Class: Pago::V2026_04::Models::CustomerSeat
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", subscription_id: "subscription_id", order_id: "order_id", status: "status", customer_id: "customer_id", member_id: "member_id", member: "member", email: "email", customer_email: "customer_email", invitation_token_expires_at: "invitation_token_expires_at", claimed_at: "claimed_at", revoked_at: "revoked_at", seat_metadata: "seat_metadata" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "subscription_id", "order_id", "status", "customer_id", "member_id", "member", "email", "customer_email", "invitation_token_expires_at", "claimed_at", "revoked_at", "seat_metadata"].freeze
Instance Attribute Summary collapse
-
#claimed_at ⇒ String?
readonly
When the seat was claimed.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#customer_email ⇒ String?
readonly
The assigned customer email.
-
#customer_id ⇒ String?
readonly
The customer ID.
-
#email ⇒ String?
readonly
Email of the seat member (set when member_model_enabled is true).
-
#id ⇒ String
readonly
The seat ID.
-
#invitation_token_expires_at ⇒ String?
readonly
When the invitation token expires.
-
#member ⇒ Models::Member?
readonly
The member associated with this seat.
-
#member_id ⇒ String?
readonly
The member ID of the seat occupant.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#order_id ⇒ String?
readonly
The order ID (for one-time purchase seats).
-
#revoked_at ⇒ String?
readonly
When the seat was revoked.
-
#seat_metadata ⇒ Hash{String => Object}?
readonly
Additional metadata for the seat.
- #status ⇒ String readonly
-
#subscription_id ⇒ String?
readonly
The subscription ID (for recurring seats).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, subscription_id:, order_id:, status:, customer_id:, member_id:, member:, email:, customer_email:, invitation_token_expires_at:, claimed_at:, revoked_at:, seat_metadata:) ⇒ CustomerSeat
constructor
A new instance of CustomerSeat.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, subscription_id:, order_id:, status:, customer_id:, member_id:, member:, email:, customer_email:, invitation_token_expires_at:, claimed_at:, revoked_at:, seat_metadata:) ⇒ CustomerSeat
Returns a new instance of CustomerSeat.
19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 |
# File 'lib/pago/v2026_04/models.rb', line 19501 def initialize( created_at:, modified_at:, id:, subscription_id:, order_id:, status:, customer_id:, member_id:, member:, email:, customer_email:, invitation_token_expires_at:, claimed_at:, revoked_at:, seat_metadata: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:subscription_id, subscription_id) assign(:order_id, order_id) assign(:status, status) assign(:customer_id, customer_id) assign(:member_id, member_id) assign(:member, member) assign(:email, email) assign(:customer_email, customer_email) assign(:invitation_token_expires_at, invitation_token_expires_at) assign(:claimed_at, claimed_at) assign(:revoked_at, revoked_at) assign(:seat_metadata, ) end |
Instance Attribute Details
#claimed_at ⇒ String? (readonly)
When the seat was claimed
19491 19492 19493 |
# File 'lib/pago/v2026_04/models.rb', line 19491 def claimed_at @claimed_at end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
19444 19445 19446 |
# File 'lib/pago/v2026_04/models.rb', line 19444 def created_at @created_at end |
#customer_email ⇒ String? (readonly)
The assigned customer email
19483 19484 19485 |
# File 'lib/pago/v2026_04/models.rb', line 19483 def customer_email @customer_email end |
#customer_id ⇒ String? (readonly)
The customer ID. When member_model_enabled is true, this is the billing customer (purchaser). When false, this is the seat member customer.
19467 19468 19469 |
# File 'lib/pago/v2026_04/models.rb', line 19467 def customer_id @customer_id end |
#email ⇒ String? (readonly)
Email of the seat member (set when member_model_enabled is true)
19479 19480 19481 |
# File 'lib/pago/v2026_04/models.rb', line 19479 def email @email end |
#id ⇒ String (readonly)
The seat ID
19452 19453 19454 |
# File 'lib/pago/v2026_04/models.rb', line 19452 def id @id end |
#invitation_token_expires_at ⇒ String? (readonly)
When the invitation token expires
19487 19488 19489 |
# File 'lib/pago/v2026_04/models.rb', line 19487 def invitation_token_expires_at @invitation_token_expires_at end |
#member ⇒ Models::Member? (readonly)
The member associated with this seat
19475 19476 19477 |
# File 'lib/pago/v2026_04/models.rb', line 19475 def member @member end |
#member_id ⇒ String? (readonly)
The member ID of the seat occupant
19471 19472 19473 |
# File 'lib/pago/v2026_04/models.rb', line 19471 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
19448 19449 19450 |
# File 'lib/pago/v2026_04/models.rb', line 19448 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The order ID (for one-time purchase seats)
19460 19461 19462 |
# File 'lib/pago/v2026_04/models.rb', line 19460 def order_id @order_id end |
#revoked_at ⇒ String? (readonly)
When the seat was revoked
19495 19496 19497 |
# File 'lib/pago/v2026_04/models.rb', line 19495 def revoked_at @revoked_at end |
#seat_metadata ⇒ Hash{String => Object}? (readonly)
Additional metadata for the seat
19499 19500 19501 |
# File 'lib/pago/v2026_04/models.rb', line 19499 def @seat_metadata end |
#status ⇒ String (readonly)
19463 19464 19465 |
# File 'lib/pago/v2026_04/models.rb', line 19463 def status @status end |
#subscription_id ⇒ String? (readonly)
The subscription ID (for recurring seats)
19456 19457 19458 |
# File 'lib/pago/v2026_04/models.rb', line 19456 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ CustomerSeat?
19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 |
# File 'lib/pago/v2026_04/models.rb', line 19538 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), status: (data.key?("status") ? data["status"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), member_id: (data.key?("member_id") ? data["member_id"] : ::Pago::UNSET), member: (data.key?("member") ? Models::Member.from_json(data["member"]) : ::Pago::UNSET), email: (data.key?("email") ? data["email"] : ::Pago::UNSET), customer_email: (data.key?("customer_email") ? data["customer_email"] : ::Pago::UNSET), invitation_token_expires_at: (data.key?("invitation_token_expires_at") ? data["invitation_token_expires_at"] : ::Pago::UNSET), claimed_at: (data.key?("claimed_at") ? data["claimed_at"] : ::Pago::UNSET), revoked_at: (data.key?("revoked_at") ? data["revoked_at"] : ::Pago::UNSET), seat_metadata: (data.key?("seat_metadata") ? data["seat_metadata"] : ::Pago::UNSET) ), data ) end |