Class: Orb::Models::EventIngestParams::Event

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/event_ingest_params.rb,
sig/orb/models/event_ingest_params.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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(event_name:, idempotency_key:, properties:, timestamp:, customer_id: nil, external_customer_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::EventIngestParams::Event for more details.

Parameters:

  • event_name (String)

    A name to meaningfully identify the action or event type.

  • idempotency_key (String)

    A unique value, generated by the client, that is used to de-duplicate events. Ex

  • properties (Hash{Symbol=>Object})

    A dictionary of custom properties. Values in this dictionary must be numeric, bo

  • timestamp (Time)

    An ISO 8601 format date with no timezone offset (i.e. UTC). This should represen

  • customer_id (String, nil) (defaults to: nil)

    The Orb Customer identifier

  • external_customer_id (String, nil) (defaults to: nil)

    An alias for the Orb customer, whose mapping is specified when creating the cust



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/orb/models/event_ingest_params.rb', line 43

class Event < Orb::Internal::Type::BaseModel
  # @!attribute event_name
  #   A name to meaningfully identify the action or event type.
  #
  #   @return [String]
  required :event_name, String

  # @!attribute idempotency_key
  #   A unique value, generated by the client, that is used to de-duplicate events.
  #   Exactly one event with a given idempotency key will be ingested, which allows
  #   for safe request retries.
  #
  #   @return [String]
  required :idempotency_key, String

  # @!attribute properties
  #   A dictionary of custom properties. Values in this dictionary must be numeric,
  #   boolean, or strings. Nested dictionaries are disallowed.
  #
  #   @return [Hash{Symbol=>Object}]
  required :properties, Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown]

  # @!attribute timestamp
  #   An ISO 8601 format date with no timezone offset (i.e. UTC). This should
  #   represent the time that usage was recorded, and is particularly important to
  #   attribute usage to a given billing period.
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute customer_id
  #   The Orb Customer identifier
  #
  #   @return [String, nil]
  optional :customer_id, String, nil?: true

  # @!attribute external_customer_id
  #   An alias for the Orb customer, whose mapping is specified when creating the
  #   customer
  #
  #   @return [String, nil]
  optional :external_customer_id, String, nil?: true

  # @!method initialize(event_name:, idempotency_key:, properties:, timestamp:, customer_id: nil, external_customer_id: nil)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::EventIngestParams::Event} for more details.
  #
  #   @param event_name [String] A name to meaningfully identify the action or event type.
  #
  #   @param idempotency_key [String] A unique value, generated by the client, that is used to de-duplicate events. Ex
  #
  #   @param properties [Hash{Symbol=>Object}] A dictionary of custom properties. Values in this dictionary must be numeric, bo
  #
  #   @param timestamp [Time] An ISO 8601 format date with no timezone offset (i.e. UTC). This should represen
  #
  #   @param customer_id [String, nil] The Orb Customer identifier
  #
  #   @param external_customer_id [String, nil] An alias for the Orb customer, whose mapping is specified when creating the cust
end

Instance Attribute Details

#customer_idString?

The Orb Customer identifier

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


77
# File 'lib/orb/models/event_ingest_params.rb', line 77

optional :customer_id, String, nil?: true

#event_nameString

A name to meaningfully identify the action or event type.

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/orb/models/event_ingest_params.rb', line 48

required :event_name, String

#external_customer_idString?

An alias for the Orb customer, whose mapping is specified when creating the customer

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


84
# File 'lib/orb/models/event_ingest_params.rb', line 84

optional :external_customer_id, String, nil?: true

#idempotency_keyString

A unique value, generated by the client, that is used to de-duplicate events. Exactly one event with a given idempotency key will be ingested, which allows for safe request retries.

Parameters:

  • value (String)

Returns:

  • (String)


56
# File 'lib/orb/models/event_ingest_params.rb', line 56

required :idempotency_key, String

#propertiesHash{Symbol=>Object}

A dictionary of custom properties. Values in this dictionary must be numeric, boolean, or strings. Nested dictionaries are disallowed.

Parameters:

  • value (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object})


63
# File 'lib/orb/models/event_ingest_params.rb', line 63

required :properties, Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown]

#timestampTime

An ISO 8601 format date with no timezone offset (i.e. UTC). This should represent the time that usage was recorded, and is particularly important to attribute usage to a given billing period.

Parameters:

  • value (Time)

Returns:

  • (Time)


71
# File 'lib/orb/models/event_ingest_params.rb', line 71

required :timestamp, Time

Instance Method Details

#to_hash{

Returns:

  • ({)


69
# File 'sig/orb/models/event_ingest_params.rbs', line 69

def to_hash: -> {