StripeElixir.Services.Radar.ValueListService (stripe_elixir v0.1.0)

Copy Markdown View Source

RadarListList

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

Related guide: Default Stripe lists

Summary

Functions

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

@spec create(StripeElixir.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Create a value list

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

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

@spec delete(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Delete a value list

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.

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

@spec list(StripeElixir.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

List all value lists

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

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

@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve a value list

Retrieves a ValueList object.

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

@spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Update a value list

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.