Class: Pago::V2026_04::Models::CustomerTeamCreate
- 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 =
["type"].freeze
Instance Attribute Summary collapse
- #billing_address ⇒ Models::AddressInput? readonly
-
#email ⇒ String?
readonly
The email address of the team 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:, email: ::Pago::UNSET) ⇒ CustomerTeamCreate
constructor
A new instance of CustomerTeamCreate.
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:, email: ::Pago::UNSET) ⇒ CustomerTeamCreate
Returns a new instance of CustomerTeamCreate.
21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 |
# File 'lib/pago/v2026_04/models.rb', line 21788 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:, email: ::Pago::UNSET ) 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)
21765 21766 21767 |
# File 'lib/pago/v2026_04/models.rb', line 21765 def billing_address @billing_address end |
#email ⇒ String? (readonly)
The email address of the team customer. Optional for team customers — if omitted, an owner with an email must be provided.
21786 21787 21788 |
# File 'lib/pago/v2026_04/models.rb', line 21786 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.
21759 21760 21761 |
# File 'lib/pago/v2026_04/models.rb', line 21759 def external_id @external_id end |
#locale ⇒ String? (readonly)
21771 21772 21773 |
# File 'lib/pago/v2026_04/models.rb', line 21771 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.
21755 21756 21757 |
# File 'lib/pago/v2026_04/models.rb', line 21755 def @metadata end |
#name ⇒ String? (readonly)
21762 21763 21764 |
# File 'lib/pago/v2026_04/models.rb', line 21762 def name @name end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the customer. Required unless you use an organization token.
21775 21776 21777 |
# File 'lib/pago/v2026_04/models.rb', line 21775 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.
21779 21780 21781 |
# File 'lib/pago/v2026_04/models.rb', line 21779 def owner @owner end |
#tax_id ⇒ String? (readonly)
21768 21769 21770 |
# File 'lib/pago/v2026_04/models.rb', line 21768 def tax_id @tax_id end |
#type ⇒ String (readonly)
21782 21783 21784 |
# File 'lib/pago/v2026_04/models.rb', line 21782 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerTeamCreate?
21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 |
# File 'lib/pago/v2026_04/models.rb', line 21815 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 |