Class: Pago::V2026_04::Models::CustomerSeatAssign

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])
{
  subscription_id: "subscription_id",
  order_id: "order_id",
  email: "email",
  external_customer_id: "external_customer_id",
  customer_id: "customer_id",
  external_member_id: "external_member_id",
  member_id: "member_id",
  metadata: "metadata",
  immediate_claim: "immediate_claim",
  checkout_id: "checkout_id"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
[].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(subscription_id: ::Pago::UNSET, order_id: ::Pago::UNSET, email: ::Pago::UNSET, external_customer_id: ::Pago::UNSET, customer_id: ::Pago::UNSET, external_member_id: ::Pago::UNSET, member_id: ::Pago::UNSET, metadata: ::Pago::UNSET, immediate_claim: ::Pago::UNSET, checkout_id: ::Pago::UNSET) ⇒ CustomerSeatAssign

Returns a new instance of CustomerSeatAssign.

Parameters:

  • subscription_id: (String, nil) (defaults to: ::Pago::UNSET)
  • order_id: (String, nil) (defaults to: ::Pago::UNSET)
  • email: (String, nil) (defaults to: ::Pago::UNSET)
  • external_customer_id: (String, nil) (defaults to: ::Pago::UNSET)
  • customer_id: (String, nil) (defaults to: ::Pago::UNSET)
  • external_member_id: (String, nil) (defaults to: ::Pago::UNSET)
  • member_id: (String, nil) (defaults to: ::Pago::UNSET)
  • metadata: (Hash[String, untyped], nil) (defaults to: ::Pago::UNSET)
  • immediate_claim: (Boolean, nil) (defaults to: ::Pago::UNSET)
  • checkout_id: (String, nil) (defaults to: ::Pago::UNSET)


19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
# File 'lib/pago/v2026_04/models.rb', line 19621

def initialize(
  subscription_id: ::Pago::UNSET,
  order_id: ::Pago::UNSET,
  email: ::Pago::UNSET,
  external_customer_id: ::Pago::UNSET,
  customer_id: ::Pago::UNSET,
  external_member_id: ::Pago::UNSET,
  member_id: ::Pago::UNSET,
  metadata: ::Pago::UNSET,
  immediate_claim: ::Pago::UNSET,
  checkout_id: ::Pago::UNSET
)
  super()
  assign(:subscription_id, subscription_id)
  assign(:order_id, order_id)
  assign(:email, email)
  assign(:external_customer_id, external_customer_id)
  assign(:customer_id, customer_id)
  assign(:external_member_id, external_member_id)
  assign(:member_id, member_id)
  assign(:metadata, )
  assign(:immediate_claim, immediate_claim)
  assign(:checkout_id, checkout_id)
end

Instance Attribute Details

#checkout_idString? (readonly)

Checkout ID. Resolves to the subscription or order produced by the checkout.

Returns:

  • (String, nil)


19619
19620
19621
# File 'lib/pago/v2026_04/models.rb', line 19619

def checkout_id
  @checkout_id
end

#customer_idString? (readonly)

Customer ID for the seat assignment

Returns:

  • (String, nil)


19599
19600
19601
# File 'lib/pago/v2026_04/models.rb', line 19599

def customer_id
  @customer_id
end

#emailString? (readonly)

Email of the customer to assign the seat to

Returns:

  • (String, nil)


19591
19592
19593
# File 'lib/pago/v2026_04/models.rb', line 19591

def email
  @email
end

#external_customer_idString? (readonly)

External customer ID for the seat assignment

Returns:

  • (String, nil)


19595
19596
19597
# File 'lib/pago/v2026_04/models.rb', line 19595

def external_customer_id
  @external_customer_id
end

#external_member_idString? (readonly)

External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).

Returns:

  • (String, nil)


19603
19604
19605
# File 'lib/pago/v2026_04/models.rb', line 19603

def external_member_id
  @external_member_id
end

#immediate_claimBoolean (readonly)

If true, the seat will be immediately claimed without sending an invitation email. API-only feature.

Returns:

  • (Boolean)


19615
19616
19617
# File 'lib/pago/v2026_04/models.rb', line 19615

def immediate_claim
  @immediate_claim
end

#member_idString? (readonly)

Member ID for the seat assignment.

Returns:

  • (String, nil)


19607
19608
19609
# File 'lib/pago/v2026_04/models.rb', line 19607

def member_id
  @member_id
end

#metadataHash{String => Object}? (readonly)

Additional metadata for the seat (max 10 keys, 1KB total)

Returns:

  • (Hash{String => Object}, nil)


19611
19612
19613
# File 'lib/pago/v2026_04/models.rb', line 19611

def 
  @metadata
end

#order_idString? (readonly)

Order ID for one-time purchases. Required if subscription_id is not provided.

Returns:

  • (String, nil)


19587
19588
19589
# File 'lib/pago/v2026_04/models.rb', line 19587

def order_id
  @order_id
end

#subscription_idString? (readonly)

Subscription ID. Required if neither order_id nor checkout_id is provided.

Returns:

  • (String, nil)


19583
19584
19585
# File 'lib/pago/v2026_04/models.rb', line 19583

def subscription_id
  @subscription_id
end

Class Method Details

.from_json(data) ⇒ CustomerSeatAssign?

Parameters:

  • data (Hash, String, nil)

Returns:



19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
# File 'lib/pago/v2026_04/models.rb', line 19648

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(
      subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET),
      order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET),
      email: (data.key?("email") ? data["email"] : ::Pago::UNSET),
      external_customer_id: (data.key?("external_customer_id") ? data["external_customer_id"] : ::Pago::UNSET),
      customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET),
      external_member_id: (data.key?("external_member_id") ? data["external_member_id"] : ::Pago::UNSET),
      member_id: (data.key?("member_id") ? data["member_id"] : ::Pago::UNSET),
      metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET),
      immediate_claim: (data.key?("immediate_claim") ? data["immediate_claim"] : ::Pago::UNSET),
      checkout_id: (data.key?("checkout_id") ? data["checkout_id"] : ::Pago::UNSET)
    ),
    data
  )
end