pinxs v3.0.0 PINXS.Customers.Customer View Source

Provides functions for working with customers

Required Fields

When creating a Customer, the following fields must be provided

  • email

and one of

  • card
  • card_token

Link to this section Summary

Functions

Adds a card to a customer

Creates a customer

Deletes a customer

Deletes a card belonging to a customer

Retreives a customer

Retrieves a paginated list of customers

Retreives a specific page of customers

Retrieves all cards for the given customer

Retrieves all charges for customer

Link to this section Types

Specs

t() :: %PINXS.Customers.Customer{
  card: nil | PINXS.Cards.Card.t(),
  card_token: nil | String.t(),
  email: String.t(),
  token: nil | String.t()
}

Link to this section Functions

Link to this function

add_card(customer, card, config)

View Source

Adds a card to a customer

Link to this function

create(customer, config)

View Source

Creates a customer

Link to this function

delete(customer, config)

View Source

Deletes a customer

Link to this function

delete_card(customer, card_token, config)

View Source

Deletes a card belonging to a customer

Retreives a customer

Retrieves a paginated list of customers

Retreives a specific page of customers

Link to this function

get_cards(customer, config)

View Source

Retrieves all cards for the given customer

Link to this function

get_charges(customer, config)

View Source

Retrieves all charges for customer

Link to this function

update(customer, params, config)

View Source

Updates a customer