nas

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

func NewCreateBankAccountInstrumentRequest

func NewCreateBankAccountInstrumentRequest() *createBankAccountInstrumentRequest

func NewCreateTokenInstrumentRequest

func NewCreateTokenInstrumentRequest() *createTokenInstrumentRequest

func NewUpdateBankAccountInstrumentRequest

func NewUpdateBankAccountInstrumentRequest() *updateBankAccountInstrumentRequest

func NewUpdateCardInstrumentRequest

func NewUpdateCardInstrumentRequest() *updateCardInstrumentRequest

func NewUpdateTokenInstrumentRequest

func NewUpdateTokenInstrumentRequest() *updateTokenInstrumentRequest

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) Delete

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

func (*Client) Get

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

func (*Client) GetBankAccountFieldFormatting

func (c *Client) GetBankAccountFieldFormatting(
	country string,
	currency string,
	query QueryBankAccountFormatting,
) (*GetBankAccountFieldFormattingResponse, error)

func (*Client) Update

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

type CreateBankAccountInstrumentResponse

type CreateBankAccountInstrumentResponse struct {
	Type common.InstrumentType `json:"type" binding:"required"`
	// common
	Id               string                   `json:"id,omitempty"`
	Fingerprint      string                   `json:"fingerprint,omitempty"`
	CustomerResponse *common.CustomerResponse `json:"customer,omitempty"`
	// specific
	BankDetails   *common.BankDetails `json:"bank,omitempty"`
	SwiftBic      string              `json:"swift_bic,omitempty"`
	AccountNumber string              `json:"account_number,omitempty"`
	BankCode      string              `json:"bank_code,omitempty"`
	Iban          string              `json:"iban,omitempty"`
}

type CreateCustomerInstrumentRequest

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

type CreateInstrumentRequest

type CreateInstrumentRequest interface{}

type CreateInstrumentResponse

type CreateInstrumentResponse struct {
	HttpMetadata                        common.HttpMetadata
	CreateBankAccountInstrumentResponse *CreateBankAccountInstrumentResponse
	CreateTokenInstrumentResponse       *CreateTokenInstrumentResponse
	AlternativeResponse                 *common.AlternativeResponse
}

func (*CreateInstrumentResponse) UnmarshalJSON

func (s *CreateInstrumentResponse) UnmarshalJSON(data []byte) error

type CreateTokenInstrumentResponse

type CreateTokenInstrumentResponse struct {
	Type common.InstrumentType `json:"type" binding:"required"`
	// common
	Id               string                   `json:"id,omitempty"`
	Fingerprint      string                   `json:"fingerprint,omitempty"`
	CustomerResponse *common.CustomerResponse `json:"customer,omitempty"`
	// specific
	ExpiryMonth   int                 `json:"expiry_month,omitempty"`
	ExpiryYear    int                 `json:"expiry_year,omitempty"`
	Scheme        string              `json:"scheme,omitempty"`
	SchemeLocal   string              `json:"scheme_local,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"`
}

type GetBankAccountFieldFormattingResponse

type GetBankAccountFieldFormattingResponse struct {
	HttpMetadata common.HttpMetadata
	Sections     []InstrumentSection `json:"sections,omitempty"`
}

type GetBankAccountInstrumentResponse

type GetBankAccountInstrumentResponse struct {
	Type          common.InstrumentType                   `json:"type" binding:"required"`
	Id            string                                  `json:"id,omitempty"`
	Fingerprint   string                                  `json:"fingerprint,omitempty"`
	Customer      *instruments.InstrumentCustomerResponse `json:"customer,omitempty"`
	AccountHolder *common.AccountHolder                   `json:"account_holder,omitempty"`

	AccountType   common.AccountType  `json:"account_type,omitempty"`
	AccountNumber string              `json:"account_number,omitempty"`
	BankCode      string              `json:"bank_code,omitempty"`
	Iban          string              `json:"iban,omitempty"`
	Bban          string              `json:"bban,omitempty"`
	SwiftBic      string              `json:"swift_bic,omitempty"`
	Currency      common.Currency     `json:"currency,omitempty"`
	Country       common.Country      `json:"country,omitempty"`
	BankDetails   *common.BankDetails `json:"bank,omitempty"`
}

type GetCardInstrumentResponse

