Class: Inttegro::PurchaseIntent::CancelResponsePurchaseIntent
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::PurchaseIntent::CancelResponsePurchaseIntent
- Extended by:
- T::Sig
- Defined in:
- lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb
Overview
Typed representation of the cancel response purchase intent 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
-
#allow_variants ⇒ Boolean
readonly
Whether the intent was configured with a variant set.
-
#application_id ⇒ String
readonly
Application that owns the purchase intent.
-
#bundle ⇒ Inttegro::PurchaseIntent::Bundle?
readonly
Value of the
bundlefield in the Inttegro API payload. -
#created_at ⇒ Time
readonly
Creation timestamp.
-
#expires_at ⇒ Time?
readonly
Timestamp at or after which the Buy link is expired.
-
#id ⇒ String
readonly
Unique purchase intent identifier with sale_ prefix.
-
#inactive_at ⇒ Time
readonly
When the Buy link was explicitly canceled.
-
#merchant ⇒ Inttegro::PurchaseIntent::Merchant?
readonly
Current public merchant presentation resolved from the purchase intent's application.
-
#presentation ⇒ Inttegro::PurchaseIntent::Presentation?
readonly
Value of the
presentationfield in the Inttegro API payload. -
#price ⇒ Inttegro::PurchaseIntent::PriceInline?
readonly
Effective Buy-link offer price.
-
#product ⇒ Inttegro::PurchaseIntent::Product?
readonly
Value of the
productfield in the Inttegro API payload. -
#quantity ⇒ Inttegro::PurchaseIntent::Quantity
readonly
Quantity bounds enforced by the hosted checkout.
-
#status ⇒ Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus
readonly
Value of the
statusfield in the Inttegro API payload. -
#updated_at ⇒ Time?
readonly
Last mutation timestamp.
-
#usage ⇒ Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage
readonly
Exactly one of multi_use or single_use is returned as true.
-
#variant_set ⇒ Inttegro::PurchaseIntent::VariantSet?
readonly
Value of the
variant_setfield in the Inttegro API payload.
Class Method Summary collapse
Instance Attribute Details
#allow_variants ⇒ Boolean (readonly)
Whether the intent was configured with a variant set
Required in the API payload. Wire name: allow_variants.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#application_id ⇒ String (readonly)
Application that owns the purchase intent. This is routing metadata, not merchant presentation.
Required in the API payload. Wire name: application_id.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#bundle ⇒ Inttegro::PurchaseIntent::Bundle? (readonly)
Value of the bundle field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: bundle.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#created_at ⇒ Time (readonly)
Creation timestamp
Required in the API payload. Wire name: created_at.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#expires_at ⇒ Time? (readonly)
Timestamp at or after which the Buy link is expired
Optional in the API payload; omitted values default to nil. Wire name: expires_at.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#id ⇒ String (readonly)
Unique purchase intent identifier with sale_ prefix. Append it to https://pages.inttegro.com/buy/ to build the hosted Buy link.
Required in the API payload. Wire name: id.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#inactive_at ⇒ Time (readonly)
When the Buy link was explicitly canceled
Required in the API payload. Wire name: inactive_at.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#merchant ⇒ Inttegro::PurchaseIntent::Merchant? (readonly)
Current public merchant presentation resolved from the purchase intent's application. It is hydrated at lookup time and is not stored on the purchase intent.
Optional in the API payload; omitted values default to nil. Wire name: merchant.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#presentation ⇒ Inttegro::PurchaseIntent::Presentation? (readonly)
Value of the presentation field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: presentation.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#price ⇒ Inttegro::PurchaseIntent::PriceInline? (readonly)
Effective Buy-link offer price. For a bundle without an explicit override, this is the current catalog default.
Optional in the API payload; omitted values default to nil. Wire name: price.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end 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.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#quantity ⇒ Inttegro::PurchaseIntent::Quantity (readonly)
Quantity bounds enforced by the hosted checkout. max is omitted when the offer has no upper bound.
Required in the API payload. Wire name: quantity.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#status ⇒ Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus (readonly)
Value of the status field in the Inttegro API payload.
Required in the API payload. Wire name: status.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#updated_at ⇒ Time? (readonly)
Last mutation timestamp
Optional in the API payload; omitted values default to nil. Wire name: updated_at.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#usage ⇒ Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage (readonly)
Exactly one of multi_use or single_use is returned as true. Order is present after a single-use intent is consumed.
Required in the API payload. Wire name: usage.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
#variant_set ⇒ Inttegro::PurchaseIntent::VariantSet? (readonly)
Value of the variant_set field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: variant_set.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 129 class CancelResponsePurchaseIntent < T::Struct const :allow_variants, T::Boolean const :application_id, String const :bundle, T.nilable(Inttegro::PurchaseIntent::Bundle), default: nil const :created_at, Time const :expires_at, T.nilable(Time), default: nil const :id, String const :inactive_at, Time const :merchant, T.nilable(Inttegro::PurchaseIntent::Merchant), default: nil const :price, T.nilable(Inttegro::PurchaseIntent::PriceInline), default: nil const :presentation, T.nilable(Inttegro::PurchaseIntent::Presentation), default: nil const :product, T.nilable(Inttegro::PurchaseIntent::Product), default: nil const :quantity, Inttegro::PurchaseIntent::Quantity const :status, Inttegro::PurchaseIntent::CancelResponsePurchaseIntentStatus const :updated_at, T.nilable(Time), default: nil const :usage, T.any(Inttegro::PurchaseIntent::MultiUseUsage, Inttegro::PurchaseIntent::SingleUseUsage) const :variant_set, T.nilable(Inttegro::PurchaseIntent::VariantSet), default: nil extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end end |
Class Method Details
.from_hash(hash, strict = false) ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/inttegro/purchase_intent/cancel_response_purchase_intent.rb', line 150 def self.from_hash(hash, strict = false) data = hash.dup if (usage_value = data["usage"]).is_a?(Hash) data["usage"] = if usage_value.key?("multi_use") Inttegro::PurchaseIntent::MultiUseUsage.from_hash(usage_value) elsif usage_value.key?("single_use") Inttegro::PurchaseIntent::SingleUseUsage.from_hash(usage_value) else usage_value end end super(data, strict) end |