Class: Inttegro::PurchaseIntent::PriceSelection

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/purchase_intent/price_selection.rb

Overview

Price selection for the Buy-link offer. Products require it; bundles may omit it to use the current catalog default. Send exactly one of id or nominal and at most one of original or original_id.

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

Instance Attribute Details

#id ⇒ String? (readonly)

Active, unarchived app-owned price ID. It must belong to a selected product; for a bundle it must be fixed and use the bundle catalog currency.

Optional in the API payload; omitted values default to nil. Wire name: id.

Returns:

  • (String, nil)


46
47
48
49
50
51
# File 'lib/inttegro/purchase_intent/price_selection.rb', line 46

class PriceSelection < T::Struct
  const :id, T.nilable(String), default: nil
  const :nominal, T.nilable(Inttegro::PurchaseIntent::PriceSelectionNominal), default: nil
  const :original, T.nilable(Inttegro::PurchaseIntent::PriceSelectionOriginal), default: nil
  const :original_id, T.nilable(String), default: nil
end

#nominal ⇒ Inttegro::PurchaseIntent::PriceSelectionNominal? (readonly)

Inline offer amount when no price ID is provided

Optional in the API payload; omitted values default to nil. Wire name: nominal.



46
47
48
49
50
51
# File 'lib/inttegro/purchase_intent/price_selection.rb', line 46

class PriceSelection < T::Struct
  const :id, T.nilable(String), default: nil
  const :nominal, T.nilable(Inttegro::PurchaseIntent::PriceSelectionNominal), default: nil
  const :original, T.nilable(Inttegro::PurchaseIntent::PriceSelectionOriginal), default: nil
  const :original_id, T.nilable(String), default: nil
end

#original ⇒ Inttegro::PurchaseIntent::PriceSelectionOriginal? (readonly)

Optional original price used for comparison display

Optional in the API payload; omitted values default to nil. Wire name: original.



46
47
48
49
50
51
# File 'lib/inttegro/purchase_intent/price_selection.rb', line 46

class PriceSelection < T::Struct
  const :id, T.nilable(String), default: nil
  const :nominal, T.nilable(Inttegro::PurchaseIntent::PriceSelectionNominal), default: nil
  const :original, T.nilable(Inttegro::PurchaseIntent::PriceSelectionOriginal), default: nil
  const :original_id, T.nilable(String), default: nil
end

#original_id ⇒ String? (readonly)

App-owned comparison price ID when not using original.id

Optional in the API payload; omitted values default to nil. Wire name: original_id.

Returns:

  • (String, nil)


46
47
48
49
50
51
# File 'lib/inttegro/purchase_intent/price_selection.rb', line 46

class PriceSelection < T::Struct
  const :id, T.nilable(String), default: nil
  const :nominal, T.nilable(Inttegro::PurchaseIntent::PriceSelectionNominal), default: nil
  const :original, T.nilable(Inttegro::PurchaseIntent::PriceSelectionOriginal), default: nil
  const :original_id, T.nilable(String), default: nil
end