Class: Pago::V2026_04::Models::Member
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A member of a customer.
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", customer_id: "customer_id", email: "email", name: "name", external_id: "external_id", role: "role" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "customer_id", "email", "name", "external_id", "role"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#customer_id ⇒ String
readonly
The ID of the customer this member belongs to.
-
#email ⇒ String
readonly
The email address of the member.
-
#external_id ⇒ String?
readonly
The ID of the member in your system.
-
#id ⇒ String
readonly
The ID of the member.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String?
readonly
The name of the member.
- #role ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, customer_id:, email:, name:, external_id:, role:) ⇒ Member
constructor
A new instance of Member.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, customer_id:, email:, name:, external_id:, role:) ⇒ Member
Returns a new instance of Member.
28805 28806 28807 28808 28809 28810 28811 28812 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 |
# File 'lib/pago/v2026_04/models.rb', line 28805 def initialize( id:, created_at:, modified_at:, customer_id:, email:, name:, external_id:, role: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:customer_id, customer_id) assign(:email, email) assign(:name, name) assign(:external_id, external_id) assign(:role, role) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
28780 28781 28782 |
# File 'lib/pago/v2026_04/models.rb', line 28780 def created_at @created_at end |
#customer_id ⇒ String (readonly)
The ID of the customer this member belongs to.
28788 28789 28790 |
# File 'lib/pago/v2026_04/models.rb', line 28788 def customer_id @customer_id end |
#email ⇒ String (readonly)
The email address of the member.
28792 28793 28794 |
# File 'lib/pago/v2026_04/models.rb', line 28792 def email @email end |
#external_id ⇒ String? (readonly)
The ID of the member in your system. This must be unique within the customer.
28800 28801 28802 |
# File 'lib/pago/v2026_04/models.rb', line 28800 def external_id @external_id end |
#id ⇒ String (readonly)
The ID of the member.
28776 28777 28778 |
# File 'lib/pago/v2026_04/models.rb', line 28776 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
28784 28785 28786 |
# File 'lib/pago/v2026_04/models.rb', line 28784 def modified_at @modified_at end |
#name ⇒ String? (readonly)
The name of the member.
28796 28797 28798 |
# File 'lib/pago/v2026_04/models.rb', line 28796 def name @name end |
#role ⇒ String (readonly)
28803 28804 28805 |
# File 'lib/pago/v2026_04/models.rb', line 28803 def role @role end |
Class Method Details
.from_json(data) ⇒ Member?
28828 28829 28830 28831 28832 28833 28834 28835 28836 28837 28838 28839 28840 28841 28842 28843 28844 28845 28846 |
# File 'lib/pago/v2026_04/models.rb', line 28828 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), 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 |