Class: Pago::V2026_04::Models::CustomerStateTeam
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A team customer along with additional state information:
- Active subscriptions
- Granted benefits
- Active meters
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", metadata: "metadata", external_id: "external_id", email: "email", email_verified: "email_verified", type: "type", name: "name", billing_name: "billing_name", billing_address: "billing_address", tax_id: "tax_id", locale: "locale", organization_id: "organization_id", default_payment_method_id: "default_payment_method_id", deleted_at: "deleted_at", avatar_url: "avatar_url", active_subscriptions: "active_subscriptions", granted_benefits: "granted_benefits", active_meters: "active_meters" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "metadata", "email_verified", "type", "name", "billing_name", "billing_address", "tax_id", "organization_id", "deleted_at", "avatar_url", "active_subscriptions", "granted_benefits", "active_meters"].freeze
Instance Attribute Summary collapse
-
#active_meters ⇒ Array<Models::CustomerStateMeter>
readonly
The customer's active meters.
-
#active_subscriptions ⇒ Array<Models::CustomerStateSubscription>
readonly
The customer's active subscriptions.
- #avatar_url ⇒ String? readonly
- #billing_address ⇒ Models::Address? readonly
-
#billing_name ⇒ String?
readonly
The name that should appear on the customer's invoices.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#default_payment_method_id ⇒ String?
readonly
The ID of the customer's default payment method, if any.
-
#deleted_at ⇒ String?
readonly
Timestamp for when the customer was soft deleted.
-
#email ⇒ String?
readonly
The email address of the customer.
-
#email_verified ⇒ Boolean
readonly
Whether the customer email address is verified.
-
#external_id ⇒ String?
readonly
The ID of the customer in your system.
-
#granted_benefits ⇒ Array<Models::CustomerStateBenefitGrant>
readonly
The customer's active benefit grants.
-
#id ⇒ String
readonly
The ID of the customer.
- #locale ⇒ String? readonly
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String?
readonly
The name of the customer.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the customer.
- #tax_id ⇒ Array<Object>? readonly
-
#type ⇒ String
readonly
The type of customer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, metadata:, external_id: ::Pago::UNSET, email: ::Pago::UNSET, email_verified:, type:, name:, billing_name:, billing_address:, tax_id:, locale: ::Pago::UNSET, organization_id:, default_payment_method_id: ::Pago::UNSET, deleted_at:, avatar_url:, active_subscriptions:, granted_benefits:, active_meters:) ⇒ CustomerStateTeam
constructor
A new instance of CustomerStateTeam.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, metadata:, external_id: ::Pago::UNSET, email: ::Pago::UNSET, email_verified:, type:, name:, billing_name:, billing_address:, tax_id:, locale: ::Pago::UNSET, organization_id:, default_payment_method_id: ::Pago::UNSET, deleted_at:, avatar_url:, active_subscriptions:, granted_benefits:, active_meters:) ⇒ CustomerStateTeam
Returns a new instance of CustomerStateTeam.
20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 |
# File 'lib/pago/v2026_04/models.rb', line 20644 def initialize( id:, created_at:, modified_at:, metadata:, external_id: ::Pago::UNSET, email: ::Pago::UNSET, email_verified:, type:, name:, billing_name:, billing_address:, tax_id:, locale: ::Pago::UNSET, organization_id:, default_payment_method_id: ::Pago::UNSET, deleted_at:, avatar_url:, active_subscriptions:, granted_benefits:, active_meters: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:metadata, ) assign(:external_id, external_id) assign(:email, email) assign(:email_verified, email_verified) assign(:type, type) assign(:name, name) assign(:billing_name, billing_name) assign(:billing_address, billing_address) assign(:tax_id, tax_id) assign(:locale, locale) assign(:organization_id, organization_id) assign(:default_payment_method_id, default_payment_method_id) assign(:deleted_at, deleted_at) assign(:avatar_url, avatar_url) assign(:active_subscriptions, active_subscriptions) assign(:granted_benefits, granted_benefits) assign(:active_meters, active_meters) end |
Instance Attribute Details
#active_meters ⇒ Array<Models::CustomerStateMeter> (readonly)
The customer's active meters.
20642 20643 20644 |
# File 'lib/pago/v2026_04/models.rb', line 20642 def active_meters @active_meters end |
#active_subscriptions ⇒ Array<Models::CustomerStateSubscription> (readonly)
The customer's active subscriptions.
20634 20635 20636 |
# File 'lib/pago/v2026_04/models.rb', line 20634 def active_subscriptions @active_subscriptions end |
#avatar_url ⇒ String? (readonly)
20630 20631 20632 |
# File 'lib/pago/v2026_04/models.rb', line 20630 def avatar_url @avatar_url end |
#billing_address ⇒ Models::Address? (readonly)
20609 20610 20611 |
# File 'lib/pago/v2026_04/models.rb', line 20609 def billing_address @billing_address end |
#billing_name ⇒ String? (readonly)
The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.
20606 20607 20608 |
# File 'lib/pago/v2026_04/models.rb', line 20606 def billing_name @billing_name end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
20575 20576 20577 |
# File 'lib/pago/v2026_04/models.rb', line 20575 def created_at @created_at end |
#default_payment_method_id ⇒ String? (readonly)
The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.
20623 20624 20625 |
# File 'lib/pago/v2026_04/models.rb', line 20623 def default_payment_method_id @default_payment_method_id end |
#deleted_at ⇒ String? (readonly)
Timestamp for when the customer was soft deleted.
20627 20628 20629 |
# File 'lib/pago/v2026_04/models.rb', line 20627 def deleted_at @deleted_at end |
#email ⇒ String? (readonly)
The email address of the customer. This must be unique within the organization.
20590 20591 20592 |
# File 'lib/pago/v2026_04/models.rb', line 20590 def email @email end |
#email_verified ⇒ Boolean (readonly)
Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
20594 20595 20596 |
# File 'lib/pago/v2026_04/models.rb', line 20594 def email_verified @email_verified end |
#external_id ⇒ String? (readonly)
The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
20586 20587 20588 |
# File 'lib/pago/v2026_04/models.rb', line 20586 def external_id @external_id end |
#granted_benefits ⇒ Array<Models::CustomerStateBenefitGrant> (readonly)
The customer's active benefit grants.
20638 20639 20640 |
# File 'lib/pago/v2026_04/models.rb', line 20638 def granted_benefits @granted_benefits end |
#id ⇒ String (readonly)
The ID of the customer.
20571 20572 20573 |
# File 'lib/pago/v2026_04/models.rb', line 20571 def id @id end |
#locale ⇒ String? (readonly)
20615 20616 20617 |
# File 'lib/pago/v2026_04/models.rb', line 20615 def locale @locale end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
20582 20583 20584 |
# File 'lib/pago/v2026_04/models.rb', line 20582 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
20579 20580 20581 |
# File 'lib/pago/v2026_04/models.rb', line 20579 def modified_at @modified_at end |
#name ⇒ String? (readonly)
The name of the customer.
20602 20603 20604 |
# File 'lib/pago/v2026_04/models.rb', line 20602 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the customer.
20619 20620 20621 |
# File 'lib/pago/v2026_04/models.rb', line 20619 def organization_id @organization_id end |
#tax_id ⇒ Array<Object>? (readonly)
20612 20613 20614 |
# File 'lib/pago/v2026_04/models.rb', line 20612 def tax_id @tax_id end |
#type ⇒ String (readonly)
The type of customer. Team customers can have multiple members.
20598 20599 20600 |
# File 'lib/pago/v2026_04/models.rb', line 20598 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerStateTeam?
20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 |
# File 'lib/pago/v2026_04/models.rb', line 20691 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), external_id: (data.key?("external_id") ? data["external_id"] : ::Pago::UNSET), email: (data.key?("email") ? data["email"] : ::Pago::UNSET), email_verified: (data.key?("email_verified") ? data["email_verified"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), billing_name: (data.key?("billing_name") ? data["billing_name"] : ::Pago::UNSET), billing_address: (data.key?("billing_address") ? Models::Address.from_json(data["billing_address"]) : ::Pago::UNSET), tax_id: (data.key?("tax_id") ? data["tax_id"] : ::Pago::UNSET), locale: (data.key?("locale") ? data["locale"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), default_payment_method_id: (data.key?("default_payment_method_id") ? data["default_payment_method_id"] : ::Pago::UNSET), deleted_at: (data.key?("deleted_at") ? data["deleted_at"] : ::Pago::UNSET), avatar_url: (data.key?("avatar_url") ? data["avatar_url"] : ::Pago::UNSET), active_subscriptions: (data.key?("active_subscriptions") ? ::Pago::Serde.array(data["active_subscriptions"]) { |item0| Models::CustomerStateSubscription.from_json(item0) } : ::Pago::UNSET), granted_benefits: (data.key?("granted_benefits") ? ::Pago::Serde.array(data["granted_benefits"]) { |item0| Models::CustomerStateBenefitGrant.from_json(item0) } : ::Pago::UNSET), active_meters: (data.key?("active_meters") ? ::Pago::Serde.array(data["active_meters"]) { |item0| Models::CustomerStateMeter.from_json(item0) } : ::Pago::UNSET) ), data ) end |