Class: MetronomeSDK::Models::V1::UsageIngestParams::Usage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/usage_ingest_params.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(customer_id: , event_type: , timestamp: , transaction_id: , properties: nil) ⇒ Object

Parameters:

  • customer_id (String) (defaults to: )
  • event_type (String) (defaults to: )
  • timestamp (String) (defaults to: )

    RFC 3339 formatted

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


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
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 20

class Usage < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute customer_id
  #
  #   @return [String]
  required :customer_id, String

  # @!attribute event_type
  #
  #   @return [String]
  required :event_type, String

  # @!attribute timestamp
  #   RFC 3339 formatted
  #
  #   @return [String]
  required :timestamp, String

  # @!attribute transaction_id
  #
  #   @return [String]
  required :transaction_id, String

  # @!attribute properties
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :properties, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]

  # @!method initialize(customer_id:, event_type:, timestamp:, transaction_id:, properties: nil)
  #   @param customer_id [String]
  #
  #   @param event_type [String]
  #
  #   @param timestamp [String] RFC 3339 formatted
  #
  #   @param transaction_id [String]
  #
  #   @param properties [Hash{Symbol=>Object}]
end

Instance Attribute Details

#customer_idString

Returns:

  • (String)


24
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 24

required :customer_id, String

#event_typeString

Returns:

  • (String)


29
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 29

required :event_type, String

#propertiesHash{Symbol=>Object}?

Returns:

  • (Hash{Symbol=>Object}, nil)


45
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 45

optional :properties, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]

#timestampString

RFC 3339 formatted

Returns:

  • (String)


35
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 35

required :timestamp, String

#transaction_idString

Returns:

  • (String)


40
# File 'lib/metronome_sdk/models/v1/usage_ingest_params.rb', line 40

required :transaction_id, String