Class: SwaggerClient::SubscriptionJson

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/models/subscription_json.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SubscriptionJson

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
# File 'lib/swagger_client/models/subscription_json.rb', line 185

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?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'version')
    self.version = attributes[:'version']
  end

  if attributes.has_key?(:'entityId')
    self.entity_id = attributes[:'entityId']
  end

  if attributes.has_key?(:'externalId')
    self.external_id = attributes[:'externalId']
  end

  if attributes.has_key?(:'accountId')
    self. = attributes[:'accountId']
  end

  if attributes.has_key?(:'shippingContactId')
    self.shipping_contact_id = attributes[:'shippingContactId']
  end

  if attributes.has_key?(:'billingContactId')
    self.billing_contact_id = attributes[:'billingContactId']
  end

  if attributes.has_key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.has_key?(:'startDate')
    self.start_date = attributes[:'startDate']
  end

  if attributes.has_key?(:'endDate')
    self.end_date = attributes[:'endDate']
  end

  if attributes.has_key?(:'canceledDate')
    self.canceled_date = attributes[:'canceledDate']
  end

  if attributes.has_key?(:'termLength')
    self.term_length = attributes[:'termLength']
  end

  if attributes.has_key?(:'billingCycle')
    self.billing_cycle = attributes[:'billingCycle']
  end

  if attributes.has_key?(:'paymentTerm')
    self.payment_term = attributes[:'paymentTerm']
  end

  if attributes.has_key?(:'billingTerm')
    self.billing_term = attributes[:'billingTerm']
  end

  if attributes.has_key?(:'charges')
    if (value = attributes[:'charges']).is_a?(Array)
      self.charges = value
    end
  end

  if attributes.has_key?(:'predefinedDiscounts')
    if (value = attributes[:'predefinedDiscounts']).is_a?(Array)
      self.predefined_discounts = value
    end
  end

  if attributes.has_key?(:'orders')
    if (value = attributes[:'orders']).is_a?(Array)
      self.orders = value
    end
  end

  if attributes.has_key?(:'purchaseOrders')
    if (value = attributes[:'purchaseOrders']).is_a?(Array)
      self.purchase_orders = value
    end
  end

  if attributes.has_key?(:'purchaseOrderRequiredForInvoicing')
    self.purchase_order_required_for_invoicing = attributes[:'purchaseOrderRequiredForInvoicing']
  end

  if attributes.has_key?(:'creationTime')
    self.creation_time = attributes[:'creationTime']
  end

  if attributes.has_key?(:'rampInterval')
    if (value = attributes[:'rampInterval']).is_a?(Array)
      self.ramp_interval = value
    end
  end

  if attributes.has_key?(:'renewedFromSubscriptionId')
    self.renewed_from_subscription_id = attributes[:'renewedFromSubscriptionId']
  end

  if attributes.has_key?(:'renewedFromDate')
    self.renewed_from_date = attributes[:'renewedFromDate']
  end

  if attributes.has_key?(:'renewedToSubscriptionId')
    self.renewed_to_subscription_id = attributes[:'renewedToSubscriptionId']
  end

  if attributes.has_key?(:'renewedToDate')
    self.renewed_to_date = attributes[:'renewedToDate']
  end

  if attributes.has_key?(:'restructuredFromSubscriptionId')
    self.restructured_from_subscription_id = attributes[:'restructuredFromSubscriptionId']
  end

  if attributes.has_key?(:'restructuredFromDate')
    self.restructured_from_date = attributes[:'restructuredFromDate']
  end

  if attributes.has_key?(:'restructuredToSubscriptionId')
    self.restructured_to_subscription_id = attributes[:'restructuredToSubscriptionId']
  end

  if attributes.has_key?(:'restructuredToDate')
    self.restructured_to_date = attributes[:'restructuredToDate']
  end

  if attributes.has_key?(:'autoRenew')
    self.auto_renew = attributes[:'autoRenew']
  end

  if attributes.has_key?(:'activationDate')
    self.activation_date = attributes[:'activationDate']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end
end

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



25
26
27
# File 'lib/swagger_client/models/subscription_json.rb', line 25

def 
  @account_id
end

#activation_dateObject

Returns the value of attribute activation_date.



79
80
81
# File 'lib/swagger_client/models/subscription_json.rb', line 79

def activation_date
  @activation_date
end

#auto_renewObject

Returns the value of attribute auto_renew.



77
78
79
# File 'lib/swagger_client/models/subscription_json.rb', line 77

def auto_renew
  @auto_renew
end

#billing_contact_idObject

Returns the value of attribute billing_contact_id.