type GetCardInstrumentResponse struct {
	Type          common.InstrumentType                   `json:"type" binding:"required"`
	Id            string                                  `json:"id,omitempty"`
	Fingerprint   string                                  `json:"fingerprint,omitempty"`
	Customer      *instruments.InstrumentCustomerResponse `json:"customer,omitempty"`
	AccountHolder *common.AccountHolder                   `json:"account_holder,omitempty"`

	ExpiryMonth   int                 `json:"expiry_month,omitempty"`
	ExpiryYear    int                 `json:"expiry_year,omitempty"`
	Name          string              `json:"name,omitempty"`
	Scheme        string              `json:"scheme,omitempty"`
	SchemeLocal   string              `json:"scheme_local,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"`
}

type GetInstrumentResponse

type GetInstrumentResponse struct {
	HttpMetadata                     common.HttpMetadata
	GetCardInstrumentResponse        *GetCardInstrumentResponse
	GetBankAccountInstrumentResponse *GetBankAccountInstrumentResponse
	AlternativeResponse              *common.AlternativeResponse
}

func (*GetInstrumentResponse) UnmarshalJSON

func (s *GetInstrumentResponse) UnmarshalJSON(data []byte) error

type InstrumentSection

type InstrumentSection struct {
	Name   string                   `json:"name,omitempty" binding:"required"`
	Fields []InstrumentSectionField `json:"fields,omitempty"`
}

type InstrumentSectionField

type InstrumentSectionField struct {
	Id              string                                `json:"id" binding:"required"`
	Section         string                                `json:"section,omitempty"`
	Display         string                                `json:"display" binding:"required"`
	HelpText        string                                `json:"help_text,omitempty"`
	Type            string                                `json:"type" binding:"required"`
	Required        bool                                  `json:"required" binding:"required"`
	ValidationRegex string                                `json:"validation_regex,omitempty"`
	MinLength       int                                   `json:"min_length,omitempty"`
	MaxLength       int                                   `json:"max_length,omitempty"`
	AllowedOptions  []InstrumentSectionFieldAllowedOption `json:"allowed_options,omitempty"`
	Dependencies    []InstrumentSectionFieldDependencies  `json:"dependencies,omitempty"`
}

type InstrumentSectionFieldAllowedOption

type InstrumentSectionFieldAllowedOption struct {
	Id      string `json:"id,omitempty"`
	Display string `json:"display,omitempty"`
}

type InstrumentSectionFieldDependencies

type InstrumentSectionFieldDependencies struct {
	FieldId string `json:"field_id,omitempty"`
	Value   string `json:"value,omitempty"`
}

type PaymentNetwork

type PaymentNetwork string
const (
	Local   PaymentNetwork = "local"
	Sepa    PaymentNetwork = "sepa"
	Fps     PaymentNetwork = "fps"
	Ach     PaymentNetwork = "ach"
	Fedwire PaymentNetwork = "fedwire"
	Swift   PaymentNetwork = "swift"
)

type QueryBankAccountFormatting

type QueryBankAccountFormatting struct {
	AccountHolderType common.AccountHolderType `json:"account-holder-type,omitempty"`
	PaymentNetwork    PaymentNetwork           `json:"payment-network,omitempty"`
}

type UpdateBankAccountInstrumentResponse

type UpdateBankAccountInstrumentResponse struct {
	Type        common.InstrumentType `json:"type" binding:"required"`
	Id          string                `json:"id,omitempty"`
	Fingerprint string                `json:"fingerprint,omitempty"`
}

UpdateBankAccountInstrumentResponse TODO review this response struct to check if we need both

type UpdateCardInstrumentResponse

type UpdateCardInstrumentResponse struct {
	Type        common.InstrumentType `json:"type" binding:"required"`
	Id          string                `json:"id,omitempty"`
	Fingerprint string                `json:"fingerprint,omitempty"`
}

UpdateCardInstrumentResponse TODO review this response struct to check if we need both

type UpdateInstrumentRequest

type UpdateInstrumentRequest interface{}

type UpdateInstrumentResponse

type UpdateInstrumentResponse struct {
	HttpMetadata                        common.HttpMetadata
	UpdateCardInstrumentResponse        *UpdateCardInstrumentResponse
	UpdateBankAccountInstrumentResponse *UpdateBankAccountInstrumentResponse
	AlternativeResponse                 *common.AlternativeResponse
}

func (*UpdateInstrumentResponse) UnmarshalJSON

func (s *UpdateInstrumentResponse) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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