Class: Pago::V2026_04::Models::CustomerIndividual
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A customer in an organization.
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" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "metadata", "email", "email_verified", "type", "name", "billing_name", "billing_address", "tax_id", "organization_id", "deleted_at", "avatar_url"].freeze
Instance Attribute Summary collapse
- #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.
-
#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:, 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:) ⇒ CustomerIndividual
constructor
A new instance of CustomerIndividual.
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:, 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:) ⇒ CustomerIndividual
Returns a new instance of CustomerIndividual.
16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 |
# File 'lib/pago/v2026_04/models.rb', line 16962 def initialize( id:, created_at:, modified_at:, metadata:, external_id: ::Pago::UNSET, email:, 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: ) 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) end |
Instance Attribute Details
#avatar_url ⇒ String? (readonly)
16960 16961 16962 |
# File 'lib/pago/v2026_04/models.rb', line 16960 def avatar_url @avatar_url end |
#billing_address ⇒ Models::Address? (readonly)
16939 16940 16941 |
# File 'lib/pago/v2026_04/models.rb', line 16939 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.
16936 16937 16938 |
# File 'lib/pago/v2026_04/models.rb', line 16936 def billing_name @billing_name end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
16905 16906 16907 |
# File 'lib/pago/v2026_04/models.rb', line 16905 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.
16953 16954 16955 |
# File 'lib/pago/v2026_04/models.rb', line 16953 def default_payment_method_id @default_payment_method_id end |
#deleted_at ⇒ String? (readonly)
Timestamp for when the customer was soft deleted.
16957 16958 16959 |
# File 'lib/pago/v2026_04/models.rb', line 16957 def deleted_at @deleted_at end |
#email ⇒ String (readonly)
The email address of the customer. This must be unique within the organization.
16920 16921 16922 |
# File 'lib/pago/v2026_04/models.rb', line 16920 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.
16924 16925 16926 |
# File 'lib/pago/v2026_04/models.rb', line 16924 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.
16916 16917 16918 |
# File 'lib/pago/v2026_04/models.rb', line 16916 def external_id @external_id end |
#id ⇒ String (readonly)
The ID of the customer.
16901 16902 16903 |
# File 'lib/pago/v2026_04/models.rb', line 16901 def id @id end |
#locale ⇒ String? (readonly)
16945 16946 16947 |
# File 'lib/pago/v2026_04/models.rb', line 16945 def locale @locale end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
16912 16913 16914 |
# File 'lib/pago/v2026_04/models.rb', line 16912 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
16909 16910 16911 |
# File 'lib/pago/v2026_04/models.rb', line 16909 def modified_at @modified_at end |
#name ⇒ String? (readonly)
The name of the customer.
16932 16933 16934 |
# File 'lib/pago/v2026_04/models.rb', line 16932 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the customer.
16949 16950 16951 |
# File 'lib/pago/v2026_04/models.rb', line 16949 def organization_id @organization_id end |
#tax_id ⇒ Array<Object>? (readonly)
16942 16943 16944 |
# File 'lib/pago/v2026_04/models.rb', line 16942 def tax_id @tax_id end |
#type ⇒ String (readonly)
The type of customer.
16928 16929 16930 |
# File 'lib/pago/v2026_04/models.rb', line 16928 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerIndividual?
17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 |
# File 'lib/pago/v2026_04/models.rb', line 17003 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) ), data ) end |