Class: Pago::V2026_04::Models::AuthorizeResponseUser
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::AuthorizeResponseUser
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
client: "client",
sub_type: "sub_type",
sub: "sub",
scopes: "scopes",
organizations: "organizations",
requires_single_organization: "requires_single_organization",
scope_display_names: "scope_display_names"
}.freeze
- REQUIRED_KEYS =
["client", "sub_type", "sub", "scopes", "organizations"].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(client:, sub_type:, sub:, scopes:, organizations:, requires_single_organization: ::Pago::UNSET, scope_display_names: ::Pago::UNSET) ⇒ AuthorizeResponseUser
Returns a new instance of AuthorizeResponseUser.
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
|
# File 'lib/pago/v2026_04/models.rb', line 580
def initialize(
client:,
sub_type:,
sub:,
scopes:,
organizations:,
requires_single_organization: ::Pago::UNSET,
scope_display_names: ::Pago::UNSET
)
super()
assign(:client, client)
assign(:sub_type, sub_type)
assign(:sub, sub)
assign(:scopes, scopes)
assign(:organizations, organizations)
assign(:requires_single_organization, requires_single_organization)
assign(:scope_display_names, scope_display_names)
end
|
Instance Attribute Details
560
561
562
|
# File 'lib/pago/v2026_04/models.rb', line 560
def client
@client
end
|
572
573
574
|
# File 'lib/pago/v2026_04/models.rb', line 572
def organizations
@organizations
end
|
#requires_single_organization ⇒ Boolean
575
576
577
|
# File 'lib/pago/v2026_04/models.rb', line 575
def requires_single_organization
@requires_single_organization
end
|
#scope_display_names ⇒ Hash{String => String}
578
579
580
|
# File 'lib/pago/v2026_04/models.rb', line 578
def scope_display_names
@scope_display_names
end
|
#scopes ⇒ Array<String>
569
570
571
|
# File 'lib/pago/v2026_04/models.rb', line 569
def scopes
@scopes
end
|
566
567
568
|
# File 'lib/pago/v2026_04/models.rb', line 566
def sub
@sub
end
|
#sub_type ⇒ String
563
564
565
|
# File 'lib/pago/v2026_04/models.rb', line 563
def sub_type
@sub_type
end
|
Class Method Details
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
|
# File 'lib/pago/v2026_04/models.rb', line 601
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(
client: (data.key?("client") ? Models::OAuth2ClientPublic.from_json(data["client"]) : ::Pago::UNSET),
sub_type: (data.key?("sub_type") ? data["sub_type"] : ::Pago::UNSET),
sub: (data.key?("sub") ? Models::AuthorizeUser.from_json(data["sub"]) : ::Pago::UNSET),
scopes: (data.key?("scopes") ? data["scopes"] : ::Pago::UNSET),
organizations: (data.key?("organizations") ? ::Pago::Serde.array(data["organizations"]) { |item0| Models::AuthorizeOrganization.from_json(item0) } : ::Pago::UNSET),
requires_single_organization: (data.key?("requires_single_organization") ? data["requires_single_organization"] : ::Pago::UNSET),
scope_display_names: (data.key?("scope_display_names") ? data["scope_display_names"] : ::Pago::UNSET)
),
data
)
end
|