Class: Pago::V2026_04::Models::EventCreateCustomer
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ timestamp: "timestamp", name: "name", organization_id: "organization_id", external_id: "external_id", parent_id: "parent_id", metadata: "metadata", customer_id: "customer_id", member_id: "member_id" }.freeze
- REQUIRED_KEYS =
["name", "customer_id"].freeze
Instance Attribute Summary collapse
-
#customer_id ⇒ String
readonly
ID of the customer in your Pago organization associated with the event.
-
#external_id ⇒ String?
readonly
Your unique identifier for this event.
-
#member_id ⇒ String?
readonly
ID of the member within the customer's organization who performed the action.
- #metadata ⇒ Models::EventMetadataInput readonly
-
#name ⇒ String
readonly
The name of the event.
-
#organization_id ⇒ String?
readonly
The ID of the organization owning the event.
-
#parent_id ⇒ String?
readonly
The ID of the parent event.
-
#timestamp ⇒ String
readonly
The timestamp of the event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(timestamp: ::Pago::UNSET, name:, organization_id: ::Pago::UNSET, external_id: ::Pago::UNSET, parent_id: ::Pago::UNSET, metadata: ::Pago::UNSET, customer_id:, member_id: ::Pago::UNSET) ⇒ EventCreateCustomer
constructor
A new instance of EventCreateCustomer.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(timestamp: ::Pago::UNSET, name:, organization_id: ::Pago::UNSET, external_id: ::Pago::UNSET, parent_id: ::Pago::UNSET, metadata: ::Pago::UNSET, customer_id:, member_id: ::Pago::UNSET) ⇒ EventCreateCustomer
Returns a new instance of EventCreateCustomer.
24788 24789 24790 24791 24792 24793 24794 24795 24796 24797 24798 24799 24800 24801 24802 24803 24804 24805 24806 24807 |
# File 'lib/pago/v2026_04/models.rb', line 24788 def initialize( timestamp: ::Pago::UNSET, name:, organization_id: ::Pago::UNSET, external_id: ::Pago::UNSET, parent_id: ::Pago::UNSET, metadata: ::Pago::UNSET, customer_id:, member_id: ::Pago::UNSET ) super() assign(:timestamp, ) assign(:name, name) assign(:organization_id, organization_id) assign(:external_id, external_id) assign(:parent_id, parent_id) assign(:metadata, ) assign(:customer_id, customer_id) assign(:member_id, member_id) end |
Instance Attribute Details
#customer_id ⇒ String (readonly)
ID of the customer in your Pago organization associated with the event.
24782 24783 24784 |
# File 'lib/pago/v2026_04/models.rb', line 24782 def customer_id @customer_id end |
#external_id ⇒ String? (readonly)
Your unique identifier for this event. Useful for deduplication and parent-child relationships.
24771 24772 24773 |
# File 'lib/pago/v2026_04/models.rb', line 24771 def external_id @external_id end |
#member_id ⇒ String? (readonly)
ID of the member within the customer's organization who performed the action. Used for member-level attribution in B2B.
24786 24787 24788 |
# File 'lib/pago/v2026_04/models.rb', line 24786 def member_id @member_id end |
#metadata ⇒ Models::EventMetadataInput (readonly)
24778 24779 24780 |
# File 'lib/pago/v2026_04/models.rb', line 24778 def @metadata end |
#name ⇒ String (readonly)
The name of the event.
24763 24764 24765 |
# File 'lib/pago/v2026_04/models.rb', line 24763 def name @name end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the event. Required unless you use an organization token.
24767 24768 24769 |
# File 'lib/pago/v2026_04/models.rb', line 24767 def organization_id @organization_id end |
#parent_id ⇒ String? (readonly)
The ID of the parent event. Can be either a Pago event ID (UUID) or an external event ID.
24775 24776 24777 |
# File 'lib/pago/v2026_04/models.rb', line 24775 def parent_id @parent_id end |
#timestamp ⇒ String (readonly)
The timestamp of the event.
24759 24760 24761 |
# File 'lib/pago/v2026_04/models.rb', line 24759 def @timestamp end |
Class Method Details
.from_json(data) ⇒ EventCreateCustomer?
24811 24812 24813 24814 24815 24816 24817 24818 24819 24820 24821 24822 24823 24824 24825 24826 24827 24828 24829 |
# File 'lib/pago/v2026_04/models.rb', line 24811 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( timestamp: (data.key?("timestamp") ? data["timestamp"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), external_id: (data.key?("external_id") ? data["external_id"] : ::Pago::UNSET), parent_id: (data.key?("parent_id") ? data["parent_id"] : ::Pago::UNSET), metadata: (data.key?("metadata") ? Models::EventMetadataInput.from_json(data["metadata"]) : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), member_id: (data.key?("member_id") ? data["member_id"] : ::Pago::UNSET) ), data ) end |