View Source Stripe.Terminal.Location (Striped v0.2.0)

A Location represents a grouping of readers.

Related guide: Fleet Management.

Link to this section Summary

Types

The full address of the location.

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.

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.

Link to this section Types

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

The full address of the location.

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

The terminal.location type.

  • address
  • 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.
  • 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.

Link to this section Functions

Link to this function

create(client, params \\ %{})

View Source
@spec create(
  client :: term(),
  params :: %{
    :address => address(),
    optional(:configuration_overrides) => :string,
    :display_name => :string,
    optional(:expand) => [:string],
    optional(:metadata) => :object | :string
  }
) :: {: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`

Link to this function

delete(client, location)

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

Deletes a Location object.

Details

  • Method: delete
  • Path: /v1/terminal/locations/{location}
Link to this function

list(client, params \\ %{})

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

Returns a list of Location objects.

Details

  • Method: get
  • Path: /v1/terminal/locations
Link to this function

retrieve(client, location, params \\ %{})

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

Retrieves a Location object.

Details

  • Method: get
  • Path: /v1/terminal/locations/{location}
Link to this function

update(client, location, params \\ %{})

View Source
@spec update(
  client :: term(),
  location :: binary(),
  params :: %{
    optional(:address) => address(),
    optional(:configuration_overrides) => :string,
    optional(:display_name) => :string,
    optional(:expand) => [:string],
    optional(:metadata) => :object | :string
  }
) ::
  {: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}