Class: Pago::V2026_04::Models::CustomerPortalCustomer

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])
{
  created_at: "created_at",
  modified_at: "modified_at",
  id: "id",
  email: "email",
  email_verified: "email_verified",
  name: "name",
  billing_name: "billing_name",
  billing_address: "billing_address",
  tax_id: "tax_id",
  oauth_accounts: "oauth_accounts",
  default_payment_method_id: "default_payment_method_id",
  type: "type",
  locale: "locale"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["created_at", "modified_at", "id", "email", "email_verified", "name", "billing_name", "billing_address", "tax_id", "oauth_accounts"].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(created_at:, modified_at:, id:, email:, email_verified:, name:, billing_name:, billing_address:, tax_id:, oauth_accounts:, default_payment_method_id: ::Pago::UNSET, type: ::Pago::UNSET, locale: ::Pago::UNSET) ⇒ CustomerPortalCustomer

Returns a new instance of CustomerPortalCustomer.

Parameters:

  • created_at: (String)
  • modified_at: (String, nil)
  • id: (String)
  • email: (String, nil)
  • email_verified: (Boolean)
  • name: (String, nil)
  • billing_name: (String, nil)
  • billing_address: (Models::Address, nil)
  • tax_id: (Array[untyped], nil)
  • oauth_accounts: (Hash[String, Models::CustomerPortalOAuthAccount])
  • default_payment_method_id: (String, nil) (defaults to: ::Pago::UNSET)
  • type: (String, nil) (defaults to: ::Pago::UNSET)
  • locale: (String, nil) (defaults to: ::Pago::UNSET)


18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
# File 'lib/pago/v2026_04/models.rb', line 18828

def initialize(
  created_at:,
  modified_at:,
  id:,
  email:,
  email_verified:,
  name:,
  billing_name:,
  billing_address:,
  tax_id:,
  oauth_accounts:,
  default_payment_method_id: ::Pago::UNSET,
  type: ::Pago::UNSET,
  locale: ::Pago::UNSET
)
  super()
  assign(:created_at, created_at)
  assign(:modified_at, modified_at)
  assign(:id, id)
  assign(:email, email)
  assign(:email_verified, email_verified)
  assign(:name, name)
  assign(:billing_name, billing_name)
  assign(:billing_address, billing_address)
  assign(:tax_id, tax_id)
  assign(:oauth_accounts, oauth_accounts)
  assign(:default_payment_method_id, default_payment_method_id)
  assign(:type, type)
  assign(:locale, locale)
end

Instance Attribute Details

#billing_addressModels::Address? (readonly)

Returns:



18811
18812
18813
# File 'lib/pago/v2026_04/models.rb', line 18811

def billing_address
  @billing_address
end

#billing_nameString? (readonly)

Returns:

  • (String, nil)


18808
18809
18810
# File 'lib/pago/v2026_04/models.rb', line 18808

def billing_name
  @billing_name
end

#created_atString (readonly)

Creation timestamp of the object.

Returns:

  • (String)


18788
18789
18790
# File 'lib/pago/v2026_04/models.rb', line 18788

def created_at
  @created_at
end

#default_payment_method_idString? (readonly)

Returns:

  • (String, nil)


18820
18821
18822
# File 'lib/pago/v2026_04/models.rb', line 18820

def default_payment_method_id
  @default_payment_method_id
end

#emailString? (readonly)

Returns:

  • (String, nil)


18799
18800
18801
# File 'lib/pago/v2026_04/models.rb', line 18799

def email
  @email
end

#email_verifiedBoolean (readonly)

Returns:

  • (Boolean)


18802
18803
18804
# File 'lib/pago/v2026_04/models.rb', line 18802

def email_verified
  @email_verified
end

#idString (readonly)

The ID of the object.

Returns:

  • (String)


18796
18797
18798
# File 'lib/pago/v2026_04/models.rb', line 18796

def id
  @id
end

#localeString? (readonly)

Returns:

  • (String, nil)


18826
18827
18828
# File 'lib/pago/v2026_04/models.rb', line 18826

def locale
  @locale
end

#modified_atString? (readonly)

Last modification timestamp of the object.

Returns:

  • (String, nil)


18792
18793
18794
# File 'lib/pago/v2026_04/models.rb', line 18792

def modified_at
  @modified_at
end

#nameString? (readonly)

Returns:

  • (String, nil)


18805
18806
18807
# File 'lib/pago/v2026_04/models.rb', line 18805

def name
  @name
end

#oauth_accountsHash{String => Models::CustomerPortalOAuthAccount} (readonly)

Returns:



18817
18818
18819
# File 'lib/pago/v2026_04/models.rb', line 18817

def oauth_accounts
  @oauth_accounts
end

#tax_idArray<Object>? (readonly)

Returns:

  • (Array<Object>, nil)


18814
18815
18816
# File 'lib/pago/v2026_04/models.rb', line 18814

def tax_id
  @tax_id
end

#typeString? (readonly)

Returns:

  • (String, nil)


18823
18824
18825
# File 'lib/pago/v2026_04/models.rb', line 18823

def type
  @type
end

Class Method Details

.from_json(data) ⇒ CustomerPortalCustomer?

Parameters:

  • data (Hash, String, nil)

Returns:



18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
# File 'lib/pago/v2026_04/models.rb', line 18861

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(
      created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET),
      modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET),
      id: (data.key?("id") ? data["id"] : ::Pago::UNSET),
      email: (data.key?("email") ? data["email"] : ::Pago::UNSET),
      email_verified: (data.key?("email_verified") ? data["email_verified"] : ::Pago::UNSET),
      name: (data.key?("name") ? data["name"] : ::Pago::UNSET),
      billing_name: (data.key?("billing_name") ? data["billing_name"] : ::Pago::UNSET),
      billing_address: (data.key?("billing_address") ? Models::Address.from_json(data["billing_address"]) : ::Pago::UNSET),
      tax_id: (data.key?("tax_id") ? data["tax_id"] : ::Pago::UNSET),
      oauth_accounts: (data.key?("oauth_accounts") ? ::Pago::Serde.map(data["oauth_accounts"]) { |value0| Models::CustomerPortalOAuthAccount.from_json(value0) } : ::Pago::UNSET),
      default_payment_method_id: (data.key?("default_payment_method_id") ? data["default_payment_method_id"] : ::Pago::UNSET),
      type: (data.key?("type") ? data["type"] : ::Pago::UNSET),
      locale: (data.key?("locale") ? data["locale"] : ::Pago::UNSET)
    ),
    data
  )
end