Class: Pago::V2026_04::Models::AuthorizeResponseOrganization
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::AuthorizeResponseOrganization
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) ⇒ AuthorizeResponseOrganization
Returns a new instance of AuthorizeResponseOrganization.
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
|
# File 'lib/pago/v2026_04/models.rb', line 506
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
486
487
488
|
# File 'lib/pago/v2026_04/models.rb', line 486
def client
@client
end
|
498
499
500
|
# File 'lib/pago/v2026_04/models.rb', line 498
def organizations
@organizations
end
|
#requires_single_organization ⇒ Boolean
501
502
503
|
# File 'lib/pago/v2026_04/models.rb', line 501
def requires_single_organization
@requires_single_organization
end
|
#scope_display_names ⇒ Hash{String => String}
504
505
506
|
# File 'lib/pago/v2026_04/models.rb', line 504
def scope_display_names
@scope_display_names
end
|
#scopes ⇒ Array<String>
495
496
497
|
# File 'lib/pago/v2026_04/models.rb', line 495
def scopes
@scopes
end
|
492
493
494
|
# File 'lib/pago/v2026_04/models.rb', line 492
def sub
@sub
end
|
#sub_type ⇒ String
489
490
491
|
# File 'lib/pago/v2026_04/models.rb', line 489
def sub_type
@sub_type
end
|
Class Method Details
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
|
# File 'lib/pago/v2026_04/models.rb', line 527
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::AuthorizeOrganization.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
|