Class: Inttegro::Order::UpdateRequest
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::Order::UpdateRequest
- Extended by:
- T::Sig
- Defined in:
- lib/inttegro/order/update_request.rb
Overview
Typed representation of the update request 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
-
#clear_payment_method ⇒ Boolean?
readonly
Clears the currently attached payment method.
-
#custom_data ⇒ Inttegro::CustomData?
readonly
Merchant-defined string values attached to a resource.
-
#finalize ⇒ Boolean?
readonly
Explicit seal decision.
-
#invoice_settings ⇒ Inttegro::Shared::InvoiceSettings?
readonly
Order-level invoice rendering data.
-
#line_items ⇒ Array<Inttegro::Shared::LineItem>?
readonly
Full replacement for the order's line items.
-
#number ⇒ String?
readonly
Replacement order number.
-
#order_id ⇒ String
readonly
Unique identifier of the order to update.
-
#payment_method_data ⇒ Inttegro::Order::UpdateRequestPaymentMethodData?
readonly
New payment method details to tokenize and attach to the order.
-
#payment_method_id ⇒ String?
readonly
ID of a saved payment method to attach to the order.
-
#receipt_number ⇒ String?
readonly
Replacement receipt number.
-
#statement_descriptor ⇒ String?
readonly
Replacement payment statement descriptor for the order's payment.
-
#statement_descriptor_prefix ⇒ String?
readonly
Static prefix used to build the replacement descriptor as
prefix*order_id.
Class Method Summary collapse
Instance Attribute Details
#clear_payment_method ⇒ Boolean? (readonly)
Clears the currently attached payment method. Mutually exclusive with payment_method_id
and payment_method_data.
Optional in the API payload; omitted values default to nil. Wire name: clear_payment_method.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#custom_data ⇒ Inttegro::CustomData? (readonly)
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.
Optional in the API payload; omitted values default to nil. Wire name: custom_data.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#finalize ⇒ Boolean? (readonly)
Explicit seal decision. Set to false to reopen a sealed order and leave it open, or true
to seal or reseal the order after applying the requested mutations.
Optional in the API payload; omitted values default to nil. Wire name: finalize.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#invoice_settings ⇒ Inttegro::Shared::InvoiceSettings? (readonly)
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views.
Optional in the API payload; omitted values default to nil. Wire name: invoice_settings.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#line_items ⇒ Array<Inttegro::Shared::LineItem>? (readonly)
Full replacement for the order's line items. Omit this field to keep the current line items unchanged.
Optional in the API payload; omitted values default to nil. Wire name: line_items.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#number ⇒ String? (readonly)
Replacement order number.
Optional in the API payload; omitted values default to nil. Wire name: number.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#order_id ⇒ String (readonly)
Unique identifier of the order to update.
Required in the API payload. Wire name: order_id.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#payment_method_data ⇒ Inttegro::Order::UpdateRequestPaymentMethodData? (readonly)
New payment method details to tokenize and attach to the order. Currently only
mobile_money is supported for order updates. When using inline mobile money details,
include billing_details.name and billing_details.address.country.
Optional in the API payload; omitted values default to nil. Wire name: payment_method_data.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#payment_method_id ⇒ String? (readonly)
ID of a saved payment method to attach to the order. Mutually exclusive with
payment_method_data and clear_payment_method.
Optional in the API payload; omitted values default to nil. Wire name: payment_method_id.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#receipt_number ⇒ String? (readonly)
Replacement receipt number. Once set, it cannot be unset; provide a different non-empty value to change it. No uniqueness is enforced.
Optional in the API payload; omitted values default to nil. Wire name: receipt_number.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#statement_descriptor ⇒ String? (readonly)
Replacement payment statement descriptor for the order's payment.
Optional in the API payload; omitted values default to nil. Wire name: statement_descriptor.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
#statement_descriptor_prefix ⇒ String? (readonly)
Static prefix used to build the replacement descriptor as prefix*order_id. Mutually
exclusive with statement_descriptor.
Optional in the API payload; omitted values default to nil. Wire name: statement_descriptor_prefix.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/inttegro/order/update_request.rb', line 103 class UpdateRequest < T::Struct const :clear_payment_method, T.nilable(T::Boolean), default: nil const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil const :finalize, T.nilable(T::Boolean), default: nil const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil const :number, T.nilable(String), default: nil const :receipt_number, T.nilable(String), default: nil const :order_id, String const :payment_method_data, T.nilable(Inttegro::Order::UpdateRequestPaymentMethodData), default: nil const :payment_method_id, T.nilable(String), default: nil const :statement_descriptor, T.nilable(String), default: nil const :statement_descriptor_prefix, T.nilable(String), 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 (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end end |
Class Method Details
.from_hash(hash, strict = false) ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/inttegro/order/update_request.rb', line 120 def self.from_hash(hash, strict = false) data = hash.dup if (line_items_value = data["line_items"]).is_a?(Array) data["line_items"] = line_items_value.map do |item| next item unless item.is_a?(Hash) case item["type"] when "product" Inttegro::Product::LineItem.from_hash(item) when "fee" Inttegro::Shared::FeeLineItem.from_hash(item) when "shipping" Inttegro::Shared::ShippingLineItem.from_hash(item) else item end end end super(data, strict) end |