Braintree.TransactionLineItem (Braintree v0.13.0)
For fetching line items for a given transaction.
https://developers.braintreepayments.com/reference/response/transaction-line-item/ruby
Link to this section Summary
Functions
Find transaction line items for the given transaction id.
Converts a list of transaction line item maps into a list of transaction line items.
Link to this section Types
@type t() :: %Braintree.TransactionLineItem{ commodity_code: String.t(), description: String.t(), discount_amount: String.t(), kind: String.t(), name: String.t(), product_code: String.t(), quantity: String.t(), tax_amount: String.t(), total_amount: String.t(), unit_amount: String.t(), unit_of_measure: String.t(), unit_tax_amount: String.t(), url: String.t() }
Link to this section Functions
Link to this function
find_all(transaction_id, opts \\ [])
@spec find_all(String.t(), Keyword.t()) :: {:ok, [t()]} | {:error, Braintree.ErrorResponse.t()}
Find transaction line items for the given transaction id.
example
Example
{:ok, transaction_line_items} = TransactionLineItem.find("123")
Link to this function
new(params)
Converts a list of transaction line item maps into a list of transaction line items.
example
Example
transaction_line_items = Braintree.TransactionLineItem.new(%{
"name" => "item name",
"total_amount" => "100.00"
})