Class: Inttegro::PurchaseIntent::Price
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::PurchaseIntent::Price
- Defined in:
- lib/inttegro/purchase_intent/price.rb
Overview
Typed representation of the price object in the Inttegro API.
This generated model is immutable. Construct it with .new, or decode a string-keyed API
payload with .from_hash. #serialize produces a string-keyed hash using the original wire
field names and serialized enum values.
Instance Attribute Summary collapse
-
#active ⇒ Boolean
readonly
Whether the resolved price can be used.
-
#id ⇒ String?
readonly
Catalog price ID when the offer price is not inline.
-
#label ⇒ String?
readonly
Catalog price label when available.
-
#nominal ⇒ Inttegro::Money::Amount
readonly
Value of the
nominalfield in the Inttegro API payload. -
#original ⇒ Inttegro::PurchaseIntent::OriginalPrice?
readonly
Value of the
originalfield in the Inttegro API payload.
Instance Attribute Details
#active ⇒ Boolean (readonly)
Whether the resolved price can be used
Required in the API payload. Wire name: active.
49 50 51 52 53 54 55 |
# File 'lib/inttegro/purchase_intent/price.rb', line 49 class Price < T::Struct const :active, T::Boolean const :id, T.nilable(String), default: nil const :label, T.nilable(String), default: nil const :nominal, Inttegro::Money::Amount const :original, T.nilable(Inttegro::PurchaseIntent::OriginalPrice), default: nil end |
#id ⇒ String? (readonly)
Catalog price ID when the offer price is not inline
Optional in the API payload; omitted values default to nil. Wire name: id.
49 50 51 52 53 54 55 |
# File 'lib/inttegro/purchase_intent/price.rb', line 49 class Price < T::Struct const :active, T::Boolean const :id, T.nilable(String), default: nil const :label, T.nilable(String), default: nil const :nominal, Inttegro::Money::Amount const :original, T.nilable(Inttegro::PurchaseIntent::OriginalPrice), default: nil end |
#label ⇒ String? (readonly)
Catalog price label when available
Optional in the API payload; omitted values default to nil. Wire name: label.
49 50 51 52 53 54 55 |
# File 'lib/inttegro/purchase_intent/price.rb', line 49 class Price < T::Struct const :active, T::Boolean const :id, T.nilable(String), default: nil const :label, T.nilable(String), default: nil const :nominal, Inttegro::Money::Amount const :original, T.nilable(Inttegro::PurchaseIntent::OriginalPrice), default: nil end |
#nominal ⇒ Inttegro::Money::Amount (readonly)
Value of the nominal field in the Inttegro API payload.
Required in the API payload. Wire name: nominal.
49 50 51 52 53 54 55 |
# File 'lib/inttegro/purchase_intent/price.rb', line 49 class Price < T::Struct const :active, T::Boolean const :id, T.nilable(String), default: nil const :label, T.nilable(String), default: nil const :nominal, Inttegro::Money::Amount const :original, T.nilable(Inttegro::PurchaseIntent::OriginalPrice), default: nil end |
#original ⇒ Inttegro::PurchaseIntent::OriginalPrice? (readonly)
Value of the original field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: original.
49 50 51 52 53 54 55 |
# File 'lib/inttegro/purchase_intent/price.rb', line 49 class Price < T::Struct const :active, T::Boolean const :id, T.nilable(String), default: nil const :label, T.nilable(String), default: nil const :nominal, Inttegro::Money::Amount const :original, T.nilable(Inttegro::PurchaseIntent::OriginalPrice), default: nil end |