Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Enrichment
}
func NewClient ¶
func NewClient(opt *ClientConfig) Client
NewClient will accept ClientConfig struct where APIKey is defined Client is required to access Enrichment Services through SDK
type ClientConfig ¶
type ClientConfig struct {
// APIKey can be obtained from client dashboard located at: https://xyo.financial/dashboard
APIKey string
// contains filtered or unexported fields
}
ClientConfig should be used to for a Client creation via NewClient method
type EnrichTransactionCollectionResponse ¶
type EnrichTransactionCollectionResponse struct {
// ID is a work ID for an enrichment request
ID string `field:"required" json:"id"`
// Link is a downloadable tar.gz Compressed file
Link string `field:"required" json:"link"`
}
EnrichTransactionCollectionResponse is a result of bulk enrichment
type Enrichment ¶
type Enrichment interface {
EnrichTransaction(enrichmentReq *EnrichmentRequest) (*EnrichmentResponse, error)
EnrichTransactionCollection(enrichmentReq []*EnrichmentRequest) (*EnrichTransactionCollectionResponse, error)
EnrichTransactionCollectionStatus(ID string) (EnrichmentCollectionStatus, error)
}
type EnrichmentCollectionStatus ¶
type EnrichmentCollectionStatus string
EnrichmentCollectionStatus represents the status of EnrichTransactionCollectionResponse Currently there are three possible associated enum values for the status
const ( EnrichmentCollectionStatusReady EnrichmentCollectionStatus = "READY" EnrichmentCollectionStatusFailed EnrichmentCollectionStatus = "FAILED" EnrichmentCollectionStatusPending EnrichmentCollectionStatus = "PENDING" )
type EnrichmentCollectionStatusResponse ¶ added in v0.3.0
type EnrichmentCollectionStatusResponse struct {
// Status could be READY, PENDING, FAILED
Status EnrichmentCollectionStatus `field:"required" json:"status"`
}
EnrichmentCollectionStatusResponse provides a status of bulk enrichment
type EnrichmentRequest ¶
type EnrichmentRequest struct {
// Content is a maximum of 128 characters long payment description
Content string `field:"required" json:"content"`
// CountryCode ISO 3166-1 alpha-2 (Two characters format)
CountryCode string `field:"required" json:"countryCode"`
}
EnrichmentRequest is a request data structure used for single and collection enrichment
type EnrichmentResponse ¶
type EnrichmentResponse struct {
// Merchant is a name of merchant
Merchant string `field:"required" json:"merchant"`
// Description A brief description about the merchant
Description string `field:"required" json:"description"`
// Categories any type of categories fitting the description of the Merchant
Categories []string `field:"required" json:"categories"`
// Logo is base64 encoded png or jpeg representing the logo of Merchant
Logo string `field:"required" json:"logo"`
// Location describes the country, city. This is an optional field that could be null
Location string `field:"optional" json:"location"`
// Address describes exact address of purchase. This is an optional field that could be null
Address string `field:"optional" json:"address"`
}
EnrichmentResponse is a result of payment transaction enrichment
