View Source StarkInfra.IssuingCard (starkinfra v0.1.0)

Groups IssuingCard related functions

Link to this section Summary

Functions

The IssuingCard struct displays the information of the cards created in your Workspace. Sensitive information will only be returned when the "expand" parameter is used, to avoid security concerns.

Same as cancel(), but it will unwrap the error tuple and raise in case of errors.

Cancel an IssuingCard entity previously created in the Stark Infra API.

Same as create(), but it will unwrap the error tuple and raise in case of errors.

Send a list of IssuingCard structs for creation in the Stark Infra API.

Same as get(), but it will unwrap the error tuple and raise in case of errors.

Receive a single IssuingCards struct previously created in the Stark Infra API by its id.

Same as page(), but it will unwrap the error tuple and raise in case of errors.

Receive a list of IssuingCards structs previously created in the Stark Infra API and the cursor to the next page.

Same as query(), but it will unwrap the error tuple and raise in case of errors.

Receive a stream of IssuingCards structs previously created in the Stark Infra API.

Same as update(), but it will unwrap the error tuple and raise in case of errors.

Update an IssuingCard by passing id.

Link to this section Types

@type t() :: %StarkInfra.IssuingCard{
  bin_id: term(),
  city: term(),
  created: term(),
  display_name: term(),
  district: term(),
  expiration: term(),
  holder_external_id: term(),
  holder_id: term(),
  holder_name: term(),
  holder_tax_id: term(),
  id: term(),
  number: term(),
  rules: term(),
  security_code: term(),
  state_code: term(),
  status: term(),
  street_line_1: term(),
  street_line_2: term(),
  tags: term(),
  type: term(),
  updated: term(),
  zip_code: term()
}

Link to this section Functions

Link to this function

%StarkInfra.IssuingCard{}

View Source (struct)

The IssuingCard struct displays the information of the cards created in your Workspace. Sensitive information will only be returned when the "expand" parameter is used, to avoid security concerns.

parameters-required

Parameters (required):

  • :holder_name [string]: card holder name. ex: "Tony Stark"
  • :holder_tax_id [string]: card holder tax ID. ex: "012.345.678-90"
  • :holder_external_id [string] card holder unique id, generated by the user to avoid duplicated holders. ex: "my-entity/123"

parameters-optional

Parameters (optional):

  • :display_name [string, default nil]: card displayed name. ex: "ANTHONY STARK"
  • :rules [list of IssuingRule, default nil]: [EXPANDABLE] list of card spending rules.
  • :bin_id [string, default nil]: BIN ID to which the card is bound. ex: "53810200"
  • :tags [list of strings]: list of strings for tagging. ex: ["travel", "food"]
  • :street_line_1 [string, default nil]: card holder main address. ex: "Av. Paulista, 200"
  • :street_line_2 [string, default nil]: card holder address complement. ex: "Apto. 123"
  • :district [string]: card holder address district / neighbourhood. ex: "Bela Vista"
  • :city [string, default nil]: card holder address city. ex: "Rio de Janeiro"
  • :state_code [string, default nil]: card holder address state. ex: "GO"
  • :zip_code [string]: card holder address zip code. ex: "01311-200"

attributes-return-only

Attributes (return-only):

  • :id [string]: unique id returned when IssuingCard is created. ex: "5656565656565656"
  • :holder_id [string]: card holder unique id. ex: "5656565656565656"
  • :type [string]: card type. ex: "virtual"
  • :status [string]: current IssuingCard status. ex: "canceled" or "active"
  • :number [string]: [EXPANDABLE] masked card number. Expand to unmask the value. ex: "123".
  • :security_code [string]: [EXPANDABLE] masked card verification value (cvv). Expand to unmask the value. ex: "123".
  • :expiration [string]: [EXPANDABLE] masked card expiration datetime. Expand to unmask the value. ex: '2020-03-10 10:30:00.000'.
  • :updated [DateTime]: latest update DateTime for the IssuingCard. ex: ~U[2020-3-10 10:30:0:0]
  • :created [DateTime]: creation datetime for the IssuingCard. ex: ~U[2020-03-10 10:30:0:0]
Link to this function

cancel!(id, options \\ [])

View Source

Same as cancel(), but it will unwrap the error tuple and raise in case of errors.

Link to this function

cancel(id, options \\ [])

View Source

Cancel an IssuingCard entity previously created in the Stark Infra API.

parameters-required

Parameters (required):

  • :id [string]: IssuingCard unique id. ex: "5656565656565656"

options

Options:

  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • canceled IssuingCard struct
Link to this function

create!(cards, options \\ [])

