abc

package
v0.0.0-...-ff628f3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client

func (*Client) Create

func (*Client) CreateWithContext

func (c *Client) CreateWithContext(ctx context.Context, request CreateInstrumentRequest) (*CreateInstrumentResponse, error)

func (*Client) Delete

func (c *Client) Delete(instrumentId string) (*common.MetadataResponse, error)

func (*Client) DeleteWithContext

func (c *Client) DeleteWithContext(ctx context.Context, instrumentId string) (*common.MetadataResponse, error)

func (*Client) Get

func (c *Client) Get(instrumentId string) (*GetInstrumentResponse, error)

func (*Client) GetWithContext

func (c *Client) GetWithContext(ctx context.Context, instrumentId string) (*GetInstrumentResponse, error)

func (*Client) Update

func (c *Client) Update(instrumentId string, request UpdateInstrumentRequest) (*UpdateInstrumentResponse, error)

func (*Client) UpdateWithContext

func (c *Client) UpdateWithContext(ctx context.Context, instrumentId string, request UpdateInstrumentRequest) (*UpdateInstrumentResponse, error)

type CreateInstrumentRequest

type CreateInstrumentRequest struct {
	Type          common.InstrumentType      `json:"type" binding:"required"`
	Token         string                     `json:"token,omitempty"`
	AccountHolder *InstrumentAccountHolder   `json:"account_holder,omitempty"`
	Customer      *InstrumentCustomerRequest `json:"customer,omitempty"`
}

type CreateInstrumentResponse

type CreateInstrumentResponse struct {
	HttpMetadata  common.HttpMetadata
	Type          common.InstrumentType    `json:"type,omitempty"`
	Id            string                   `json:"id,omitempty"`
	Fingerprint   string                   `json:"fingerprint,omitempty"`
	ExpiryMonth   int                      `json:"expiry_month,omitempty"`
	ExpiryYear    int                      `json:"expiry_year,omitempty"`
	Scheme        string                   `json:"scheme,omitempty"`
	Last4         string                   `json:"last4,omitempty"`
	Bin           string                   `json:"bin,omitempty"`
	CardType      common.CardType          `json:"card_type,omitempty"`
	CardCategory  common.CardCategory      `json:"card_category,omitempty"`
	Issuer        string                   `json:"issuer,omitempty"`
	IssuerCountry common.Country           `json:"issuer_country,omitempty"`
	ProductId     string                   `json:"product_id,omitempty"`
	ProductType   string                   `json:"product_type,omitempty"`
	Customer      *common.CustomerResponse `json:"customer,omitempty"`
}

type GetInstrumentResponse

type GetInstrumentResponse struct {
	HttpMetadata  common.HttpMetadata
	Type          common.InstrumentType                   `json:"type,omitempty"`
	Id            string                                  `json:"id,omitempty"`
	Fingerprint   string                                  `json:"fingerprint,omitempty"`
	ExpiryMonth   int                                     `json:"expiry_month,omitempty"`
	ExpiryYear    int                                     `json:"expiry_year,omitempty"`
	Name          string                                  `json:"name,omitempty"`
	Scheme        string                                  `json:"scheme,omitempty"`
	Last4         string                                  `json:"last4,omitempty"`
	Bin           string                                  `json:"bin,omitempty"`
	CardType      common.CardType                         `json:"card_type,omitempty"`
	CardCategory  common.CardCategory                     `json:"card_category,omitempty"`
	Issuer        string                                  `json:"issuer,omitempty"`
	IssuerCountry common.Country                          `json:"issuer_country,omitempty"`
	ProductId     string                                  `json:"product_id,omitempty"`
	ProductType   string                                  `json:"product_type,omitempty"`
	AccountHolder *InstrumentAccountHolder                `json:"account_holder,omitempty"`
	Customer      *instruments.InstrumentCustomerResponse `json:"customer,omitempty"`
}

type InstrumentAccountHolder

type InstrumentAccountHolder struct {
	BillingAddress *common.Address `json:"billing_address,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
}

type InstrumentCustomerRequest

type InstrumentCustomerRequest struct {
	Id        string        `json:"id,omitempty"`
	Email     string        `json:"email,omitempty"`
	Name      string        `json:"name,omitempty"`
	Phone     *common.Phone `json:"phone,omitempty"`
	IsDefault bool          `json:"default,omitempty"`
}

type InstrumentCustomerUpdateRequest

type InstrumentCustomerUpdateRequest struct {
	Id        string `json:"id,omitempty"`
	IsDefault bool   `json:"default,omitempty"`
}

type UpdateInstrumentRequest

type UpdateInstrumentRequest struct {
	ExpiryMonth   int                              `json:"expiry_month,omitempty"`
	ExpiryYear    int                              `json:"expiry_year,omitempty"`
	Name          string                           `json:"name,omitempty"`
	AccountHolder *InstrumentAccountHolder         `json:"account_holder,omitempty"`
	Customer      *InstrumentCustomerUpdateRequest `json:"customer,omitempty"`
}

type UpdateInstrumentResponse

type UpdateInstrumentResponse struct {
	HttpMetadata common.HttpMetadata
	Type         common.InstrumentType `json:"type" binding:"required"`
	Fingerprint  string                `json:"fingerprint,omitempty"`
}

Jump to

Keyboard shortcuts

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