Class: Orb::Models::EventSearchResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/event_search_response.rb

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

Some parameter documentations has been truncated, see Orb::Models::EventSearchResponse::Data for more details.

The [Event](/core-concepts#event) resource represents a usage event that has been created for a customer. Events are the core of Orb’s usage-based billing model, and are used to calculate the usage charges for a given billing period.

Parameters:

  • id (String) (defaults to: )

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

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

    The Orb Customer identifier

  • deprecated (Boolean) (defaults to: )

    A boolean indicating whether the event is currently deprecated.

  • event_name (String) (defaults to: )

    A name to meaningfully identify the action or event type.

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

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

  • properties (Hash{Symbol=>Object}) (defaults to: )

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

  • timestamp (Time) (defaults to: )

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



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
# File 'lib/orb/models/event_search_response.rb', line 15

class Data < Orb::Internal::Type::BaseModel
  # @!attribute id
  #   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 :id, String

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

  # @!attribute deprecated
  #   A boolean indicating whether the event is currently deprecated.
  #
  #   @return [Boolean]
  required :deprecated, Orb::Internal::Type::Boolean

  # @!attribute event_name
  #   A name to meaningfully identify the action or event type.
  #
  #   @return [String]
  required :event_name, String

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

  # @!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

  # @!method initialize(id:, customer_id:, deprecated:, event_name:, external_customer_id:, properties:, timestamp:)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::EventSearchResponse::Data} for more details.
  #
  #   The [Event](/core-concepts#event) resource represents a usage event that has
  #   been created for a customer. Events are the core of Orb's usage-based billing
  #   model, and are used to calculate the usage charges for a given billing period.
  #
  #   @param id [String] A unique value, generated by the client, that is used to de-duplicate events. Ex
  #
  #   @param customer_id [String, nil] The Orb Customer identifier
  #
  #   @param deprecated [Boolean] A boolean indicating whether the event is currently deprecated.
  #
  #   @param event_name [String] A name to meaningfully identify the action or event type.
  #
  #   @param external_customer_id [String, nil] An alias for the Orb customer, whose mapping is specified when creating the cust
  #
  #   @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
end

Instance Attribute Details

#customer_idString?

The Orb Customer identifier

Returns:

  • (String, nil)


28
# File 'lib/orb/models/event_search_response.rb', line 28

required :customer_id, String, nil?: true

#deprecatedBoolean

A boolean indicating whether the event is currently deprecated.

Returns:

  • (Boolean)


34
# File 'lib/orb/models/event_search_response.rb', line 34

required :deprecated, Orb::Internal::Type::Boolean

#event_nameString

A name to meaningfully identify the action or event type.

Returns:

  • (String)


40
# File 'lib/orb/models/event_search_response.rb', line 40

required :event_name, String

#external_customer_idString?

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

Returns:

  • (String, nil)


47
# File 'lib/orb/models/event_search_response.rb', line 47

required :external_customer_id, String, nil?: true

#idString

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.

Returns:

  • (String)


22
# File 'lib/orb/models/event_search_response.rb', line 22

required :id, String

#propertiesHash{Symbol=>Object}

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

Returns:

  • (Hash{Symbol=>Object})


54
# File 'lib/orb/models/event_search_response.rb', line 54

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.

Returns:

  • (Time)


62
# File 'lib/orb/models/event_search_response.rb', line 62

required :timestamp, Time