Class: ApiReference::SubscriptionPlanChange
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::SubscriptionPlanChange
- Defined in:
- lib/api_reference/models/subscription_plan_change.rb
Overview
SubscriptionPlanChange Model.
Instance Attribute Summary collapse
-
#add_adjustments ⇒ Array[AddSubscriptionAdjustmentParams]
Additional adjustments to be added to the subscription.
-
#add_prices ⇒ Array[AddSubscriptionPriceParams]
Additional prices to be added to the subscription.
-
#align_billing_with_plan_change_date ⇒ TrueClass | FalseClass
[DEPRECATED] Use billing_cycle_alignment instead.
-
#auto_collection ⇒ TrueClass | FalseClass
Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date.
-
#auto_issuance ⇒ TrueClass | FalseClass
Used to determine if invoices for this subscription will be automatically issued.
-
#billing_cycle_alignment ⇒ BillingCycleAlignment
Reset billing periods to be aligned with the plan change's effective date or start of the month.
-
#billing_cycle_anchor_configuration ⇒ BillingCycleAnchorConfiguration
Specifies which version of the plan to change to.
-
#change_date ⇒ DateTime
The date that the plan change should take effect.
-
#change_option ⇒ ChangeOption1
Plan adjustments to be replaced with additional adjustments on the subscription.
-
#coupon_redemption_code ⇒ String
Redemption code to be used for this subscription.
-
#credits_overage_rate ⇒ Float
Optionally provide a list of overrides for prices on the plan.
-
#default_invoice_memo ⇒ String
Determines the default memo on this subscription's invoices.
-
#external_plan_id ⇒ String
The external_plan_id of the plan that the given subscription should be switched to.
-
#filter ⇒ String
An additional filter to apply to usage queries.
-
#initial_phase_order ⇒ Integer
The phase of the plan to start with.
-
#invoicing_threshold ⇒ String
When this subscription's accrued usage reaches this threshold, an invoice will be issued for the subscription.
-
#net_terms ⇒ Integer
The net terms determines the difference between the invoice date and the issue date for the invoice.
-
#per_credit_overage_amount ⇒ Float
Optionally provide a list of overrides for prices on the plan.
-
#plan_id ⇒ String
The plan that the given subscription should be switched to.
-
#plan_version_number ⇒ Integer
Specifies which version of the plan to change to.
-
#price_overrides ⇒ Array[Object]
Optionally provide a list of overrides for prices on the plan.
-
#remove_adjustments ⇒ Array[RemoveSubscriptionAdjustmentParams]
Plan adjustments to be removed from the subscription.
-
#remove_prices ⇒ Array[RemoveSubscriptionPriceParams]
Plan prices to be removed from the subscription.
-
#replace_adjustments ⇒ Array[ReplaceSubscriptionAdjustmentParams]
Plan adjustments to be replaced with additional adjustments on the subscription.
-
#replace_prices ⇒ Array[ReplaceSubscriptionPriceParams]
Plan prices to be replaced with additional prices on the subscription.
-
#trial_duration_days ⇒ Integer
The duration of the trial period in days.
-
#usage_customer_ids ⇒ Array[String]
A list of customer IDs whose usage events will be aggregated and billed under this subscription.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(change_option:, usage_customer_ids: SKIP, filter: SKIP, plan_id: SKIP, external_plan_id: SKIP, price_overrides: SKIP, per_credit_overage_amount: SKIP, credits_overage_rate: SKIP, trial_duration_days: SKIP, net_terms: SKIP, auto_collection: SKIP, auto_issuance: SKIP, default_invoice_memo: SKIP, coupon_redemption_code: SKIP, invoicing_threshold: SKIP, initial_phase_order: SKIP, add_prices: SKIP, remove_prices: SKIP, replace_prices: SKIP, add_adjustments: SKIP, remove_adjustments: SKIP, replace_adjustments: SKIP, change_date: SKIP, align_billing_with_plan_change_date: SKIP, billing_cycle_alignment: BillingCycleAlignment::UNCHANGED, plan_version_number: SKIP, billing_cycle_anchor_configuration: SKIP) ⇒ SubscriptionPlanChange
constructor
A new instance of SubscriptionPlanChange.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_change_date ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(change_option:, usage_customer_ids: SKIP, filter: SKIP, plan_id: SKIP, external_plan_id: SKIP, price_overrides: SKIP, per_credit_overage_amount: SKIP, credits_overage_rate: SKIP, trial_duration_days: SKIP, net_terms: SKIP, auto_collection: SKIP, auto_issuance: SKIP, default_invoice_memo: SKIP, coupon_redemption_code: SKIP, invoicing_threshold: SKIP, initial_phase_order: SKIP, add_prices: SKIP, remove_prices: SKIP, replace_prices: SKIP, add_adjustments: SKIP, remove_adjustments: SKIP, replace_adjustments: SKIP, change_date: SKIP, align_billing_with_plan_change_date: SKIP, billing_cycle_alignment: BillingCycleAlignment::UNCHANGED, plan_version_number: SKIP, billing_cycle_anchor_configuration: SKIP) ⇒ SubscriptionPlanChange
Returns a new instance of SubscriptionPlanChange.
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 266 def initialize(change_option:, usage_customer_ids: SKIP, filter: SKIP, plan_id: SKIP, external_plan_id: SKIP, price_overrides: SKIP, per_credit_overage_amount: SKIP, credits_overage_rate: SKIP, trial_duration_days: SKIP, net_terms: SKIP, auto_collection: SKIP, auto_issuance: SKIP, default_invoice_memo: SKIP, coupon_redemption_code: SKIP, invoicing_threshold: SKIP, initial_phase_order: SKIP, add_prices: SKIP, remove_prices: SKIP, replace_prices: SKIP, add_adjustments: SKIP, remove_adjustments: SKIP, replace_adjustments: SKIP, change_date: SKIP, align_billing_with_plan_change_date: SKIP, billing_cycle_alignment: BillingCycleAlignment::UNCHANGED, plan_version_number: SKIP, billing_cycle_anchor_configuration: SKIP) @usage_customer_ids = usage_customer_ids unless usage_customer_ids == SKIP @filter = filter unless filter == SKIP @plan_id = plan_id unless plan_id == SKIP @external_plan_id = external_plan_id unless external_plan_id == SKIP @price_overrides = price_overrides unless price_overrides == SKIP unless per_credit_overage_amount == SKIP @per_credit_overage_amount = per_credit_overage_amount end @credits_overage_rate = credits_overage_rate unless credits_overage_rate == SKIP @trial_duration_days = trial_duration_days unless trial_duration_days == SKIP @net_terms = net_terms unless net_terms == SKIP @auto_collection = auto_collection unless auto_collection == SKIP @auto_issuance = auto_issuance unless auto_issuance == SKIP @default_invoice_memo = default_invoice_memo unless default_invoice_memo == SKIP @coupon_redemption_code = coupon_redemption_code unless coupon_redemption_code == SKIP @invoicing_threshold = invoicing_threshold unless invoicing_threshold == SKIP @initial_phase_order = initial_phase_order unless initial_phase_order == SKIP @add_prices = add_prices unless add_prices == SKIP @remove_prices = remove_prices unless remove_prices == SKIP @replace_prices = replace_prices unless replace_prices == SKIP @add_adjustments = add_adjustments unless add_adjustments == SKIP @remove_adjustments = remove_adjustments unless remove_adjustments == SKIP @replace_adjustments = replace_adjustments unless replace_adjustments == SKIP @change_option = change_option @change_date = change_date unless change_date == SKIP unless align_billing_with_plan_change_date == SKIP @align_billing_with_plan_change_date = align_billing_with_plan_change_date end @billing_cycle_alignment = billing_cycle_alignment unless billing_cycle_alignment == SKIP @plan_version_number = plan_version_number unless plan_version_number == SKIP unless billing_cycle_anchor_configuration == SKIP @billing_cycle_anchor_configuration = billing_cycle_anchor_configuration end end |
Instance Attribute Details
#add_adjustments ⇒ Array[AddSubscriptionAdjustmentParams]
Additional adjustments to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
120 121 122 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 120 def add_adjustments @add_adjustments end |
#add_prices ⇒ Array[AddSubscriptionPriceParams]
Additional prices to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
104 105 106 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 104 def add_prices @add_prices end |
#align_billing_with_plan_change_date ⇒ TrueClass | FalseClass
[DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be aligned with the plan change's effective date.
149 150 151 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 149 def align_billing_with_plan_change_date @align_billing_with_plan_change_date end |
#auto_collection ⇒ TrueClass | FalseClass
Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. If not specified, this defaults to the behavior configured for this customer.
70 71 72 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 70 def auto_collection @auto_collection end |
#auto_issuance ⇒ TrueClass | FalseClass
Used to determine if invoices for this subscription will be automatically
issued. If true, invoices will be automatically issued. If false, invoices
will require manual approval. If null is specified, this defaults to the
behavior configured for this customer.
77 78 79 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 77 def auto_issuance @auto_issuance end |
#billing_cycle_alignment ⇒ BillingCycleAlignment
Reset billing periods to be aligned with the plan change's effective date
or start of the month. Defaults to unchanged which keeps subscription's
existing billing cycle alignment.
155 156 157 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 155 def billing_cycle_alignment @billing_cycle_alignment end |
#billing_cycle_anchor_configuration ⇒ BillingCycleAnchorConfiguration
Specifies which version of the plan to change to. If null, the default version will be used.
165 166 167 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 165 def billing_cycle_anchor_configuration @billing_cycle_anchor_configuration end |
#change_date ⇒ DateTime
The date that the plan change should take effect. This parameter can only
be passed if the change_option is requested_date. If a date with no
time is passed, the plan change will happen at midnight in the customer's
timezone.
144 145 146 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 144 def change_date @change_date end |
#change_option ⇒ ChangeOption1
Plan adjustments to be replaced with additional adjustments on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
137 138 139 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 137 def change_option @change_option end |
#coupon_redemption_code ⇒ String
Redemption code to be used for this subscription. If the coupon cannot be found by its redemption code, or cannot be redeemed, an error response will be returned and the subscription creation or plan change will not be scheduled.
89 90 91 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 89 def coupon_redemption_code @coupon_redemption_code end |
#credits_overage_rate ⇒ Float
Optionally provide a list of overrides for prices on the plan
51 52 53 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 51 def credits_overage_rate @credits_overage_rate end |
#default_invoice_memo ⇒ String
Determines the default memo on this subscription's invoices. Note that if this is not provided, it is determined by the plan configuration.
82 83 84 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 82 def default_invoice_memo @default_invoice_memo end |
#external_plan_id ⇒ String
The external_plan_id of the plan that the given subscription should be
switched to. Note that either this property or plan_id must be
specified.
39 40 41 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 39 def external_plan_id @external_plan_id end |
#filter ⇒ String
An additional filter to apply to usage queries. This filter must be expressed as a boolean computed property. If null, usage queries will not include any additional filter.
28 29 30 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 28 def filter @filter end |
#initial_phase_order ⇒ Integer
The phase of the plan to start with
99 100 101 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 99 def initial_phase_order @initial_phase_order end |
#invoicing_threshold ⇒ String
When this subscription's accrued usage reaches this threshold, an invoice will be issued for the subscription. If not specified, invoices will only be issued at the end of the billing period.
95 96 97 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 95 def invoicing_threshold @invoicing_threshold end |
#net_terms ⇒ Integer
The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0. If not provided, this defaults to the value specified in the plan.
64 65 66 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 64 def net_terms @net_terms end |
#per_credit_overage_amount ⇒ Float
Optionally provide a list of overrides for prices on the plan
47 48 49 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 47 def per_credit_overage_amount @per_credit_overage_amount end |
#plan_id ⇒ String
The plan that the given subscription should be switched to. Note that
either this property or external_plan_id must be specified.
33 34 35 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 33 def plan_id @plan_id end |
#plan_version_number ⇒ Integer
Specifies which version of the plan to change to. If null, the default version will be used.
160 161 162 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 160 def plan_version_number @plan_version_number end |
#price_overrides ⇒ Array[Object]
Optionally provide a list of overrides for prices on the plan
43 44 45 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 43 def price_overrides @price_overrides end |
#remove_adjustments ⇒ Array[RemoveSubscriptionAdjustmentParams]
Plan adjustments to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
125 126 127 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 125 def remove_adjustments @remove_adjustments end |
#remove_prices ⇒ Array[RemoveSubscriptionPriceParams]
Plan prices to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
109 110 111 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 109 def remove_prices @remove_prices end |
#replace_adjustments ⇒ Array[ReplaceSubscriptionAdjustmentParams]
Plan adjustments to be replaced with additional adjustments on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
131 132 133 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 131 def replace_adjustments @replace_adjustments end |
#replace_prices ⇒ Array[ReplaceSubscriptionPriceParams]
Plan prices to be replaced with additional prices on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
115 116 117 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 115 def replace_prices @replace_prices end |
#trial_duration_days ⇒ Integer
The duration of the trial period in days. If not provided, this defaults
to the value specified in the plan. If 0 is provided, the trial on the
plan will be skipped.
57 58 59 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 57 def trial_duration_days @trial_duration_days end |
#usage_customer_ids ⇒ Array[String]
A list of customer IDs whose usage events will be aggregated and billed under this subscription. By default, a subscription only considers usage events associated with its attached customer's customer_id. When usage_customer_ids is provided, the subscription includes usage events from the specified customers only. Provided usage_customer_ids must be either the customer for this subscription itself, or any of that customer's children.
21 22 23 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 21 def usage_customer_ids @usage_customer_ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 319 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. change_option = hash.key?('change_option') ? hash['change_option'] : nil usage_customer_ids = hash.key?('usage_customer_ids') ? hash['usage_customer_ids'] : SKIP filter = hash.key?('filter') ? hash['filter'] : SKIP plan_id = hash.key?('plan_id') ? hash['plan_id'] : SKIP external_plan_id = hash.key?('external_plan_id') ? hash['external_plan_id'] : SKIP price_overrides = hash.key?('price_overrides') ? hash['price_overrides'] : SKIP per_credit_overage_amount = hash.key?('per_credit_overage_amount') ? hash['per_credit_overage_amount'] : SKIP credits_overage_rate = hash.key?('credits_overage_rate') ? hash['credits_overage_rate'] : SKIP trial_duration_days = hash.key?('trial_duration_days') ? hash['trial_duration_days'] : SKIP net_terms = hash.key?('net_terms') ? hash['net_terms'] : SKIP auto_collection = hash.key?('auto_collection') ? hash['auto_collection'] : SKIP auto_issuance = hash.key?('auto_issuance') ? hash['auto_issuance'] : SKIP default_invoice_memo = hash.key?('default_invoice_memo') ? hash['default_invoice_memo'] : SKIP coupon_redemption_code = hash.key?('coupon_redemption_code') ? hash['coupon_redemption_code'] : SKIP invoicing_threshold = hash.key?('invoicing_threshold') ? hash['invoicing_threshold'] : SKIP initial_phase_order = hash.key?('initial_phase_order') ? hash['initial_phase_order'] : SKIP # Parameter is an array, so we need to iterate through it add_prices = nil unless hash['add_prices'].nil? add_prices = [] hash['add_prices'].each do |structure| add_prices << (AddSubscriptionPriceParams.from_hash(structure) if structure) end end add_prices = SKIP unless hash.key?('add_prices') # Parameter is an array, so we need to iterate through it remove_prices = nil unless hash['remove_prices'].nil? remove_prices = [] hash['remove_prices'].each do |structure| remove_prices << (RemoveSubscriptionPriceParams.from_hash(structure) if structure) end end remove_prices = SKIP unless hash.key?('remove_prices') # Parameter is an array, so we need to iterate through it replace_prices = nil unless hash['replace_prices'].nil? replace_prices = [] hash['replace_prices'].each do |structure| replace_prices << (ReplaceSubscriptionPriceParams.from_hash(structure) if structure) end end replace_prices = SKIP unless hash.key?('replace_prices') # Parameter is an array, so we need to iterate through it add_adjustments = nil unless hash['add_adjustments'].nil? add_adjustments = [] hash['add_adjustments'].each do |structure| add_adjustments << (AddSubscriptionAdjustmentParams.from_hash(structure) if structure) end end add_adjustments = SKIP unless hash.key?('add_adjustments') # Parameter is an array, so we need to iterate through it remove_adjustments = nil unless hash['remove_adjustments'].nil? remove_adjustments = [] hash['remove_adjustments'].each do |structure| remove_adjustments << (RemoveSubscriptionAdjustmentParams.from_hash(structure) if structure) end end remove_adjustments = SKIP unless hash.key?('remove_adjustments') # Parameter is an array, so we need to iterate through it replace_adjustments = nil unless hash['replace_adjustments'].nil? replace_adjustments = [] hash['replace_adjustments'].each do |structure| replace_adjustments << (ReplaceSubscriptionAdjustmentParams.from_hash(structure) if structure) end end replace_adjustments = SKIP unless hash.key?('replace_adjustments') change_date = if hash.key?('change_date') (DateTimeHelper.from_rfc3339(hash['change_date']) if hash['change_date']) else SKIP end align_billing_with_plan_change_date = hash.key?('align_billing_with_plan_change_date') ? hash['align_billing_with_plan_change_date'] : SKIP billing_cycle_alignment = hash['billing_cycle_alignment'] ||= BillingCycleAlignment::UNCHANGED plan_version_number = hash.key?('plan_version_number') ? hash['plan_version_number'] : SKIP if hash['billing_cycle_anchor_configuration'] billing_cycle_anchor_configuration = BillingCycleAnchorConfiguration.from_hash(hash['billing_cycle_anchor_configuration']) end # Create object from extracted values. SubscriptionPlanChange.new(change_option: change_option, usage_customer_ids: usage_customer_ids, filter: filter, plan_id: plan_id, external_plan_id: external_plan_id, price_overrides: price_overrides, per_credit_overage_amount: per_credit_overage_amount, credits_overage_rate: credits_overage_rate, trial_duration_days: trial_duration_days, net_terms: net_terms, auto_collection: auto_collection, auto_issuance: auto_issuance, default_invoice_memo: default_invoice_memo, coupon_redemption_code: coupon_redemption_code, invoicing_threshold: invoicing_threshold, initial_phase_order: initial_phase_order, add_prices: add_prices, remove_prices: remove_prices, replace_prices: replace_prices, add_adjustments: add_adjustments, remove_adjustments: remove_adjustments, replace_adjustments: replace_adjustments, change_date: change_date, align_billing_with_plan_change_date: align_billing_with_plan_change_date, billing_cycle_alignment: billing_cycle_alignment, plan_version_number: plan_version_number, billing_cycle_anchor_configuration: billing_cycle_anchor_configuration) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 196 197 198 199 200 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 168 def self.names @_hash = {} if @_hash.nil? @_hash['usage_customer_ids'] = 'usage_customer_ids' @_hash['filter'] = 'filter' @_hash['plan_id'] = 'plan_id' @_hash['external_plan_id'] = 'external_plan_id' @_hash['price_overrides'] = 'price_overrides' @_hash['per_credit_overage_amount'] = 'per_credit_overage_amount' @_hash['credits_overage_rate'] = 'credits_overage_rate' @_hash['trial_duration_days'] = 'trial_duration_days' @_hash['net_terms'] = 'net_terms' @_hash['auto_collection'] = 'auto_collection' @_hash['auto_issuance'] = 'auto_issuance' @_hash['default_invoice_memo'] = 'default_invoice_memo' @_hash['coupon_redemption_code'] = 'coupon_redemption_code' @_hash['invoicing_threshold'] = 'invoicing_threshold' @_hash['initial_phase_order'] = 'initial_phase_order' @_hash['add_prices'] = 'add_prices' @_hash['remove_prices'] = 'remove_prices' @_hash['replace_prices'] = 'replace_prices' @_hash['add_adjustments'] = 'add_adjustments' @_hash['remove_adjustments'] = 'remove_adjustments' @_hash['replace_adjustments'] = 'replace_adjustments' @_hash['change_option'] = 'change_option' @_hash['change_date'] = 'change_date' @_hash['align_billing_with_plan_change_date'] = 'align_billing_with_plan_change_date' @_hash['billing_cycle_alignment'] = 'billing_cycle_alignment' @_hash['plan_version_number'] = 'plan_version_number' @_hash['billing_cycle_anchor_configuration'] = 'billing_cycle_anchor_configuration' @_hash end |
.nullables ⇒ Object
An array for nullable fields
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 235 def self.nullables %w[ usage_customer_ids filter plan_id external_plan_id price_overrides per_credit_overage_amount credits_overage_rate trial_duration_days net_terms auto_collection auto_issuance default_invoice_memo coupon_redemption_code invoicing_threshold initial_phase_order add_prices remove_prices replace_prices add_adjustments remove_adjustments replace_adjustments change_date align_billing_with_plan_change_date billing_cycle_alignment plan_version_number billing_cycle_anchor_configuration ] end |
.optionals ⇒ Object
An array for optional fields
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 203 def self.optionals %w[ usage_customer_ids filter plan_id external_plan_id price_overrides per_credit_overage_amount credits_overage_rate trial_duration_days net_terms auto_collection auto_issuance default_invoice_memo coupon_redemption_code invoicing_threshold initial_phase_order add_prices remove_prices replace_prices add_adjustments remove_adjustments replace_adjustments change_date align_billing_with_plan_change_date billing_cycle_alignment plan_version_number billing_cycle_anchor_configuration ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 480 def inspect class_name = self.class.name.split('::').last "<#{class_name} usage_customer_ids: #{@usage_customer_ids.inspect}, filter:"\ " #{@filter.inspect}, plan_id: #{@plan_id.inspect}, external_plan_id:"\ " #{@external_plan_id.inspect}, price_overrides: #{@price_overrides.inspect},"\ " per_credit_overage_amount: #{@per_credit_overage_amount.inspect}, credits_overage_rate:"\ " #{@credits_overage_rate.inspect}, trial_duration_days: #{@trial_duration_days.inspect},"\ " net_terms: #{@net_terms.inspect}, auto_collection: #{@auto_collection.inspect},"\ " auto_issuance: #{@auto_issuance.inspect}, default_invoice_memo:"\ " #{@default_invoice_memo.inspect}, coupon_redemption_code:"\ " #{@coupon_redemption_code.inspect}, invoicing_threshold: #{@invoicing_threshold.inspect},"\ " initial_phase_order: #{@initial_phase_order.inspect}, add_prices: #{@add_prices.inspect},"\ " remove_prices: #{@remove_prices.inspect}, replace_prices: #{@replace_prices.inspect},"\ " add_adjustments: #{@add_adjustments.inspect}, remove_adjustments:"\ " #{@remove_adjustments.inspect}, replace_adjustments: #{@replace_adjustments.inspect},"\ " change_option: #{@change_option.inspect}, change_date: #{@change_date.inspect},"\ " align_billing_with_plan_change_date: #{@align_billing_with_plan_change_date.inspect},"\ " billing_cycle_alignment: #{@billing_cycle_alignment.inspect}, plan_version_number:"\ " #{@plan_version_number.inspect}, billing_cycle_anchor_configuration:"\ " #{@billing_cycle_anchor_configuration.inspect}>" end |
#to_custom_change_date ⇒ Object
455 456 457 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 455 def to_custom_change_date DateTimeHelper.to_rfc3339(change_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/api_reference/models/subscription_plan_change.rb', line 460 def to_s class_name = self.class.name.split('::').last "<#{class_name} usage_customer_ids: #{@usage_customer_ids}, filter: #{@filter}, plan_id:"\ " #{@plan_id}, external_plan_id: #{@external_plan_id}, price_overrides: #{@price_overrides},"\ " per_credit_overage_amount: #{@per_credit_overage_amount}, credits_overage_rate:"\ " #{@credits_overage_rate}, trial_duration_days: #{@trial_duration_days}, net_terms:"\ " #{@net_terms}, auto_collection: #{@auto_collection}, auto_issuance: #{@auto_issuance},"\ " default_invoice_memo: #{@default_invoice_memo}, coupon_redemption_code:"\ " #{@coupon_redemption_code}, invoicing_threshold: #{@invoicing_threshold},"\ " initial_phase_order: #{@initial_phase_order}, add_prices: #{@add_prices}, remove_prices:"\ " #{@remove_prices}, replace_prices: #{@replace_prices}, add_adjustments:"\ " #{@add_adjustments}, remove_adjustments: #{@remove_adjustments}, replace_adjustments:"\ " #{@replace_adjustments}, change_option: #{@change_option}, change_date: #{@change_date},"\ " align_billing_with_plan_change_date: #{@align_billing_with_plan_change_date},"\ " billing_cycle_alignment: #{@billing_cycle_alignment}, plan_version_number:"\ " #{@plan_version_number}, billing_cycle_anchor_configuration:"\ " #{@billing_cycle_anchor_configuration}>" end |