Class: Pago::V2026_04::Models::CustomerUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", email: "email", name: "name", billing_address: "billing_address", tax_id: "tax_id", locale: "locale", external_id: "external_id", type: "type" }.freeze
- REQUIRED_KEYS =
[].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
- #tax_id ⇒ String? readonly
-
#type ⇒ String?
readonly
The customer type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: ::Pago::UNSET, email: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, external_id: ::Pago::UNSET, type: ::Pago::UNSET) ⇒ CustomerUpdate
constructor
A new instance of CustomerUpdate.
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, email: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, external_id: ::Pago::UNSET, type: ::Pago::UNSET) ⇒ CustomerUpdate
Returns a new instance of CustomerUpdate.
21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 |
# File 'lib/pago/v2026_04/models.rb', line 21889 def initialize( metadata: ::Pago::UNSET, email: ::Pago::UNSET, name: ::Pago::UNSET, billing_address: ::Pago::UNSET, tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, external_id: ::Pago::UNSET, type: ::Pago::UNSET ) super() assign(:metadata, ) assign(:email, email) assign(:name, name) assign(:billing_address, billing_address) assign(:tax_id, tax_id) assign(:locale, locale) assign(:external_id, external_id) assign(:type, type) end |
Instance Attribute Details
#billing_address ⇒ Models::AddressInput? (readonly)
21873 21874 21875 |
# File 'lib/pago/v2026_04/models.rb', line 21873 def billing_address @billing_address end |
#email ⇒ String? (readonly)
The email address of the customer. This must be unique within the organization.
21867 21868 21869 |
# File 'lib/pago/v2026_04/models.rb', line 21867 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.
21883 21884 21885 |
# File 'lib/pago/v2026_04/models.rb', line 21883 def external_id @external_id end |
#locale ⇒ String? (readonly)
21879 21880 21881 |
# File 'lib/pago/v2026_04/models.rb', line 21879 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.
21863 21864 21865 |
# File 'lib/pago/v2026_04/models.rb', line 21863 def @metadata end |
#name ⇒ String? (readonly)
21870 21871 21872 |
# File 'lib/pago/v2026_04/models.rb', line 21870 def name @name end |
#tax_id ⇒ String? (readonly)
21876 21877 21878 |
# File 'lib/pago/v2026_04/models.rb', line 21876 def tax_id @tax_id end |
#type ⇒ String? (readonly)
The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.
21887 21888 21889 |
# File 'lib/pago/v2026_04/models.rb', line 21887 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerUpdate?
21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 |
# File 'lib/pago/v2026_04/models.rb', line 21912 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), email: (data.key?("email") ? data["email"] : ::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), external_id: (data.key?("external_id") ? data["external_id"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET) ), data ) end |