View Source Chargebeex.AttachedItem (chargebeex v0.5.0)

Struct that represent a Chargebee's API attached item resource.

Summary

Types

"web" | "app_store" | "play_store"

"subscription_creation" | "subscription_trial_start" | "plan_activation" | "subscription_activation" | "contract_termination" | "on_demand"

"active" | "archived" | "deleted"

t()

"recommended" | "mandatory" | "optional"

Types

@type channel() :: String.t()

"web" | "app_store" | "play_store"

@type charge_event() :: String.t()

"subscription_creation" | "subscription_trial_start" | "plan_activation" | "subscription_activation" | "contract_termination" | "on_demand"

@type status() :: String.t()

"active" | "archived" | "deleted"

@type t() :: %Chargebeex.AttachedItem{
  billing_cycles: non_neg_integer() | nil,
  channel: channel() | nil,
  charge_on_event: charge_event() | nil,
  charge_once: boolean() | nil,
  created_at: non_neg_integer() | nil,
  id: String.t() | nil,
  item_id: String.t() | nil,
  parent_item_id: String.t() | nil,
  quantity: non_neg_integer() | nil,
  quantity_in_decimals: non_neg_integer() | nil,
  resource_version: non_neg_integer() | nil,
  status: status() | nil,
  type: type() | nil,
  updated_at: non_neg_integer() | nil
}
@type type() :: String.t()

"recommended" | "mandatory" | "optional"

Functions

Link to this function

build(map_or_kwlist, opts \\ [])

View Source
@spec build(ExConstructor.map_or_kwlist(), Keyword.t()) :: %Chargebeex.AttachedItem{
  billing_cycles: term(),
  channel: term(),
  charge_on_event: term(),
  charge_once: term(),
  created_at: term(),
  id: term(),
  item_id: term(),
  parent_item_id: term(),
  quantity: term(),
  quantity_in_decimals: term(),
  resource_version: term(),
  status: term(),
  type: term(),
  updated_at: term()
}
Link to this function

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

View Source

Allows to list Attached Items

Available filters can be found here: https://apidocs.eu.chargebee.com/docs/api/attached_items#list_attached_items

Examples

iex> filters = %{limit: 2}
iex(2)> Chargebeex.AttachedItem.list(filters)
{:ok, [%Chargebeex.AttachedItem{...}, %Chargebeex.AttachedItem{...}], %{"next_offset" => nil}}