Class: Dodopayments::Models::EventInput
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::EventInput
- Defined in:
- lib/dodopayments/models/event_input.rb
Defined Under Namespace
Modules: Metadata
Instance Attribute Summary collapse
-
#customer_id ⇒ String
customer_id of the customer whose usage needs to be tracked.
-
#event_id ⇒ String
Event Id acts as an idempotency key.
-
#event_name ⇒ String
Name of the event.
-
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}?
Custom metadata.
-
#timestamp ⇒ Time?
Custom Timestamp.
Instance Method Summary collapse
-
#initialize(customer_id: , event_id: , event_name: , metadata: nil, timestamp: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see EventInput for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(customer_id: , event_id: , event_name: , metadata: nil, timestamp: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::EventInput for more details.
|
|
# File 'lib/dodopayments/models/event_input.rb', line 41
|
Instance Attribute Details
#customer_id ⇒ String
customer_id of the customer whose usage needs to be tracked
10 |
# File 'lib/dodopayments/models/event_input.rb', line 10 required :customer_id, String |
#event_id ⇒ String
Event Id acts as an idempotency key. Any subsequent requests with the same event_id will be ignored
17 |
# File 'lib/dodopayments/models/event_input.rb', line 17 required :event_id, String |
#event_name ⇒ String
Name of the event
23 |
# File 'lib/dodopayments/models/event_input.rb', line 23 required :event_name, String |
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}?
Custom metadata. Only key value pairs are accepted, objects or arrays submitted will be rejected.
30 31 32 |
# File 'lib/dodopayments/models/event_input.rb', line 30 optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::EventInput::Metadata] }, nil?: true |
#timestamp ⇒ Time?
Custom Timestamp. Defaults to current timestamp in UTC. Timestamps that are older that 1 hour or after 5 mins, from current timestamp, will be rejected.
39 |
# File 'lib/dodopayments/models/event_input.rb', line 39 optional :timestamp, Time, nil?: true |