customers

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardType added in v0.13.0

type CardType = shared.CardType

Issuing card network of the payment card used for the transaction.

type Client added in v0.13.0

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

func NewClient added in v0.13.0

func NewClient(c *client.Client) *Client

func (*Client) Create added in v0.13.0

func (c *Client) Create(ctx context.Context, body Create) (*Customer, error)

Creates a new saved customer resource which you can later manipulate and save payment instruments to.

func (*Client) DeactivatePaymentInstrument added in v0.13.0

func (c *Client) DeactivatePaymentInstrument(ctx context.Context, customerID string, token string) error

Deactivates an identified card payment instrument resource for a customer.

func (*Client) Get added in v0.13.0

func (c *Client) Get(ctx context.Context, customerID string) (*Customer, error)

Retrieves an identified saved customer resource through the unique `customer_id` parameter, generated upon customer creation.

func (*Client) ListPaymentInstruments added in v0.13.0

func (c *Client) ListPaymentInstruments(ctx context.Context, customerID string) (*ListPaymentInstruments200Response, error)

Lists all payment instrument resources that are saved for an identified customer.

func (*Client) Update added in v0.13.0

func (c *Client) Update(ctx context.Context, customerID string, body Update) (*Customer, error)

Updates an identified saved customer resource's personal details.

The request only overwrites the parameters included in the request, all other parameters will remain with their initially assigned values.

type Create added in v0.12.0

type Create struct {
	// Unique ID of the customer.
	CustomerID string `json:"customer_id"`
	// Personal details for the customer.
	PersonalDetails *shared.PersonalDetails `json:"personal_details,omitempty"`
}

Create is a schema definition.

type Customer

type Customer struct {
	// Unique ID of the customer.
	CustomerID string `json:"customer_id"`
	// Personal details for the customer.
	PersonalDetails *shared.PersonalDetails `json:"personal_details,omitempty"`
}

Customer is a schema definition.

type ListPaymentInstruments200Response

type ListPaymentInstruments200Response []PaymentInstrumentResponse

ListPaymentInstruments200Response is a schema definition.

type MandateResponse added in v0.13.0

type MandateResponse = shared.MandateResponse

Created mandate

type PaymentInstrumentResponse

type PaymentInstrumentResponse struct {
	// Indicates whether the payment instrument is active and can be used for payments. To deactivate it, send a
	// `DELETE` request to the resource endpoint.
	// Read only
	// Default: true
	Active *bool `json:"active,omitempty"`
	// Details of the payment card.
	Card *PaymentInstrumentResponseCard `json:"card,omitempty"`
	// Creation date of payment instrument. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Created mandate
	Mandate *shared.MandateResponse `json:"mandate,omitempty"`
	// Unique token identifying the saved payment card for a customer.
	// Read only
	Token *string `json:"token,omitempty"`
	// Type of the payment instrument.
	Type *PaymentInstrumentResponseType `json:"type,omitempty"`
}

Payment Instrument Response

type PaymentInstrumentResponseCard

type PaymentInstrumentResponseCard struct {
	// Last 4 digits of the payment card number.
	// Read only
	// Min length: 4
	// Max length: 4
	Last4Digits *string `json:"last_4_digits,omitempty"`
	// Issuing card network of the payment card used for the transaction.
	Type *shared.CardType `json:"type,omitempty"`
}

Details of the payment card.

type PaymentInstrumentResponseType

type PaymentInstrumentResponseType string

Type of the payment instrument.

const (
	PaymentInstrumentResponseTypeCard PaymentInstrumentResponseType = "card"
)

type PersonalDetails added in v0.13.0

type PersonalDetails = shared.PersonalDetails

Personal details for the customer.

type Update added in v0.12.0

type Update struct {
	// Personal details for the customer.
	PersonalDetails *shared.PersonalDetails `json:"personal_details,omitempty"`
}

Update is a schema definition.

Jump to

Keyboard shortcuts

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