Stripe.Person (stripity_stripe v2.17.2) View Source

Work with Stripe Connect person objects.

You can:

  • Create a person
  • Retrieve a person with a specified id
  • Update a person
  • Delete a person
  • List all persons on an account

Stripe API reference: https://stripe.com/docs/api/persons

Link to this section Summary

Functions

Create a person.

List all persons on an account.

Retrieve a person with a specified id.

Link to this section Types

Specs

create_params() :: %{
  optional(:account) => String.t(),
  optional(:address) => Stripe.Types.address(),
  optional(:address_kana) => Stripe.Types.japan_address(),
  optional(:address_kanji) => Stripe.Types.japan_address(),
  optional(:dob) => Stripe.Types.dob(),
  optional(:email) => String.t(),
  optional(:first_name) => String.t(),
  optional(:first_name_kana) => String.t(),
  optional(:first_name_kanji) => String.t(),
  optional(:gender) => String.t(),
  optional(:id_number) => String.t(),
  optional(:last_name) => String.t(),
  optional(:last_name_kana) => String.t(),
  optional(:last_name_kanji) => String.t(),
  optional(:maiden_name) => String.t(),
  optional(:metadata) => Stripe.Types.metadata(),
  optional(:person_token) => String.t(),
  optional(:phone) => String.t(),
  optional(:relationship) => relationship(),
  optional(:ssn_last_4) => String.t(),
  optional(:verification) => verification()
}

Specs

relationship() :: %{
  representative: boolean() | nil,
  director: boolean() | nil,
  owner: boolean() | nil,
  percent_ownership: float() | nil,
  title: String.t() | nil
}

Specs

requirements() :: %{
  currently_due: Stripe.List.t(String.t()) | nil,
  eventually_due: Stripe.List.t(String.t()) | nil,
  past_due: Stripe.List.t(String.t()) | nil
}

Specs

t() :: %Stripe.Person{
  account: Stripe.id(),
  address: Stripe.Types.address() | nil,
  address_kana: Stripe.Types.japan_address() | nil,
  address_kanji: Stripe.Types.japan_address() | nil,
  created: Stripe.timestamp() | nil,
  deleted: boolean() | nil,
  dob: Stripe.Types.dob() | nil,
  email: String.t() | nil,
  first_name: String.t() | nil,
  first_name_kana: String.t() | nil,
  first_name_kanji: String.t() | nil,
  gender: String.t() | nil,
  id: Stripe.id(),
  id_number_provided: boolean(),
  last_name: String.t() | nil,
  last_name_kana: String.t() | nil,
  last_name_kanji: String.t() | nil,
  maiden_name: String.t() | nil,
  metadata: Stripe.Types.metadata(),
  nationality: String.t(),
  object: String.t(),
  phone: String.t() | nil,
  relationship: relationship() | nil,
  requirements: requirements() | nil,
  ssn_last_4_provided: boolean(),
  verification: verification() | nil
}

Specs

update_params() :: %{
  optional(:account) => String.t(),
  optional(:address) => Stripe.Types.address(),
  optional(:address_kana) => Stripe.Types.japan_address(),
  optional(:address_kanji) => Stripe.Types.japan_address(),
  optional(:dob) => Stripe.Types.dob(),
  optional(:email) => String.t(),
  optional(:first_name) => String.t(),
  optional(:first_name_kana) => String.t(),
  optional(:first_name_kanji) => String.t(),
  optional(:gender) => String.t(),
  optional(:id_number) => String.t(),
  optional(:last_name) => String.t(),
  optional(:last_name_kana) => String.t(),
  optional(:last_name_kanji) => String.t(),
  optional(:maiden_name) => String.t(),
  optional(:metadata) => Stripe.Types.metadata(),
  optional(:person_token) => String.t(),
  optional(:phone) => String.t(),
  optional(:relationship) => relationship(),
  optional(:ssn_last_4) => String.t(),
  optional(:verification) => verification()
}

Specs

verification() :: %{
  details: String.t() | nil,
  details_code: String.t() | nil,
  document: verification_document() | nil,
  status: String.t() | nil
}
Link to this type

verification_document()

View Source

Specs

verification_document() :: %{
  back: String.t() | nil,
  details: String.t() | nil,
  details_code: String.t() | nil,
  front: String.t() | nil
}

Link to this section Functions

Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params: create_params()

Create a person.

Link to this function

delete(id, params, opts \\ [])

View Source

Specs

delete(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{account: Stripe.id()}

Delete a person.

Link to this function

list(params, opts \\ [])

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       :account => Stripe.id(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:starting_after) => t() | Stripe.id()
     }

List all persons on an account.

Link to this function

retrieve(id, params, opts \\ [])

View Source

Retrieve a person with a specified id.

Link to this function

update(id, params, opts \\ [])

View Source

Specs

update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: update_params()

Update a person.

Takes the id and a map of changes.