icache

package
v0.0.0-...-4eb781d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 14 Imported by: 0

README

icache

Experian's "iCache" system provides access to more personal financial data than any one company should hold(!), which is very good for risk rating etc.

Authenticated using their "WASP" system - see the wasp package for that.

Usage

Base URLs:

Sources

Based on the WSDL at https://dfi.uk.experian.com/DelphiForQuotations/InteractiveWS.asmx?wsdl and several resources which Experian can provide:

  • a big spreadsheet called "iCache Data Definition Document" (we have v7.4)
  • a doc called "iCache Quick Start Guide" (we have v1.7)
  • an example SOAP request & response (see the tests, which are roughly equivalent)

Notes

Request marshalling currently only includes the basic structures Cuvva needs.

Response unmarshalling currently excludes:

  • legacy/deprecated fields (e.g. Mosaic)
  • defaulted/unavailable fields (e.g. CIFAS)
  • future functionality fields (e.g. director)
  • fields which repeat back inputs without anything particularly useful added
  • support for generic extensions (hosted data & spare fields)
  • fields which Cuvva can't currently use (e.g. vehicle, CUE, commercial)

We'd consider accepting PRs adding support for most use-cases, aside from legacy/deprecated and consistently defaulted/unavailable fields.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized = errors.New("experian icache: unauthorized")
	ErrForbidden    = errors.New("experian icache: forbidden")
)

Functions

This section is empty.

Types

type AdditDelphiBlocks

type AdditDelphiBlocks struct {
	Utilisationblock Map
}

type Applicant

type Applicant struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	ApplicantIdentifier int

	Name ApplicantName

	DateOfBirth Date
}

type ApplicantName

type ApplicantName struct {
	Forename   string
	MiddleName *string
	Surname    string
}

type Application

type Application struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	ApplicationType string
}

type Bool

type Bool bool

func (Bool) MarshalXML

func (b Bool) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Bool) UnmarshalXML

func (b *Bool) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BureauMatchKey

type BureauMatchKey struct {
	MatchCategory string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL string) (*Client, error)

func (*Client) GetConsumerData

func (c *Client) GetConsumerData(ctx context.Context, token string, input *Input) (*Output, error)

type ConsumerSummary

type ConsumerSummary struct {
	PremiumValueData ConsumerSummaryPremiumValueData
	Summary          ConsumerSummarySummary
}

type ConsumerSummaryPremiumValueData

type ConsumerSummaryPremiumValueData struct {
	Scoring           Map
	AddrLink          Map
	AgeDOB            Map `xml:"AgeDoB"`
	CII               Map
	Mosaic            Map
	AdditDelphiBlocks AdditDelphiBlocks
}

type ConsumerSummarySummary

type ConsumerSummarySummary struct {
	ElectoralRoll Map
	PublicInfo    Map
	CAIS          Map
	CAPS          Map
}

type Control

type Control struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	ExperianReference   *string
	ClientAccountNumber *string
	ClientBranchNumber  *string
	UserIdentity        *string
}

type Date

type Date struct {
	Year  int        `xml:"CCYY"`
	Month time.Month `xml:"MM"`
	Day   int        `xml:"DD"`
}

func NewDate

func NewDate(t time.Time) Date

func (Date) String

func (d Date) String() string

func (Date) Time

func (d Date) Time(loc *time.Location) time.Time

type Input

type Input struct {
	XMLName xml.Name `json:"-" xml:"http://schema.uk.experian.com/experian/cems/msgs/v1.1/ConsumerData Input"`

	Control        Control
	Application    Application
	ThirdPartyData ThirdPartyData

	Applicant       Applicant
	LocationDetails LocationDetails
	Residency       Residency
}

type InputRoot

type InputRoot struct {
	XMLName xml.Name `json:"-" xml:"http://schemas.microsoft.com/BizTalk/2003/Any Root"`

	Input Input
}

type InteractiveRequest

type InteractiveRequest struct {
	XMLName xml.Name `json:"-" xml:"http://www.uk.experian.com/experian/wbsv/peinteractive/v100 Interactive"`

	Root InputRoot
}

type InteractiveResponse

type InteractiveResponse struct {
	XMLName xml.Name `json:"-" xml:"http://www.uk.experian.com/experian/wbsv/peinteractive/v100 InteractiveResponse"`

	Root OutputRoot
}

type LocationDetails

type LocationDetails struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	LocationIdentifier int

	UKLocation LocationDetailsUKLocation
}

type LocationDetailsUKLocation

type LocationDetailsUKLocation struct {
	Flat            *string
	HouseName       *string
	HouseNumber     *string
	Street          *string
	Street2         *string
	District        *string
	District2       *string
	PostTown        *string
	County          *string
	Postcode        *string
	POBox           *string
	Country         *string
	SharedLetterbox *string
}

type Map

type Map map[string]string

func (Map) MarshalXML

func (m Map) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Map) UnmarshalXML

func (m *Map) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type OneShotFailure

type OneShotFailure struct {
	FailedLocation int
	Reason         string
}

type Output

type Output struct {
	XMLName xml.Name `json:"-" xml:"http://schema.uk.experian.com/experian/cems/msgs/v1.1/ConsumerData Output"`

	Control *Control

	OneShotFailure *OneShotFailure
	Error          *ServiceError

	BureauMatchKey *BureauMatchKey

	Residency *Residency

	ConsumerSummary *ConsumerSummary
}

type OutputRoot

type OutputRoot struct {
	XMLName xml.Name `json:"-" xml:"http://schemas.microsoft.com/BizTalk/2003/Any OutputRoot"`

	Output Output
}

type Residency

type Residency struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	ApplicantIdentifier int
	LocationIdentifier  int

	LocationCode string

	ResidencyDateFrom Date
	ResidencyDateTo   Date
}

type ServiceError

type ServiceError struct {
	ErrorCode string
	Message   string
	Severity  int
}

type ThirdPartyData

type ThirdPartyData struct {
	XMLNS string `json:"-" xml:"xmlns,attr"`

	OptOut          Bool
	TransientAssocs Bool
	HHOAllowed      Bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL