Class: SubskribeSandboxClient::OrderJson

Inherits:
Object
  • Object
show all
Defined in:
lib/subskribe_sandbox/models/order_json.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OrderJson

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
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
# File 'lib/subskribe_sandbox/models/order_json.rb', line 261

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'subscriptionTargetVersion')
    self.subscription_target_version = attributes[:'subscriptionTargetVersion']
  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?(:'predefinedDiscounts')
    if (value = attributes[:'predefinedDiscounts']).is_a?(Array)
      self.predefined_discounts = value
    end
  end

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

  if attributes.has_key?(:'lineItemsNetEffect')
    if (value = attributes[:'lineItemsNetEffect']).is_a?(Array)
      self.line_items_net_effect = value
    end
  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?(:'termLength')
    self.term_length = attributes[:'termLength']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



25
26
27
# File 'lib/subskribe_sandbox/models/order_json.rb', line 25

def 
  @account_id
end

#approval_segment_idObject

Returns the value of attribute approval_segment_id.



109
110
111
# File 'lib/subskribe_sandbox/models/order_json.rb', line 109

def approval_segment_id
  @approval_segment_id
end

#attachment_idObject

Returns the value of attribute attachment_id.



111
112
113
# File 'lib/subskribe_sandbox/models/order_json.rb', line 111

def attachment_id
  @attachment_id
end

#auto_renewObject

Returns the value of attribute auto_renew.



107
108
109
# File 'lib/subskribe_sandbox/models/order_json.rb', line 107

def auto_renew
  @auto_renew
end

#billing_anchor_dateObject

Returns the value of attribute billing_anchor_date.



57
58
59
# File 'lib/subskribe_sandbox/models/order_json.rb', line 57

def billing_anchor_date
  @billing_anchor_date
end

#billing_contact_idObject

Returns the value of attribute billing_contact_id.



39
40
41
# File 'lib/subskribe_sandbox/models/order_json.rb', line 39

def billing_contact_id
  @billing_contact_id
end

#billing_cycleObject

Returns the value of attribute billing_cycle.



53
54
55
# File 'lib/subskribe_sandbox/models/order_json.rb', line 53

def billing_cycle
  @billing_cycle
end

#billing_termObject

Returns the value of attribute billing_term.



55
56
57
# File 'lib/subskribe_sandbox/models/order_json.rb', line 55

def billing_term
  @billing_term
end

#composite_order_idObject

Returns the value of attribute composite_order_id.



113
114
115
# File 'lib/subskribe_sandbox/models/order_json.rb', line 113

def composite_order_id
  @composite_order_id
end

#currencyObject

Returns the value of attribute currency.



29
30
31
# File 'lib/subskribe_sandbox/models/order_json.rb', line 29

def currency
  @currency
end

#custom_fieldsObject

Returns the value of attribute custom_fields.



117
118
119
# File 'lib/subskribe_sandbox/models/order_json.rb', line 117

def custom_fields
  @custom_fields
end

#document_master_template_idObject

Returns the value of attribute document_master_template_id.



101
102
103
# File 'lib/subskribe_sandbox/models/order_json.rb', line 101

def document_master_template_id
  @document_master_template_id
end

#end_dateObject

Returns the value of attribute end_date.



49
50
51
# File 'lib/subskribe_sandbox/models/order_json.rb', line 49

def end_date
  @end_date
end

#entity_idObject

Returns the value of attribute entity_id.



19
20
21
# File 'lib/subskribe_sandbox/models/order_json.rb', line 19

def entity_id
  @entity_id
end

#executed_onObject

Returns the value of attribute executed_on.



69
70
71
# File 'lib/subskribe_sandbox/models/order_json.rb', line 69

def executed_on
  @executed_on
end

#executed_on_formattedObject

Returns the value of attribute executed_on_formatted.



73
74
75
# File 'lib/subskribe_sandbox/models/order_json.rb', line 73

def executed_on_formatted
  @executed_on_formatted
end

#expires_onObject

Returns the value of attribute expires_on.



115
116
117
# File 'lib/subskribe_sandbox/models/order_json.rb', line 115

def expires_on
  @expires_on
end

#external_idObject

Returns the value of attribute external_id.



21
22
23
# File 'lib/subskribe_sandbox/models/order_json.rb', line 21

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/subskribe_sandbox/models/order_json.rb', line 17

def id
  @id
end

#is_primary_order_for_sfdc_opportunityObject

Returns the value of attribute is_primary_order_for_sfdc_opportunity.



83
84
85
# File 'lib/subskribe_sandbox/models/order_json.rb', line 83

