View Source Chargebeex.Quote (chargebeex v0.3.0)

Struct that represent a Chargebee's API quote.

Summary

Types

"create_subscription_for_customer" | "change_subscription" | "onetime_invoice"

"tax_exclusive" | "tax_inclusive"

"open" | "accepted" | "declined" | "invoiced" | "closed"

t()

Functions

Changes the quote produced for creating a new subscription items (operation_type = create_subscription_for_customer)

Changes the quote produced for adding one-time charges and charge items. (operation_type = onetime_invoice)

Changes the quote produced for updating the subscription items. (operation_type = change_subscription)

Types

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

"create_subscription_for_customer" | "change_subscription" | "onetime_invoice"

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

"tax_exclusive" | "tax_inclusive"

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

"open" | "accepted" | "declined" | "invoiced" | "closed"

@type t() :: %Chargebeex.Quote{
  amount_due: non_neg_integer() | nil,
  amount_paid: non_neg_integer() | nil,
  billing_address: map() | nil,
  business_entity_id: String.t() | nil,
  charge_on_acceptance: non_neg_integer() | nil,
  contract_term_end: non_neg_integer() | nil,
  contract_term_start: non_neg_integer() | nil,
  contract_term_termination_fee: non_neg_integer() | nil,
  credits_applied: non_neg_integer() | nil,
  currency_code: String.t() | nil,
  customer_id: String.t() | nil,
  date: non_neg_integer() | nil,
  discounts: list() | nil,
  id: String.t() | nil,
  invoice_id: String.t() | nil,
  line_item_discounts: list() | nil,
  line_item_taxes: list() | nil,
  line_item_tiers: list() | nil,
  line_items: list() | nil,
  name: String.t() | nil,
  notes: list() | nil,
  operation_type: operation_type() | nil,
  po_number: String.t() | nil,
  price_type: price_type() | nil,
  resource_version: non_neg_integer() | nil,
  resources: map(),
  shipping_address: map() | nil,
  status: status() | nil,
  sub_total: non_neg_integer() | nil,
  subscription_id: String.t() | nil,
  taxes: list() | nil,
  total: non_neg_integer() | nil,
  total_payable: non_neg_integer() | nil,
  updated_at: non_neg_integer() | nil,
  valid_till: non_neg_integer() | nil,
  vat_number: String.t() | nil,
  vat_number_prefix: String.t() | nil,
  version: pos_integer() | nil
}

Functions

Link to this function

build(map_or_kwlist, opts \\ [])

View Source
@spec build(ExConstructor.map_or_kwlist(), Keyword.t()) :: %Chargebeex.Quote{
  amount_due: term(),
  amount_paid: term(),
  billing_address: term(),
  business_entity_id: term(),
  charge_on_acceptance: term(),
  contract_term_end: term(),
  contract_term_start: term(),
  contract_term_termination_fee: term(),
  credits_applied: term(),
  currency_code: term(),
  customer_id: term(),
  date: term(),
  discounts: term(),
  id: term(),
  invoice_id: term(),
  line_item_discounts: term(),
  line_item_taxes: term(),
  line_item_tiers: term(),
  line_items: term(),
  name: term(),
  notes: term(),
  operation_type: term(),
  po_number: term(),
  price_type: term(),
  resource_version: term(),
  resources: term(),
  shipping_address: term(),
  status: term(),
  sub_total: term(),
  subscription_id: term(),
  taxes: term(),
  total: term(),
  total_payable: term(),
  updated_at: term(),
  valid_till: term(),
  vat_number: term(),
  vat_number_prefix: term(),
  version: term()
}
Link to this function

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

View Source

Changes the quote produced for creating a new subscription items (operation_type = create_subscription_for_customer)

Link to this function

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

View Source

Changes the quote produced for adding one-time charges and charge items. (operation_type = onetime_invoice)

Link to this function

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

View Source

Changes the quote produced for updating the subscription items. (operation_type = change_subscription)

Link to this function

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

View Source

Callback implementation for Chargebeex.Resource.list/2.

Link to this function

retrieve(id, opts \\ [])

View Source

Callback implementation for Chargebeex.Resource.retrieve/2.