Class: Pago::V2026_04::Models::CustomerPortalOAuthAccount

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])
{
  account_id: "account_id",
  account_username: "account_username"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["account_id", "account_username"].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(account_id:, account_username:) ⇒ CustomerPortalOAuthAccount

Returns a new instance of CustomerPortalOAuthAccount.

Parameters:

  • account_id: (String)
  • account_username: (String, nil)


19149
19150
19151
19152
19153
19154
19155
19156
# File 'lib/pago/v2026_04/models.rb', line 19149

def initialize(
  account_id:,
  account_username:
)
  super()
  assign(:account_id, )
  assign(:account_username, )
end

Instance Attribute Details

#account_idString (readonly)

Returns:

  • (String)


19144
19145
19146
# File 'lib/pago/v2026_04/models.rb', line 19144

def 
  @account_id
end

#account_usernameString? (readonly)

Returns:

  • (String, nil)


19147
19148
19149
# File 'lib/pago/v2026_04/models.rb', line 19147

def 
  @account_username
end

Class Method Details

.from_json(data) ⇒ CustomerPortalOAuthAccount?

Parameters:

  • data (Hash, String, nil)

Returns:



19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
# File 'lib/pago/v2026_04/models.rb', line 19160

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(
      account_id: (data.key?("account_id") ? data["account_id"] : ::Pago::UNSET),
      account_username: (data.key?("account_username") ? data["account_username"] : ::Pago::UNSET)
    ),
    data
  )
end