Paypal.Common.CurrencyValue (Paypal v0.1.1)
View SourceMost of the currencies in the Paypal requests and responses are handled
as a JSON object that is including currency_code
and value
. But it's
even more complex in other requests.
This struct contains the possibilities for all of these requests/responses.
Summary
Types
@type t() :: %Paypal.Common.CurrencyValue{ breakdown: map() | nil, currency_code: String.t() | nil, value: Decimal.t() | nil }
The type is composed by the following:
currency_code
is the currency code based on ISO-4217, i.e. EURvalue
is the decimal or integer value for the currency.breakdown
is expressing information for the money.
About the breakdown, we could find that if it's provided, it could include information like this one:
%{
"item_total" => %{
"currency_code" => "EUR",
"value" => "12.00"
},
"shipping" => %{
"currency_code" => "EUR",
"value" => "2.00"
},
"discount" => {
"currency_code" => "EUR",
"value" => "5.00"
}
}