def is_primary_order_for_sfdc_opportunity
  @is_primary_order_for_sfdc_opportunity
end

#line_itemsObject

Returns the value of attribute line_items.



43
44
45
# File 'lib/subskribe_sandbox/models/order_json.rb', line 43

def line_items
  @line_items
end

#line_items_net_effectObject

Returns the value of attribute line_items_net_effect.



45
46
47
# File 'lib/subskribe_sandbox/models/order_json.rb', line 45

def line_items_net_effect
  @line_items_net_effect
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/subskribe_sandbox/models/order_json.rb', line 23

def name
  @name
end

#opportunity_crm_typeObject

Returns the value of attribute opportunity_crm_type.



93
94
95
# File 'lib/subskribe_sandbox/models/order_json.rb', line 93

def opportunity_crm_type
  @opportunity_crm_type
end

#order_form_template_idsObject

Returns the value of attribute order_form_template_ids.



77
78
79
# File 'lib/subskribe_sandbox/models/order_json.rb', line 77

def order_form_template_ids
  @order_form_template_ids
end

#order_termsObject

Returns the value of attribute order_terms.



79
80
81
# File 'lib/subskribe_sandbox/models/order_json.rb', line 79

def order_terms
  @order_terms
end

#order_typeObject

Returns the value of attribute order_type.



27
28
29
# File 'lib/subskribe_sandbox/models/order_json.rb', line 27

def order_type
  @order_type
end

#owner_idObject

Returns the value of attribute owner_id.



99
100
101
# File 'lib/subskribe_sandbox/models/order_json.rb', line 99

def owner_id
  @owner_id
end

#payment_termObject

Returns the value of attribute payment_term.



31
32
33
# File 'lib/subskribe_sandbox/models/order_json.rb', line 31

def payment_term
  @payment_term
end

#predefined_discountsObject

Returns the value of attribute predefined_discounts.



41
42
43
# File 'lib/subskribe_sandbox/models/order_json.rb', line 41

def predefined_discounts
  @predefined_discounts
end

#purchase_order_numberObject

Returns the value of attribute purchase_order_number.



103
104
105
# File 'lib/subskribe_sandbox/models/order_json.rb', line 103

def purchase_order_number
  @purchase_order_number
end

#purchase_order_required_for_invoicingObject

Returns the value of attribute purchase_order_required_for_invoicing.



105
106
107
# File 'lib/subskribe_sandbox/models/order_json.rb', line 105

def purchase_order_required_for_invoicing
  @purchase_order_required_for_invoicing
end

#ramp_intervalObject

Returns the value of attribute ramp_interval.



75
76
77
# File 'lib/subskribe_sandbox/models/order_json.rb', line 75

def ramp_interval
  @ramp_interval
end

#renewal_for_subscription_idObject

Returns the value of attribute renewal_for_subscription_id.



95
96
97
# File 'lib/subskribe_sandbox/models/order_json.rb', line 95

def renewal_for_subscription_id
  @renewal_for_subscription_id
end

#renewal_for_subscription_versionObject

Returns the value of attribute renewal_for_subscription_version.



97
98
99
# File 'lib/subskribe_sandbox/models/order_json.rb', line 97

def renewal_for_subscription_version
  @renewal_for_subscription_version
end

#sfdc_opportunity_idObject

Returns the value of attribute sfdc_opportunity_id.



81
82
83
# File 'lib/subskribe_sandbox/models/order_json.rb', line 81

def sfdc_opportunity_id
  @sfdc_opportunity_id
end

#sfdc_opportunity_nameObject

Returns the value of attribute sfdc_opportunity_name.



85
86
87
# File 'lib/subskribe_sandbox/models/order_json.rb', line 85

def sfdc_opportunity_name
  @sfdc_opportunity_name
end

#sfdc_opportunity_stageObject

Returns the value of attribute sfdc_opportunity_stage.



89
90
91
# File 'lib/subskribe_sandbox/models/order_json.rb', line 89

def sfdc_opportunity_stage
  @sfdc_opportunity_stage
end

#sfdc_opportunity_typeObject

Returns the value of attribute sfdc_opportunity_type.



87
88
89
# File 'lib/subskribe_sandbox/models/order_json.rb', line 87

def sfdc_opportunity_type
  @sfdc_opportunity_type
end

#sfdc_order_can_be_executedObject

Returns the value of attribute sfdc_order_can_be_executed.



91
92
93
# File 'lib/subskribe_sandbox/models/order_json.rb', line 91

def sfdc_order_can_be_executed
  @sfdc_order_can_be_executed
