Chargebeex.CustomerEntitlement (chargebeex v0.6.0)

View Source

Struct that represent a Chargebee's API customer entitlement resource.

Summary

Types

t()

@type t() :: %Chargebeex.CustomerEntitlement{
  customer_id: String.t() | nil,
  feature_id: String.t() | nil,
  is_enabled: boolean() | nil,
  name: String.t() | nil,
  object: String.t() | nil,
  subscription_id: String.t() | nil,
  value: String.t() | nil
}

Functions

build(map_or_kwlist, opts \\ [])

@spec build(ExConstructor.map_or_kwlist(), Keyword.t()) ::
  %Chargebeex.CustomerEntitlement{
    customer_id: term(),
    feature_id: term(),
    is_enabled: term(),
    name: term(),
    object: term(),
    subscription_id: term(),
    value: term()
  }

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

Allows to list Customer Entitlements

Available filters can be found here: https://apidocs.chargebee.com/docs/api/customer_entitlements#list_customer_entitlements

Examples

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