Class: ApiReference::PackageWithAllocationPrice
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::PackageWithAllocationPrice
- Defined in:
- lib/api_reference/models/package_with_allocation_price.rb
Overview
PackageWithAllocationPrice Model.
Instance Attribute Summary collapse
-
#billable_metric ⇒ BillableMetricTiny
The price id this price replaces.
-
#billing_cycle_configuration ⇒ BillingCycleConfiguration
The price id this price replaces.
-
#billing_mode ⇒ BillingMode
The price id this price replaces.
-
#cadence ⇒ Cadence104
The price id this price replaces.
-
#composite_price_filters ⇒ Array[PriceFilter]
A minimal representation of an Item containing only the essential identifying information.
-
#conversion_rate ⇒ Float
The price id this price replaces.
-
#conversion_rate_config ⇒ Object
The price id this price replaces.
-
#created_at ⇒ DateTime
The price id this price replaces.
-
#credit_allocation ⇒ Allocation
A minimal representation of an Item containing only the essential identifying information.
-
#currency ⇒ String
The price id this price replaces.
-
#dimensional_price_configuration ⇒ DimensionalPriceConfiguration
The price id this price replaces.
-
#discount ⇒ Object
A minimal representation of an Item containing only the essential identifying information.
-
#external_price_id ⇒ String
User specified key-value pairs for the resource.
-
#fixed_price_quantity ⇒ Float
The price id this price replaces.
-
#id ⇒ String
User specified key-value pairs for the resource.
-
#invoice_grouping_key ⇒ String
A minimal representation of an Item containing only the essential identifying information.
-
#invoicing_cycle_configuration ⇒ BillingCycleConfiguration
The price id this price replaces.
-
#item ⇒ ItemSlim
A minimal representation of an Item containing only the essential identifying information.
-
#license_type ⇒ LicenseType
A minimal representation of an Item containing only the essential identifying information.
-
#maximum ⇒ Maximum
A minimal representation of an Item containing only the essential identifying information.
-
#maximum_amount ⇒ String
A minimal representation of an Item containing only the essential identifying information.
-
#metadata ⇒ Hash[String, String]
User specified key-value pairs for the resource.
-
#minimum ⇒ Minimum
A minimal representation of an Item containing only the essential identifying information.
-
#minimum_amount ⇒ String
A minimal representation of an Item containing only the essential identifying information.
-
#model_type ⇒ String
readonly
The pricing model type.
-
#name ⇒ String
User specified key-value pairs for the resource.
-
#package_with_allocation_config ⇒ PackageWithAllocationConfig1
Configuration for package_with_allocation pricing.
-
#plan_phase_order ⇒ Integer
The price id this price replaces.
-
#price_type ⇒ PriceType6
The price id this price replaces.
-
#replaces_price_id ⇒ String
The price id this price replaces.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(package_with_allocation_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) ⇒ PackageWithAllocationPrice
constructor
A new instance of PackageWithAllocationPrice.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_at ⇒ 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(package_with_allocation_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) ⇒ PackageWithAllocationPrice
Returns a new instance of PackageWithAllocationPrice.
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 288 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 240 def initialize(package_with_allocation_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 = 'package_with_allocation' @package_with_allocation_config = package_with_allocation_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_metric ⇒ BillableMetricTiny
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
87 88 89 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 87 def billable_metric @billable_metric end |
#billing_cycle_configuration ⇒ BillingCycleConfiguration
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/package_with_allocation_price.rb', line 77 def billing_cycle_configuration @billing_cycle_configuration end |
#billing_mode ⇒ BillingMode
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
72 73 74 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 72 def billing_mode @billing_mode end |
#cadence ⇒ Cadence104
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
67 68 69 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 67 def cadence @cadence end |
#composite_price_filters ⇒ Array[PriceFilter]
A minimal representation of an Item containing only the essential identifying information.
132 133 134 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 132 def composite_price_filters @composite_price_filters end |
#conversion_rate ⇒ Float
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
112 113 114 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 112 def conversion_rate @conversion_rate end |
#conversion_rate_config ⇒ Object
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
117 118 119 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 117 def conversion_rate_config @conversion_rate_config end |
#created_at ⇒ DateTime
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
62 63 64 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 62 def created_at @created_at end |
#credit_allocation ⇒ Allocation
A minimal representation of an Item containing only the essential identifying information.
127 128 129 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 127 def credit_allocation @credit_allocation end |
#currency ⇒ String
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
107 108 109 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 107 def currency @currency end |
#dimensional_price_configuration ⇒ DimensionalPriceConfiguration
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/package_with_allocation_price.rb', line 92 def dimensional_price_configuration @dimensional_price_configuration end |
#discount ⇒ Object
A minimal representation of an Item containing only the essential identifying information.
147 148 149 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 147 def discount @discount end |
#external_price_id ⇒ 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.
47 48 49 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 47 def external_price_id @external_price_id end |
#fixed_price_quantity ⇒ Float
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
97 98 99 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 97 def fixed_price_quantity @fixed_price_quantity end |
#id ⇒ 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.
33 34 35 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 33 def id @id end |
#invoice_grouping_key ⇒ String
A minimal representation of an Item containing only the essential identifying information.
137 138 139 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 137 def invoice_grouping_key @invoice_grouping_key end |
#invoicing_cycle_configuration ⇒ BillingCycleConfiguration
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/package_with_allocation_price.rb', line 82 def invoicing_cycle_configuration @invoicing_cycle_configuration end |
#item ⇒ ItemSlim
A minimal representation of an Item containing only the essential identifying information.
122 123 124 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 122 def item @item end |
#license_type ⇒ LicenseType
A minimal representation of an Item containing only the essential identifying information.
142 143 144 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 142 def license_type @license_type end |
#maximum ⇒ Maximum
A minimal representation of an Item containing only the essential identifying information.
162 163 164 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 162 def maximum @maximum end |
#maximum_amount ⇒ String
A minimal representation of an Item containing only the essential identifying information.
167 168 169 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 167 def maximum_amount @maximum_amount end |
#metadata ⇒ Hash[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.
26 27 28 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 26 def @metadata end |
#minimum ⇒ Minimum
A minimal representation of an Item containing only the essential identifying information.
152 153 154 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 152 def minimum @minimum end |
#minimum_amount ⇒ String
A minimal representation of an Item containing only the essential identifying information.
157 158 159 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 157 def minimum_amount @minimum_amount end |
#model_type ⇒ String (readonly)
The pricing model type
15 16 17 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 15 def model_type @model_type end |
#name ⇒ 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.
40 41 42 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 40 def name @name end |
#package_with_allocation_config ⇒ PackageWithAllocationConfig1
Configuration for package_with_allocation pricing
19 20 21 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 19 def package_with_allocation_config @package_with_allocation_config end |
#plan_phase_order ⇒ Integer
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
102 103 104 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 102 def plan_phase_order @plan_phase_order end |
#price_type ⇒ PriceType6
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
57 58 59 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 57 def price_type @price_type end |
#replaces_price_id ⇒ String
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
52 53 54 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 52 def replaces_price_id @replaces_price_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 393 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 291 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['package_with_allocation_config'] package_with_allocation_config = PackageWithAllocationConfig1.from_hash(hash['package_with_allocation_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. PackageWithAllocationPrice.new(package_with_allocation_config: package_with_allocation_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 |
.names ⇒ Object
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 206 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 170 def self.names @_hash = {} if @_hash.nil? @_hash['model_type'] = 'model_type' @_hash['package_with_allocation_config'] = 'package_with_allocation_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 |
.nullables ⇒ Object
An array for nullable fields
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 217 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 |
.optionals ⇒ Object
An array for optional fields
209 210 211 212 213 214 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 209 def self.optionals %w[ dimensional_price_configuration license_type ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
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 543 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 401 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.package_with_allocation_config, ->(val) { PackageWithAllocationConfig1.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['package_with_allocation_config'], ->(val) { PackageWithAllocationConfig1.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
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 566 def inspect class_name = self.class.name.split('::').last "<#{class_name} model_type: #{@model_type.inspect}, package_with_allocation_config:"\ " #{@package_with_allocation_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_at ⇒ Object
395 396 397 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 395 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/api_reference/models/package_with_allocation_price.rb', line 546 def to_s class_name = self.class.name.split('::').last "<#{class_name} model_type: #{@model_type}, package_with_allocation_config:"\ " #{@package_with_allocation_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 |