Class: Telnyx::Models::Pricing::ProductRetrieveResponse::Data
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::Pricing::ProductRetrieveResponse::Data
- Defined in:
- lib/telnyx/models/pricing/product_retrieve_response.rb,
sig/telnyx/models/pricing/product_retrieve_response.rbs
Defined Under Namespace
Modules: Rate
Instance Attribute Summary collapse
-
#cached_input_rate ⇒ String?
Cached input token rate.
-
#cached_input_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Cached input token tiered pricing.
-
#country_iso ⇒ String?
ISO country code.
-
#currency ⇒ String?
ISO currency code (e.g., USD).
-
#direction ⇒ String?
Direction (e.g., termination).
-
#input_rate ⇒ String?
Input token rate.
-
#input_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Input token tiered pricing.
-
#model ⇒ String?
Model identifier.
-
#name ⇒ String?
Human-readable name describing the pricing entry.
-
#note ⇒ String?
Additional note for rate-deck products (e.g., "Pricing is determined by the WhatsApp rate deck.").
-
#output_rate ⇒ String?
Output token rate.
-
#output_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Output token tiered pricing.
-
#pricing_type ⇒ String?
Pricing type for non-standard products (e.g., rate_deck).
-
#rate ⇒ Float, ...
Per-unit rate.
-
#tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Volume-based tiered pricing.
-
#type ⇒ String?
Pricing type (e.g., usage).
-
#unit ⇒ String?
Unit of measurement (e.g., part, message, GB, per_1k_tokens).
Instance Method Summary collapse
-
#initialize(cached_input_rate: nil, cached_input_tiers: nil, country_iso: nil, currency: nil, direction: nil, input_rate: nil, input_tiers: nil, model: nil, name: nil, note: nil, output_rate: nil, output_tiers: nil, pricing_type: nil, rate: nil, tiers: nil, type: nil, unit: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Data for more details.
- #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(cached_input_rate: nil, cached_input_tiers: nil, country_iso: nil, currency: nil, direction: nil, input_rate: nil, input_tiers: nil, model: nil, name: nil, note: nil, output_rate: nil, output_tiers: nil, pricing_type: nil, rate: nil, tiers: nil, type: nil, unit: nil) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::Pricing::ProductRetrieveResponse::Data for more details.
A single pricing entry. Standard products include rate, unit, currency, type, country_iso, direction, and tiers. Inference products include model, input_rate, output_rate, cached_input_rate, and their respective tier arrays. Rate-deck products include pricing_type and note fields with null rate and empty tiers.
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 23 class Data < Telnyx::Internal::Type::BaseModel # @!attribute cached_input_rate # Cached input token rate. Present only on inference product entries. # # @return [String, nil] optional :cached_input_rate, String # @!attribute cached_input_tiers # Cached input token tiered pricing. Present only on inference product entries. # # @return [Array<Telnyx::Models::Pricing::PricingTier>, nil] optional :cached_input_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } # @!attribute country_iso # ISO country code. Null for non-geographic products. # # @return [String, nil] optional :country_iso, String, nil?: true # @!attribute currency # ISO currency code (e.g., USD). # # @return [String, nil] optional :currency, String # @!attribute direction # Direction (e.g., termination). Null for non-directional products. # # @return [String, nil] optional :direction, String, nil?: true # @!attribute input_rate # Input token rate. Present only on inference product entries. # # @return [String, nil] optional :input_rate, String # @!attribute input_tiers # Input token tiered pricing. Present only on inference product entries. # # @return [Array<Telnyx::Models::Pricing::PricingTier>, nil] optional :input_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } # @!attribute model # Model identifier. Present only on inference product entries. # # @return [String, nil] optional :model, String # @!attribute name # Human-readable name describing the pricing entry. # # @return [String, nil] optional :name, String # @!attribute note # Additional note for rate-deck products (e.g., "Pricing is determined by the # WhatsApp rate deck."). # # @return [String, nil] optional :note, String, nil?: true # @!attribute output_rate # Output token rate. Present only on inference product entries. # # @return [String, nil] optional :output_rate, String # @!attribute output_tiers # Output token tiered pricing. Present only on inference product entries. # # @return [Array<Telnyx::Models::Pricing::PricingTier>, nil] optional :output_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } # @!attribute pricing_type # Pricing type for non-standard products (e.g., rate_deck). Absent on standard # products. # # @return [String, nil] optional :pricing_type, String, nil?: true # @!attribute rate # Per-unit rate. Numeric for standard products, string for inference products. # Null for rate-deck products. # # @return [Float, String, nil] optional :rate, union: -> { Telnyx::Models::Pricing::ProductRetrieveResponse::Data::Rate }, nil?: true # @!attribute tiers # Volume-based tiered pricing. Empty for rate-deck products. # # @return [Array<Telnyx::Models::Pricing::PricingTier>, nil] optional :tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } # @!attribute type # Pricing type (e.g., usage). # # @return [String, nil] optional :type, String # @!attribute unit # Unit of measurement (e.g., part, message, GB, per_1k_tokens). # # @return [String, nil] optional :unit, String # @!method initialize(cached_input_rate: nil, cached_input_tiers: nil, country_iso: nil, currency: nil, direction: nil, input_rate: nil, input_tiers: nil, model: nil, name: nil, note: nil, output_rate: nil, output_tiers: nil, pricing_type: nil, rate: nil, tiers: nil, type: nil, unit: nil) # Some parameter documentations has been truncated, see # {Telnyx::Models::Pricing::ProductRetrieveResponse::Data} for more details. # # A single pricing entry. Standard products include rate, unit, currency, type, # country_iso, direction, and tiers. Inference products include model, input_rate, # output_rate, cached_input_rate, and their respective tier arrays. Rate-deck # products include pricing_type and note fields with null rate and empty tiers. # # @param cached_input_rate [String] Cached input token rate. Present only on inference product entries. # # @param cached_input_tiers [Array<Telnyx::Models::Pricing::PricingTier>] Cached input token tiered pricing. Present only on inference product entries. # # @param country_iso [String, nil] ISO country code. Null for non-geographic products. # # @param currency [String] ISO currency code (e.g., USD). # # @param direction [String, nil] Direction (e.g., termination). Null for non-directional products. # # @param input_rate [String] Input token rate. Present only on inference product entries. # # @param input_tiers [Array<Telnyx::Models::Pricing::PricingTier>] Input token tiered pricing. Present only on inference product entries. # # @param model [String] Model identifier. Present only on inference product entries. # # @param name [String] Human-readable name describing the pricing entry. # # @param note [String, nil] Additional note for rate-deck products (e.g., "Pricing is determined by the What # # @param output_rate [String] Output token rate. Present only on inference product entries. # # @param output_tiers [Array<Telnyx::Models::Pricing::PricingTier>] Output token tiered pricing. Present only on inference product entries. # # @param pricing_type [String, nil] Pricing type for non-standard products (e.g., rate_deck). Absent on standard pro # # @param rate [Float, String, nil] Per-unit rate. Numeric for standard products, string for inference products. Nul # # @param tiers [Array<Telnyx::Models::Pricing::PricingTier>] Volume-based tiered pricing. Empty for rate-deck products. # # @param type [String] Pricing type (e.g., usage). # # @param unit [String] Unit of measurement (e.g., part, message, GB, per_1k_tokens). # Per-unit rate. Numeric for standard products, string for inference products. # Null for rate-deck products. # # @see Telnyx::Models::Pricing::ProductRetrieveResponse::Data#rate module Rate extend Telnyx::Internal::Type::Union # Rate for standard products (e.g., 0.004). variant Float # Rate for inference products (e.g., "0.001"). variant String # @!method self.variants # @return [Array(Float, String)] end end |
Instance Attribute Details
#cached_input_rate ⇒ String?
Cached input token rate. Present only on inference product entries.
28 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 28 optional :cached_input_rate, String |
#cached_input_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Cached input token tiered pricing. Present only on inference product entries.
34 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 34 optional :cached_input_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } |
#country_iso ⇒ String?
ISO country code. Null for non-geographic products.
40 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 40 optional :country_iso, String, nil?: true |
#currency ⇒ String?
ISO currency code (e.g., USD).
46 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 46 optional :currency, String |
#direction ⇒ String?
Direction (e.g., termination). Null for non-directional products.
52 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 52 optional :direction, String, nil?: true |
#input_rate ⇒ String?
Input token rate. Present only on inference product entries.
58 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 58 optional :input_rate, String |
#input_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Input token tiered pricing. Present only on inference product entries.
64 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 64 optional :input_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } |
#model ⇒ String?
Model identifier. Present only on inference product entries.
70 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 70 optional :model, String |
#name ⇒ String?
Human-readable name describing the pricing entry.
76 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 76 optional :name, String |
#note ⇒ String?
Additional note for rate-deck products (e.g., "Pricing is determined by the WhatsApp rate deck.").
83 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 83 optional :note, String, nil?: true |
#output_rate ⇒ String?
Output token rate. Present only on inference product entries.
89 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 89 optional :output_rate, String |
#output_tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Output token tiered pricing. Present only on inference product entries.
95 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 95 optional :output_tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } |
#pricing_type ⇒ String?
Pricing type for non-standard products (e.g., rate_deck). Absent on standard products.
102 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 102 optional :pricing_type, String, nil?: true |
#rate ⇒ Float, ...
Per-unit rate. Numeric for standard products, string for inference products. Null for rate-deck products.
109 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 109 optional :rate, union: -> { Telnyx::Models::Pricing::ProductRetrieveResponse::Data::Rate }, nil?: true |
#tiers ⇒ Array<Telnyx::Models::Pricing::PricingTier>?
Volume-based tiered pricing. Empty for rate-deck products.
115 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 115 optional :tiers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Pricing::PricingTier] } |
#type ⇒ String?
Pricing type (e.g., usage).
121 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 121 optional :type, String |
#unit ⇒ String?
Unit of measurement (e.g., part, message, GB, per_1k_tokens).
127 |
# File 'lib/telnyx/models/pricing/product_retrieve_response.rb', line 127 optional :unit, String |
Instance Method Details
#to_hash ⇒ {
133 |
# File 'sig/telnyx/models/pricing/product_retrieve_response.rbs', line 133
def to_hash: -> {
|