end

#shipping_contact_idObject

Returns the value of attribute shipping_contact_id.



37
38
39
# File 'lib/subskribe_sandbox/models/order_json.rb', line 37

def shipping_contact_id
  @shipping_contact_id
end

#start_dateObject

Returns the value of attribute start_date.



47
48
49
# File 'lib/subskribe_sandbox/models/order_json.rb', line 47

def start_date
  @start_date
end

#start_date_typeObject

Returns the value of attribute start_date_type.



119
120
121
# File 'lib/subskribe_sandbox/models/order_json.rb', line 119

def start_date_type
  @start_date_type
end

#statusObject

Returns the value of attribute status.



67
68
69
# File 'lib/subskribe_sandbox/models/order_json.rb', line 67

def status
  @status
end

#subscription_idObject

Returns the value of attribute subscription_id.



33
34
35
# File 'lib/subskribe_sandbox/models/order_json.rb', line 33

def subscription_id
  @subscription_id
end

#subscription_target_versionObject

Returns the value of attribute subscription_target_version.



35
36
37
# File 'lib/subskribe_sandbox/models/order_json.rb', line 35

def subscription_target_version
  @subscription_target_version
end

#tax_estimateObject

Returns the value of attribute tax_estimate.



65
66
67
# File 'lib/subskribe_sandbox/models/order_json.rb', line 65

def tax_estimate
  @tax_estimate
end

#term_lengthObject

Returns the value of attribute term_length.



51
52
53
# File 'lib/subskribe_sandbox/models/order_json.rb', line 51

def term_length
  @term_length
end

#total_amountObject

Returns the value of attribute total_amount.



59
60
61
# File 'lib/subskribe_sandbox/models/order_json.rb', line 59

def total_amount
  @total_amount
end

#total_list_amountObject

Returns the value of attribute total_list_amount.



61
62
63
# File 'lib/subskribe_sandbox/models/order_json.rb', line 61

def total_list_amount
  @total_list_amount
end

#total_list_amount_before_overrideObject

Returns the value of attribute total_list_amount_before_override.



63
64
65
# File 'lib/subskribe_sandbox/models/order_json.rb', line 63

def total_list_amount_before_override
  @total_list_amount_before_override
end

#updated_onObject

Returns the value of attribute updated_on.



71
72
73
# File 'lib/subskribe_sandbox/models/order_json.rb', line 71

def updated_on
  @updated_on
end

Class Method Details

.attribute_mapObject

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



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
169
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
# File 'lib/subskribe_sandbox/models/order_json.rb', line 144

