Class: Inttegro::PurchaseIntent::Variant
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::PurchaseIntent::Variant
- Defined in:
- lib/inttegro/purchase_intent/variant.rb
Overview
Typed representation of the variant 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
Value of the
activefield in the Inttegro API payload. -
#position ⇒ Integer?
readonly
Value of the
positionfield in the Inttegro API payload. -
#price ⇒ Inttegro::PurchaseIntent::Price?
readonly
Value of the
pricefield in the Inttegro API payload. -
#product ⇒ Inttegro::PurchaseIntent::Product?
readonly
Value of the
productfield in the Inttegro API payload. -
#product_id ⇒ String
readonly
Value of the
product_idfield in the Inttegro API payload. -
#variant_values ⇒ Hash{String => String}
readonly
Product variant attribute selections keyed by attribute name.
Instance Attribute Details
#active ⇒ Boolean (readonly)
Value of the active field in the Inttegro API payload.
Required in the API payload. Wire name: active.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |
#position ⇒ Integer? (readonly)
Value of the position field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: position.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |
#price ⇒ Inttegro::PurchaseIntent::Price? (readonly)
Value of the price field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: price.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |
#product ⇒ Inttegro::PurchaseIntent::Product? (readonly)
Value of the product field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: product.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |
#product_id ⇒ String (readonly)
Value of the product_id field in the Inttegro API payload.
Required in the API payload. Wire name: product_id.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |
#variant_values ⇒ Hash{String => String} (readonly)
Product variant attribute selections keyed by attribute name.
Required in the API payload. Wire name: variant_values.
55 56 57 58 59 60 61 62 |
# File 'lib/inttegro/purchase_intent/variant.rb', line 55 class Variant < T::Struct const :active, T::Boolean const :position, T.nilable(Integer), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::Price), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :product_id, String const :variant_values, T::Hash[String, String] end |