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,682 @@
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 DeliveryNoteDetailApiDto < ApiModelBase
19
+ # 订单明细ID
20
+ attr_accessor :id
21
+
22
+ # 订单明细ID
23
+ attr_accessor :order_line_id
24
+
25
+ # 物品名称(冗余)
26
+ attr_accessor :product_name
27
+
28
+ # 运输单明细ID
29
+ attr_accessor :delivery_note_id
30
+
31
+ # 订单ID
32
+ attr_accessor :order_id
33
+
34
+ # 运输数量
35
+ attr_accessor :quantity
36
+
37
+ # 单位
38
+ attr_accessor :unit
39
+
40
+ # 毛重
41
+ attr_accessor :gross_weight
42
+
43
+ # 净重
44
+ attr_accessor :net_weight
45
+
46
+ # 认证重量
47
+ attr_accessor :certification_weight
48
+
49
+ # TC交易证书编号
50
+ attr_accessor :tc_number
51
+
52
+ # 租户ID
53
+ attr_accessor :tenant_id
54
+
55
+ # 批次唯一编码,确保每批成品在系统内唯一
56
+ attr_accessor :unique_code
57
+
58
+ # 环境类型:0 正式, 1 测试
59
+ attr_accessor :environment_type
60
+
61
+ # 第二数量
62
+ attr_accessor :quantity2
63
+
64
+ # 是否创建了新的销售
65
+ attr_accessor :is_new_order
66
+
67
+ # 成品ID
68
+ attr_accessor :product_id
69
+
70
+ # -9 禁用, -1 删除, 0 正常
71
+ attr_accessor :status
72
+
73
+ # 修改用户ID
74
+ attr_accessor :updated_by
75
+
76
+ # 更新时间
77
+ attr_accessor :updated_at
78
+
79
+ # 10 待收货,20 已收货,30 拒绝收货
80
+ attr_accessor :detail_business_status
81
+
82
+ # 拒绝收货理由
83
+ attr_accessor :audit_comment
84
+
85
+ # 本单对应链条最后更新时间
86
+ attr_accessor :chain_latest_updated_at
87
+
88
+ # gts同步的运输开始日期
89
+ attr_accessor :gts_departure_date
90
+
91
+ # gts同步的运输到达日期
92
+ attr_accessor :gts_arrival_date
93
+
94
+ # gts同步船运是否完成:0未完成,1已完成, 2.KPI定时任务已快照
95
+ attr_accessor :gts_ship_finished
96
+
97
+ # 贸易发货与正常发货的关联(用于coc中跳过贸易发货单)
98
+ attr_accessor :related_delivery_note_detail_id
99
+
100
+ # 入库id集合
101
+ attr_accessor :product_receipt_id_list
102
+
103
+ # 订单编号。外部发货接口可用 OrderNumber + OrderDate + LineNumber 定位订单明细。
104
+ attr_accessor :order_number
105
+
106
+ # 订单日期。外部发货接口按订单业务键解析订单明细时使用。
107
+ attr_accessor :order_date
108
+
109
+ # 订单行唯一标识。传入后可直接定位订单明细。
110
+ attr_accessor :unique_no
111
+
112
+ # 订单行号。需要配合 OrderNumber 和 OrderDate 一起定位订单明细。
113
+ attr_accessor :line_number
114
+
115
+ # 产品编码。外部发货接口可用 ProductCode 解析内部 ProductId。
116
+ attr_accessor :product_code
117
+
118
+ # 单位
119
+ attr_accessor :unit_name
120
+
121
+ attr_accessor :available_quantity
122
+
123
+ # 当前贸易销售关系扣除其他贸易运输后剩余的领料额度;单位见 PoUnit/PoUnitName。
124
+ attr_accessor :available_trade_quantity
125
+
126
+ attr_accessor :can_transfer_quantity
127
+
128
+ attr_accessor :is_transfer
129
+
130
+ # 所属运输单的贸易类型:0/空为普通运输,1 为贸易商自运,2 为供应商直接运输。
131
+ attr_accessor :is_trade
132
+
133
+ # 贸易查询时返回“当前运输单库存+数量+采购单位”。
134
+ attr_accessor :pending_information
135
+
136
+ # 发货日期
137
+ attr_accessor :delivery_date
138
+
139
+ # 客户是否分批发货:0按需发货;1分批发货;2无法按需发货实际发货完成
140
+ attr_accessor :ship_in_batches
141
+
142
+ attr_accessor :so_quantity
143
+
144
+ attr_accessor :so_unit
145
+
146
+ attr_accessor :po_quantity
147
+
148
+ attr_accessor :po_unit
149
+
150
+ attr_accessor :po_unit_name
151
+
152
+ attr_accessor :so_unit_name
153
+
154
+ # 来源运输单号;贸易运输显示关联的正常运输单号,转运详情显示参与可转运量计算的运输单号并用逗号分隔。
155
+ attr_accessor :number
156
+
157
+ # 链条是否审核通过
158
+ attr_accessor :chain_review_status
159
+
160
+ # Attribute mapping from ruby-style variable name to JSON key.
161
+ def self.attribute_map
162
+ {
163
+ :'id' => :'id',
164
+ :'order_line_id' => :'orderLineId',
165
+ :'product_name' => :'productName',
166
+ :'delivery_note_id' => :'deliveryNoteId',
167
+ :'order_id' => :'orderId',
168
+ :'quantity' => :'quantity',
169
+ :'unit' => :'unit',
170
+ :'gross_weight' => :'grossWeight',
171
+ :'net_weight' => :'netWeight',
172
+ :'certification_weight' => :'certificationWeight',
173
+ :'tc_number' => :'tcNumber',
174
+ :'tenant_id' => :'tenantId',
175
+ :'unique_code' => :'uniqueCode',
176
+ :'environment_type' => :'environmentType',
177
+ :'quantity2' => :'quantity2',
178
+ :'is_new_order' => :'isNewOrder',
179
+ :'product_id' => :'productId',
180
+ :'status' => :'status',
181
+ :'updated_by' => :'updatedBy',
182
+ :'updated_at' => :'updatedAt',
183
+ :'detail_business_status' => :'detailBusinessStatus',
184
+ :'audit_comment' => :'auditComment',
185
+ :'chain_latest_updated_at' => :'chainLatestUpdatedAt',
186
+ :'gts_departure_date' => :'gtsDepartureDate',
187
+ :'gts_arrival_date' => :'gtsArrivalDate',
188
+ :'gts_ship_finished' => :'gtsShipFinished',
189
+ :'related_delivery_note_detail_id' => :'relatedDeliveryNoteDetailId',
190
+ :'product_receipt_id_list' => :'productReceiptIdList',
191
+ :'order_number' => :'orderNumber',
192
+ :'order_date' => :'orderDate',
193
+ :'unique_no' => :'uniqueNo',
194
+ :'line_number' => :'lineNumber',
195
+ :'product_code' => :'productCode',
196
+ :'unit_name' => :'unitName',
197
+ :'available_quantity' => :'availableQuantity',
198
+ :'available_trade_quantity' => :'availableTradeQuantity',
199
+ :'can_transfer_quantity' => :'canTransferQuantity',
200
+ :'is_transfer' => :'isTransfer',
201
+ :'is_trade' => :'isTrade',
202
+ :'pending_information' => :'pendingInformation',
203
+ :'delivery_date' => :'deliveryDate',
204
+ :'ship_in_batches' => :'shipInBatches',
205
+ :'so_quantity' => :'soQuantity',
206
+ :'so_unit' => :'soUnit',
207
+ :'po_quantity' => :'poQuantity',
208
+ :'po_unit' => :'poUnit',
209
+ :'po_unit_name' => :'poUnitName',
210
+ :'so_unit_name' => :'soUnitName',
211
+ :'number' => :'number',
212
+ :'chain_review_status' => :'chainReviewStatus'
213
+ }
214
+ end
215
+
216
+ # Returns attribute mapping this model knows about
217
+ def self.acceptable_attribute_map
218
+ attribute_map
219
+ end
220
+
221
+ # Returns all the JSON keys this model knows about
222
+ def self.acceptable_attributes
223
+ acceptable_attribute_map.values
224
+ end
225
+
226
+ # Attribute type mapping.
227
+ def self.openapi_types
228
+ {
229
+ :'id' => :'Integer',
230
+ :'order_line_id' => :'String',
231
+ :'product_name' => :'String',
232
+ :'delivery_note_id' => :'Integer',
233
+ :'order_id' => :'String',
234
+ :'quantity' => :'Float',
235
+ :'unit' => :'String',
236
+ :'gross_weight' => :'Float',
237
+ :'net_weight' => :'Float',
238
+ :'certification_weight' => :'Float',
239
+ :'tc_number' => :'String',
240
+ :'tenant_id' => :'String',
241
+ :'unique_code' => :'String',
242
+ :'environment_type' => :'Integer',
243
+ :'quantity2' => :'Float',
244
+ :'is_new_order' => :'Integer',
245
+ :'product_id' => :'String',
246
+ :'status' => :'Integer',
247
+ :'updated_by' => :'String',
248
+ :'updated_at' => :'Time',
249
+ :'detail_business_status' => :'Integer',
250
+ :'audit_comment' => :'String',
251
+ :'chain_latest_updated_at' => :'Time',
252
+ :'gts_departure_date' => :'Time',
253
+ :'gts_arrival_date' => :'Time',
254
+ :'gts_ship_finished' => :'Integer',
255
+ :'related_delivery_note_detail_id' => :'Integer',
256
+ :'product_receipt_id_list' => :'Array<Integer>',
257
+ :'order_number' => :'String',
258
+ :'order_date' => :'Time',
259
+ :'unique_no' => :'String',
260
+ :'line_number' => :'String',
261
+ :'product_code' => :'String',
262
+ :'unit_name' => :'String',
263
+ :'available_quantity' => :'Float',
264
+ :'available_trade_quantity' => :'Float',
265
+ :'can_transfer_quantity' => :'Float',
266
+ :'is_transfer' => :'Integer',
267
+ :'is_trade' => :'Integer',
268
+ :'pending_information' => :'String',
269
+ :'delivery_date' => :'Time',
270
+ :'ship_in_batches' => :'Integer',
271
+ :'so_quantity' => :'Float',
272
+ :'so_unit' => :'String',
273
+ :'po_quantity' => :'Float',
274
+ :'po_unit' => :'String',
275
+ :'po_unit_name' => :'String',
276
+ :'so_unit_name' => :'String',
277
+ :'number' => :'String',
278
+ :'chain_review_status' => :'Boolean'
279
+ }
280
+ end
281
+
282
+ # List of attributes with nullable: true
283
+ def self.openapi_nullable
284
+ Set.new([
285
+ :'id',
286
+ :'order_line_id',
287
+ :'product_name',
288
+ :'delivery_note_id',
289
+ :'order_id',
290
+ :'quantity',
291
+ :'unit',
292
+ :'gross_weight',
293
+ :'net_weight',
294
+ :'certification_weight',
295
+ :'tc_number',
296
+ :'tenant_id',
297
+ :'unique_code',
298
+ :'environment_type',
299
+ :'quantity2',
300
+ :'is_new_order',
301
+ :'product_id',
302
+ :'status',
303
+ :'updated_by',
304
+ :'updated_at',
305
+ :'detail_business_status',
306
+ :'audit_comment',
307
+ :'chain_latest_updated_at',
308
+ :'gts_departure_date',
309
+ :'gts_arrival_date',
310
+ :'gts_ship_finished',
311
+ :'related_delivery_note_detail_id',
312
+ :'product_receipt_id_list',
313
+ :'order_number',
314
+ :'order_date',
315
+ :'unique_no',
316
+ :'line_number',
317
+ :'product_code',
318
+ :'unit_name',
319
+ :'available_quantity',
320
+ :'available_trade_quantity',
321
+ :'can_transfer_quantity',
322
+ :'is_transfer',
323
+ :'is_trade',
324
+ :'pending_information',
325
+ :'delivery_date',
326
+ :'ship_in_batches',
327
+ :'so_quantity',
328
+ :'so_unit',
329
+ :'po_quantity',
330
+ :'po_unit',
331
+ :'po_unit_name',
332
+ :'so_unit_name',
333
+ :'number',
334
+ :'chain_review_status'
335
+ ])
336
+ end
337
+
338
+ # Initializes the object
339
+ # @param [Hash] attributes Model attributes in the form of hash
340
+ def initialize(attributes = {})
341
+ if (!attributes.is_a?(Hash))
342
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::DeliveryNoteDetailApiDto` initialize method"
343
+ end
344
+
345
+ # check to see if the attribute exists and convert string to symbol for hash key
346
+ acceptable_attribute_map = self.class.acceptable_attribute_map
347
+ attributes = attributes.each_with_object({}) { |(k, v), h|
348
+ if (!acceptable_attribute_map.key?(k.to_sym))
349
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::DeliveryNoteDetailApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
350
+ end
351
+ h[k.to_sym] = v
352
+ }
353
+
354
+ if attributes.key?(:'id')
355
+ self.id = attributes[:'id']
356
+ end
357
+
358
+ if attributes.key?(:'order_line_id')
359
+ self.order_line_id = attributes[:'order_line_id']
360
+ end
361
+
362
+ if attributes.key?(:'product_name')
363
+ self.product_name = attributes[:'product_name']
364
+ end
365
+
366
+ if attributes.key?(:'delivery_note_id')
367
+ self.delivery_note_id = attributes[:'delivery_note_id']
368
+ end
369
+
370
+ if attributes.key?(:'order_id')
371
+ self.order_id = attributes[:'order_id']
372
+ end
373
+
374
+ if attributes.key?(:'quantity')
375
+ self.quantity = attributes[:'quantity']
376
+ end
377
+
378
+ if attributes.key?(:'unit')
379
+ self.unit = attributes[:'unit']
380
+ end
381
+
382
+ if attributes.key?(:'gross_weight')
383
+ self.gross_weight = attributes[:'gross_weight']
384
+ end
385
+
386
+ if attributes.key?(:'net_weight')
387
+ self.net_weight = attributes[:'net_weight']
388
+ end
389
+
390
+ if attributes.key?(:'certification_weight')
391
+ self.certification_weight = attributes[:'certification_weight']
392
+ end
393
+
394
+ if attributes.key?(:'tc_number')
395
+ self.tc_number = attributes[:'tc_number']
396
+ end
397
+
398
+ if attributes.key?(:'tenant_id')
399
+ self.tenant_id = attributes[:'tenant_id']
400
+ end
401
+
402
+ if attributes.key?(:'unique_code')
403
+ self.unique_code = attributes[:'unique_code']
404
+ end
405
+
406
+ if attributes.key?(:'environment_type')
407
+ self.environment_type = attributes[:'environment_type']
408
+ end
409
+
410
+ if attributes.key?(:'quantity2')
411
+ self.quantity2 = attributes[:'quantity2']
412
+ end
413
+
414
+ if attributes.key?(:'is_new_order')
415
+ self.is_new_order = attributes[:'is_new_order']
416
+ end
417
+
418
+ if attributes.key?(:'product_id')
419
+ self.product_id = attributes[:'product_id']
420
+ end
421
+
422
+ if attributes.key?(:'status')
423
+ self.status = attributes[:'status']
424
+ end
425
+
426
+ if attributes.key?(:'updated_by')
427
+ self.updated_by = attributes[:'updated_by']
428
+ end
429
+
430
+ if attributes.key?(:'updated_at')
431
+ self.updated_at = attributes[:'updated_at']
432
+ end
433
+
434
+ if attributes.key?(:'detail_business_status')
435
+ self.detail_business_status = attributes[:'detail_business_status']
436
+ end
437
+
438
+ if attributes.key?(:'audit_comment')
439
+ self.audit_comment = attributes[:'audit_comment']
440
+ end
441
+
442
+ if attributes.key?(:'chain_latest_updated_at')
443
+ self.chain_latest_updated_at = attributes[:'chain_latest_updated_at']
444
+ end
445
+
446
+ if attributes.key?(:'gts_departure_date')
447
+ self.gts_departure_date = attributes[:'gts_departure_date']
448
+ end
449
+
450
+ if attributes.key?(:'gts_arrival_date')
451
+ self.gts_arrival_date = attributes[:'gts_arrival_date']
452
+ end
453
+
454
+ if attributes.key?(:'gts_ship_finished')
455
+ self.gts_ship_finished = attributes[:'gts_ship_finished']
456
+ end
457
+
458
+ if attributes.key?(:'related_delivery_note_detail_id')
459
+ self.related_delivery_note_detail_id = attributes[:'related_delivery_note_detail_id']
460
+ end
461
+
462
+ if attributes.key?(:'product_receipt_id_list')
463
+ if (value = attributes[:'product_receipt_id_list']).is_a?(Array)
464
+ self.product_receipt_id_list = value
465
+ end
466
+ end
467
+
468
+ if attributes.key?(:'order_number')
469
+ self.order_number = attributes[:'order_number']
470
+ end
471
+
472
+ if attributes.key?(:'order_date')
473
+ self.order_date = attributes[:'order_date']
474
+ end
475
+
476
+ if attributes.key?(:'unique_no')
477
+ self.unique_no = attributes[:'unique_no']
478
+ end
479
+
480
+ if attributes.key?(:'line_number')
481
+ self.line_number = attributes[:'line_number']
482
+ end
483
+
484
+ if attributes.key?(:'product_code')
485
+ self.product_code = attributes[:'product_code']
486
+ end
487
+
488
+ if attributes.key?(:'unit_name')
489
+ self.unit_name = attributes[:'unit_name']
490
+ end
491
+
492
+ if attributes.key?(:'available_quantity')
493
+ self.available_quantity = attributes[:'available_quantity']
494
+ end
495
+
496
+ if attributes.key?(:'available_trade_quantity')
497
+ self.available_trade_quantity = attributes[:'available_trade_quantity']
498
+ end
499
+
500
+ if attributes.key?(:'can_transfer_quantity')
501
+ self.can_transfer_quantity = attributes[:'can_transfer_quantity']
502
+ end
503
+
504
+ if attributes.key?(:'is_transfer')
505
+ self.is_transfer = attributes[:'is_transfer']
506
+ end
507
+
508
+ if attributes.key?(:'is_trade')
509
+ self.is_trade = attributes[:'is_trade']
510
+ end
511
+
512
+ if attributes.key?(:'pending_information')
513
+ self.pending_information = attributes[:'pending_information']
514
+ end
515
+
516
+ if attributes.key?(:'delivery_date')
517
+ self.delivery_date = attributes[:'delivery_date']
518
+ end
519
+
520
+ if attributes.key?(:'ship_in_batches')
521
+ self.ship_in_batches = attributes[:'ship_in_batches']
522
+ end
523
+
524
+ if attributes.key?(:'so_quantity')
525
+ self.so_quantity = attributes[:'so_quantity']
526
+ end
527
+
528
+ if attributes.key?(:'so_unit')
529
+ self.so_unit = attributes[:'so_unit']
530
+ end
531
+
532
+ if attributes.key?(:'po_quantity')
533
+ self.po_quantity = attributes[:'po_quantity']
534
+ end
535
+
536
+ if attributes.key?(:'po_unit')
537
+ self.po_unit = attributes[:'po_unit']
538
+ end
539
+
540
+ if attributes.key?(:'po_unit_name')
541
+ self.po_unit_name = attributes[:'po_unit_name']
542
+ end
543
+
544
+ if attributes.key?(:'so_unit_name')
545
+ self.so_unit_name = attributes[:'so_unit_name']
546
+ end
547
+
548
+ if attributes.key?(:'number')
549
+ self.number = attributes[:'number']
550
+ end
551
+
552
+ if attributes.key?(:'chain_review_status')
553
+ self.chain_review_status = attributes[:'chain_review_status']
554
+ end
555
+ end
556
+
557
+ # Show invalid properties with the reasons. Usually used together with valid?
558
+ # @return Array for valid properties with the reasons
559
+ def list_invalid_properties
560
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
561
+ invalid_properties = Array.new
562
+ invalid_properties
563
+ end
564
+
565
+ # Check to see if the all the properties in the model are valid
566
+ # @return true if the model is valid
567
+ def valid?
568
+ warn '[DEPRECATED] the `valid?` method is obsolete'
569
+ true
570
+ end
571
+
572
+ # Checks equality by comparing each attribute.
573
+ # @param [Object] Object to be compared
574
+ def ==(o)
575
+ return true if self.equal?(o)
576
+ self.class == o.class &&
577
+ id == o.id &&
578
+ order_line_id == o.order_line_id &&
579
+ product_name == o.product_name &&
580
+ delivery_note_id == o.delivery_note_id &&
581
+ order_id == o.order_id &&
582
+ quantity == o.quantity &&
583
+ unit == o.unit &&
584
+ gross_weight == o.gross_weight &&
585
+ net_weight == o.net_weight &&
586
+ certification_weight == o.certification_weight &&
587
+ tc_number == o.tc_number &&
588
+ tenant_id == o.tenant_id &&
589
+ unique_code == o.unique_code &&
590
+ environment_type == o.environment_type &&
591
+ quantity2 == o.quantity2 &&
592
+ is_new_order == o.is_new_order &&
593
+ product_id == o.product_id &&
594
+ status == o.status &&
595
+ updated_by == o.updated_by &&
596
+ updated_at == o.updated_at &&
597
+ detail_business_status == o.detail_business_status &&
598
+ audit_comment == o.audit_comment &&
599
+ chain_latest_updated_at == o.chain_latest_updated_at &&
600
+ gts_departure_date == o.gts_departure_date &&
601
+ gts_arrival_date == o.gts_arrival_date &&
602
+ gts_ship_finished == o.gts_ship_finished &&
603
+ related_delivery_note_detail_id == o.related_delivery_note_detail_id &&
604
+ product_receipt_id_list == o.product_receipt_id_list &&
605
+ order_number == o.order_number &&
606
+ order_date == o.order_date &&
607
+ unique_no == o.unique_no &&
608
+ line_number == o.line_number &&
609
+ product_code == o.product_code &&
610
+ unit_name == o.unit_name &&
611
+ available_quantity == o.available_quantity &&
612
+ available_trade_quantity == o.available_trade_quantity &&
613
+ can_transfer_quantity == o.can_transfer_quantity &&
614
+ is_transfer == o.is_transfer &&
615
+ is_trade == o.is_trade &&
616
+ pending_information == o.pending_information &&
617
+ delivery_date == o.delivery_date &&
618
+ ship_in_batches == o.ship_in_batches &&
619
+ so_quantity == o.so_quantity &&
620
+ so_unit == o.so_unit &&
621
+ po_quantity == o.po_quantity &&
622
+ po_unit == o.po_unit &&
623
+ po_unit_name == o.po_unit_name &&
624
+ so_unit_name == o.so_unit_name &&
625
+ number == o.number &&
626
+ chain_review_status == o.chain_review_status
627
+ end
628
+
629
+ # @see the `==` method
630
+ # @param [Object] Object to be compared
631
+ def eql?(o)
632
+ self == o
633
+ end
634
+
635
+ # Calculates hash code according to all attributes.
636
+ # @return [Integer] Hash code
637
+ def hash
638
+ [id, order_line_id, product_name, delivery_note_id, order_id, quantity, unit, gross_weight, net_weight, certification_weight, tc_number, tenant_id, unique_code, environment_type, quantity2, is_new_order, product_id, status, updated_by, updated_at, detail_business_status, audit_comment, chain_latest_updated_at, gts_departure_date, gts_arrival_date, gts_ship_finished, related_delivery_note_detail_id, product_receipt_id_list, order_number, order_date, unique_no, line_number, product_code, unit_name, available_quantity, available_trade_quantity, can_transfer_quantity, is_transfer, is_trade, pending_information, delivery_date, ship_in_batches, so_quantity, so_unit, po_quantity, po_unit, po_unit_name, so_unit_name, number, chain_review_status].hash
639
+ end
640
+
641
+ # Builds the object from hash
642
+ # @param [Hash] attributes Model attributes in the form of hash
643
+ # @return [Object] Returns the model itself
644
+ def self.build_from_hash(attributes)
645
+ return nil unless attributes.is_a?(Hash)
646
+ attributes = attributes.transform_keys(&:to_sym)
647
+ transformed_hash = {}
648
+ openapi_types.each_pair do |key, type|
649
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
650
+ transformed_hash["#{key}"] = nil
651
+ elsif type =~ /\AArray<(.*)>/i
652
+ # check to ensure the input is an array given that the attribute
653
+ # is documented as an array but the input is not
654
+ if attributes[attribute_map[key]].is_a?(Array)
655
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
656
+ end
657
+ elsif !attributes[attribute_map[key]].nil?
658
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
659
+ end
660
+ end
661
+ new(transformed_hash)
662
+ end
663
+
664
+ # Returns the object in the form of hash
665
+ # @return [Hash] Returns the object in the form of hash
666
+ def to_hash
667
+ hash = {}
668
+ self.class.attribute_map.each_pair do |attr, param|
669
+ value = self.send(attr)
670
+ if value.nil?
671
+ is_nullable = self.class.openapi_nullable.include?(attr)
672
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
673
+ end
674
+
675
+ hash[param] = _to_hash(value)
676
+ end
677
+ hash
678
+ end
679
+
680
+ end
681
+
682
+ end