View Source
@spec create!([t() | map()],
  expand: [binary()] | nil,
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: any()

Same as create(), but it will unwrap the error tuple and raise in case of errors.

Link to this function

create(cards, options \\ [])

View Source
@spec create([t() | map()],
  expand: [binary()] | nil,
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: {:ok, [t()]} | {:error, [StarkInfra.Error.t()]}

Send a list of IssuingCard structs for creation in the Stark Infra API.

parameters-required

Parameters (required):

  • :cards [list of IssuingCard structs]: list of IssuingCard structs to be created in the API

options

Options:

  • :expand [list of strings, default []]: fields to expand information. ex: ["rules", "security_code", "number", "expiration"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • list of IssuingCard structs with updated attributes

Same as get(), but it will unwrap the error tuple and raise in case of errors.

Receive a single IssuingCards struct previously created in the Stark Infra API by its id.

parameters-required

Parameters (required):

  • :id [string]: struct unique id. ex: "5656565656565656"

options

Options:

  • :expand [list of strings, default nil]: fields to expand information. ex: ["rules"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • IssuingCards struct with updated attributes
@spec page!(
  status: binary(),
  types: [binary()],
  holder_ids: [binary()],
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  tags: [binary()],
  ids: [binary()],
  limit: integer(),
  cursor: binary(),
  expand: [binary()],
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: any()

Same as page(), but it will unwrap the error tuple and raise in case of errors.

@spec page(
  status: binary(),
  types: [binary()],
  holder_ids: [binary()],
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  tags: [binary()],
  ids: [binary()],
  limit: integer(),
  cursor: binary(),
  expand: [binary()],
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: {:ok, {binary(), [t()]}} | {:error, [StarkInfra.Error.t()]}

Receive a list of IssuingCards structs previously created in the Stark Infra API and the cursor to the next page.

options

Options:

  • :status [string, default nil]: filter for status of retrieved structs. ex: "paid" or "registered"
  • :types [list of strings, default nil]: card type. ex: ["virtual"]
  • :holder_ids [list of strings, default nil]: card holder IDs. ex: ["5656565656565656", "4545454545454545"]
  • :after [Date or string, default nil]: date filter for structs created only after specified date. ex: ~D[2020-03-25]
  • :before [Date or string, default nil]: date filter for structs created only before specified date. ex: ~D[2020-03-25]
  • :tags [list of strings, default nil]: tags to filter retrieved structs. ex: ["tony", "stark"]
  • :ids [list of strings, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
  • :limit [integer, default 100]: maximum number of structs to be retrieved. Unlimited if nil. ex: 35
  • :cursor [string, default nil]: cursor returned on the previous page function call
  • :expand [list of strings, default []]: fields to expand information. ex: ["rules", "security_code", "number", "expiration"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • list of IssuingCards structs with updated attributes
  • cursor to retrieve the next page of IssuingCards structs
@spec query!(
  status: binary(),
  types: [binary()],
  holder_ids: [binary()],
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  tags: [binary()],
  ids: [binary()],
  limit: integer(),
  expand: [binary()],
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: any()

Same as query(), but it will unwrap the error tuple and raise in case of errors.

@spec query(
  status: binary(),
  types: [binary()],
  holder_ids: [binary()],
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  tags: [binary()],
  ids: [binary()],
  limit: integer(),
  expand: [binary()],
  user: StarkInfra.User.Organization.t() | StarkInfra.User.Project.t() | nil
) :: {:ok, [t()]} | {:error, [StarkInfra.Error.t()]}

Receive a stream of IssuingCards structs previously created in the Stark Infra API.

options

Options:

  • :status [string, default nil]: filter for status of retrieved structs. ex: "paid" or "registered"
  • :types [list of strings, default nil]: card type. ex: ["virtual"]
  • :holder_ids [list of strings]: card holder IDs. ex: ["5656565656565656", "4545454545454545"]
  • :after [Date or string, default nil]: date filter for structs created only after specified date. ex: ~D[2020-03-25]
  • :before [Date or string, default nil]: date filter for structs created only before specified date. ex: ~D[2020-03-25]
  • :tags [list of strings, default nil]: tags to filter retrieved structs. ex: ["tony", "stark"]
  • :ids [list of strings, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
  • :limit [integer, default nil]: maximum number of structs to be retrieved. Unlimited if nil. ex: 35
  • :expand [list of strings, default []]: fields to expand information. ex: ["rules", "security_code", "number", "expiration"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • stream of IssuingCards structs with updated attributes
Link to this function

update!(id, parameters \\ [])

View Source

Same as update(), but it will unwrap the error tuple and raise in case of errors.

Link to this function

update(id, parameters \\ [])

View Source

Update an IssuingCard by passing id.

parameters-required

Parameters (required):

  • :id [string]: IssuingCard id. ex: '5656565656565656'

parameters-optional

Parameters (Optional):

  • :status [string]: You may block the IssuingCard by passing 'blocked' in the status
  • :display_name [string, default nil]: card displayed name
  • :rules [list of dictionaries, default nil]: list of dictionaries with "amount": int, "currencyCode": string, "id": string, "interval": string, "name": string pairs.
  • :tags [list of strings, default nil]: list of strings for tagging
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • target IssuingCard with updated attributes