Chargebeex.Item (chargebeex v0.6.0)

View Source

Struct that represent a Chargebee's API item resource.

Summary

Types

"web" | "app_store" | "play_store"

"all" | "restricted"

"active" | "archived" | "deleted"

t()

"plan" | "addon" | "charge"

"sum_of_usages" | "last_usage" | "max_usage"

Types

channel()

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

"web" | "app_store" | "play_store"

item_applicability()

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

"all" | "restricted"

status()

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

"active" | "archived" | "deleted"

t()

@type t() :: %Chargebeex.Item{
  applicable_items: list(),
  archived_at: non_neg_integer() | nil,
  channel: channel() | nil,
  custom_fields: map(),
  description: String.t() | nil,
  enabled_for_checkout: boolean(),
  enabled_in_portal: boolean(),
  external_name: String.t() | nil,
  gift_claim_redirect_url: String.t() | nil,
  id: String.t() | nil,
  included_in_mrr: boolean() | nil,
  is_giftable: boolean(),
  is_shippable: boolean(),
  item_applicability: item_applicability() | nil,
  item_family_id: String.t() | nil,
  metadata: map(),
  metered: boolean(),
  name: String.t() | nil,
  redirect_url: String.t() | nil,
  resource_version: non_neg_integer() | nil,
  status: status() | nil,
  type: type() | nil,
  unit: String.t() | nil,
  updated_at: non_neg_integer() | nil,
  usage_calculation: usage_calculation() | nil
}

type()

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

"plan" | "addon" | "charge"

usage_calculation()

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

"sum_of_usages" | "last_usage" | "max_usage"

Functions

build(raw_data)

Callback implementation for Chargebeex.Resource.build/1.

build(map_or_kwlist, opts \\ [])

@spec build(ExConstructor.map_or_kwlist(), Keyword.t()) :: %Chargebeex.Item{
  applicable_items: term(),
  archived_at: term(),
  channel: term(),
  custom_fields: term(),
  description: term(),
  enabled_for_checkout: term(),
  enabled_in_portal: term(),
  external_name: term(),
  gift_claim_redirect_url: term(),
  id: term(),
  included_in_mrr: term(),
  is_giftable: term(),
  is_shippable: term(),
  item_applicability: term(),
  item_family_id: term(),
  metadata: term(),
  metered: term(),
  name: term(),
  redirect_url: term(),
  resource_version: term(),
  status: term(),
  type: term(),
  unit: term(),
  updated_at: term(),
  usage_calculation: term()
}

create(params, opts \\ [])

Callback implementation for Chargebeex.Resource.create/2.

delete(id, opts \\ [])

Callback implementation for Chargebeex.Resource.delete/2.

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

Callback implementation for Chargebeex.Resource.list/2.

retrieve(id, opts \\ [])

Callback implementation for Chargebeex.Resource.retrieve/2.

update(id, params, opts \\ [])

Callback implementation for Chargebeex.Resource.update/3.