Class: Pago::V2026_04::Models::CustomerPortalMemberCreate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema for adding a new member to the customer's team.
Constant Summary collapse
- JSON_KEYS =
{ email: "email", name: "name", role: "role" }.freeze
- REQUIRED_KEYS =
["email"].freeze
Instance Attribute Summary collapse
-
#email ⇒ String
readonly
The email address of the new member.
-
#name ⇒ String?
readonly
The name of the new member (optional).
- #role ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email:, name: ::Pago::UNSET, role: ::Pago::UNSET) ⇒ CustomerPortalMemberCreate
constructor
A new instance of CustomerPortalMemberCreate.
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, role: ::Pago::UNSET) ⇒ CustomerPortalMemberCreate
Returns a new instance of CustomerPortalMemberCreate.
19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 |
# File 'lib/pago/v2026_04/models.rb', line 19065 def initialize( email:, name: ::Pago::UNSET, role: ::Pago::UNSET ) super() assign(:email, email) assign(:name, name) assign(:role, role) end |
Instance Attribute Details
#email ⇒ String (readonly)
The email address of the new member.
19056 19057 19058 |
# File 'lib/pago/v2026_04/models.rb', line 19056 def email @email end |
#name ⇒ String? (readonly)
The name of the new member (optional).
19060 19061 19062 |
# File 'lib/pago/v2026_04/models.rb', line 19060 def name @name end |
#role ⇒ String (readonly)
19063 19064 19065 |
# File 'lib/pago/v2026_04/models.rb', line 19063 def role @role end |
Class Method Details
.from_json(data) ⇒ CustomerPortalMemberCreate?
19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 |
# File 'lib/pago/v2026_04/models.rb', line 19078 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), role: (data.key?("role") ? data["role"] : ::Pago::UNSET) ), data ) end |