Class: Pago::V2026_04::Models::OrderCustomer
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
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_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
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:) ⇒ OrderCustomer
constructor
A new instance of OrderCustomer.
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:) ⇒ OrderCustomer
Returns a new instance of OrderCustomer.
32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380 32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 |
# File 'lib/pago/v2026_04/models.rb', line 32362 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: ) 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)
32360 32361 32362 |
# File 'lib/pago/v2026_04/models.rb', line 32360 def avatar_url @avatar_url end |
#billing_address ⇒ Models::Address? (readonly)
32339 32340 32341 |
# File 'lib/pago/v2026_04/models.rb', line 32339 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.
32336 32337 32338 |
# File 'lib/pago/v2026_04/models.rb', line 32336 def billing_name @billing_name end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
32306 32307 32308 |
# File 'lib/pago/v2026_04/models.rb', line 32306 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.
32353 32354 32355 |
# File 'lib/pago/v2026_04/models.rb', line 32353 def default_payment_method_id @default_payment_method_id end |
#deleted_at ⇒ String? (readonly)
Timestamp for when the customer was soft deleted.
32357 32358 32359 |
# File 'lib/pago/v2026_04/models.rb', line 32357 def deleted_at @deleted_at end |
#email ⇒ String? (readonly)
The email address of the customer. This must be unique within the organization.
32321 32322 32323 |
# File 'lib/pago/v2026_04/models.rb', line 32321 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.
32325 32326 32327 |
# File 'lib/pago/v2026_04/models.rb', line 32325 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.
32317 32318 32319 |
# File 'lib/pago/v2026_04/models.rb', line 32317 def external_id @external_id end |
#id ⇒ String (readonly)
The ID of the customer.
32302 32303 32304 |
# File 'lib/pago/v2026_04/models.rb', line 32302 def id @id end |
#locale ⇒ String? (readonly)
32345 32346 32347 |
# File 'lib/pago/v2026_04/models.rb', line 32345 def locale @locale end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
32313 32314 32315 |
# File 'lib/pago/v2026_04/models.rb', line 32313 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
32310 32311 32312 |
# File 'lib/pago/v2026_04/models.rb', line 32310 def modified_at @modified_at end |
#name ⇒ String? (readonly)
The name of the customer.
32332 32333 32334 |
# File 'lib/pago/v2026_04/models.rb', line 32332 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the customer.
32349 32350 32351 |
# File 'lib/pago/v2026_04/models.rb', line 32349 def organization_id @organization_id end |
#tax_id ⇒ Array<Object>? (readonly)
32342 32343 32344 |
# File 'lib/pago/v2026_04/models.rb', line 32342 def tax_id @tax_id end |
#type ⇒ String (readonly)
32328 32329 32330 |
# File 'lib/pago/v2026_04/models.rb', line 32328 def type @type end |
Class Method Details
.from_json(data) ⇒ OrderCustomer?
32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 |
# File 'lib/pago/v2026_04/models.rb', line 32403 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 |