Class: Pago::V2026_04::Models::OrderUpdate

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

Overview

Schema to update an order.

Constant Summary collapse

JSON_KEYS =

Returns:

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

Returns:

  • (Array[String])
[].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(billing_name: ::Pago::UNSET, billing_address: ::Pago::UNSET) ⇒ OrderUpdate

Returns a new instance of OrderUpdate.

Parameters:

  • billing_name: (String, nil) (defaults to: ::Pago::UNSET)
  • billing_address: (Models::AddressInput, nil) (defaults to: ::Pago::UNSET)


33619
33620
33621
33622
33623
33624
33625
33626
# File 'lib/pago/v2026_04/models.rb', line 33619

def initialize(
  billing_name: ::Pago::UNSET,
  billing_address: ::Pago::UNSET
)
  super()
  assign(:billing_name, billing_name)
  assign(:billing_address, billing_address)
end

Instance Attribute Details

#billing_addressModels::AddressInput? (readonly)

The address of the customer that should appear on the invoice. Country and state fields cannot be updated.

Returns:



33617
33618
33619
# File 'lib/pago/v2026_04/models.rb', line 33617

def billing_address
  @billing_address
end

#billing_nameString? (readonly)

The name of the customer that should appear on the invoice.

Returns:

  • (String, nil)


33613
33614
33615
# File 'lib/pago/v2026_04/models.rb', line 33613

def billing_name
  @billing_name
end

Class Method Details

.from_json(data) ⇒ OrderUpdate?

Parameters:

  • data (Hash, String, nil)

Returns:



33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
# File 'lib/pago/v2026_04/models.rb', line 33630

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(
      billing_name: (data.key?("billing_name") ? data["billing_name"] : ::Pago::UNSET),
      billing_address: (data.key?("billing_address") ? Models::AddressInput.from_json(data["billing_address"]) : ::Pago::UNSET)
    ),
    data
  )
end