Class: Pago::V2026_04::Models::OrderReceipt
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Order's receipt data.
Constant Summary collapse
- JSON_KEYS =
{ url: "url" }.freeze
- REQUIRED_KEYS =
["url"].freeze
Instance Attribute Summary collapse
-
#url ⇒ String
readonly
The URL to the receipt PDF.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url:) ⇒ OrderReceipt
constructor
A new instance of OrderReceipt.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(url:) ⇒ OrderReceipt
Returns a new instance of OrderReceipt.
33130 33131 33132 33133 33134 33135 |
# File 'lib/pago/v2026_04/models.rb', line 33130 def initialize( url: ) super() assign(:url, url) end |
Instance Attribute Details
#url ⇒ String (readonly)
The URL to the receipt PDF.
33128 33129 33130 |
# File 'lib/pago/v2026_04/models.rb', line 33128 def url @url end |
Class Method Details
.from_json(data) ⇒ OrderReceipt?
33139 33140 33141 33142 33143 33144 33145 33146 33147 33148 33149 33150 |
# File 'lib/pago/v2026_04/models.rb', line 33139 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( url: (data.key?("url") ? data["url"] : ::Pago::UNSET) ), data ) end |