Class: Stigg::Models::V1::UsageReportResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/usage_report_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:, created_at:, customer_id:, feature_id:, timestamp:, value:, current_usage: nil, next_reset_date: nil, resource_id: nil, usage_period_end: nil, usage_period_start: nil) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1::UsageReportResponse::Data for more details.

Recorded usage with period info

Parameters:

  • id (String)

    Unique identifier for the entity

  • created_at (Time)

    Timestamp of when the record was created

  • customer_id (String)

    Customer id

  • feature_id (String)

    Feature id

  • timestamp (Time)

    Timestamp

  • value (Integer)

    The usage measurement record

  • current_usage (Float, nil) (defaults to: nil)

    The current measured usage value

  • next_reset_date (Time, nil) (defaults to: nil)

    The date when the next usage reset will occur

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

    Resource id

  • usage_period_end (Time, nil) (defaults to: nil)

    The end date of the usage period in which this measurement resides (for entitlem

  • usage_period_start (Time, nil) (defaults to: nil)

    The start date of the usage period in which this measurement resides (for entitl



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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/stigg/models/v1/usage_report_response.rb', line 20

class Data < Stigg::Internal::Type::BaseModel
  # @!attribute id
  #   Unique identifier for the entity
  #
  #   @return [String]
  required :id, String

  # @!attribute created_at
  #   Timestamp of when the record was created
  #
  #   @return [Time]
  required :created_at, Time, api_name: :createdAt

  # @!attribute customer_id
  #   Customer id
  #
  #   @return [String]
  required :customer_id, String, api_name: :customerId

  # @!attribute feature_id
  #   Feature id
  #
  #   @return [String]
  required :feature_id, String, api_name: :featureId

  # @!attribute timestamp
  #   Timestamp
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute value
  #   The usage measurement record
  #
  #   @return [Integer]
  required :value, Integer

  # @!attribute current_usage
  #   The current measured usage value
  #
  #   @return [Float, nil]
  optional :current_usage, Float, api_name: :currentUsage, nil?: true

  # @!attribute next_reset_date
  #   The date when the next usage reset will occur
  #
  #   @return [Time, nil]
  optional :next_reset_date, Time, api_name: :nextResetDate, nil?: true

  # @!attribute resource_id
  #   Resource id
  #
  #   @return [String, nil]
  optional :resource_id, String, api_name: :resourceId, nil?: true

  # @!attribute usage_period_end
  #   The end date of the usage period in which this measurement resides (for
  #   entitlements with a reset period)
  #
  #   @return [Time, nil]
  optional :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true

  # @!attribute usage_period_start
  #   The start date of the usage period in which this measurement resides (for
  #   entitlements with a reset period)
  #
  #   @return [Time, nil]
  optional :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true

  # @!method initialize(id:, created_at:, customer_id:, feature_id:, timestamp:, value:, current_usage: nil, next_reset_date: nil, resource_id: nil, usage_period_end: nil, usage_period_start: nil)
  #   Some parameter documentations has been truncated, see
  #   {Stigg::Models::V1::UsageReportResponse::Data} for more details.
  #
  #   Recorded usage with period info
  #
  #   @param id [String] Unique identifier for the entity
  #
  #   @param created_at [Time] Timestamp of when the record was created
  #
  #   @param customer_id [String] Customer id
  #
  #   @param feature_id [String] Feature id
  #
  #   @param timestamp [Time] Timestamp
  #
  #   @param value [Integer] The usage measurement record
  #
  #   @param current_usage [Float, nil] The current measured usage value
  #
  #   @param next_reset_date [Time, nil] The date when the next usage reset will occur
  #
  #   @param resource_id [String, nil] Resource id
  #
  #   @param usage_period_end [Time, nil] The end date of the usage period in which this measurement resides (for entitlem
  #
  #   @param usage_period_start [Time, nil] The start date of the usage period in which this measurement resides (for entitl
end

Instance Attribute Details

#created_atTime

Timestamp of when the record was created

Returns:

  • (Time)


31
# File 'lib/stigg/models/v1/usage_report_response.rb', line 31

required :created_at, Time, api_name: :createdAt

#current_usageFloat?

The current measured usage value

Returns:

  • (Float, nil)


61
# File 'lib/stigg/models/v1/usage_report_response.rb', line 61

optional :current_usage, Float, api_name: :currentUsage, nil?: true

#customer_idString

Customer id

Returns:

  • (String)


37
# File 'lib/stigg/models/v1/usage_report_response.rb', line 37

required :customer_id, String, api_name: :customerId

#feature_idString

Feature id

Returns:

  • (String)


43
# File 'lib/stigg/models/v1/usage_report_response.rb', line 43

required :feature_id, String, api_name: :featureId

#idString

Unique identifier for the entity

Returns:

  • (String)


25
# File 'lib/stigg/models/v1/usage_report_response.rb', line 25

required :id, String

#next_reset_dateTime?

The date when the next usage reset will occur

Returns:

  • (Time, nil)


67
# File 'lib/stigg/models/v1/usage_report_response.rb', line 67

optional :next_reset_date, Time, api_name: :nextResetDate, nil?: true

#resource_idString?

Resource id

Returns:

  • (String, nil)


73
# File 'lib/stigg/models/v1/usage_report_response.rb', line 73

optional :resource_id, String, api_name: :resourceId, nil?: true

#timestampTime

Timestamp

Returns:

  • (Time)


49
# File 'lib/stigg/models/v1/usage_report_response.rb', line 49

required :timestamp, Time

#usage_period_endTime?

The end date of the usage period in which this measurement resides (for entitlements with a reset period)

Returns:

  • (Time, nil)


80
# File 'lib/stigg/models/v1/usage_report_response.rb', line 80

optional :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true

#usage_period_startTime?

The start date of the usage period in which this measurement resides (for entitlements with a reset period)

Returns:

  • (Time, nil)


87
# File 'lib/stigg/models/v1/usage_report_response.rb', line 87

optional :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true

#valueInteger

The usage measurement record

Returns:

  • (Integer)


55
# File 'lib/stigg/models/v1/usage_report_response.rb', line 55

required :value, Integer