sources

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 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 ACH

type ACH struct {
	Type           string          `json:"type" binding:"required"`
	Reference      string          `json:"reference,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
	Customer       *Customer       `json:"customer,omitempty"`
	BillingAddress *common.Address `json:"billing_address" binding:"required"`
	SourceData     *ACHSourceData  `json:"source_data,omitempty"`
}

ACH -

type ACHSourceData

type ACHSourceData struct {
	AccountType       string `json:"account_type,omitempty"`
	AccountNumber     string `json:"account_number,omitempty"`
	RoutingNumber     string `json:"routing_number,omitempty"`
	AccountHolderName string `json:"account_holder_name,omitempty"`
	BillingDescriptor string `json:"billing_descriptor,omitempty"`
	CompanyName       string `json:"company_name,omitempty"`
}

ACHSourceData -

type Client

type Client struct {
	API checkout.HTTPClient
}

Client ...

func NewClient

func NewClient(config checkout.Config) *Client

NewClient ...

func (*Client) AddPaymentSource

func (c *Client) AddPaymentSource(request *Request) (*Response, error)

AddPaymentSource -

type Customer

type Customer struct {
	ID    string `json:"id,omitempty"`
	Email string `json:"email,omitempty"`
	Name  string `json:"name,omitempty"`
}

Customer -

type Request

type Request struct {
	*SEPA
	*ACH
}

Request -

type Response

type Response struct {
	StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
	Source         *Source                  `json:"source,omitempty"`
}

Response -

type ResponseData

type ResponseData struct {
	MandateReference string `json:"mandate_reference,omitempty"`
}

ResponseData -

type SEPA

type SEPA struct {
	Type           string          `json:"type" binding:"required"`
	Reference      string          `json:"reference,omitempty"`
	Phone          *common.Phone   `json:"phone,omitempty"`
	Customer       *Customer       `json:"customer,omitempty"`
	BillingAddress *common.Address `json:"billing_address" binding:"required"`
	SourceData     *SEPASourceData `json:"source_data,omitempty"`
}

SEPA -

type SEPASourceData

type SEPASourceData struct {
	FirstName         string `json:"first_name,omitempty"`
	LastName          string `json:"last_name,omitempty"`
	AccountIBAN       string `json:"account_iban,omitempty"`
	BIC               string `json:"bic,omitempty"`
	BillingDescriptor string `json:"billing_descriptor,omitempty"`
	MandateType       string `json:"mandate_type,omitempty"`
}

SEPASourceData -

type Source

type Source struct {
	ID           string                 `json:"id,omitempty"`
	Type         string                 `json:"type,omitempty"`
	ResponseCode string                 `json:"response_code,omitempty"`
	Customer     *Customer              `json:"response_data,omitempty"`
	ResponseData *ResponseData          `json:"uploaded_on,omitempty"`
	Links        map[string]common.Link `json:"_links"`
}

Source -

Jump to

Keyboard shortcuts

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