Class: Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/subscription_retrieve_usage_history_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:, chargeable_units:, consumed_units:, currency:, free_threshold:, name:, price_per_unit:, total_price:) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter for more details.

Parameters:

  • id (String)

    Meter identifier

  • chargeable_units (String)

    Chargeable units (after free threshold) as string for precision

  • consumed_units (String)

    Total units consumed as string for precision

  • currency (Symbol, Dodopayments::Models::Currency)

    Currency for the price per unit

  • free_threshold (Integer)

    Free threshold units for this meter

  • name (String)

    Meter name

  • price_per_unit (String)

    Price per unit in string format for precision

  • total_price (Integer)

    Total price charged for this meter in the currency’s smallest unit



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
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 33

class Meter < Dodopayments::Internal::Type::BaseModel
  # @!attribute id
  #   Meter identifier
  #
  #   @return [String]
  required :id, String

  # @!attribute chargeable_units
  #   Chargeable units (after free threshold) as string for precision
  #
  #   @return [String]
  required :chargeable_units, String

  # @!attribute consumed_units
  #   Total units consumed as string for precision
  #
  #   @return [String]
  required :consumed_units, String

  # @!attribute currency
  #   Currency for the price per unit
  #
  #   @return [Symbol, Dodopayments::Models::Currency]
  required :currency, enum: -> { Dodopayments::Currency }

  # @!attribute free_threshold
  #   Free threshold units for this meter
  #
  #   @return [Integer]
  required :free_threshold, Integer

  # @!attribute name
  #   Meter name
  #
  #   @return [String]
  required :name, String

  # @!attribute price_per_unit
  #   Price per unit in string format for precision
  #
  #   @return [String]
  required :price_per_unit, String

  # @!attribute total_price
  #   Total price charged for this meter in the currency's smallest unit (cents for
  #   USD, yen for JPY, fils for KWD)
  #
  #   @return [Integer]
  required :total_price, Integer

  # @!method initialize(id:, chargeable_units:, consumed_units:, currency:, free_threshold:, name:, price_per_unit:, total_price:)
  #   Some parameter documentations has been truncated, see
  #   {Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter} for more
  #   details.
  #
  #   @param id [String] Meter identifier
  #
  #   @param chargeable_units [String] Chargeable units (after free threshold) as string for precision
  #
  #   @param consumed_units [String] Total units consumed as string for precision
  #
  #   @param currency [Symbol, Dodopayments::Models::Currency] Currency for the price per unit
  #
  #   @param free_threshold [Integer] Free threshold units for this meter
  #
  #   @param name [String] Meter name
  #
  #   @param price_per_unit [String] Price per unit in string format for precision
  #
  #   @param total_price [Integer] Total price charged for this meter in the currency's smallest unit
end

Instance Attribute Details

#chargeable_unitsString

Chargeable units (after free threshold) as string for precision

Returns:

  • (String)


44
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 44

required :chargeable_units, String

#consumed_unitsString

Total units consumed as string for precision

Returns:

  • (String)


50
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 50

required :consumed_units, String

#currencySymbol, Dodopayments::Models::Currency

Currency for the price per unit

Returns:



56
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 56

required :currency, enum: -> { Dodopayments::Currency }

#free_thresholdInteger

Free threshold units for this meter

Returns:

  • (Integer)


62
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 62

required :free_threshold, Integer

#idString

Meter identifier

Returns:

  • (String)


38
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 38

required :id, String

#nameString

Meter name

Returns:

  • (String)


68
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 68

required :name, String

#price_per_unitString

Price per unit in string format for precision

Returns:

  • (String)


74
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 74

required :price_per_unit, String

#total_priceInteger

Total price charged for this meter in the currency’s smallest unit (cents for USD, yen for JPY, fils for KWD)

Returns:

  • (Integer)


81
# File 'lib/dodopayments/models/subscription_retrieve_usage_history_response.rb', line 81

required :total_price, Integer