Struct paypal_rs::invoice::Amount[][src]

pub struct Amount {
    pub currency_code: Currency,
    pub value: String,
    pub breakdown: Option<Breakdown>,
}
Expand description

Represents an amount of money.

Fields

currency_code: Currency

The three-character ISO-4217 currency code that identifies the currency.

value: String

The value, which might be:

  • An integer for currencies like JPY that are not typically fractional.
  • A decimal fraction for currencies like TND that are subdivided into thousandths.

For the required number of decimal places for a currency code, see Currency Codes.

breakdown: Option<Breakdown>

The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, custom amount, shipping and discounts, if any.

Implementations

Creates a new amount with the required values.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.