Class: ApiReference::TieredWithMinimumPrice

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/api_reference/models/tiered_with_minimum_price.rb

Overview

TieredWithMinimumPrice Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(tiered_with_minimum_config:, metadata:, id:, name:, external_price_id:, replaces_price_id:, price_type:, created_at:, cadence:, billing_mode:, billing_cycle_configuration:, invoicing_cycle_configuration:, billable_metric:, fixed_price_quantity:, plan_phase_order:, currency:, conversion_rate:, conversion_rate_config:, item:, credit_allocation:, composite_price_filters:, invoice_grouping_key:, discount:, minimum:, minimum_amount:, maximum:, maximum_amount:, dimensional_price_configuration: SKIP, license_type: SKIP, additional_properties: nil) ⇒ TieredWithMinimumPrice

Returns a new instance of TieredWithMinimumPrice.



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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 239

def initialize(tiered_with_minimum_config:, metadata:, id:, name:,
               external_price_id:, replaces_price_id:, price_type:,
               created_at:, cadence:, billing_mode:,
               billing_cycle_configuration:, invoicing_cycle_configuration:,
               billable_metric:, fixed_price_quantity:, plan_phase_order:,
               currency:, conversion_rate:, conversion_rate_config:, item:,
               credit_allocation:, composite_price_filters:,
               invoice_grouping_key:, discount:, minimum:, minimum_amount:,
               maximum:, maximum_amount:,
               dimensional_price_configuration: SKIP, license_type: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @model_type = 'tiered_with_minimum'
  @tiered_with_minimum_config = tiered_with_minimum_config
  @metadata = 
  @id = id
  @name = name
  @external_price_id = external_price_id
  @replaces_price_id = replaces_price_id
  @price_type = price_type
  @created_at = created_at
  @cadence = cadence
  @billing_mode = billing_mode
  @billing_cycle_configuration = billing_cycle_configuration
  @invoicing_cycle_configuration = invoicing_cycle_configuration
  @billable_metric = billable_metric
  unless dimensional_price_configuration == SKIP
    @dimensional_price_configuration =
      dimensional_price_configuration
  end
  @fixed_price_quantity = fixed_price_quantity
  @plan_phase_order = plan_phase_order
  @currency = currency
  @conversion_rate = conversion_rate
  @conversion_rate_config = conversion_rate_config
  @item = item
  @credit_allocation = credit_allocation
  @composite_price_filters = composite_price_filters
  @invoice_grouping_key = invoice_grouping_key
  @license_type = license_type unless license_type == SKIP
  @discount = discount
  @minimum = minimum
  @minimum_amount = minimum_amount
  @maximum = maximum
  @maximum_amount = maximum_amount
  @additional_properties = additional_properties
end

Instance Attribute Details

#billable_metricBillableMetricTiny

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:



87
88
89
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 87

def billable_metric
  @billable_metric
end

#billing_cycle_configurationBillingCycleConfiguration

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.



77
78
79
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 77

def billing_cycle_configuration
  @billing_cycle_configuration
end

#billing_modeBillingMode

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:



72
73
74
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 72

def billing_mode
  @billing_mode
end

#cadenceCadence104

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:



67
68
69
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 67

def cadence
  @cadence
end

#composite_price_filtersArray[PriceFilter]

A minimal representation of an Item containing only the essential identifying information.

Returns:



132
133
134
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 132

def composite_price_filters
  @composite_price_filters
end

#conversion_rateFloat

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (Float)


112
113
114
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 112

def conversion_rate
  @conversion_rate
end

#conversion_rate_configObject

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (Object)


117
118
119
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 117

def conversion_rate_config
  @conversion_rate_config
end

#created_atDateTime

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (DateTime)


62
63
64
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 62

def created_at
  @created_at
end

#credit_allocationAllocation

A minimal representation of an Item containing only the essential identifying information.

Returns:



127
128
129
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 127

def credit_allocation
  @credit_allocation
end

#currencyString

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (String)


107
108
109
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 107

def currency
  @currency
end

#dimensional_price_configurationDimensionalPriceConfiguration

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.



92
93
94
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 92

def dimensional_price_configuration
  @dimensional_price_configuration
end

#discountObject

A minimal representation of an Item containing only the essential identifying information.

Returns:

  • (Object)


147
148
149
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 147

def discount
  @discount
end

#external_price_idString

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Returns:

  • (String)


47
48
49
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 47

def external_price_id
  @external_price_id
end

#fixed_price_quantityFloat

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (Float)


97
98
99
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 97

def fixed_price_quantity
  @fixed_price_quantity
end

#idString

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Returns:

  • (String)


33
34
35
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 33

def id
  @id
end

#invoice_grouping_keyString

A minimal representation of an Item containing only the essential identifying information.

Returns:

  • (String)


137
138
139
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 137

def invoice_grouping_key
  @invoice_grouping_key
end

#invoicing_cycle_configurationBillingCycleConfiguration

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.



82
83
84
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 82

def invoicing_cycle_configuration
  @invoicing_cycle_configuration
end

#itemItemSlim

A minimal representation of an Item containing only the essential identifying information.

Returns:



122
123
124
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 122

def item
  @item
end

#license_typeLicenseType

A minimal representation of an Item containing only the essential identifying information.

Returns:



142
143
144
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 142

def license_type
  @license_type
end

#maximumMaximum

A minimal representation of an Item containing only the essential identifying information.

Returns:



162
163
164
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 162

def maximum
  @maximum
end

#maximum_amountString

A minimal representation of an Item containing only the essential identifying information.

Returns:

  • (String)


167
168
169
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 167

def maximum_amount
  @maximum_amount
end

#metadataHash[String, String]

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Returns:

  • (Hash[String, String])


26
27
28
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 26

def 
  @metadata
end

#minimumMinimum

A minimal representation of an Item containing only the essential identifying information.

Returns:



152
153
154
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 152

def minimum
  @minimum
end

#minimum_amountString

A minimal representation of an Item containing only the essential identifying information.

Returns:

  • (String)


157
158
159
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 157

def minimum_amount
  @minimum_amount
end

#model_typeString (readonly)

The pricing model type

Returns:

  • (String)


15
16
17
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 15

def model_type
  @model_type
end

#nameString

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Returns:

  • (String)


40
41
42
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 40

def name
  @name
end

#plan_phase_orderInteger

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (Integer)


102
103
104
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 102

def plan_phase_order
  @plan_phase_order
end

#price_typePriceType6

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:



57
58
59
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 57

def price_type
  @price_type
end

#replaces_price_idString

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Returns:

  • (String)


52
53
54
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 52

def replaces_price_id
  @replaces_price_id
end

#tiered_with_minimum_configTieredPricingWithMinimumConfig1

Configuration for tiered_with_minimum pricing



19
20
21
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 19

def tiered_with_minimum_config
  @tiered_with_minimum_config
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
317
318
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
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 290

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  if hash['tiered_with_minimum_config']
    tiered_with_minimum_config = TieredPricingWithMinimumConfig1.from_hash(hash['tiered_with_minimum_config'])
  end
   = hash.key?('metadata') ? hash['metadata'] : nil
  id = hash.key?('id') ? hash['id'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  external_price_id =
    hash.key?('external_price_id') ? hash['external_price_id'] : nil
  replaces_price_id =
    hash.key?('replaces_price_id') ? hash['replaces_price_id'] : nil
  price_type = hash.key?('price_type') ? hash['price_type'] : nil
  created_at = if hash.key?('created_at')
                 (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
               end
  cadence = hash.key?('cadence') ? hash['cadence'] : nil
  billing_mode = hash.key?('billing_mode') ? hash['billing_mode'] : nil
  if hash['billing_cycle_configuration']
    billing_cycle_configuration = BillingCycleConfiguration.from_hash(hash['billing_cycle_configuration'])
  end
  if hash['invoicing_cycle_configuration']
    invoicing_cycle_configuration = BillingCycleConfiguration.from_hash(hash['invoicing_cycle_configuration'])
  end
  billable_metric = BillableMetricTiny.from_hash(hash['billable_metric']) if
    hash['billable_metric']
  fixed_price_quantity =
    hash.key?('fixed_price_quantity') ? hash['fixed_price_quantity'] : nil
  plan_phase_order =
    hash.key?('plan_phase_order') ? hash['plan_phase_order'] : nil
  currency = hash.key?('currency') ? hash['currency'] : nil
  conversion_rate =
    hash.key?('conversion_rate') ? hash['conversion_rate'] : nil
  conversion_rate_config =
    hash.key?('conversion_rate_config') ? hash['conversion_rate_config'] : nil
  item = ItemSlim.from_hash(hash['item']) if hash['item']
  credit_allocation = Allocation.from_hash(hash['credit_allocation']) if
    hash['credit_allocation']
  # Parameter is an array, so we need to iterate through it
  composite_price_filters = nil
  unless hash['composite_price_filters'].nil?
    composite_price_filters = []
    hash['composite_price_filters'].each do |structure|
      composite_price_filters << (PriceFilter.from_hash(structure) if structure)
    end
  end

  composite_price_filters = nil unless hash.key?('composite_price_filters')
  invoice_grouping_key =
    hash.key?('invoice_grouping_key') ? hash['invoice_grouping_key'] : nil
  discount = hash.key?('discount') ? hash['discount'] : nil
  minimum = Minimum.from_hash(hash['minimum']) if hash['minimum']
  minimum_amount =
    hash.key?('minimum_amount') ? hash['minimum_amount'] : nil
  maximum = Maximum.from_hash(hash['maximum']) if hash['maximum']
  maximum_amount =
    hash.key?('maximum_amount') ? hash['maximum_amount'] : nil
  if hash['dimensional_price_configuration']
    dimensional_price_configuration = DimensionalPriceConfiguration.from_hash(hash['dimensional_price_configuration'])
  end
  license_type = LicenseType.from_hash(hash['license_type']) if hash['license_type']

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  TieredWithMinimumPrice.new(tiered_with_minimum_config: tiered_with_minimum_config,
                             metadata: ,
                             id: id,
                             name: name,
                             external_price_id: external_price_id,
                             replaces_price_id: replaces_price_id,
                             price_type: price_type,
                             created_at: created_at,
                             cadence: cadence,
                             billing_mode: billing_mode,
                             billing_cycle_configuration: billing_cycle_configuration,
                             invoicing_cycle_configuration: invoicing_cycle_configuration,
                             billable_metric: billable_metric,
                             fixed_price_quantity: fixed_price_quantity,
                             plan_phase_order: plan_phase_order,
                             currency: currency,
                             conversion_rate: conversion_rate,
                             conversion_rate_config: conversion_rate_config,
                             item: item,
                             credit_allocation: credit_allocation,
                             composite_price_filters: composite_price_filters,
                             invoice_grouping_key: invoice_grouping_key,
                             discount: discount,
                             minimum: minimum,
                             minimum_amount: minimum_amount,
                             maximum: maximum,
                             maximum_amount: maximum_amount,
                             dimensional_price_configuration: dimensional_price_configuration,
                             license_type: license_type,
                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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
201
202
203
204
205
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 170

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['model_type'] = 'model_type'
  @_hash['tiered_with_minimum_config'] = 'tiered_with_minimum_config'
  @_hash['metadata'] = 'metadata'
  @_hash['id'] = 'id'
  @_hash['name'] = 'name'
  @_hash['external_price_id'] = 'external_price_id'
  @_hash['replaces_price_id'] = 'replaces_price_id'
  @_hash['price_type'] = 'price_type'
  @_hash['created_at'] = 'created_at'
  @_hash['cadence'] = 'cadence'
  @_hash['billing_mode'] = 'billing_mode'
  @_hash['billing_cycle_configuration'] = 'billing_cycle_configuration'
  @_hash['invoicing_cycle_configuration'] =
    'invoicing_cycle_configuration'
  @_hash['billable_metric'] = 'billable_metric'
  @_hash['dimensional_price_configuration'] =
    'dimensional_price_configuration'
  @_hash['fixed_price_quantity'] = 'fixed_price_quantity'
  @_hash['plan_phase_order'] = 'plan_phase_order'
  @_hash['currency'] = 'currency'
  @_hash['conversion_rate'] = 'conversion_rate'
  @_hash['conversion_rate_config'] = 'conversion_rate_config'
  @_hash['item'] = 'item'
  @_hash['credit_allocation'] = 'credit_allocation'
  @_hash['composite_price_filters'] = 'composite_price_filters'
  @_hash['invoice_grouping_key'] = 'invoice_grouping_key'
  @_hash['license_type'] = 'license_type'
  @_hash['discount'] = 'discount'
  @_hash['minimum'] = 'minimum'
  @_hash['minimum_amount'] = 'minimum_amount'
  @_hash['maximum'] = 'maximum'
  @_hash['maximum_amount'] = 'maximum_amount'
  @_hash
end

.nullablesObject

An array for nullable fields



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 216

def self.nullables
  %w[
    external_price_id
    replaces_price_id
    invoicing_cycle_configuration
    billable_metric
    dimensional_price_configuration
    fixed_price_quantity
    plan_phase_order
    conversion_rate
    conversion_rate_config
    credit_allocation
    composite_price_filters
    invoice_grouping_key
    license_type
    discount
    minimum
    minimum_amount
    maximum
    maximum_amount
  ]
end

.optionalsObject

An array for optional fields



208
209
210
211
212
213
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 208

def self.optionals
  %w[
    dimensional_price_configuration
    license_type
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 400

def self.validate(value)
  if value.instance_of? self
    return (
      APIHelper.valid_type?(value.model_type,
                            ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.tiered_with_minimum_config,
                              ->(val) { TieredPricingWithMinimumConfig1.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.id,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.name,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.external_price_id,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.replaces_price_id,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.price_type,
                              ->(val) { PriceType6.validate(val) }) and
        APIHelper.valid_type?(value.created_at,
                              ->(val) { val.instance_of? DateTime }) and
        APIHelper.valid_type?(value.cadence,
                              ->(val) { Cadence104.validate(val) }) and
        APIHelper.valid_type?(value.billing_mode,
                              ->(val) { BillingMode.validate(val) }) and
        APIHelper.valid_type?(value.billing_cycle_configuration,
                              ->(val) { BillingCycleConfiguration.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.invoicing_cycle_configuration,
                              ->(val) { BillingCycleConfiguration.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.billable_metric,
                              ->(val) { BillableMetricTiny.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.fixed_price_quantity,
                              ->(val) { val.instance_of? Float }) and
        APIHelper.valid_type?(value.plan_phase_order,
                              ->(val) { val.instance_of? Integer }) and
        APIHelper.valid_type?(value.currency,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.conversion_rate,
                              ->(val) { val.instance_of? Float }) and
        APIHelper.valid_type?(value.conversion_rate_config,
                              ->(val) { val.instance_of? Object }) and
        APIHelper.valid_type?(value.item,
                              ->(val) { ItemSlim.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.credit_allocation,
                              ->(val) { Allocation.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.composite_price_filters,
                              ->(val) { PriceFilter.validate(val) },
                              is_model_hash: true,
                              is_inner_model_hash: true) and
        APIHelper.valid_type?(value.invoice_grouping_key,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.discount,
                              ->(val) { val.instance_of? Object }) and
        APIHelper.valid_type?(value.minimum,
                              ->(val) { Minimum.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.minimum_amount,
                              ->(val) { val.instance_of? String }) and
        APIHelper.valid_type?(value.maximum,
                              ->(val) { Maximum.validate(val) },
                              is_model_hash: true) and
        APIHelper.valid_type?(value.maximum_amount,
                              ->(val) { val.instance_of? String })
    )
  end

  return false unless value.instance_of? Hash

  (
    APIHelper.valid_type?(value['model_type'],
                          ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['tiered_with_minimum_config'],
                            ->(val) { TieredPricingWithMinimumConfig1.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['metadata'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['id'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['name'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['external_price_id'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['replaces_price_id'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['price_type'],
                            ->(val) { PriceType6.validate(val) }) and
      APIHelper.valid_type?(value['created_at'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['cadence'],
                            ->(val) { Cadence104.validate(val) }) and
      APIHelper.valid_type?(value['billing_mode'],
                            ->(val) { BillingMode.validate(val) }) and
      APIHelper.valid_type?(value['billing_cycle_configuration'],
                            ->(val) { BillingCycleConfiguration.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['invoicing_cycle_configuration'],
                            ->(val) { BillingCycleConfiguration.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['billable_metric'],
                            ->(val) { BillableMetricTiny.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['fixed_price_quantity'],
                            ->(val) { val.instance_of? Float }) and
      APIHelper.valid_type?(value['plan_phase_order'],
                            ->(val) { val.instance_of? Integer }) and
      APIHelper.valid_type?(value['currency'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['conversion_rate'],
                            ->(val) { val.instance_of? Float }) and
      APIHelper.valid_type?(value['conversion_rate_config'],
                            ->(val) { val.instance_of? Object }) and
      APIHelper.valid_type?(value['item'],
                            ->(val) { ItemSlim.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['credit_allocation'],
                            ->(val) { Allocation.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['composite_price_filters'],
                            ->(val) { PriceFilter.validate(val) },
                            is_model_hash: true,
                            is_inner_model_hash: true) and
      APIHelper.valid_type?(value['invoice_grouping_key'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['discount'],
                            ->(val) { val.instance_of? Object }) and
      APIHelper.valid_type?(value['minimum'],
                            ->(val) { Minimum.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['minimum_amount'],
                            ->(val) { val.instance_of? String }) and
      APIHelper.valid_type?(value['maximum'],
                            ->(val) { Maximum.validate(val) },
                            is_model_hash: true) and
      APIHelper.valid_type?(value['maximum_amount'],
                            ->(val) { val.instance_of? String })
  )
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 565

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} model_type: #{@model_type.inspect}, tiered_with_minimum_config:"\
  " #{@tiered_with_minimum_config.inspect}, metadata: #{@metadata.inspect}, id:"\
  " #{@id.inspect}, name: #{@name.inspect}, external_price_id: #{@external_price_id.inspect},"\
  " replaces_price_id: #{@replaces_price_id.inspect}, price_type: #{@price_type.inspect},"\
  " created_at: #{@created_at.inspect}, cadence: #{@cadence.inspect}, billing_mode:"\
  " #{@billing_mode.inspect}, billing_cycle_configuration:"\
  " #{@billing_cycle_configuration.inspect}, invoicing_cycle_configuration:"\
  " #{@invoicing_cycle_configuration.inspect}, billable_metric: #{@billable_metric.inspect},"\
  " dimensional_price_configuration: #{@dimensional_price_configuration.inspect},"\
  " fixed_price_quantity: #{@fixed_price_quantity.inspect}, plan_phase_order:"\
  " #{@plan_phase_order.inspect}, currency: #{@currency.inspect}, conversion_rate:"\
  " #{@conversion_rate.inspect}, conversion_rate_config: #{@conversion_rate_config.inspect},"\
  " item: #{@item.inspect}, credit_allocation: #{@credit_allocation.inspect},"\
  " composite_price_filters: #{@composite_price_filters.inspect}, invoice_grouping_key:"\
  " #{@invoice_grouping_key.inspect}, license_type: #{@license_type.inspect}, discount:"\
  " #{@discount.inspect}, minimum: #{@minimum.inspect}, minimum_amount:"\
  " #{@minimum_amount.inspect}, maximum: #{@maximum.inspect}, maximum_amount:"\
  " #{@maximum_amount.inspect}, additional_properties: #{@additional_properties}>"
end

#to_custom_created_atObject



394
395
396
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 394

def to_custom_created_at
  DateTimeHelper.to_rfc3339(created_at)
end

#to_sObject

Provides a human-readable string representation of the object.



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/api_reference/models/tiered_with_minimum_price.rb', line 545

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} model_type: #{@model_type}, tiered_with_minimum_config:"\
  " #{@tiered_with_minimum_config}, metadata: #{@metadata}, id: #{@id}, name: #{@name},"\
  " external_price_id: #{@external_price_id}, replaces_price_id: #{@replaces_price_id},"\
  " price_type: #{@price_type}, created_at: #{@created_at}, cadence: #{@cadence},"\
  " billing_mode: #{@billing_mode}, billing_cycle_configuration:"\
  " #{@billing_cycle_configuration}, invoicing_cycle_configuration:"\
  " #{@invoicing_cycle_configuration}, billable_metric: #{@billable_metric},"\
  " dimensional_price_configuration: #{@dimensional_price_configuration},"\
  " fixed_price_quantity: #{@fixed_price_quantity}, plan_phase_order: #{@plan_phase_order},"\
  " currency: #{@currency}, conversion_rate: #{@conversion_rate}, conversion_rate_config:"\
  " #{@conversion_rate_config}, item: #{@item}, credit_allocation: #{@credit_allocation},"\
  " composite_price_filters: #{@composite_price_filters}, invoice_grouping_key:"\
  " #{@invoice_grouping_key}, license_type: #{@license_type}, discount: #{@discount}, minimum:"\
  " #{@minimum}, minimum_amount: #{@minimum_amount}, maximum: #{@maximum}, maximum_amount:"\
  " #{@maximum_amount}, additional_properties: #{@additional_properties}>"
end