Class: Orb::Models::Licenses::UsageGetAllUsageResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/licenses/usage_get_all_usage_response.rb,
sig/orb/models/licenses/usage_get_all_usage_response.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(allocated_credits:, consumed_credits:, end_date:, license_type_id:, pricing_unit:, remaining_credits:, start_date:, subscription_id:, allocation_eligible_credits: nil, external_license_id: nil, license_id: nil, shared_pool_credits: nil) ⇒ Object

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

The LicenseUsage resource represents usage and remaining credits for a license over a date range.

When grouped by 'day' only, license_id and external_license_id will be null as the data is aggregated across all licenses.

Parameters:

  • allocated_credits (Float)

    The total credits allocated to this license for the period.

  • consumed_credits (Float)

    The credits consumed by this license for the period.

  • end_date (Date)

    The end date of the usage period.

  • license_type_id (String)

    The unique identifier for the license type.

  • pricing_unit (String)

    The pricing unit for the credits (e.g., 'credits').

  • remaining_credits (Float)

    The remaining credits available for this license (allocated - consumed).

  • start_date (Date)

    The start date of the usage period.

  • subscription_id (String)

    The unique identifier for the subscription.

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

    Credits consumed while the license was active (eligible for individual allocatio

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

    The external identifier for the license. Null when grouped by day only.

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

    The unique identifier for the license. Null when grouped by day only.

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

    Credits consumed while the license was inactive (draws from shared pool, not ind



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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 22

class Data < Orb::Internal::Type::BaseModel
  # @!attribute allocated_credits
  #   The total credits allocated to this license for the period.
  #
  #   @return [Float]
  required :allocated_credits, Float

  # @!attribute consumed_credits
  #   The credits consumed by this license for the period.
  #
  #   @return [Float]
  required :consumed_credits, Float

  # @!attribute end_date
  #   The end date of the usage period.
  #
  #   @return [Date]
  required :end_date, Date

  # @!attribute license_type_id
  #   The unique identifier for the license type.
  #
  #   @return [String]
  required :license_type_id, String

  # @!attribute pricing_unit
  #   The pricing unit for the credits (e.g., 'credits').
  #
  #   @return [String]
  required :pricing_unit, String

  # @!attribute remaining_credits
  #   The remaining credits available for this license (allocated - consumed).
  #
  #   @return [Float]
  required :remaining_credits, Float

  # @!attribute start_date
  #   The start date of the usage period.
  #
  #   @return [Date]
  required :start_date, Date

  # @!attribute subscription_id
  #   The unique identifier for the subscription.
  #
  #   @return [String]
  required :subscription_id, String

  # @!attribute allocation_eligible_credits
  #   Credits consumed while the license was active (eligible for individual
  #   allocation deduction).
  #
  #   @return [Float, nil]
  optional :allocation_eligible_credits, Float, nil?: true

  # @!attribute external_license_id
  #   The external identifier for the license. Null when grouped by day only.
  #
  #   @return [String, nil]
  optional :external_license_id, String, nil?: true

  # @!attribute license_id
  #   The unique identifier for the license. Null when grouped by day only.
  #
  #   @return [String, nil]
  optional :license_id, String, nil?: true

  # @!attribute shared_pool_credits
  #   Credits consumed while the license was inactive (draws from shared pool, not
  #   individual allocation).
  #
  #   @return [Float, nil]
  optional :shared_pool_credits, Float, nil?: true

  # @!method initialize(allocated_credits:, consumed_credits:, end_date:, license_type_id:, pricing_unit:, remaining_credits:, start_date:, subscription_id:, allocation_eligible_credits: nil, external_license_id: nil, license_id: nil, shared_pool_credits: nil)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::Licenses::UsageGetAllUsageResponse::Data} for more details.
  #
  #   The LicenseUsage resource represents usage and remaining credits for a license
  #   over a date range.
  #
  #   When grouped by 'day' only, license_id and external_license_id will be null as
  #   the data is aggregated across all licenses.
  #
  #   @param allocated_credits [Float] The total credits allocated to this license for the period.
  #
  #   @param consumed_credits [Float] The credits consumed by this license for the period.
  #
  #   @param end_date [Date] The end date of the usage period.
  #
  #   @param license_type_id [String] The unique identifier for the license type.
  #
  #   @param pricing_unit [String] The pricing unit for the credits (e.g., 'credits').
  #
  #   @param remaining_credits [Float] The remaining credits available for this license (allocated - consumed).
  #
  #   @param start_date [Date] The start date of the usage period.
  #
  #   @param subscription_id [String] The unique identifier for the subscription.
  #
  #   @param allocation_eligible_credits [Float, nil] Credits consumed while the license was active (eligible for individual allocatio
  #
  #   @param external_license_id [String, nil] The external identifier for the license. Null when grouped by day only.
  #
  #   @param license_id [String, nil] The unique identifier for the license. Null when grouped by day only.
  #
  #   @param shared_pool_credits [Float, nil] Credits consumed while the license was inactive (draws from shared pool, not ind
end

Instance Attribute Details

#allocated_creditsFloat

The total credits allocated to this license for the period.

Parameters:

  • value (Float)

Returns:

  • (Float)


27
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 27

required :allocated_credits, Float

#allocation_eligible_creditsFloat?

Credits consumed while the license was active (eligible for individual allocation deduction).

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


76
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 76

optional :allocation_eligible_credits, Float, nil?: true

#consumed_creditsFloat

The credits consumed by this license for the period.

Parameters:

  • value (Float)

Returns:

  • (Float)


33
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 33

required :consumed_credits, Float

#end_dateDate

The end date of the usage period.

Parameters:

  • value (Date)

Returns:

  • (Date)


39
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 39

required :end_date, Date

#external_license_idString?

The external identifier for the license. Null when grouped by day only.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


82
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 82

optional :external_license_id, String, nil?: true

#license_idString?

The unique identifier for the license. Null when grouped by day only.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


88
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 88

optional :license_id, String, nil?: true

#license_type_idString

The unique identifier for the license type.

Parameters:

  • value (String)

Returns:

  • (String)


45
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 45

required :license_type_id, String

#pricing_unitString

The pricing unit for the credits (e.g., 'credits').

Parameters:

  • value (String)

Returns:

  • (String)


51
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 51

required :pricing_unit, String

#remaining_creditsFloat

The remaining credits available for this license (allocated - consumed).

Parameters:

  • value (Float)

Returns:

  • (Float)


57
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 57

required :remaining_credits, Float

#shared_pool_creditsFloat?

Credits consumed while the license was inactive (draws from shared pool, not individual allocation).

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


95
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 95

optional :shared_pool_credits, Float, nil?: true

#start_dateDate

The start date of the usage period.

Parameters:

  • value (Date)

Returns:

  • (Date)


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

required :start_date, Date

#subscription_idString

The unique identifier for the subscription.

Parameters:

  • value (String)

Returns:

  • (String)


69
# File 'lib/orb/models/licenses/usage_get_all_usage_response.rb', line 69

required :subscription_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


81
# File 'sig/orb/models/licenses/usage_get_all_usage_response.rbs', line 81

def to_hash: -> {