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
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 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 220 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“: }
93 94 95 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 93 def calculation @calculation end |
#changed_by ⇒ Object
{ "description" : "ID of the user who last updated the entity.", "verbs":[] }
48 49 50 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 48 def changed_by @changed_by end |
#charge_type ⇒ Object
{ "description" : "charge-type.", "verbs“: }
36 37 38 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 36 def charge_type @charge_type end |
#child_invoice_id ⇒ Object
The ID of the invoice that is associated with the invoice-line.
117 118 119 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 117 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“: }
102 103 104 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 102 def component_value @component_value end |
#cost ⇒ Object
{ "description" : "The cost of the invoice-line including tax.", "verbs“: }
96 97 98 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 96 def cost @cost end |
#created ⇒ Object
{ "description" : "The UTC DateTime when the object was created.", "verbs":[] }
45 46 47 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 45 def created @created end |
#description ⇒ Object
{ "description" : "The human readable description of the invoice-line.", "verbs“: }
90 91 92 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 90 def description @description end |
#id ⇒ Object
{ "description" : "ID of the invoice-line.", "verbs“: }
54 55 56 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 54 def id @id end |
#invoice_id ⇒ Object
{ "description" : "invoice associated with the invoice-line.", "verbs“: }
57 58 59 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 57 def invoice_id @invoice_id end |
#name ⇒ Object
{ "description" : "The human readable name of the invoice-line.", "verbs“: }
87 88 89 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 87 def name @name end |
#organization_id ⇒ Object
{ "description" : "ID of the organization associated with the invoice-line.", "verbs“: }
84 85 86 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 84 def organization_id @organization_id end |
#period_end ⇒ Object
The period end of the charge.
42 43 44 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 42 def period_end @period_end end |
#period_start ⇒ Object
The period start of the charge.
39 40 41 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 39 def period_start @period_start end |
#pricing_component_id ⇒ Object
The ID of the pricing-component that is associated with the invoice-line.
105 106 107 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 105 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.
111 112 113 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 111 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“: }
33 34 35 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 33 def pricing_component_type @pricing_component_type end |
#product_id ⇒ Object
{ "description" : "the product ID associated with the invoice-line.", "verbs“: }
75 76 77 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 75 def product_id @product_id end |
#product_name ⇒ Object
{ "description" : "the product name associated with the invoice-line.", "verbs“: }
81 82 83 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 81 def product_name @product_name end |
#product_rate_plan_id ⇒ Object
{ "description" : "the product rate plan ID associated with the invoice-line.", "verbs“: }
66 67 68 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 66 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“: }
72 73 74 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 72 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.
108 109 110 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 108 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“: }
78 79 80 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 78 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“: }
69 70 71 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 69 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.
114 115 116 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 114 def subscription_charge_id @subscription_charge_id end |
#subscription_id ⇒ Object
{ "description" : "the subscription ID associated with the invoice-line.", "verbs“: }
63 64 65 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 63 def subscription_id @subscription_id end |
#tax ⇒ Object
{ "description" : "The cumulative tax of the invoice-line.", "verbs“: }
99 100 101 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 99 def tax @tax end |
#type ⇒ Object
The type of the invoice-line.
120 121 122 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 120 def type @type end |
#unit_of_measure ⇒ Object
{ "description" : "The unit-of-measure associated with the invoice-line.", "verbs“: }
30 31 32 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 30 def unit_of_measure @unit_of_measure end |
#unit_of_measure_id ⇒ Object
{ "description" : "unit-of-measure associated with the invoice-line.", "verbs“: }
60 61 62 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 60 def unit_of_measure_id @unit_of_measure_id end |
#updated ⇒ Object
{ "description" : "The UTC DateTime when the object was last updated.", "verbs":[] }
51 52 53 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 51 def updated @updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 145 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.
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 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 182 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.
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 421 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
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 493 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 =~ /^(true|t|yes|y|1)$/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
559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 559 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
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 472 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/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
459 460 461 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 459 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
465 466 467 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 465 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?
354 355 356 357 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 354 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
539 540 541 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 539 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
545 546 547 548 549 550 551 552 553 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 545 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
533 534 535 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 533 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/bf_ruby2/models/invoice_line.rb', line 361 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 |