29
30
31
# File 'lib/swagger_client/models/subscription_json.rb', line 29

def billing_contact_id
  @billing_contact_id
end

#billing_cycleObject

Returns the value of attribute billing_cycle.



41
42
43
# File 'lib/swagger_client/models/subscription_json.rb', line 41

def billing_cycle
  @billing_cycle
end

#billing_termObject

Returns the value of attribute billing_term.



45
46
47
# File 'lib/swagger_client/models/subscription_json.rb', line 45

def billing_term
  @billing_term
end

#canceled_dateObject

Returns the value of attribute canceled_date.



37
38
39
# File 'lib/swagger_client/models/subscription_json.rb', line 37

def canceled_date
  @canceled_date
end

#chargesObject

Returns the value of attribute charges.



47
48
49
# File 'lib/swagger_client/models/subscription_json.rb', line 47

def charges
  @charges
end

#creation_timeObject

Returns the value of attribute creation_time.



57
58
59
# File 'lib/swagger_client/models/subscription_json.rb', line 57

def creation_time
  @creation_time
end

#end_dateObject

Returns the value of attribute end_date.



35
36
37
# File 'lib/swagger_client/models/subscription_json.rb', line 35

def end_date
  @end_date
end

#entity_idObject

Returns the value of attribute entity_id.



21
22
23
# File 'lib/swagger_client/models/subscription_json.rb', line 21

def entity_id
  @entity_id
end

#external_idObject

Returns the value of attribute external_id.



23
24
25
# File 'lib/swagger_client/models/subscription_json.rb', line 23

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/swagger_client/models/subscription_json.rb', line 17

def id
  @id
end

#nameObject

Returns the value of attribute name.



81
82
83
# File 'lib/swagger_client/models/subscription_json.rb', line 81

def name
  @name
end

#ordersObject

Returns the value of attribute orders.



51
52
53
# File 'lib/swagger_client/models/subscription_json.rb', line 51

def orders
  @orders
end

#payment_termObject

Returns the value of attribute payment_term.



43
44
45
# File 'lib/swagger_client/models/subscription_json.rb', line 43

def payment_term
  @payment_term
end

#predefined_discountsObject

Returns the value of attribute predefined_discounts.



49
50
51
# File 'lib/swagger_client/models/subscription_json.rb', line 49

def predefined_discounts
  @predefined_discounts
end

#purchase_order_required_for_invoicingObject

Returns the value of attribute purchase_order_required_for_invoicing.



55
56
57
# File 'lib/swagger_client/models/subscription_json.rb', line 55

def purchase_order_required_for_invoicing
  @purchase_order_required_for_invoicing
end

#purchase_ordersObject

Returns the value of attribute purchase_orders.



53
54
55
# File 'lib/swagger_client/models/subscription_json.rb', line 53

def purchase_orders
  @purchase_orders
end

#ramp_intervalObject

Returns the value of attribute ramp_interval.



59
60
61
# File 'lib/swagger_client/models/subscription_json.rb', line 59

def ramp_interval
  @ramp_interval
end

#renewed_from_dateObject

Returns the value of attribute renewed_from_date.



63
64
65
# File 'lib/swagger_client/models/subscription_json.rb', line 63

def renewed_from_date
  @renewed_from_date
end

#renewed_from_subscription_idObject

Returns the value of attribute renewed_from_subscription_id.



61
62
63
# File 'lib/swagger_client/models/subscription_json.rb', line 61

def renewed_from_subscription_id
  @renewed_from_subscription_id
end

#renewed_to_dateObject

Returns the value of attribute renewed_to_date.



67
68
69
# File 'lib/swagger_client/models/subscription_json.rb', line 67

def renewed_to_date
  @renewed_to_date
end

#renewed_to_subscription_idObject

Returns the value of attribute renewed_to_subscription_id.



65
66
67
# File 'lib/swagger_client/models/subscription_json.rb', line 65

def renewed_to_subscription_id
  @renewed_to_subscription_id
end

#restructured_from_dateObject

Returns the value of attribute restructured_from_date.



71
72
73
# File 'lib/swagger_client/models/subscription_json.rb', line 71

def restructured_from_date
  @restructured_from_date
end

#restructured_from_subscription_idObject

Returns the value of attribute restructured_from_subscription_id.



69
70
71
# File 'lib/swagger_client/models/subscription_json.rb', line 69

def restructured_from_subscription_id
  @restructured_from_subscription_id
end

#restructured_to_dateObject

Returns the value of attribute restructured_to_date.



75
76
77
# File 'lib/swagger_client/models/subscription_json.rb', line 75

def restructured_to_date
  @restructured_to_date
