tachain-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +226 -0
  5. data/Rakefile +10 -0
  6. data/git_push.sh +54 -0
  7. data/lib/tachain-sdk/api/api_declaration_api.rb +396 -0
  8. data/lib/tachain-sdk/api/api_delivery_api.rb +676 -0
  9. data/lib/tachain-sdk/api/api_enum_api.rb +94 -0
  10. data/lib/tachain-sdk/api/api_order_api.rb +846 -0
  11. data/lib/tachain-sdk/api/api_order_workflow_api.rb +170 -0
  12. data/lib/tachain-sdk/api/api_production_api.rb +466 -0
  13. data/lib/tachain-sdk/api_client.rb +397 -0
  14. data/lib/tachain-sdk/api_error.rb +58 -0
  15. data/lib/tachain-sdk/api_model_base.rb +88 -0
  16. data/lib/tachain-sdk/configuration.rb +329 -0
  17. data/lib/tachain-sdk/models/api_declaration_delete_request.rb +341 -0
  18. data/lib/tachain-sdk/models/api_declaration_document_request.rb +209 -0
  19. data/lib/tachain-sdk/models/api_declaration_list_dto.rb +251 -0
  20. data/lib/tachain-sdk/models/api_declaration_submit_request.rb +251 -0
  21. data/lib/tachain-sdk/models/api_declaration_submit_result_dto.rb +197 -0
  22. data/lib/tachain-sdk/models/api_integration_delete_request.rb +209 -0
  23. data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +216 -0
  24. data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +243 -0
  25. data/lib/tachain-sdk/models/api_response_api_declaration_list_dto.rb +199 -0
  26. data/lib/tachain-sdk/models/api_response_api_declaration_submit_result_dto.rb +199 -0
  27. data/lib/tachain-sdk/models/api_response_delivery_note_api_dto.rb +199 -0
  28. data/lib/tachain-sdk/models/api_response_order_api_dto.rb +199 -0
  29. data/lib/tachain-sdk/models/api_response_production_api_dto.rb +199 -0
  30. data/lib/tachain-sdk/models/api_response_string.rb +200 -0
  31. data/lib/tachain-sdk/models/attachment_in_api_create_dto.rb +262 -0
  32. data/lib/tachain-sdk/models/attachment_in_api_dto.rb +363 -0
  33. data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +334 -0
  34. data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +880 -0
  35. data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +749 -0
  36. data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +513 -0
  37. data/lib/tachain-sdk/models/company.rb +780 -0
  38. data/lib/tachain-sdk/models/company_compliance_profile.rb +547 -0
  39. data/lib/tachain-sdk/models/company_utility_declaration.rb +592 -0
  40. data/lib/tachain-sdk/models/customer.rb +569 -0
  41. data/lib/tachain-sdk/models/delivery_note_api_dto.rb +597 -0
  42. data/lib/tachain-sdk/models/delivery_note_detail_api_dto.rb +682 -0
  43. data/lib/tachain-sdk/models/document_type_api_dto.rb +480 -0
  44. data/lib/tachain-sdk/models/factory.rb +545 -0
  45. data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +201 -0
  46. data/lib/tachain-sdk/models/microsoft_asp_net_core_mvc_problem_details.rb +188 -0
  47. data/lib/tachain-sdk/models/model1.rb +157 -0
  48. data/lib/tachain-sdk/models/model3.rb +202 -0
  49. data/lib/tachain-sdk/models/model4.rb +202 -0
  50. data/lib/tachain-sdk/models/order.rb +974 -0
  51. data/lib/tachain-sdk/models/order_api_dto.rb +918 -0
  52. data/lib/tachain-sdk/models/order_line.rb +1184 -0
  53. data/lib/tachain-sdk/models/order_line_api_dto.rb +1277 -0
  54. data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +270 -0
  55. data/lib/tachain-sdk/models/order_stage_form_datum_api_dto.rb +260 -0
  56. data/lib/tachain-sdk/models/order_stage_form_dto.rb +254 -0
  57. data/lib/tachain-sdk/models/paged_response_delivery_note_api_dto.rb +296 -0
  58. data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +296 -0
  59. data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +296 -0
  60. data/lib/tachain-sdk/models/product_bom_grouping_dto.rb +280 -0
  61. data/lib/tachain-sdk/models/production_api_dto.rb +639 -0
  62. data/lib/tachain-sdk/models/production_raw_material_api_dto.rb +481 -0
  63. data/lib/tachain-sdk/models/production_raw_material_dto.rb +548 -0
  64. data/lib/tachain-sdk/models/production_sales_order_api_dto.rb +436 -0
  65. data/lib/tachain-sdk/models/result_api_enum.rb +270 -0
  66. data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +331 -0
  67. data/lib/tachain-sdk/models/result_brand_report_unlinked_order_detail.rb +229 -0
  68. data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +418 -0
  69. data/lib/tachain-sdk/models/result_mapping_order_select.rb +335 -0
  70. data/lib/tachain-sdk/models/result_order_trace_report.rb +721 -0
  71. data/lib/tachain-sdk/models/stage_attachment_api_dto.rb +398 -0
  72. data/lib/tachain-sdk/models/supplier.rb +585 -0
  73. data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +383 -0
  74. data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +456 -0
  75. data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +227 -0
  76. data/lib/tachain-sdk/models/trader.rb +506 -0
  77. data/lib/tachain-sdk/signed_api_client.rb +65 -0
  78. data/lib/tachain-sdk/version.rb +15 -0
  79. data/lib/tachain-sdk.rb +108 -0
  80. data/spec/spec_helper.rb +111 -0
  81. data/tachain-sdk.gemspec +39 -0
  82. metadata +165 -0
