Class: Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate
- Defined in:
- lib/stigg/models/v1/usage_estimate_cost_response.rb,
sig/stigg/models/v1/usage_estimate_cost_response.rbs
Defined Under Namespace
Classes: Breakdown
Instance Attribute Summary collapse
-
#balance_after_estimate ⇒ Float
The credit balance after subtracting the estimated cost.
-
#breakdown ⇒ Array<Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown>
Estimated cost contribution per feature.
-
#currency_id ⇒ String
The credit currency identifier.
-
#current_balance ⇒ Float
The current credit balance, including not-yet-reconciled consumption.
-
#estimated_cost ⇒ Float
The estimated credit cost of the reported event or usage.
-
#would_overdraft ⇒ Boolean
Whether the estimated consumption would bring the balance below zero.
Instance Method Summary collapse
-
#initialize(estimates:, warnings:) ⇒ Object
constructor
Estimated credit cost, current balance and balance after.
- #to_hash ⇒ {
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(estimates:, warnings:) ⇒ Object
Estimated credit cost, current balance and balance after
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 131 132 133 134 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 42 class Estimate < Stigg::Internal::Type::BaseModel # @!attribute balance_after_estimate # The credit balance after subtracting the estimated cost # # @return [Float] required :balance_after_estimate, Float, api_name: :balanceAfterEstimate # @!attribute breakdown # Estimated cost contribution per feature # # @return [Array<Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown>] required :breakdown, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown] } # @!attribute currency_id # The credit currency identifier # # @return [String] required :currency_id, String, api_name: :currencyId # @!attribute current_balance # The current credit balance, including not-yet-reconciled consumption # # @return [Float] required :current_balance, Float, api_name: :currentBalance # @!attribute estimated_cost # The estimated credit cost of the reported event or usage # # @return [Float] required :estimated_cost, Float, api_name: :estimatedCost # @!attribute would_overdraft # Whether the estimated consumption would bring the balance below zero # # @return [Boolean] required :would_overdraft, Stigg::Internal::Type::Boolean, api_name: :wouldOverdraft # @!method initialize(balance_after_estimate:, breakdown:, currency_id:, current_balance:, estimated_cost:, would_overdraft:) # @param balance_after_estimate [Float] The credit balance after subtracting the estimated cost # # @param breakdown [Array<Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown>] Estimated cost contribution per feature # # @param currency_id [String] The credit currency identifier # # @param current_balance [Float] The current credit balance, including not-yet-reconciled consumption # # @param estimated_cost [Float] The estimated credit cost of the reported event or usage # # @param would_overdraft [Boolean] Whether the estimated consumption would bring the balance below zero class Breakdown < Stigg::Internal::Type::BaseModel # @!attribute cost # The estimated credit cost contributed by this feature # # @return [Float] required :cost, Float # @!attribute feature_id # The feature whose meter contributed this cost # # @return [String] required :feature_id, String, api_name: :featureId # @!attribute warning_code # Warning explaining why this cost may be inaccurate, if any # # @return [Symbol, Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown::WarningCode, nil] required :warning_code, enum: -> { Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown::WarningCode }, api_name: :warningCode, nil?: true # @!method initialize(cost:, feature_id:, warning_code:) # @param cost [Float] The estimated credit cost contributed by this feature # # @param feature_id [String] The feature whose meter contributed this cost # # @param warning_code [Symbol, Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown::WarningCode, nil] Warning explaining why this cost may be inaccurate, if any # Warning explaining why this cost may be inaccurate, if any # # @see Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown#warning_code module WarningCode extend Stigg::Internal::Type::Enum UNSUPPORTED_AGGREGATION = :UNSUPPORTED_AGGREGATION # @!method self.values # @return [Array<Symbol>] end end end |
Instance Attribute Details
#balance_after_estimate ⇒ Float
The credit balance after subtracting the estimated cost
47 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 47 required :balance_after_estimate, Float, api_name: :balanceAfterEstimate |
#breakdown ⇒ Array<Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown>
Estimated cost contribution per feature
53 54 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 53 required :breakdown, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::UsageEstimateCostResponse::Data::Estimate::Breakdown] } |
#currency_id ⇒ String
The credit currency identifier
60 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 60 required :currency_id, String, api_name: :currencyId |
#current_balance ⇒ Float
The current credit balance, including not-yet-reconciled consumption
66 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 66 required :current_balance, Float, api_name: :currentBalance |
#estimated_cost ⇒ Float
The estimated credit cost of the reported event or usage
72 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 72 required :estimated_cost, Float, api_name: :estimatedCost |
#would_overdraft ⇒ Boolean
Whether the estimated consumption would bring the balance below zero
78 |
# File 'lib/stigg/models/v1/usage_estimate_cost_response.rb', line 78 required :would_overdraft, Stigg::Internal::Type::Boolean, api_name: :wouldOverdraft |
Instance Method Details
#to_hash ⇒ {
71 |
# File 'sig/stigg/models/v1/usage_estimate_cost_response.rbs', line 71
def to_hash: -> {
|