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

Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.

Related guide: Managing list items

Summary

Types

t()

The radar.value_list_item type.

Functions

Creates a new ValueListItem object, which is added to the specified parent value list.

Deletes a ValueListItem object, removing it from its parent value list.

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

Retrieves a ValueListItem object.

Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type t() :: %Stripe.Radar.ValueListItem{
  created: integer(),
  created_by: binary(),
  id: binary(),
  livemode: boolean(),
  object: binary(),
  value: binary(),
  value_list: binary()
}

The radar.value_list_item type.

  • 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 added this item to the value list.
  • 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.
  • object String representing the object's type. Objects of the same type share the same value.
  • value The value of the item.
  • value_list The identifier of the value list this item belongs to.

Functions

Link to this function

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

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

Creates a new ValueListItem object, which is added to the specified parent value list.

Details

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

delete(item, opts \\ [])

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

Deletes a ValueListItem object, removing it from its parent value list.

Details

  • Method: delete
  • Path: /v1/radar/value_list_items/{item}
Link to this function

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

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

Returns a list of ValueListItem 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_list_items
Link to this function

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

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

Retrieves a ValueListItem object.

Details

  • Method: get
  • Path: /v1/radar/value_list_items/{item}