def self.attribute_map
  {
    :'id' => :'id',
    :'entity_id' => :'entityId',
    :'external_id' => :'externalId',
    :'name' => :'name',
    :'account_id' => :'accountId',
    :'order_type' => :'orderType',
    :'currency' => :'currency',
    :'payment_term' => :'paymentTerm',
    :'subscription_id' => :'subscriptionId',
    :'subscription_target_version' => :'subscriptionTargetVersion',
    :'shipping_contact_id' => :'shippingContactId',
    :'billing_contact_id' => :'billingContactId',
    :'predefined_discounts' => :'predefinedDiscounts',
    :'line_items' => :'lineItems',
    :'line_items_net_effect' => :'lineItemsNetEffect',
    :'start_date' => :'startDate',
    :'end_date' => :'endDate',
    :'term_length' => :'termLength',
    :'billing_cycle' => :'billingCycle',
    :'billing_term' => :'billingTerm',
    :'billing_anchor_date' => :'billingAnchorDate',
    :'total_amount' => :'totalAmount',
    :'total_list_amount' => :'totalListAmount',
    :'total_list_amount_before_override' => :'totalListAmountBeforeOverride',
    :'tax_estimate' => :'taxEstimate',
    :'status' => :'status',
    :'executed_on' => :'executedOn',
    :'updated_on' => :'updatedOn',
    :'executed_on_formatted' => :'executedOnFormatted',
    :'ramp_interval' => :'rampInterval',
    :'order_form_template_ids' => :'orderFormTemplateIds',
    :'order_terms' => :'orderTerms',
    :'sfdc_opportunity_id' => :'sfdcOpportunityId',
    :'is_primary_order_for_sfdc_opportunity' => :'isPrimaryOrderForSfdcOpportunity',
    :'sfdc_opportunity_name' => :'sfdcOpportunityName',
    :'sfdc_opportunity_type' => :'sfdcOpportunityType',
    :'sfdc_opportunity_stage' => :'sfdcOpportunityStage',
    :'sfdc_order_can_be_executed' => :'sfdcOrderCanBeExecuted',
    :'opportunity_crm_type' => :'opportunityCrmType',
    :'renewal_for_subscription_id' => :'renewalForSubscriptionId',
    :'renewal_for_subscription_version' => :'renewalForSubscriptionVersion',
    :'owner_id' => :'ownerId',
    :'document_master_template_id' => :'documentMasterTemplateId',
    :'purchase_order_number' => :'purchaseOrderNumber',
    :'purchase_order_required_for_invoicing' => :'purchaseOrderRequiredForInvoicing',
    :'auto_renew' => :'autoRenew',
    :'approval_segment_id' => :'approvalSegmentId',
    :'attachment_id' => :'attachmentId',
    :'composite_order_id' => :'compositeOrderId',
    :'expires_on' => :'expiresOn',
    :'custom_fields' => :'customFields',
    :'start_date_type' => :'startDateType'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/subskribe_sandbox/models/order_json.rb', line 202

def self.swagger_types
  {
    :'id' => :'String',
    :'entity_id' => :'String',
    :'external_id' => :'String',
    :'name' => :'String',
    :'account_id' => :'String',
    :'order_type' => :'String',
    :'currency' => :'String',
    :'payment_term' => :'String',
    :'subscription_id' => :'String',
    :'subscription_target_version' => :'Integer',
    :'shipping_contact_id' => :'String',
    :'billing_contact_id' => :'String',
    :'predefined_discounts' => :'Array<TenantDiscountJson>',
    :'line_items' => :'Array<OrderLineItemJson>',
    :'line_items_net_effect' => :'Array<OrderLineItemJson>',
    :'start_date' => :'Integer',
    :'end_date' => :'Integer',
    :'term_length' => :'RecurrenceJson',
    :'billing_cycle' => :'RecurrenceJson',
    :'billing_term' => :'String',
    :'billing_anchor_date' => :'Integer',
    :'total_amount' => :'Float',
    :'total_list_amount' => :'Float',
    :'total_list_amount_before_override' => :'Float',
    :'tax_estimate' => :'Float',
    :'status' => :'String',
    :'executed_on' => :'Integer',
    :'updated_on' => :'Integer',
    :'executed_on_formatted' => :'String',
    :'ramp_interval' => :'Array<Integer>',
    :'order_form_template_ids' => :'Array<String>',
    :'order_terms' => :'Array<OrderTerms>',
    :'sfdc_opportunity_id' => :'String',
    :'is_primary_order_for_sfdc_opportunity' => :'BOOLEAN',
    :'sfdc_opportunity_name' => :'String',
    :'sfdc_opportunity_type' => :'String',
    :'sfdc_opportunity_stage' => :'String',
    :'sfdc_order_can_be_executed' => :'BOOLEAN',
    :'opportunity_crm_type' => :'String',
    :'renewal_for_subscription_id' => :'String',
    :'renewal_for_subscription_version' => :'Integer',
    :'owner_id' => :'String',
    :'document_master_template_id' => :'String',
    :'purchase_order_number' => :'String',
    :'purchase_order_required_for_invoicing' => :'BOOLEAN',
    :'auto_renew' => :'BOOLEAN',
    :'approval_segment_id' => :'String',
    :'attachment_id' => :'String',
    :'composite_order_id' => :'String',
    :'expires_on' => :'Integer',
    :'custom_fields' => :'Array<CustomFieldEntry>',
    :'start_date_type' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
# File 'lib/subskribe_sandbox/models/order_json.rb', line 580

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      entity_id == o.entity_id &&
      external_id == o.external_id &&
      name == o.name &&
       == o. &&
      order_type == o.order_type &&
      currency == o.currency &&
      payment_term == o.payment_term &&
      subscription_id == o.subscription_id &&
      subscription_target_version == o.subscription_target_version &&
      shipping_contact_id == o.shipping_contact_id &&
      billing_contact_id == o.billing_contact_id &&
      predefined_discounts == o.predefined_discounts &&
      line_items == o.line_items &&
      line_items_net_effect == o.line_items_net_effect &&
      start_date == o.start_date &&
      end_date == o.end_date &&
      term_length == o.term_length &&
      billing_cycle == o.billing_cycle &&
      billing_term == o.billing_term &&
      billing_anchor_date == o.billing_anchor_date &&
      total_amount == o.total_amount &&
      total_list_amount == o.total_list_amount &&
      total_list_amount_before_override == o.total_list_amount_before_override &&
      tax_estimate == o.tax_estimate &&
      status == o.status &&
      executed_on == o.executed_on &&
      updated_on == o.updated_on &&
      executed_on_formatted == o.executed_on_formatted &&
      ramp_interval == o.ramp_interval &&
      order_form_template_ids == o.order_form_template_ids &&
      order_terms == o.order_terms &&
      sfdc_opportunity_id == o.sfdc_opportunity_id &&
      is_primary_order_for_sfdc_opportunity == o.is_primary_order_for_sfdc_opportunity &&
      sfdc_opportunity_name == o.sfdc_opportunity_name &&
      sfdc_opportunity_type == o.sfdc_opportunity_type &&
      sfdc_opportunity_stage == o.sfdc_opportunity_stage &&
      sfdc_order_can_be_executed == o.sfdc_order_can_be_executed &&
      opportunity_crm_type == o.opportunity_crm_type &&
      renewal_for_subscription_id == o.renewal_for_subscription_id &&
      renewal_for_subscription_version == o.renewal_for_subscription_version &&
      owner_id == o.owner_id &&
      document_master_template_id == o.document_master_template_id &&
      purchase_order_number == o.purchase_order_number &&
      purchase_order_required_for_invoicing == o.purchase_order_required_for_invoicing &&
      auto_renew == o.auto_renew &&
      approval_segment_id == o.approval_segment_id &&
      attachment_id == o.attachment_id &&
      composite_order_id == o.composite_order_id &&
      expires_on == o.expires_on &&
      custom_fields == o.custom_fields &&
      start_date_type == o.start_date_type
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



673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/subskribe_sandbox/models/order_json.rb', line 673

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



739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/subskribe_sandbox/models/order_json.rb', line 739

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



652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/subskribe_sandbox/models/order_json.rb', line 652

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


639
640
641
# File 'lib/subskribe_sandbox/models/order_json.rb', line 639

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



645
646
647
# File 'lib/subskribe_sandbox/models/order_json.rb', line 645

def hash
  [id, entity_id, external_id, name, , order_type, currency, payment_term, subscription_id, subscription_target_version, shipping_contact_id, billing_contact_id, predefined_discounts, line_items, line_items_net_effect, start_date, end_date, term_length, billing_cycle, billing_term, billing_anchor_date, total_amount, total_list_amount, total_list_amount_before_override, tax_estimate, status, executed_on, updated_on, executed_on_formatted, ramp_interval, order_form_template_ids, order_terms, sfdc_opportunity_id, is_primary_order_for_sfdc_opportunity, sfdc_opportunity_name, sfdc_opportunity_type, sfdc_opportunity_stage, sfdc_order_can_be_executed, opportunity_crm_type, renewal_for_subscription_id, renewal_for_subscription_version, owner_id, document_master_template_id, purchase_order_number, purchase_order_required_for_invoicing, auto_renew, approval_segment_id, attachment_id, composite_order_id, expires_on, custom_fields, start_date_type].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# File 'lib/subskribe_sandbox/models/order_json.rb', line 492

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

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

  if @status.nil?
    invalid_properties.push('invalid value for "status", status 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



719
720
721
# File 'lib/subskribe_sandbox/models/order_json.rb', line 719

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



725
726
727
728
729
730
731
732
733
# File 'lib/subskribe_sandbox/models/order_json.rb', line 725

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



713
714
715
# File 'lib/subskribe_sandbox/models/order_json.rb', line 713

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



511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/subskribe_sandbox/models/order_json.rb', line 511

def valid?
  return false if @order_type.nil?
  order_type_validator = EnumAttributeValidator.new('String', ['NEW', 'AMENDMENT', 'CANCEL', 'RENEWAL', 'RESTRUCTURE'])
  return false unless order_type_validator.valid?(@order_type)
  return false if @start_date.nil?
  billing_term_validator = EnumAttributeValidator.new('String', ['UP_FRONT', 'IN_ARREARS'])
  return false unless billing_term_validator.valid?(@billing_term)
  return false if @status.nil?
  status_validator = EnumAttributeValidator.new('String', ['DRAFT', 'SUBMITTED', 'APPROVED', 'EXECUTED', 'CANCELLED', 'EXPIRED'])
  return false unless status_validator.valid?(@status)
  opportunity_crm_type_validator = EnumAttributeValidator.new('String', ['SALESFORCE', 'HUBSPOT'])
  return false unless opportunity_crm_type_validator.valid?(@opportunity_crm_type)
  start_date_type_validator = EnumAttributeValidator.new('String', ['FIXED', 'EXECUTION_DATE'])
  return false unless start_date_type_validator.valid?(@start_date_type)
  true
end