Class: Pago::V2026_04::Models::CustomerOrderInvoice

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Order's invoice data.

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  url: "url"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["url"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(url:) ⇒ CustomerOrderInvoice

Returns a new instance of CustomerOrderInvoice.

Parameters:

  • url: (String)


17632
17633
17634
17635
17636
17637
# File 'lib/pago/v2026_04/models.rb', line 17632

def initialize(
  url:
)
  super()
  assign(:url, url)
end

Instance Attribute Details

#urlString (readonly)

The URL to the invoice.

Returns:

  • (String)


17630
17631
17632
# File 'lib/pago/v2026_04/models.rb', line 17630

def url
  @url
end

Class Method Details

.from_json(data) ⇒ CustomerOrderInvoice?

Parameters:

  • data (Hash, String, nil)

Returns:



17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
# File 'lib/pago/v2026_04/models.rb', line 17641

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