Class: Bfwd::InvoiceLine
- Inherits:
-
Object
- Object
- Bfwd::InvoiceLine
- Defined in:
- lib/bf_ruby2/models/invoice_line.rb
Overview
An invoice-line represents the portion of an invoice specific to one particular pricing-component and its associated pricing-component-value.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#calculation ⇒ Object
{ "description" : "A human readable explanation of how the value of the invoice-line was calculated.", "verbs“: }.
-
#changed_by ⇒ Object
{ "description" : "ID of the user who last updated the entity.", "verbs":[] }.
-
#charge_type ⇒ Object
{ "description" : "charge-type.", "verbs“: }.
-
#child_invoice_id ⇒ Object
The ID of the invoice that is associated with the invoice-line.
-
#component_value ⇒ Object
{ "description" : "The component value for the unit-of-measure that is associated with the invoice-line.", "verbs“: }.
-
#cost ⇒ Object
{ "description" : "The cost of the invoice-line including tax.", "verbs“: }.
-
#created ⇒ Object
{ "description" : "The UTC DateTime when the object was created.", "verbs":[] }.
-
#description ⇒ Object
{ "description" : "The human readable description of the invoice-line.", "verbs“: }.
-
#id ⇒ Object
{ "description" : "ID of the invoice-line.", "verbs“: }.
-
#invoice_id ⇒ Object
{ "description" : "invoice associated with the invoice-line.", "verbs“: }.
-
#name ⇒ Object
{ "description" : "The human readable name of the invoice-line.", "verbs“: }.
-
#organization_id ⇒ Object
{ "description" : "ID of the organization associated with the invoice-line.", "verbs“: }.
-
#period_end ⇒ Object
The period end of the charge.
-
#period_start ⇒ Object
The period start of the charge.
-
#pricing_component_id ⇒ Object
The ID of the pricing-component that is associated with the invoice-line.
-
#pricing_component_name ⇒ Object
The name of the pricing-component that is associated with the invoice-line.
-
#pricing_component_type ⇒ Object
{ "description" : "The type of the pricing component associated with the invoice line.", "verbs“: }.
-
#product_id ⇒ Object
{ "description" : "the product ID associated with the invoice-line.", "verbs“: }.
-
#product_name ⇒ Object
{ "description" : "the product name associated with the invoice-line.", "verbs“: }.
-
#product_rate_plan_id ⇒ Object
{ "description" : "the product rate plan ID associated with the invoice-line.", "verbs“: }.
-
#product_rate_plan_name ⇒ Object
{ "description" : "the product rate plan name associated with the invoice-line.", "verbs“: }.
-
#public_pricing_component_name ⇒ Object
The public name of the pricing-component that is associated with the invoice-line.
-
#public_product_name ⇒ Object
{ "description" : "the public product name associated with the invoice-line.", "verbs“: }.
-
#public_product_rate_plan_name ⇒ Object
{ "description" : "the public product rate plan name associated with the invoice-line.", "verbs“: }.
-
#subscription_charge_id ⇒ Object
The ID of the subscription-charge that is associated with the invoice-line.
-
#subscription_id ⇒ Object
{ "description" : "the subscription ID associated with the invoice-line.", "verbs“: }.
-
#tax ⇒ Object
{ "description" : "The cumulative tax of the invoice-line.", "verbs“: }.
-
#type ⇒ Object
The type of the invoice-line.
-
#unit_of_measure ⇒ Object
{ "description" : "The unit-of-measure associated with the invoice-line.", "verbs“: }.
-
#unit_of_measure_id ⇒ Object
{ "description" : "unit-of-measure associated with the invoice-line.", "verbs“: }.
-
#updated ⇒ Object
{ "description" : "The UTC DateTime when the object was last updated.", "verbs":[] }.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ InvoiceLine
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ InvoiceLine
Initializes the object
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 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 265 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 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 209 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'unitOfMeasure') self.unit_of_measure = attributes[:'unitOfMeasure'] end if attributes.has_key?(:'pricingComponentType') self.pricing_component_type = attributes[:'pricingComponentType'] end if attributes.has_key?(:'chargeType') self.charge_type = attributes[:'chargeType'] end if attributes.has_key?(:'periodStart') self.period_start = attributes[:'periodStart'] end if attributes.has_key?(:'periodEnd') self.period_end = attributes[:'periodEnd'] end if attributes.has_key?(:'created') self.created = attributes[:'created'] end if attributes.has_key?(:'changedBy') self.changed_by = attributes[:'changedBy'] end if attributes.has_key?(:'updated') self.updated = attributes[:'updated'] end if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'invoiceID') self.invoice_id = attributes[:'invoiceID'] end if attributes.has_key?(:'unitOfMeasureID') self.unit_of_measure_id = attributes[:'unitOfMeasureID'] end if attributes.has_key?(:'subscriptionID') self.subscription_id = attributes[:'subscriptionID'] end if attributes.has_key?(:'productRatePlanID') self.product_rate_plan_id = attributes[:'productRatePlanID'] end if attributes.has_key?(:'publicProductRatePlanName') self.public_product_rate_plan_name = attributes[:'publicProductRatePlanName'] end if attributes.has_key?(:'productRatePlanName') self.product_rate_plan_name = attributes[:'productRatePlanName'] end if attributes.has_key?(:'productID') self.product_id = attributes[:'productID'] end if attributes.has_key?(:'publicProductName') self.public_product_name = attributes[:'publicProductName'] end if attributes.has_key?(:'productName') self.product_name = attributes[:'productName'] end if attributes.has_key?(:'organizationID') self.organization_id = attributes[:'organizationID'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'calculation') self.calculation = attributes[:'calculation'] end if attributes.has_key?(:'cost') self.cost = attributes[:'cost'] end if attributes.has_key?(:'tax') self.tax = attributes[:'tax'] end if attributes.has_key?(:'componentValue') self.component_value = attributes[:'componentValue'] end if attributes.has_key?(:'pricingComponentID') self.pricing_component_id = attributes[:'pricingComponentID'] end if attributes.has_key?(:'publicPricingComponentName') self.public_pricing_component_name = attributes[:'publicPricingComponentName'] end if attributes.has_key?(:'pricingComponentName') self.pricing_component_name = attributes[:'pricingComponentName'] end if attributes.has_key?(:'subscriptionChargeID') self.subscription_charge_id = attributes[:'subscriptionChargeID'] end if attributes.has_key?(:'childInvoiceID') self.child_invoice_id = attributes[:'childInvoiceID'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end end |
Instance Attribute Details
#calculation ⇒ Object
{ "description" : "A human readable explanation of how the value of the invoice-line was calculated.", "verbs“: }
82 83 84 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 82 def calculation @calculation end |
#changed_by ⇒ Object
{ "description" : "ID of the user who last updated the entity.", "verbs":[] }
37 38 39 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 37 def changed_by @changed_by end |
#charge_type ⇒ Object
{ "description" : "charge-type.", "verbs“: }
25 26 27 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 25 def charge_type @charge_type end |
#child_invoice_id ⇒ Object
The ID of the invoice that is associated with the invoice-line.
106 107 108 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 106 def child_invoice_id @child_invoice_id end |
#component_value ⇒ Object
{ "description" : "The component value for the unit-of-measure that is associated with the invoice-line.", "verbs“: }
91 92 93 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 91 def component_value @component_value end |
#cost ⇒ Object
{ "description" : "The cost of the invoice-line including tax.", "verbs“: }
85 86 87 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 85 def cost @cost end |
#created ⇒ Object
{ "description" : "The UTC DateTime when the object was created.", "verbs":[] }
34 35 36 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 34 def created @created end |
#description ⇒ Object
{ "description" : "The human readable description of the invoice-line.", "verbs“: }
79 80 81 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 79 def description @description end |
#id ⇒ Object
{ "description" : "ID of the invoice-line.", "verbs“: }
43 44 45 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 43 def id @id end |
#invoice_id ⇒ Object
{ "description" : "invoice associated with the invoice-line.", "verbs“: }
46 47 48 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 46 def invoice_id @invoice_id end |
#name ⇒ Object
{ "description" : "The human readable name of the invoice-line.", "verbs“: }
76 77 78 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 76 def name @name end |
#organization_id ⇒ Object
{ "description" : "ID of the organization associated with the invoice-line.", "verbs“: }
73 74 75 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 73 def organization_id @organization_id end |
#period_end ⇒ Object
The period end of the charge.
31 32 33 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 31 def period_end @period_end end |
#period_start ⇒ Object
The period start of the charge.
28 29 30 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 28 def period_start @period_start end |
#pricing_component_id ⇒ Object
The ID of the pricing-component that is associated with the invoice-line.
94 95 96 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 94 def pricing_component_id @pricing_component_id end |
#pricing_component_name ⇒ Object
The name of the pricing-component that is associated with the invoice-line.
100 101 102 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 100 def pricing_component_name @pricing_component_name end |
#pricing_component_type ⇒ Object
{ "description" : "The type of the pricing component associated with the invoice line.", "verbs“: }
22 23 24 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 22 def pricing_component_type @pricing_component_type end |
#product_id ⇒ Object
{ "description" : "the product ID associated with the invoice-line.", "verbs“: }
64 65 66 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 64 def product_id @product_id end |
#product_name ⇒ Object
{ "description" : "the product name associated with the invoice-line.", "verbs“: }
70 71 72 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 70 def product_name @product_name end |
#product_rate_plan_id ⇒ Object
{ "description" : "the product rate plan ID associated with the invoice-line.", "verbs“: }
55 56 57 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 55 def product_rate_plan_id @product_rate_plan_id end |
#product_rate_plan_name ⇒ Object
{ "description" : "the product rate plan name associated with the invoice-line.", "verbs“: }
61 62 63 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 61 def product_rate_plan_name @product_rate_plan_name end |
#public_pricing_component_name ⇒ Object
The public name of the pricing-component that is associated with the invoice-line.
97 98 99 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 97 def public_pricing_component_name @public_pricing_component_name end |
#public_product_name ⇒ Object
{ "description" : "the public product name associated with the invoice-line.", "verbs“: }
67 68 69 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 67 def public_product_name @public_product_name end |
#public_product_rate_plan_name ⇒ Object
{ "description" : "the public product rate plan name associated with the invoice-line.", "verbs“: }
58 59 60 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 58 def public_product_rate_plan_name @public_product_rate_plan_name end |
#subscription_charge_id ⇒ Object
The ID of the subscription-charge that is associated with the invoice-line.
103 104 105 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 103 def subscription_charge_id @subscription_charge_id end |
#subscription_id ⇒ Object
{ "description" : "the subscription ID associated with the invoice-line.", "verbs“: }
52 53 54 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 52 def subscription_id @subscription_id end |
#tax ⇒ Object
{ "description" : "The cumulative tax of the invoice-line.", "verbs“: }
88 89 90 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 88 def tax @tax end |
#type ⇒ Object
The type of the invoice-line.
109 110 111 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 109 def type @type end |
#unit_of_measure ⇒ Object
{ "description" : "The unit-of-measure associated with the invoice-line.", "verbs“: }
19 20 21 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 19 def unit_of_measure @unit_of_measure end |
#unit_of_measure_id ⇒ Object
{ "description" : "unit-of-measure associated with the invoice-line.", "verbs“: }
49 50 51 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 49 def unit_of_measure_id @unit_of_measure_id end |
#updated ⇒ Object
{ "description" : "The UTC DateTime when the object was last updated.", "verbs":[] }
40 41 42 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 40 def updated @updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 134 def self.attribute_map { :'unit_of_measure' => :'unitOfMeasure', :'pricing_component_type' => :'pricingComponentType', :'charge_type' => :'chargeType', :'period_start' => :'periodStart', :'period_end' => :'periodEnd', :'created' => :'created', :'changed_by' => :'changedBy', :'updated' => :'updated', :'id' => :'id', :'invoice_id' => :'invoiceID', :'unit_of_measure_id' => :'unitOfMeasureID', :'subscription_id' => :'subscriptionID', :'product_rate_plan_id' => :'productRatePlanID', :'public_product_rate_plan_name' => :'publicProductRatePlanName', :'product_rate_plan_name' => :'productRatePlanName', :'product_id' => :'productID', :'public_product_name' => :'publicProductName', :'product_name' => :'productName', :'organization_id' => :'organizationID', :'name' => :'name', :'description' => :'description', :'calculation' => :'calculation', :'cost' => :'cost', :'tax' => :'tax', :'component_value' => :'componentValue', :'pricing_component_id' => :'pricingComponentID', :'public_pricing_component_name' => :'publicPricingComponentName', :'pricing_component_name' => :'pricingComponentName', :'subscription_charge_id' => :'subscriptionChargeID', :'child_invoice_id' => :'childInvoiceID', :'type' => :'type' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/bf_ruby2/models/invoice_line.rb', line 171 def self.swagger_types { :'unit_of_measure' => :'UnitOfMeasure', :'pricing_component_type' => :'String', :'charge_type' => :'String', :'period_start' => :'DateTime', :'period_end' => :'DateTime', :'created' => :'DateTime', :'changed_by' => :'String', :'updated' => :'DateTime', :'id' => :'String', :'invoice_id' => :'String', :'unit_of_measure_id' => :'String', :'subscription_id' => :'String', :'product_rate_plan_id' => :'String', :'public_product_rate_plan_name' => :'String', :'product_rate_plan_name' => :'String', :'product_id' => :'String', :'public_product_name' => :'String', :'product_name' => :'String', :'organization_id' => :'String', :'name' => :'String', :'description' => :'String', :'calculation' => :'String', :'cost' => :'Float', :'tax' => :'Float', :'component_value' => :'Integer', :'pricing_component_id' => :'String', :'public_pricing_component_name' => :'String', :'pricing_component_name' => :'String', :'subscription_charge_id' => :'String', :'child_invoice_id' => :'String', :'type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 482 def ==(o) return true if self.equal?(o) self.class == o.class && unit_of_measure == o.unit_of_measure && pricing_component_type == o.pricing_component_type && charge_type == o.charge_type && period_start == o.period_start && period_end == o.period_end && created == o.created && changed_by == o.changed_by && updated == o.updated && id == o.id && invoice_id == o.invoice_id && unit_of_measure_id == o.unit_of_measure_id && subscription_id == o.subscription_id && product_rate_plan_id == o.product_rate_plan_id && public_product_rate_plan_name == o.public_product_rate_plan_name && product_rate_plan_name == o.product_rate_plan_name && product_id == o.product_id && public_product_name == o.public_product_name && product_name == o.product_name && organization_id == o.organization_id && name == o.name && description == o.description && calculation == o.calculation && cost == o.cost && tax == o.tax && component_value == o.component_value && pricing_component_id == o.pricing_component_id && public_pricing_component_name == o.public_pricing_component_name && pricing_component_name == o.pricing_component_name && subscription_charge_id == o.subscription_charge_id && child_invoice_id == o.child_invoice_id && type == o.type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 554 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = Bfwd.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 620 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 533 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
520 521 522 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 520 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
526 527 528 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 526 def hash [unit_of_measure, pricing_component_type, charge_type, period_start, period_end, created, changed_by, updated, id, invoice_id, unit_of_measure_id, subscription_id, product_rate_plan_id, public_product_rate_plan_name, product_rate_plan_name, product_id, public_product_name, product_name, organization_id, name, description, calculation, cost, tax, component_value, pricing_component_id, public_pricing_component_name, pricing_component_name, subscription_charge_id, child_invoice_id, type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 343 def list_invalid_properties invalid_properties = Array.new if @pricing_component_type.nil? invalid_properties.push("invalid value for 'pricing_component_type', pricing_component_type cannot be nil.") end if @charge_type.nil? invalid_properties.push("invalid value for 'charge_type', charge_type cannot be nil.") end if @period_start.nil? invalid_properties.push("invalid value for 'period_start', period_start cannot be nil.") end if @period_end.nil? invalid_properties.push("invalid value for 'period_end', period_end cannot be nil.") end if @invoice_id.nil? invalid_properties.push("invalid value for 'invoice_id', invoice_id cannot be nil.") end if @organization_id.nil? invalid_properties.push("invalid value for 'organization_id', organization_id cannot be nil.") end if @name.nil? invalid_properties.push("invalid value for 'name', name cannot be nil.") end if @description.nil? invalid_properties.push("invalid value for 'description', description cannot be nil.") end if @calculation.nil? invalid_properties.push("invalid value for 'calculation', calculation cannot be nil.") end if @cost.nil? invalid_properties.push("invalid value for 'cost', cost cannot be nil.") end if @tax.nil? invalid_properties.push("invalid value for 'tax', tax cannot be nil.") end if @component_value.nil? invalid_properties.push("invalid value for 'component_value', component_value cannot be nil.") end if @pricing_component_id.nil? invalid_properties.push("invalid value for 'pricing_component_id', pricing_component_id cannot be nil.") end if @public_pricing_component_name.nil? invalid_properties.push("invalid value for 'public_pricing_component_name', public_pricing_component_name cannot be nil.") end if @pricing_component_name.nil? invalid_properties.push("invalid value for 'pricing_component_name', pricing_component_name cannot be nil.") end if @subscription_charge_id.nil? invalid_properties.push("invalid value for 'subscription_charge_id', subscription_charge_id cannot be nil.") end if @child_invoice_id.nil? invalid_properties.push("invalid value for 'child_invoice_id', child_invoice_id cannot be nil.") end if @type.nil? invalid_properties.push("invalid value for 'type', type cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
600 601 602 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 600 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
606 607 608 609 610 611 612 613 614 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 606 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
594 595 596 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 594 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 422 def valid? return false if @pricing_component_type.nil? pricing_component_type_validator = EnumAttributeValidator.new('String', ["setup", "subscription", "arrears", "usage"]) return false unless pricing_component_type_validator.valid?(@pricing_component_type) return false if @charge_type.nil? charge_type_validator = EnumAttributeValidator.new('String', ["Credit", "Debit"]) return false unless charge_type_validator.valid?(@charge_type) return false if @period_start.nil? return false if @period_end.nil? return false if @invoice_id.nil? return false if @organization_id.nil? return false if @name.nil? return false if @description.nil? return false if @calculation.nil? return false if @cost.nil? return false if @tax.nil? return false if @component_value.nil? return false if @pricing_component_id.nil? return false if @public_pricing_component_name.nil? return false if @pricing_component_name.nil? return false if @subscription_charge_id.nil? return false if @child_invoice_id.nil? return false if @type.nil? type_validator = EnumAttributeValidator.new('String', ["PricingComponent", "Coupon", "Migration", "AggregatedInvoice"]) return false unless type_validator.valid?(@type) return true end |