Class: Pago::V2026_04::Models::EventCreateExternalCustomer
- 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", external_customer_id: "external_customer_id", external_member_id: "external_member_id" }.freeze
- REQUIRED_KEYS =
["name", "external_customer_id"].freeze
Instance Attribute Summary collapse
-
#external_customer_id ⇒ String
readonly
ID of the customer in your system associated with the event.
-
#external_id ⇒ String?
readonly
Your unique identifier for this event.
-
#external_member_id ⇒ String?
readonly
ID of the member in your system 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, external_customer_id:, external_member_id: ::Pago::UNSET) ⇒ EventCreateExternalCustomer
constructor
A new instance of EventCreateExternalCustomer.
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, external_customer_id:, external_member_id: ::Pago::UNSET) ⇒ EventCreateExternalCustomer
Returns a new instance of EventCreateExternalCustomer.
24876 24877 24878 24879 24880 24881 24882 24883 24884 24885 24886 24887 24888 24889 24890 24891 24892 24893 24894 24895 |
# File 'lib/pago/v2026_04/models.rb', line 24876 def initialize( timestamp: ::Pago::UNSET, name:, organization_id: ::Pago::UNSET, external_id: ::Pago::UNSET, parent_id: ::Pago::UNSET, metadata: ::Pago::UNSET, external_customer_id:, external_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(:external_customer_id, external_customer_id) assign(:external_member_id, external_member_id) end |
Instance Attribute Details
#external_customer_id ⇒ String (readonly)
ID of the customer in your system associated with the event.
24870 24871 24872 |
# File 'lib/pago/v2026_04/models.rb', line 24870 def external_customer_id @external_customer_id end |
#external_id ⇒ String? (readonly)
Your unique identifier for this event. Useful for deduplication and parent-child relationships.
24859 24860 24861 |
# File 'lib/pago/v2026_04/models.rb', line 24859 def external_id @external_id end |
#external_member_id ⇒ String? (readonly)
ID of the member in your system within the customer's organization who performed the action. Used for member-level attribution in B2B.
24874 24875 24876 |
# File 'lib/pago/v2026_04/models.rb', line 24874 def external_member_id @external_member_id end |
#metadata ⇒ Models::EventMetadataInput (readonly)
24866 24867 24868 |
# File 'lib/pago/v2026_04/models.rb', line 24866 def @metadata end |
#name ⇒ String (readonly)
The name of the event.
24851 24852 24853 |
# File 'lib/pago/v2026_04/models.rb', line 24851 def name @name end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the event. Required unless you use an organization token.
24855 24856 24857 |
# File 'lib/pago/v2026_04/models.rb', line 24855 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.
24863 24864 24865 |
# File 'lib/pago/v2026_04/models.rb', line 24863 def parent_id @parent_id end |
#timestamp ⇒ String (readonly)
The timestamp of the event.
24847 24848 24849 |
# File 'lib/pago/v2026_04/models.rb', line 24847 def @timestamp end |
Class Method Details
.from_json(data) ⇒ EventCreateExternalCustomer?
24899 24900 24901 24902 24903 24904 24905 24906 24907 24908 24909 24910 24911 24912 24913 24914 24915 24916 24917 |
# File 'lib/pago/v2026_04/models.rb', line 24899 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), external_customer_id: (data.key?("external_customer_id") ? data["external_customer_id"] : ::Pago::UNSET), external_member_id: (data.key?("external_member_id") ? data["external_member_id"] : ::Pago::UNSET) ), data ) end |