end

#restructured_to_subscription_idObject

Returns the value of attribute restructured_to_subscription_id.



73
74
75
# File 'lib/swagger_client/models/subscription_json.rb', line 73

def restructured_to_subscription_id
  @restructured_to_subscription_id
end

#shipping_contact_idObject

Returns the value of attribute shipping_contact_id.



27
28
29
# File 'lib/swagger_client/models/subscription_json.rb', line 27

def shipping_contact_id
  @shipping_contact_id
end

#start_dateObject

Returns the value of attribute start_date.



33
34
35
# File 'lib/swagger_client/models/subscription_json.rb', line 33

def start_date
  @start_date
end

#stateObject

Returns the value of attribute state.



31
32
33
# File 'lib/swagger_client/models/subscription_json.rb', line 31

def state
  @state
end

#term_lengthObject

Returns the value of attribute term_length.



39
40
41
# File 'lib/swagger_client/models/subscription_json.rb', line 39

def term_length
  @term_length
end

#versionObject

Returns the value of attribute version.



19
20
21
# File 'lib/swagger_client/models/subscription_json.rb', line 19

def version
  @version
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/swagger_client/models/subscription_json.rb', line 106

def self.attribute_map
  {
    :'id' => :'id',
    :'version' => :'version',
    :'entity_id' => :'entityId',
    :'external_id' => :'externalId',
    :'account_id' => :'accountId',
    :'shipping_contact_id' => :'shippingContactId',
    :'billing_contact_id' => :'billingContactId',
    :'state' => :'state',
    :'start_date' => :'startDate',
    :'end_date' => :'endDate',
    :'canceled_date' => :'canceledDate',
    :'term_length' => :'termLength',
    :'billing_cycle' => :'billingCycle',
    :'payment_term' => :'paymentTerm',
    :'billing_term' => :'billingTerm',
    :'charges' => :'charges',
    :'predefined_discounts' => :'predefinedDiscounts',
    :'orders' => :'orders',
    :'purchase_orders' => :'purchaseOrders',
    :'purchase_order_required_for_invoicing' => :'purchaseOrderRequiredForInvoicing',
    :'creation_time' => :'creationTime',
    :'ramp_interval' => :'rampInterval',
    :'renewed_from_subscription_id' => :'renewedFromSubscriptionId',
    :'renewed_from_date' => :'renewedFromDate',
    :'renewed_to_subscription_id' => :'renewedToSubscriptionId',
    :'renewed_to_date' => :'renewedToDate',
    :'restructured_from_subscription_id' => :'restructuredFromSubscriptionId',
    :'restructured_from_date' => :'restructuredFromDate',
    :'restructured_to_subscription_id' => :'restructuredToSubscriptionId',
    :'restructured_to_date' => :'restructuredToDate',
    :'auto_renew' => :'autoRenew',
    :'activation_date' => :'activationDate',
    :'name' => :'name'
  }
end

.swagger_typesObject

Attribute type mapping.



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
180
181
# File 'lib/swagger_client/models/subscription_json.rb', line 145