@@ -0,0 +1,513 @@
1
+ =begin
2
+ #Tactic Chain Public API
3
+
4
+ #Public integration endpoints. Set your own base URL and credential before calling.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TachainSdk
17
+ # 品牌订单申报未完成项快照表
18
+ class BrandOrderUncompletedDeclareSnapshotDto < ApiModelBase
19
+ # 申报未完成项快照ID,建议使用Guid字符串
20
+ attr_accessor :id
21
+
22
+ # 品牌订单KPI快照ID,关联brand_order_kpi_snapshot.id
23
+ attr_accessor :brand_order_kpi_snapshot_id
24
+
25
+ # 供应商订单级快照ID,关联brand_order_supplier_order_snapshot.id
26
+ attr_accessor :supplier_order_snapshot_id
27
+
28
+ # 租户ID
29
+ attr_accessor :tenant_id
30
+
31
+ # 环境类型:0正式,1测试
32
+ attr_accessor :environment_type
33
+
34
+ # 原stage_declare_situation.id
35
+ attr_accessor :stage_declare_situation_id
36
+
37
+ # 订单/生产单/发货单/入库单ID
38
+ attr_accessor :extend_id
39
+
40
+ # 流程阶段ID,例如订单、生产、发货、入库
41
+ attr_accessor :stage_id
42
+
43
+ # 快照时阶段单号,订单号/生产单号/发货单号
44
+ attr_accessor :stage_number
45
+
46
+ # 文档类型ID
47
+ attr_accessor :document_type_id
48
+
49
+ # 快照时文档类型名称
50
+ attr_accessor :document_type_name
51
+
52
+ # 快照时是否必须:1必要,0非必要
53
+ attr_accessor :is_required
54
+
55
+ # 快照时是否完成;本表只存未完成项,通常为0
56
+ attr_accessor :is_completed
57
+
58
+ # 快照时数据来源:0买卖双方都可,1卖方优先,2买方优先,3仅卖方,4仅买方
59
+ attr_accessor :from_type
60
+
61
+ # 快照时申报项备注
62
+ attr_accessor :remark
63
+
64
+ # 创建时间
65
+ attr_accessor :created_at
66
+
67
+ # 更新时间
68
+ attr_accessor :updated_at
69
+
70
+ # -1删除,0正常
71
+ attr_accessor :status
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'id' => :'id',
77
+ :'brand_order_kpi_snapshot_id' => :'brandOrderKpiSnapshotId',
78
+ :'supplier_order_snapshot_id' => :'supplierOrderSnapshotId',
79
+ :'tenant_id' => :'tenantId',
80
+ :'environment_type' => :'environmentType',
81
+ :'stage_declare_situation_id' => :'stageDeclareSituationId',
82
+ :'extend_id' => :'extendId',
83
+ :'stage_id' => :'stageId',
84
+ :'stage_number' => :'stageNumber',
85
+ :'document_type_id' => :'documentTypeId',
86
+ :'document_type_name' => :'documentTypeName',
87
+ :'is_required' => :'isRequired',
88
+ :'is_completed' => :'isCompleted',
89
+ :'from_type' => :'fromType',
90
+ :'remark' => :'remark',
91
+ :'created_at' => :'createdAt',
92
+ :'updated_at' => :'updatedAt',
93
+ :'status' => :'status'
94
+ }
95
+ end
96
+
97
+ # Returns attribute mapping this model knows about
98
+ def self.acceptable_attribute_map
99
+ attribute_map
100
+ end
101
+
102
+ # Returns all the JSON keys this model knows about
103
+ def self.acceptable_attributes
104
+ acceptable_attribute_map.values
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.openapi_types
109
+ {
110
+ :'id' => :'String',
111
+ :'brand_order_kpi_snapshot_id' => :'String',
112
+ :'supplier_order_snapshot_id' => :'String',
113
+ :'tenant_id' => :'String',
114
+ :'environment_type' => :'Integer',
115
+ :'stage_declare_situation_id' => :'String',
116
+ :'extend_id' => :'String',
117
+ :'stage_id' => :'String',
118
+ :'stage_number' => :'String',
119
+ :'document_type_id' => :'String',
120
+ :'document_type_name' => :'String',
121
+ :'is_required' => :'Integer',
122
+ :'is_completed' => :'Integer',
123
+ :'from_type' => :'Integer',
124
+ :'remark' => :'String',
125
+ :'created_at' => :'Time',
126
+ :'updated_at' => :'Time',
127
+ :'status' => :'Integer'
128
+ }
129
+ end
130
+
131
+ # List of attributes with nullable: true
132
+ def self.openapi_nullable
133
+ Set.new([
134
+ :'supplier_order_snapshot_id',
135
+ :'stage_number',
136
+ :'document_type_name',
137
+ :'is_required',
138
+ :'from_type',
139
+ :'remark',
140
+ :'updated_at',
141
+ ])
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::BrandOrderUncompletedDeclareSnapshotDto` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::BrandOrderUncompletedDeclareSnapshotDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'id')
161
+ self.id = attributes[:'id']
162
+ else
163
+ self.id = nil
164
+ end
165
+
166
+ if attributes.key?(:'brand_order_kpi_snapshot_id')
167
+ self.brand_order_kpi_snapshot_id = attributes[:'brand_order_kpi_snapshot_id']
168
+ else
169
+ self.brand_order_kpi_snapshot_id = nil
170
+ end
171
+
172
+ if attributes.key?(:'supplier_order_snapshot_id')
173
+ self.supplier_order_snapshot_id = attributes[:'supplier_order_snapshot_id']
174
+ end
175
+
176
+ if attributes.key?(:'tenant_id')
177
+ self.tenant_id = attributes[:'tenant_id']
178
+ else
179
+ self.tenant_id = nil
180
+ end
181
+
182
+ if attributes.key?(:'environment_type')
183
+ self.environment_type = attributes[:'environment_type']
184
+ else
185
+ self.environment_type = nil
186
+ end
187
+
188
+ if attributes.key?(:'stage_declare_situation_id')
189
+ self.stage_declare_situation_id = attributes[:'stage_declare_situation_id']
190
+ else
191
+ self.stage_declare_situation_id = nil
192
+ end
193
+
194
+ if attributes.key?(:'extend_id')
195
+ self.extend_id = attributes[:'extend_id']
196
+ else
197
+ self.extend_id = nil
198
+ end
199
+
200
+ if attributes.key?(:'stage_id')
201
+ self.stage_id = attributes[:'stage_id']
202
+ else
203
+ self.stage_id = nil
204
+ end
205
+
206
+ if attributes.key?(:'stage_number')
207
+ self.stage_number = attributes[:'stage_number']
208
+ end
209
+
210
+ if attributes.key?(:'document_type_id')
211
+ self.document_type_id = attributes[:'document_type_id']
212
+ else
213
+ self.document_type_id = nil
214
+ end
215
+
216
+ if attributes.key?(:'document_type_name')
217
+ self.document_type_name = attributes[:'document_type_name']
218
+ end
219
+
220
+ if attributes.key?(:'is_required')
221
+ self.is_required = attributes[:'is_required']
222
+ end
223
+
224
+ if attributes.key?(:'is_completed')
225
+ self.is_completed = attributes[:'is_completed']
226
+ else
227
+ self.is_completed = nil
228
+ end
229
+
230
+ if attributes.key?(:'from_type')
231
+ self.from_type = attributes[:'from_type']
232
+ end
233
+
234
+ if attributes.key?(:'remark')
235
+ self.remark = attributes[:'remark']
236
+ end
237
+
238
+ if attributes.key?(:'created_at')
239
+ self.created_at = attributes[:'created_at']
240
+ else
241
+ self.created_at = nil
242
+ end
243
+
244
+ if attributes.key?(:'updated_at')
245
+ self.updated_at = attributes[:'updated_at']
246
+ end
247
+
248
+ if attributes.key?(:'status')
249
+ self.status = attributes[:'status']
250
+ else
251
+ self.status = nil
252
+ end
253
+ end
254
+
255
+ # Show invalid properties with the reasons. Usually used together with valid?
256
+ # @return Array for valid properties with the reasons
257
+ def list_invalid_properties
258
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
259
+ invalid_properties = Array.new
260
+ if @id.nil?
261
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
262
+ end
263
+
264
+ if @brand_order_kpi_snapshot_id.nil?
265
+ invalid_properties.push('invalid value for "brand_order_kpi_snapshot_id", brand_order_kpi_snapshot_id cannot be nil.')
266
+ end
267
+
268
+ if @tenant_id.nil?
269
+ invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
270
+ end
271
+
272
+ if @environment_type.nil?
273
+ invalid_properties.push('invalid value for "environment_type", environment_type cannot be nil.')
274
+ end
275
+
276
+ if @stage_declare_situation_id.nil?
277
+ invalid_properties.push('invalid value for "stage_declare_situation_id", stage_declare_situation_id cannot be nil.')
278
+ end
279
+
280
+ if @extend_id.nil?
281
+ invalid_properties.push('invalid value for "extend_id", extend_id cannot be nil.')
282
+ end
283
+
284
+ if @stage_id.nil?
285
+ invalid_properties.push('invalid value for "stage_id", stage_id cannot be nil.')
286
+ end
287
+
288
+ if @document_type_id.nil?
289
+ invalid_properties.push('invalid value for "document_type_id", document_type_id cannot be nil.')
290
+ end
291
+
292
+ if @is_completed.nil?
293
+ invalid_properties.push('invalid value for "is_completed", is_completed cannot be nil.')
294
+ end
295
+
296
+ if @created_at.nil?
297
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
298
+ end
299
+
300
+ if @status.nil?
301
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
302
+ end
303
+
304
+ invalid_properties
305
+ end
306
+
307
+ # Check to see if the all the properties in the model are valid
308
+ # @return true if the model is valid
309
+ def valid?
310
+ warn '[DEPRECATED] the `valid?` method is obsolete'
311
+ return false if @id.nil?
312
+ return false if @brand_order_kpi_snapshot_id.nil?
313
+ return false if @tenant_id.nil?
314
+ return false if @environment_type.nil?
315
+ return false if @stage_declare_situation_id.nil?
316
+ return false if @extend_id.nil?
317
+ return false if @stage_id.nil?
318
+ return false if @document_type_id.nil?
319
+ return false if @is_completed.nil?
320
+ return false if @created_at.nil?
321
+ return false if @status.nil?
322
+ true
323
+ end
324
+
325
+ # Custom attribute writer method with validation
326
+ # @param [Object] id Value to be assigned
327
+ def id=(id)
328
+ if id.nil?
329
+ fail ArgumentError, 'id cannot be nil'
330
+ end
331
+
332
+ @id = id
333
+ end
334
+
335
+ # Custom attribute writer method with validation
336
+ # @param [Object] brand_order_kpi_snapshot_id Value to be assigned
337
+ def brand_order_kpi_snapshot_id=(brand_order_kpi_snapshot_id)
338
+ if brand_order_kpi_snapshot_id.nil?
339
+ fail ArgumentError, 'brand_order_kpi_snapshot_id cannot be nil'
340
+ end
341
+
342
+ @brand_order_kpi_snapshot_id = brand_order_kpi_snapshot_id
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] tenant_id Value to be assigned
347
+ def tenant_id=(tenant_id)
348
+ if tenant_id.nil?
349
+ fail ArgumentError, 'tenant_id cannot be nil'
350
+ end
351
+
352
+ @tenant_id = tenant_id
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] environment_type Value to be assigned
357
+ def environment_type=(environment_type)
358
+ if environment_type.nil?
359
+ fail ArgumentError, 'environment_type cannot be nil'
360
+ end
361
+
362
+ @environment_type = environment_type
363
+ end
364
+
365
+ # Custom attribute writer method with validation
366
+ # @param [Object] stage_declare_situation_id Value to be assigned
367
+ def stage_declare_situation_id=(stage_declare_situation_id)
368
+ if stage_declare_situation_id.nil?
369
+ fail ArgumentError, 'stage_declare_situation_id cannot be nil'
370
+ end
371
+
372
+ @stage_declare_situation_id = stage_declare_situation_id
373
+ end
374
+
375
+ # Custom attribute writer method with validation
376
+ # @param [Object] extend_id Value to be assigned
377
+ def extend_id=(extend_id)
378
+ if extend_id.nil?
379
+ fail ArgumentError, 'extend_id cannot be nil'
380
+ end
381
+
382
+ @extend_id = extend_id
383
+ end
384
+
385
+ # Custom attribute writer method with validation
386
+ # @param [Object] stage_id Value to be assigned
387
+ def stage_id=(stage_id)
388
+ if stage_id.nil?
389
+ fail ArgumentError, 'stage_id cannot be nil'
390
+ end
391
+
392
+ @stage_id = stage_id
393
+ end
394
+
395
+ # Custom attribute writer method with validation
396
+ # @param [Object] document_type_id Value to be assigned
397
+ def document_type_id=(document_type_id)
398
+ if document_type_id.nil?
399
+ fail ArgumentError, 'document_type_id cannot be nil'
400
+ end
401
+
402
+ @document_type_id = document_type_id
403
+ end
404
+
405
+ # Custom attribute writer method with validation
406
+ # @param [Object] is_completed Value to be assigned
407
+ def is_completed=(is_completed)
408
+ if is_completed.nil?
409
+ fail ArgumentError, 'is_completed cannot be nil'
410
+ end
411
+
412
+ @is_completed = is_completed
413
+ end
414
+
415
+ # Custom attribute writer method with validation
416
+ # @param [Object] created_at Value to be assigned
417
+ def created_at=(created_at)
418
+ if created_at.nil?
419
+ fail ArgumentError, 'created_at cannot be nil'
420
+ end
421
+
422
+ @created_at = created_at
423
+ end
424
+
425
+ # Custom attribute writer method with validation
426
+ # @param [Object] status Value to be assigned
427
+ def status=(status)
428
+ if status.nil?
429
+ fail ArgumentError, 'status cannot be nil'
430
+ end
431
+
432
+ @status = status
433
+ end
434
+
435
+ # Checks equality by comparing each attribute.
436
+ # @param [Object] Object to be compared
437
+ def ==(o)
438
+ return true if self.equal?(o)
439
+ self.class == o.class &&
440
+ id == o.id &&
441
+ brand_order_kpi_snapshot_id == o.brand_order_kpi_snapshot_id &&
442
+ supplier_order_snapshot_id == o.supplier_order_snapshot_id &&
443
+ tenant_id == o.tenant_id &&
444
+ environment_type == o.environment_type &&
445
+ stage_declare_situation_id == o.stage_declare_situation_id &&
446
+ extend_id == o.extend_id &&
447
+ stage_id == o.stage_id &&
448
+ stage_number == o.stage_number &&
449
+ document_type_id == o.document_type_id &&
450
+ document_type_name == o.document_type_name &&
451
+ is_required == o.is_required &&
452
+ is_completed == o.is_completed &&
453
+ from_type == o.from_type &&
454
+ remark == o.remark &&
455
+ created_at == o.created_at &&
456
+ updated_at == o.updated_at &&
457
+ status == o.status
458
+ end
459
+
460
+ # @see the `==` method
461
+ # @param [Object] Object to be compared
462
+ def eql?(o)
463
+ self == o
464
+ end
465
+
466
+ # Calculates hash code according to all attributes.
467
+ # @return [Integer] Hash code
468
+ def hash
469
+ [id, brand_order_kpi_snapshot_id, supplier_order_snapshot_id, tenant_id, environment_type, stage_declare_situation_id, extend_id, stage_id, stage_number, document_type_id, document_type_name, is_required, is_completed, from_type, remark, created_at, updated_at, status].hash
470
+ end
471
+
472
+ # Builds the object from hash
473
+ # @param [Hash] attributes Model attributes in the form of hash
474
+ # @return [Object] Returns the model itself
475
+ def self.build_from_hash(attributes)
476
+ return nil unless attributes.is_a?(Hash)
477
+ attributes = attributes.transform_keys(&:to_sym)
478
+ transformed_hash = {}
479
+ openapi_types.each_pair do |key, type|
480
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
481
+ transformed_hash["#{key}"] = nil
482
+ elsif type =~ /\AArray<(.*)>/i
483
+ # check to ensure the input is an array given that the attribute
484
+ # is documented as an array but the input is not
485
+ if attributes[attribute_map[key]].is_a?(Array)
486
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
487
+ end
488
+ elsif !attributes[attribute_map[key]].nil?
489
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
490
+ end
491
+ end
492
+ new(transformed_hash)
493
+ end
494
+
495
+ # Returns the object in the form of hash
496
+ # @return [Hash] Returns the object in the form of hash
497
+ def to_hash
498
+ hash = {}
499
+ self.class.attribute_map.each_pair do |attr, param|
500
+ value = self.send(attr)
501
+ if value.nil?
502
+ is_nullable = self.class.openapi_nullable.include?(attr)
503
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
504
+ end
505
+
506
+ hash[param] = _to_hash(value)
507
+ end
508
+ hash
509
+ end
510
+
511
+ end
512
+
513
+ end