Class: Pago::V2026_04::Models::CustomerOrderReceipt
- 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:) ⇒ CustomerOrderReceipt
constructor
A new instance of CustomerOrderReceipt.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(url:) ⇒ CustomerOrderReceipt
Returns a new instance of CustomerOrderReceipt.
17933 17934 17935 17936 17937 17938 |
# File 'lib/pago/v2026_04/models.rb', line 17933 def initialize( url: ) super() assign(:url, url) end |
Instance Attribute Details
#url ⇒ String (readonly)
The URL to the receipt PDF.
17931 17932 17933 |
# File 'lib/pago/v2026_04/models.rb', line 17931 def url @url end |
Class Method Details
.from_json(data) ⇒ CustomerOrderReceipt?
17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 |
# File 'lib/pago/v2026_04/models.rb', line 17942 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 |