def self.swagger_types
  {
    :'id' => :'String',
    :'version' => :'Integer',
    :'entity_id' => :'String',
    :'external_id' => :'String',
    :'account_id' => :'String',
    :'shipping_contact_id' => :'String',
    :'billing_contact_id' => :'String',
    :'state' => :'String',
    :'start_date' => :'Integer',
    :'end_date' => :'Integer',
    :'canceled_date' => :'Integer',
    :'term_length' => :'RecurrenceJson',
    :'billing_cycle' => :'RecurrenceJson',
    :'payment_term' => :'String',
    :'billing_term' => :'String',
    :'charges' => :'Array<SubscriptionChargeJson>',
    :'predefined_discounts' => :'Array<TenantDiscountJson>',
    :'orders' => :'Array<String>',
    :'purchase_orders' => :'Array<PurchaseOrder>',
    :'purchase_order_required_for_invoicing' => :'BOOLEAN',
    :'creation_time' => :'Integer',
    :'ramp_interval' => :'Array<Integer>',
    :'renewed_from_subscription_id' => :'String',
    :'renewed_from_date' => :'Integer',
    :'renewed_to_subscription_id' => :'String',
    :'renewed_to_date' => :'Integer',
    :'restructured_from_subscription_id' => :'String',
    :'restructured_from_date' => :'Integer',
    :'restructured_to_subscription_id' => :'String',
    :'restructured_to_date' => :'Integer',
    :'auto_renew' => :'BOOLEAN',
    :'activation_date' => :'Integer',
    :'name' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/swagger_client/models/subscription_json.rb', line 428

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      version == o.version &&
      entity_id == o.entity_id &&
      external_id == o.external_id &&
       == o. &&
      shipping_contact_id == o.shipping_contact_id &&
      billing_contact_id == o.billing_contact_id &&
      state == o.state &&
      start_date == o.start_date &&
      end_date == o.end_date &&
      canceled_date == o.canceled_date &&
      term_length == o.term_length &&
      billing_cycle == o.billing_cycle &&
      payment_term == o.payment_term &&
      billing_term == o.billing_term &&
      charges == o.charges &&
      predefined_discounts == o.predefined_discounts &&
      orders == o.orders &&
      purchase_orders == o.purchase_orders &&
      purchase_order_required_for_invoicing == o.purchase_order_required_for_invoicing &&
      creation_time == o.creation_time &&
      ramp_interval == o.ramp_interval &&
      renewed_from_subscription_id == o.renewed_from_subscription_id &&
      renewed_from_date == o.renewed_from_date &&
      renewed_to_subscription_id == o.renewed_to_subscription_id &&
      renewed_to_date == o.renewed_to_date &&
      restructured_from_subscription_id == o.restructured_from_subscription_id &&
      restructured_from_date == o.restructured_from_date &&
      restructured_to_subscription_id == o.restructured_to_subscription_id &&
      restructured_to_date == o.restructured_to_date &&
      auto_renew == o.auto_renew &&
      activation_date == o.activation_date &&
      name == o.name
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
# File 'lib/swagger_client/models/subscription_json.rb', line 502

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 = SwaggerClient.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/swagger_client/models/subscription_json.rb', line 568

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/swagger_client/models/subscription_json.rb', line 481

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 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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


468
469
470
# File 'lib/swagger_client/models/subscription_json.rb', line 468

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



474
475
476
# File 'lib/swagger_client/models/subscription_json.rb', line 474

def hash
  [id, version, entity_id, external_id, , shipping_contact_id, billing_contact_id, state, start_date, end_date, canceled_date, term_length, billing_cycle, payment_term, billing_term, charges, predefined_discounts, orders, purchase_orders, purchase_order_required_for_invoicing, creation_time, ramp_interval, renewed_from_subscription_id, renewed_from_date, renewed_to_subscription_id, renewed_to_date, restructured_from_subscription_id, restructured_from_date, restructured_to_subscription_id, restructured_to_date, auto_renew, activation_date, name].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/swagger_client/models/subscription_json.rb', line 336

def list_invalid_properties
  invalid_properties = Array.new
  if @version.nil?
    invalid_properties.push('invalid value for "version", version cannot be nil.')
  end

  if @entity_id.nil?
    invalid_properties.push('invalid value for "entity_id", entity_id cannot be nil.')
  end

  if @account_id.nil?
    invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
  end

  if @state.nil?
    invalid_properties.push('invalid value for "state", state cannot be nil.')
  end

  if @start_date.nil?
    invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
  end

  if @end_date.nil?
    invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
  end

  if @term_length.nil?
    invalid_properties.push('invalid value for "term_length", term_length cannot be nil.')
  end

  if @billing_cycle.nil?
    invalid_properties.push('invalid value for "billing_cycle", billing_cycle cannot be nil.')
  end

  if @charges.nil?
    invalid_properties.push('invalid value for "charges", charges cannot be nil.')
  end

  if @orders.nil?
    invalid_properties.push('invalid value for "orders", orders cannot be nil.')
  end

  if @creation_time.nil?
    invalid_properties.push('invalid value for "creation_time", creation_time cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



548
549
550
# File 'lib/swagger_client/models/subscription_json.rb', line 548

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



554
555
556
557
558
559
560
561
562
# File 'lib/swagger_client/models/subscription_json.rb', line 554

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



542
543
544
# File 'lib/swagger_client/models/subscription_json.rb', line 542

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/swagger_client/models/subscription_json.rb', line 387

def valid?
  return false if @version.nil?
  return false if @entity_id.nil?
  return false if @account_id.nil?
  return false if @state.nil?
  state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'EXPIRED', 'CANCELLED', 'PENDING', 'PENDING_CANCELLATION'])
  return false unless state_validator.valid?(@state)
  return false if @start_date.nil?
  return false if @end_date.nil?
  return false if @term_length.nil?
  return false if @billing_cycle.nil?
  billing_term_validator = EnumAttributeValidator.new('String', ['UP_FRONT', 'IN_ARREARS'])
  return false unless billing_term_validator.valid?(@billing_term)
  return false if @charges.nil?
  return false if @orders.nil?
  return false if @creation_time.nil?
  true
end