Class: Pago::V2026_04::Models::MemberCreateFromCustomer
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema for creating a new member nested under a customer.
The customer is taken from the URL path, so it's not part of the body.
Constant Summary collapse
- JSON_KEYS =
{ email: "email", name: "name", external_id: "external_id", role: "role" }.freeze
- REQUIRED_KEYS =
["email"].freeze
Instance Attribute Summary collapse
-
#email ⇒ String
readonly
The email address of the member.
-
#external_id ⇒ String?
readonly
The ID of the member in your system.
- #name ⇒ String? readonly
-
#role ⇒ String
readonly
The role of the member within the customer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email:, name: ::Pago::UNSET, external_id: ::Pago::UNSET, role: ::Pago::UNSET) ⇒ MemberCreateFromCustomer
constructor
A new instance of MemberCreateFromCustomer.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(email:, name: ::Pago::UNSET, external_id: ::Pago::UNSET, role: ::Pago::UNSET) ⇒ MemberCreateFromCustomer
Returns a new instance of MemberCreateFromCustomer.
28876 28877 28878 28879 28880 28881 28882 28883 28884 28885 28886 28887 |
# File 'lib/pago/v2026_04/models.rb', line 28876 def initialize( email:, name: ::Pago::UNSET, external_id: ::Pago::UNSET, role: ::Pago::UNSET ) super() assign(:email, email) assign(:name, name) assign(:external_id, external_id) assign(:role, role) end |
Instance Attribute Details
#email ⇒ String (readonly)
The email address of the member.
28863 28864 28865 |
# File 'lib/pago/v2026_04/models.rb', line 28863 def email @email end |
#external_id ⇒ String? (readonly)
The ID of the member in your system. This must be unique within the customer.
28870 28871 28872 |
# File 'lib/pago/v2026_04/models.rb', line 28870 def external_id @external_id end |
#name ⇒ String? (readonly)
28866 28867 28868 |
# File 'lib/pago/v2026_04/models.rb', line 28866 def name @name end |
#role ⇒ String (readonly)
The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.
28874 28875 28876 |
# File 'lib/pago/v2026_04/models.rb', line 28874 def role @role end |
Class Method Details
.from_json(data) ⇒ MemberCreateFromCustomer?
28891 28892 28893 28894 28895 28896 28897 28898 28899 28900 28901 28902 28903 28904 28905 |
# File 'lib/pago/v2026_04/models.rb', line 28891 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( email: (data.key?("email") ? data["email"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), external_id: (data.key?("external_id") ? data["external_id"] : ::Pago::UNSET), role: (data.key?("role") ? data["role"] : ::Pago::UNSET) ), data ) end |