Class: Pago::V2026_04::Models::CustomerDeletedMetadata

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

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  customer_id: "customer_id",
  customer_email: "customer_email",
  customer_name: "customer_name",
  customer_external_id: "customer_external_id"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["customer_id", "customer_email", "customer_name", "customer_external_id"].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(customer_id:, customer_email:, customer_name:, customer_external_id:) ⇒ CustomerDeletedMetadata

Returns a new instance of CustomerDeletedMetadata.

Parameters:

  • customer_id: (String)
  • customer_email: (String, nil)
  • customer_name: (String, nil)
  • customer_external_id: (String, nil)


16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
# File 'lib/pago/v2026_04/models.rb', line 16748

def initialize(
  customer_id:,
  customer_email:,
  customer_name:,
  customer_external_id:
)
  super()
  assign(:customer_id, customer_id)
  assign(:customer_email, customer_email)
  assign(:customer_name, customer_name)
  assign(:customer_external_id, customer_external_id)
end

Instance Attribute Details

#customer_emailString? (readonly)

Returns:

  • (String, nil)


16740
16741
16742
# File 'lib/pago/v2026_04/models.rb', line 16740

def customer_email
  @customer_email
end

#customer_external_idString? (readonly)

Returns:

  • (String, nil)


16746
16747
16748
# File 'lib/pago/v2026_04/models.rb', line 16746

def customer_external_id
  @customer_external_id
end

#customer_idString (readonly)

Returns:

  • (String)


16737
16738
16739
# File 'lib/pago/v2026_04/models.rb', line 16737

def customer_id
  @customer_id
end

#customer_nameString? (readonly)

Returns:

  • (String, nil)


16743
16744
16745
# File 'lib/pago/v2026_04/models.rb', line 16743

def customer_name
  @customer_name
end

Class Method Details

.from_json(data) ⇒ CustomerDeletedMetadata?

Parameters:

  • data (Hash, String, nil)

Returns:



16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
# File 'lib/pago/v2026_04/models.rb', line 16763

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(
      customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET),
      customer_email: (data.key?("customer_email") ? data["customer_email"] : ::Pago::UNSET),
      customer_name: (data.key?("customer_name") ? data["customer_name"] : ::Pago::UNSET),
      customer_external_id: (data.key?("customer_external_id") ? data["customer_external_id"] : ::Pago::UNSET)
    ),
    data
  )
end