Class: Pago::V2026_04::Models::CustomerOrderPaymentStatus
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Payment status for an order.
Constant Summary collapse
- JSON_KEYS =
{ status: "status", error: "error" }.freeze
- REQUIRED_KEYS =
["status"].freeze
Instance Attribute Summary collapse
-
#error ⇒ String?
readonly
Error message if payment failed.
-
#status ⇒ String
readonly
Current payment status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, error: ::Pago::UNSET) ⇒ CustomerOrderPaymentStatus
constructor
A new instance of CustomerOrderPaymentStatus.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(status:, error: ::Pago::UNSET) ⇒ CustomerOrderPaymentStatus
Returns a new instance of CustomerOrderPaymentStatus.
17721 17722 17723 17724 17725 17726 17727 17728 |
# File 'lib/pago/v2026_04/models.rb', line 17721 def initialize( status:, error: ::Pago::UNSET ) super() assign(:status, status) assign(:error, error) end |
Instance Attribute Details
#error ⇒ String? (readonly)
Error message if payment failed.
17719 17720 17721 |
# File 'lib/pago/v2026_04/models.rb', line 17719 def error @error end |
#status ⇒ String (readonly)
Current payment status.
17715 17716 17717 |
# File 'lib/pago/v2026_04/models.rb', line 17715 def status @status end |
Class Method Details
.from_json(data) ⇒ CustomerOrderPaymentStatus?
17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 |
# File 'lib/pago/v2026_04/models.rb', line 17732 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( status: (data.key?("status") ? data["status"] : ::Pago::UNSET), error: (data.key?("error") ? data["error"] : ::Pago::UNSET) ), data ) end |