Class: MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate
- Defined in:
- lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb
Defined Under Namespace
Modules: BillingFrequency, RateType
Instance Attribute Summary collapse
-
#billing_frequency ⇒ Symbol, ...
Optional.
-
#commit_rate ⇒ MetronomeSDK::Models::CommitRate?
A distinct rate on the rate card.
-
#credit_type_id ⇒ String?
“The Metronome ID of the credit type to associate with price, defaults to USD (cents) if not passed.
-
#custom_rate ⇒ Hash{Symbol=>Object}?
Only set for CUSTOM rate_type.
-
#ending_before ⇒ Time?
exclusive end date.
- #entitled ⇒ Boolean
-
#is_prorated ⇒ Boolean?
Default proration configuration.
-
#price ⇒ Float?
Default price.
-
#pricing_group_values ⇒ Hash{Symbol=>String}?
Optional.
-
#product_id ⇒ String
ID of the product to add a rate for.
-
#quantity ⇒ Float?
Default quantity.
- #rate_type ⇒ Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType
-
#starting_at ⇒ Time
inclusive effective date.
-
#tiers ⇒ Array<MetronomeSDK::Models::Tier>?
Only set for TIERED rate_type.
-
#use_list_prices ⇒ Boolean?
Only set for PERCENTAGE rate_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entitled: , product_id: , rate_type: , starting_at: , billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Rate for more details.
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(entitled: , product_id: , rate_type: , starting_at: , billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil) ⇒ Object
Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate for more details.
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 189 190 191 192 193 194 195 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 29 class Rate < MetronomeSDK::Internal::Type::BaseModel # @!attribute entitled # # @return [Boolean] required :entitled, MetronomeSDK::Internal::Type::Boolean # @!attribute product_id # ID of the product to add a rate for # # @return [String] required :product_id, String # @!attribute rate_type # # @return [Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType] required :rate_type, enum: -> { MetronomeSDK::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType } # @!attribute starting_at # inclusive effective date # # @return [Time] required :starting_at, Time # @!attribute billing_frequency # Optional. Frequency to bill subscriptions with. Required for subscription type # products with Flat rate. # # @return [Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::BillingFrequency, nil] optional :billing_frequency, enum: -> { MetronomeSDK::V1::Contracts::RateCards::RateAddManyParams::Rate::BillingFrequency } # @!attribute commit_rate # A distinct rate on the rate card. You can choose to use this rate rather than # list rate when consuming a credit or commit. # # @return [MetronomeSDK::Models::CommitRate, nil] optional :commit_rate, -> { MetronomeSDK::CommitRate } # @!attribute credit_type_id # "The Metronome ID of the credit type to associate with price, defaults to USD # (cents) if not passed. Used by all rate_types except type PERCENTAGE. PERCENTAGE # rates use the credit type of associated rates." # # @return [String, nil] optional :credit_type_id, String # @!attribute custom_rate # Only set for CUSTOM rate_type. This field is interpreted by custom rate # processors. # # @return [Hash{Symbol=>Object}, nil] optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown] # @!attribute ending_before # exclusive end date # # @return [Time, nil] optional :ending_before, Time # @!attribute is_prorated # Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be # set to true. # # @return [Boolean, nil] optional :is_prorated, MetronomeSDK::Internal::Type::Boolean # @!attribute price # Default price. For FLAT and SUBSCRIPTION rate_type, this must be >=0. For # PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this # must be >=0 and <=1. # # @return [Float, nil] optional :price, Float # @!attribute pricing_group_values # Optional. List of pricing group key value pairs which will be used to calculate # the price. # # @return [Hash{Symbol=>String}, nil] optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute quantity # Default quantity. For SUBSCRIPTION rate_type, this must be >=0. # # @return [Float, nil] optional :quantity, Float # @!attribute tiers # Only set for TIERED rate_type. # # @return [Array<MetronomeSDK::Models::Tier>, nil] optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] } # @!attribute use_list_prices # Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed # using list prices rather than the standard rates for this product on the # contract. # # @return [Boolean, nil] optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean # @!method initialize(entitled:, product_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil) # Some parameter documentations has been truncated, see # {MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate} for # more details. # # @param entitled [Boolean] # # @param product_id [String] ID of the product to add a rate for # # @param rate_type [Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType] # # @param starting_at [Time] inclusive effective date # # @param billing_frequency [Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::BillingFrequency] Optional. Frequency to bill subscriptions with. Required for subscription type p # # @param commit_rate [MetronomeSDK::Models::CommitRate] A distinct rate on the rate card. You can choose to use this rate rather than li # # @param credit_type_id [String] "The Metronome ID of the credit type to associate with price, defaults to USD (c # # @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo # # @param ending_before [Time] exclusive end date # # @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be # # @param price [Float] Default price. For FLAT and SUBSCRIPTION rate_type, this must be >=0. For PERCEN # # @param pricing_group_values [Hash{Symbol=>String}] Optional. List of pricing group key value pairs which will be used to calculate # # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0. # # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type. # # @param use_list_prices [Boolean] Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed # @see MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate#rate_type module RateType extend MetronomeSDK::Internal::Type::Enum FLAT = :FLAT PERCENTAGE = :PERCENTAGE SUBSCRIPTION = :SUBSCRIPTION TIERED = :TIERED CUSTOM = :CUSTOM # @!method self.values # @return [Array<Symbol>] end # Optional. Frequency to bill subscriptions with. Required for subscription type # products with Flat rate. # # @see MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate#billing_frequency module BillingFrequency extend MetronomeSDK::Internal::Type::Enum MONTHLY = :MONTHLY QUARTERLY = :QUARTERLY ANNUAL = :ANNUAL WEEKLY = :WEEKLY # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#billing_frequency ⇒ Symbol, ...
Optional. Frequency to bill subscriptions with. Required for subscription type products with Flat rate.
58 59 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 58 optional :billing_frequency, enum: -> { MetronomeSDK::V1::Contracts::RateCards::RateAddManyParams::Rate::BillingFrequency } |
#commit_rate ⇒ MetronomeSDK::Models::CommitRate?
A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit.
66 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 66 optional :commit_rate, -> { MetronomeSDK::CommitRate } |
#credit_type_id ⇒ String?
“The Metronome ID of the credit type to associate with price, defaults to USD (cents) if not passed. Used by all rate_types except type PERCENTAGE. PERCENTAGE rates use the credit type of associated rates.”
74 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 74 optional :credit_type_id, String |
#custom_rate ⇒ Hash{Symbol=>Object}?
Only set for CUSTOM rate_type. This field is interpreted by custom rate processors.
81 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 81 optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown] |
#ending_before ⇒ Time?
exclusive end date
87 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 87 optional :ending_before, Time |
#entitled ⇒ Boolean
33 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 33 required :entitled, MetronomeSDK::Internal::Type::Boolean |
#is_prorated ⇒ Boolean?
Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true.
94 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 94 optional :is_prorated, MetronomeSDK::Internal::Type::Boolean |
#price ⇒ Float?
Default price. For FLAT and SUBSCRIPTION rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
102 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 102 optional :price, Float |
#pricing_group_values ⇒ Hash{Symbol=>String}?
Optional. List of pricing group key value pairs which will be used to calculate the price.
109 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 109 optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String] |
#product_id ⇒ String
ID of the product to add a rate for
39 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 39 required :product_id, String |
#quantity ⇒ Float?
Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
115 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 115 optional :quantity, Float |
#rate_type ⇒ Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType
44 45 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 44 required :rate_type, enum: -> { MetronomeSDK::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType } |
#starting_at ⇒ Time
inclusive effective date
51 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 51 required :starting_at, Time |
#tiers ⇒ Array<MetronomeSDK::Models::Tier>?
Only set for TIERED rate_type.
121 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 121 optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] } |
#use_list_prices ⇒ Boolean?
Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed using list prices rather than the standard rates for this product on the contract.
129 |
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 129 optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb', line 176
|