Class: Pago::V2026_04::Models::CustomerIndividualCreate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", external_id: "external_id", name: "name", billing_address: "billing_address", tax_id: "tax_id", locale: "locale", organization_id: "organization_id", owner: "owner", type: "type", email: "email" }.freeze
- REQUIRED_KEYS =
["email"].freeze
Instance Attribute Summary collapse
- #billing_address ⇒ Models::AddressInput? readonly
-
#email ⇒ String
readonly
The email address of the customer.
-
#external_id ⇒ String?
readonly
The ID of the customer in your system.
- #locale ⇒ String? readonly
-
#metadata ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to store additional information.
- #name ⇒ String? readonly
-
#organization_id ⇒ String?
readonly
The ID of the organization owning the customer.
-
#owner ⇒ Models::MemberOwnerCreate?
readonly
Optional owner member to create with the customer.
- #tax_id ⇒ String? readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: ::Pago::UNSET, external_id: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, organization_id: ::Pago::UNSET, owner: ::Pago::UNSET, type: ::Pago::UNSET, email:) ⇒ CustomerIndividualCreate
constructor
A new instance of CustomerIndividualCreate.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(metadata: ::Pago::UNSET, external_id: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, organization_id: ::Pago::UNSET, owner: ::Pago::UNSET, type: ::Pago::UNSET, email:) ⇒ CustomerIndividualCreate
Returns a new instance of CustomerIndividualCreate.
17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 |
# File 'lib/pago/v2026_04/models.rb', line 17093 def initialize( metadata: ::Pago::UNSET, external_id: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, organization_id: ::Pago::UNSET, owner: ::Pago::UNSET, type: ::Pago::UNSET, email: ) super() assign(:metadata, ) assign(:external_id, external_id) assign(:name, name) assign(:billing_address, billing_address) assign(:tax_id, tax_id) assign(:locale, locale) assign(:organization_id, organization_id) assign(:owner, owner) assign(:type, type) assign(:email, email) end |
Instance Attribute Details
#billing_address ⇒ Models::AddressInput? (readonly)
17070 17071 17072 |
# File 'lib/pago/v2026_04/models.rb', line 17070 def billing_address @billing_address end |
#email ⇒ String (readonly)
The email address of the customer. This must be unique within the organization.
17091 17092 17093 |
# File 'lib/pago/v2026_04/models.rb', line 17091 def email @email 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.
17064 17065 17066 |
# File 'lib/pago/v2026_04/models.rb', line 17064 def external_id @external_id end |
#locale ⇒ String? (readonly)
17076 17077 17078 |
# File 'lib/pago/v2026_04/models.rb', line 17076 def locale @locale end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
17060 17061 17062 |
# File 'lib/pago/v2026_04/models.rb', line 17060 def @metadata end |
#name ⇒ String? (readonly)
17067 17068 17069 |
# File 'lib/pago/v2026_04/models.rb', line 17067 def name @name end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the customer. Required unless you use an organization token.
17080 17081 17082 |
# File 'lib/pago/v2026_04/models.rb', line 17080 def organization_id @organization_id end |
#owner ⇒ Models::MemberOwnerCreate? (readonly)
Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.
17084 17085 17086 |
# File 'lib/pago/v2026_04/models.rb', line 17084 def owner @owner end |
#tax_id ⇒ String? (readonly)
17073 17074 17075 |
# File 'lib/pago/v2026_04/models.rb', line 17073 def tax_id @tax_id end |
#type ⇒ String (readonly)
17087 17088 17089 |
# File 'lib/pago/v2026_04/models.rb', line 17087 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerIndividualCreate?
17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 |
# File 'lib/pago/v2026_04/models.rb', line 17120 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( metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), external_id: (data.key?("external_id") ? data["external_id"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), billing_address: (data.key?("billing_address") ? Models::AddressInput.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), owner: (data.key?("owner") ? Models::MemberOwnerCreate.from_json(data["owner"]) : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), email: (data.key?("email") ? data["email"] : ::Pago::UNSET) ), data ) end |