Stripe.Terminal.Location (stripity_stripe v3.3.2)

View Source

A Location represents a grouping of readers.

Related guide: Fleet management

Summary

Types

The full address of the location.

The Kana variation of the full address of the location (Japan only).

The Kanji variation of the full address of the location (Japan only).

t()

The terminal.location type.

Functions

Creates a new Location object.For further details, including which address fields are required in each country, see the Manage locations guide.

#### Details * Method: `post` * Path: `/v1/terminal/locations`

Deletes a Location object.

Returns a list of Location objects.

Retrieves a Location object.

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Types

address()

@type address() :: %{
  optional(:city) => binary(),
  optional(:country) => binary(),
  optional(:line1) => binary(),
  optional(:line2) => binary(),
  optional(:postal_code) => binary(),
  optional(:state) => binary()
}

The full address of the location.

address_kana()

@type address_kana() :: %{
  optional(:city) => binary(),
  optional(:country) => binary(),
  optional(:line1) => binary(),
  optional(:line2) => binary(),
  optional(:postal_code) => binary(),
  optional(:state) => binary(),
  optional(:town) => binary()
}

The Kana variation of the full address of the location (Japan only).

address_kanji()

@type address_kanji() :: %{
  optional(:city) => binary(),
  optional(:country) => binary(),
  optional(:line1) => binary(),
  optional(:line2) => binary(),
  optional(:postal_code) => binary(),
  optional(:state) => binary(),
  optional(:town) => binary()
}

The Kanji variation of the full address of the location (Japan only).

t()

@type t() :: %Stripe.Terminal.Location{
  address: term(),
  address_kana: term(),
  address_kanji: term(),
  configuration_overrides: binary(),
  display_name: binary(),
  display_name_kana: binary(),
  display_name_kanji: binary(),
  id: binary(),
  livemode: boolean(),
  metadata: term(),
  object: binary(),
  phone: binary()
}

The terminal.location type.

  • address
  • address_kana
  • address_kanji
  • configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
  • display_name The display name of the location.
  • display_name_kana The Kana variation of the display name of the location.
  • display_name_kanji The Kanji variation of the display name of the location.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • object String representing the object's type. Objects of the same type share the same value.
  • phone The phone number of the location.

Functions

create(params \\ %{}, opts \\ [])

@spec create(
  params :: %{
    optional(:address) => address(),
    optional(:address_kana) => address_kana(),
    optional(:address_kanji) => address_kanji(),
    optional(:configuration_overrides) => binary(),
    optional(:display_name) => binary(),
    optional(:display_name_kana) => binary(),
    optional(:display_name_kanji) => binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary(),
    optional(:phone) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Creates a new Location object.For further details, including which address fields are required in each country, see the Manage locations guide.

#### Details * Method: `post` * Path: `/v1/terminal/locations`

delete(location, opts \\ [])

@spec delete(location :: binary(), opts :: Keyword.t()) ::
  {:ok, Stripe.DeletedTerminal.Location.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

Deletes a Location object.

Details

  • Method: delete
  • Path: /v1/terminal/locations/{location}

list(params \\ %{}, opts \\ [])

@spec list(
  params :: %{
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of Location objects.

Details

  • Method: get
  • Path: /v1/terminal/locations

retrieve(location, params \\ %{}, opts \\ [])

@spec retrieve(
  location :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) ::
  {:ok, t() | Stripe.DeletedTerminal.Location.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

Retrieves a Location object.

Details

  • Method: get
  • Path: /v1/terminal/locations/{location}

update(location, params \\ %{}, opts \\ [])

@spec update(
  location :: binary(),
  params :: %{
    optional(:address) => address(),
    optional(:address_kana) => address_kana(),
    optional(:address_kanji) => address_kanji(),
    optional(:configuration_overrides) => binary() | binary(),
    optional(:display_name) => binary() | binary(),
    optional(:display_name_kana) => binary() | binary(),
    optional(:display_name_kanji) => binary() | binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary(),
    optional(:phone) => binary() | binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, t() | Stripe.DeletedTerminal.Location.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Details

  • Method: post
  • Path: /v1/terminal/locations/{location}