Class: Pago::V2026_04::Models::SeatAssign

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"
}.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) ⇒ SeatAssign

Returns a new instance of SeatAssign.

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)


39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
# File 'lib/pago/v2026_04/models.rb', line 39039

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
)
  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)
end

Instance Attribute Details

#customer_idString? (readonly)

Customer ID for the seat assignment

Returns:

  • (String, nil)


39021
39022
39023
# File 'lib/pago/v2026_04/models.rb', line 39021

def customer_id
  @customer_id
end

#emailString? (readonly)

Email of the customer to assign the seat to

Returns:

  • (String, nil)


39013
39014
39015
# File 'lib/pago/v2026_04/models.rb', line 39013

def email
  @email
end

#external_customer_idString? (readonly)

External customer ID for the seat assignment

Returns:

  • (String, nil)


39017
39018
39019
# File 'lib/pago/v2026_04/models.rb', line 39017

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)


39025
39026
39027
# File 'lib/pago/v2026_04/models.rb', line 39025

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)


39037
39038
39039
# File 'lib/pago/v2026_04/models.rb', line 39037

def immediate_claim
  @immediate_claim
end

#member_idString? (readonly)

Member ID for the seat assignment.

Returns:

  • (String, nil)


39029
39030
39031
# File 'lib/pago/v2026_04/models.rb', line 39029

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)


39033
39034
39035
# File 'lib/pago/v2026_04/models.rb', line 39033

def 
  @metadata
end

#order_idString? (readonly)

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

Returns:

  • (String, nil)


39009
39010
39011
# File 'lib/pago/v2026_04/models.rb', line 39009

def order_id
  @order_id
end

#subscription_idString? (readonly)

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

Returns:

  • (String, nil)


39005
39006
39007
# File 'lib/pago/v2026_04/models.rb', line 39005

def subscription_id
  @subscription_id
end

Class Method Details

.from_json(data) ⇒ SeatAssign?

Parameters:

  • data (Hash, String, nil)

Returns:



39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
# File 'lib/pago/v2026_04/models.rb', line 39064

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)
    ),
    data
  )
end