View Source Stripe.Radar.ValueList (stripity_stripe v3.2.0)

Value lists allow you to group values together which can then be referenced in rules.

Related guide: Default Stripe lists

Summary

Types

t()

The radar.value_list type.

Functions

Creates a new ValueList object, which can then be referenced in rules.

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Retrieves a ValueList object.

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type t() :: %Stripe.Radar.ValueList{
  alias: binary(),
  created: integer(),
  created_by: binary(),
  id: binary(),
  item_type: binary(),
  list_items: term(),
  livemode: boolean(),
  metadata: term(),
  name: binary(),
  object: binary()
}

The radar.value_list type.

  • alias The name of the value list for use in rules.
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • created_by The name or email address of the user who created this value list.
  • id Unique identifier for the object.
  • item_type The type of items in the value list. One of card_fingerprint, us_bank_account_fingerprint, sepa_debit_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id.
  • list_items List of items contained within this value list.
  • 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.
  • name The name of the value list.
  • object String representing the object's type. Objects of the same type share the same value.

Functions

Link to this function

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

View Source
@spec create(
  params :: %{
    optional(:alias) => binary(),
    optional(:expand) => [binary()],
    optional(:item_type) =>
      :card_bin
      | :card_fingerprint
      | :case_sensitive_string
      | :country
      | :customer_id
      | :email
      | :ip_address
      | :sepa_debit_fingerprint
      | binary()
      | :us_bank_account_fingerprint,
    optional(:metadata) => %{optional(binary()) => binary()},
    optional(:name) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Creates a new ValueList object, which can then be referenced in rules.

Details

  • Method: post
  • Path: /v1/radar/value_lists
Link to this function

delete(value_list, opts \\ [])

View Source
@spec delete(value_list :: binary(), opts :: Keyword.t()) ::
  {:ok, Stripe.DeletedRadar.ValueList.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

Details

  • Method: delete
  • Path: /v1/radar/value_lists/{value_list}
Link to this function

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

View Source
@spec list(
  params :: %{
    optional(:alias) => binary(),
    optional(:contains) => binary(),
    optional(:created) => created() | integer(),
    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 ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Details

  • Method: get
  • Path: /v1/radar/value_lists
Link to this function

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

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

Retrieves a ValueList object.

Details

  • Method: get
  • Path: /v1/radar/value_lists/{value_list}
Link to this function

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

View Source
@spec update(
  value_list :: binary(),
  params :: %{
    optional(:alias) => binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()},
    optional(:name) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

Details

  • Method: post
  • Path: /v1/radar/value_lists/{value_list}