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,1184 @@
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 OrderLine < ApiModelBase
19
+ # 订单明细ID
20
+ attr_accessor :id
21
+
22
+ # 系统流水号,全局唯一
23
+ attr_accessor :unique_no
24
+
25
+ # 关联订单ID
26
+ attr_accessor :order_id
27
+
28
+ # 行项目序号
29
+ attr_accessor :line_number
30
+
31
+ # 成品分类
32
+ attr_accessor :product_category
33
+
34
+ # 原料ID
35
+ attr_accessor :material_id
36
+
37
+ # 原料编码
38
+ attr_accessor :material_code
39
+
40
+ # 原料名称
41
+ attr_accessor :material_name
42
+
43
+ # 成品ID
44
+ attr_accessor :product_id
45
+
46
+ # 成品编码
47
+ attr_accessor :product_code
48
+
49
+ # 成品名称
50
+ attr_accessor :product_name
51
+
52
+ # 颜色
53
+ attr_accessor :color
54
+
55
+ # 物料批次号
56
+ attr_accessor :batch
57
+
58
+ # 数量
59
+ attr_accessor :quantity
60
+
61
+ # 目的国家
62
+ attr_accessor :destination_country
63
+
64
+ # 物料成分
65
+ attr_accessor :component
66
+
67
+ # 认证要求
68
+ attr_accessor :certification
69
+
70
+ # 计量单位
71
+ attr_accessor :unit
72
+
73
+ # 单位名称
74
+ attr_accessor :unit_name
75
+
76
+ # 单位编码
77
+ attr_accessor :unit_code
78
+
79
+ # 客户外部系统流水号
80
+ attr_accessor :customer_ext_no
81
+
82
+ # 供应商外部系统流水号
83
+ attr_accessor :supplier_ext_no
84
+
85
+ # 备注
86
+ attr_accessor :remark
87
+
88
+ # 原产国
89
+ attr_accessor :origin_country
90
+
91
+ # 毛重
92
+ attr_accessor :gross_weight
93
+
94
+ # 净重
95
+ attr_accessor :net_weight
96
+
97
+ # 预计发货日期(ETD)
98
+ attr_accessor :estimated_time_of_departure
99
+
100
+ # 季度
101
+ attr_accessor :season
102
+
103
+ # 年份
104
+ attr_accessor :season_year
105
+
106
+ # 单价
107
+ attr_accessor :unit_price
108
+
109
+ # 税率
110
+ attr_accessor :tax
111
+
112
+ # -9 禁用, -1 删除, 0 正常
113
+ attr_accessor :status
114
+
115
+ # 租户ID
116
+ attr_accessor :tenant_id
117
+
118
+ # 最后更新时间
119
+ attr_accessor :last_updated_at
120
+
121
+ # 采购状态:7拒绝接单|待接单 9|待生产 10|待发货 20|已发货 30|待收货 40|已收货 50|已使用 60|已用完 70
122
+ attr_accessor :po_status
123
+
124
+ # 销售状态:7拒绝接单|待接单 9|待生产 10|待发货 20|已发货 30|待收货 40|已收货 50|已使用 60|已用完 70
125
+ attr_accessor :so_status
126
+
127
+ # 第二数量
128
+ attr_accessor :quantity2
129
+
130
+ # 审核状态:101 草稿 102 待审核 103 重新提交待审 111 取消审核 113 审核作废 114 审核驳回 115 审核拒绝 120 审核通过
131
+ attr_accessor :approve_status
132
+
133
+ # 所处销售阶段
134
+ attr_accessor :scope_code
135
+
136
+ # 销售单位
137
+ attr_accessor :so_unit
138
+
139
+ # 单位名称
140
+ attr_accessor :so_unit_name
141
+
142
+ # 单位编码
143
+ attr_accessor :so_unit_code
144
+
145
+ # 销售范围名称
146
+ attr_accessor :product_category_name
147
+
148
+ # 销售数量
149
+ attr_accessor :so_quantity
150
+
151
+ # 主订单链条审核状态 101 草稿 102 待审核 103 重新提交待审 111 取消审核 113 审核作废 114 审核驳回 115 审核拒绝 120 审核通过
152
+ attr_accessor :master_approve_status
153
+
154
+ # 主订单链条完成状态,1完成;0未完成(包括申报完成和订单关联了最后一级订单)
155
+ attr_accessor :order_chain_status
156
+
157
+ # 主订单id集 |分割
158
+ attr_accessor :top_orderline_ids
159
+
160
+ # 订单计量单位组与成品计量单位组是否一致(0 = 是(单位组一致不一致),1 = 否(单位组不一致),2 = 用户已确认,3=是(单位组一致单位一致))
161
+ attr_accessor :so_unitgroup_consistent
162
+
163
+ attr_accessor :max_so_quantity
164
+
165
+ attr_accessor :min_so_quantity
166
+
167
+ attr_accessor :scope_name
168
+
169
+ attr_accessor :order_number
170
+
171
+ attr_accessor :order_remarks
172
+
173
+ attr_accessor :available_quantity
174
+
175
+ # 单位分组
176
+ attr_accessor :unit_category
177
+
178
+ # 是否是最后一个单
179
+ attr_accessor :is_end_order
180
+
181
+ # 成品是否可以修改
182
+ attr_accessor :product_final
183
+
184
+ attr_accessor :customer_id
185
+
186
+ attr_accessor :supplier_id
187
+
188
+ # 客户租户ID
189
+ attr_accessor :customer_tenant_id
190
+
191
+ # 供应商租户ID
192
+ attr_accessor :supplier_tenant_id
193
+
194
+ attr_accessor :order_date
195
+
196
+ attr_accessor :order_type
197
+
198
+ # 是否审核通过
199
+ attr_accessor :is_approved
200
+
201
+ # 采购附件列表(合同/发票/付款证明/宣誓书)
202
+ attr_accessor :attachments
203
+
204
+ # 买方确认收货状态:101 草稿 102 待审核 103 重新提交待审 111 取消审核 113 审核作废 114 审核驳回 115 审核拒绝 120 审核通过
205
+ attr_accessor :customer_confirm_status
206
+
207
+ # 领料的损耗率
208
+ attr_accessor :loss
209
+
210
+ # 订单使用的bom版本号
211
+ attr_accessor :bom_batch
212
+
213
+ # 订单名称
214
+ attr_accessor :order_name
215
+
216
+ # 链条完成状态,1完成;0未完成(不包含申报,是否关联至了最后一级订单)
217
+ attr_accessor :chain_status
218
+
219
+ # 本单对应链条最后更新时间
220
+ attr_accessor :chain_latest_updated_at
221
+
222
+ # 集成推送最早交货日期
223
+ attr_accessor :push_early_delivery_date
224
+
225
+ # 是否手工调整最早交货日期:0=否,1=是
226
+ attr_accessor :is_adjust_delivery
227
+
228
+ # 添加修改最早发货时间信息备注
229
+ attr_accessor :adjust_delivery_remark
230
+
231
+ # 供应商最新提交审核时间
232
+ attr_accessor :order_line_finish_time
233
+
234
+ # 客户确认收货最新通过时间
235
+ attr_accessor :customer_confirm_time
236
+
237
+ # KPI剔除标记:0-未剔除,1-已剔除
238
+ attr_accessor :kpi_exclude_flag
239
+
240
+ # KPI剔除原因
241
+ attr_accessor :kpi_exclude_reason
242
+
243
+ # 客户是否分批发货:0按需发货;1分批发货;2无法按需发货实际发货完成
244
+ attr_accessor :ship_in_batches
245
+
246
+ # gts同步的运输开始日期
247
+ attr_accessor :gts_departure_date
248
+
249
+ # gts同步的运输到达日期
250
+ attr_accessor :gts_arrival_date
251
+
252
+ # gts同步船运是否完成:0未完成,1已完成, 2.KPI定时任务已快照
253
+ attr_accessor :gts_ship_finished
254
+
255
+ # 是否需要转运:1是,0否。空的情况实时读配置
256
+ attr_accessor :is_need_transfer
257
+
258
+ # T4单物料成分
259
+ attr_accessor :single_component
260
+
261
+ # T4原料订单使用工厂id
262
+ attr_accessor :use_factory_id
263
+
264
+ # 剩余需贸易运输数量:贸易生产数量合计减去已创建贸易运输数量合计,最小为 0。
265
+ attr_accessor :remain_trade_ship_quantity
266
+
267
+ # 当前订单明细是否与第一条采购变更申请中的对应明细存在业务字段差异。 该字段只用于接口展示,不保存到 order_line 表。
268
+ attr_accessor :is_order_line_changed
269
+
270
+ # Attribute mapping from ruby-style variable name to JSON key.
271
+ def self.attribute_map
272
+ {
273
+ :'id' => :'id',
274
+ :'unique_no' => :'uniqueNo',
275
+ :'order_id' => :'orderId',
276
+ :'line_number' => :'lineNumber',
277
+ :'product_category' => :'productCategory',
278
+ :'material_id' => :'materialId',
279
+ :'material_code' => :'materialCode',
280
+ :'material_name' => :'materialName',
281
+ :'product_id' => :'productId',
282
+ :'product_code' => :'productCode',
283
+ :'product_name' => :'productName',
284
+ :'color' => :'color',
285
+ :'batch' => :'batch',
286
+ :'quantity' => :'quantity',
287
+ :'destination_country' => :'destinationCountry',
288
+ :'component' => :'component',
289
+ :'certification' => :'certification',
290
+ :'unit' => :'unit',
291
+ :'unit_name' => :'unitName',
292
+ :'unit_code' => :'unitCode',
293
+ :'customer_ext_no' => :'customerExtNo',
294
+ :'supplier_ext_no' => :'supplierExtNo',
295
+ :'remark' => :'remark',
296
+ :'origin_country' => :'originCountry',
297
+ :'gross_weight' => :'grossWeight',
298
+ :'net_weight' => :'netWeight',
299
+ :'estimated_time_of_departure' => :'estimatedTimeOfDeparture',
300
+ :'season' => :'season',
301
+ :'season_year' => :'seasonYear',
302
+ :'unit_price' => :'unitPrice',
303
+ :'tax' => :'tax',
304
+ :'status' => :'status',
305
+ :'tenant_id' => :'tenantId',
306
+ :'last_updated_at' => :'lastUpdatedAt',
307
+ :'po_status' => :'poStatus',
308
+ :'so_status' => :'soStatus',
309
+ :'quantity2' => :'quantity2',
310
+ :'approve_status' => :'approveStatus',
311
+ :'scope_code' => :'scopeCode',
312
+ :'so_unit' => :'soUnit',
313
+ :'so_unit_name' => :'soUnitName',
314
+ :'so_unit_code' => :'soUnitCode',
315
+ :'product_category_name' => :'productCategoryName',
316
+ :'so_quantity' => :'soQuantity',
317
+ :'master_approve_status' => :'masterApproveStatus',
318
+ :'order_chain_status' => :'orderChainStatus',
319
+ :'top_orderline_ids' => :'topOrderlineIds',
320
+ :'so_unitgroup_consistent' => :'soUnitgroupConsistent',
321
+ :'max_so_quantity' => :'maxSoQuantity',
322
+ :'min_so_quantity' => :'minSoQuantity',
323
+ :'scope_name' => :'scopeName',
324
+ :'order_number' => :'orderNumber',
325
+ :'order_remarks' => :'orderRemarks',
326
+ :'available_quantity' => :'availableQuantity',
327
+ :'unit_category' => :'unitCategory',
328
+ :'is_end_order' => :'isEndOrder',
329
+ :'product_final' => :'productFinal',
330
+ :'customer_id' => :'customerId',
331
+ :'supplier_id' => :'supplierId',
332
+ :'customer_tenant_id' => :'customerTenantId',
333
+ :'supplier_tenant_id' => :'supplierTenantId',
334
+ :'order_date' => :'orderDate',
335
+ :'order_type' => :'orderType',
336
+ :'is_approved' => :'isApproved',
337
+ :'attachments' => :'attachments',
338
+ :'customer_confirm_status' => :'customerConfirmStatus',
339
+ :'loss' => :'loss',
340
+ :'bom_batch' => :'bomBatch',
341
+ :'order_name' => :'orderName',
342
+ :'chain_status' => :'chainStatus',
343
+ :'chain_latest_updated_at' => :'chainLatestUpdatedAt',
344
+ :'push_early_delivery_date' => :'pushEarlyDeliveryDate',
345
+ :'is_adjust_delivery' => :'isAdjustDelivery',
346
+ :'adjust_delivery_remark' => :'adjustDeliveryRemark',
347
+ :'order_line_finish_time' => :'orderLineFinishTime',
348
+ :'customer_confirm_time' => :'customerConfirmTime',
349
+ :'kpi_exclude_flag' => :'kpiExcludeFlag',
350
+ :'kpi_exclude_reason' => :'kpiExcludeReason',
351
+ :'ship_in_batches' => :'shipInBatches',
352
+ :'gts_departure_date' => :'gtsDepartureDate',
353
+ :'gts_arrival_date' => :'gtsArrivalDate',
354
+ :'gts_ship_finished' => :'gtsShipFinished',
355
+ :'is_need_transfer' => :'isNeedTransfer',
356
+ :'single_component' => :'singleComponent',
357
+ :'use_factory_id' => :'useFactoryId',
358
+ :'remain_trade_ship_quantity' => :'remainTradeShipQuantity',
359
+ :'is_order_line_changed' => :'isOrderLineChanged'
360
+ }
361
+ end
362
+
363
+ # Returns attribute mapping this model knows about
364
+ def self.acceptable_attribute_map
365
+ attribute_map
366
+ end
367
+
368
+ # Returns all the JSON keys this model knows about
369
+ def self.acceptable_attributes
370
+ acceptable_attribute_map.values
371
+ end
372
+
373
+ # Attribute type mapping.
374
+ def self.openapi_types
375
+ {
376
+ :'id' => :'String',
377
+ :'unique_no' => :'String',
378
+ :'order_id' => :'String',
379
+ :'line_number' => :'String',
380
+ :'product_category' => :'String',
381
+ :'material_id' => :'String',
382
+ :'material_code' => :'String',
383
+ :'material_name' => :'String',
384
+ :'product_id' => :'String',
385
+ :'product_code' => :'String',
386
+ :'product_name' => :'String',
387
+ :'color' => :'String',
388
+ :'batch' => :'String',
389
+ :'quantity' => :'Float',
390
+ :'destination_country' => :'String',
391
+ :'component' => :'String',
392
+ :'certification' => :'String',
393
+ :'unit' => :'String',
394
+ :'unit_name' => :'String',
395
+ :'unit_code' => :'String',
396
+ :'customer_ext_no' => :'String',
397
+ :'supplier_ext_no' => :'String',
398
+ :'remark' => :'String',
399
+ :'origin_country' => :'String',
400
+ :'gross_weight' => :'Float',
401
+ :'net_weight' => :'Float',
402
+ :'estimated_time_of_departure' => :'Time',
403
+ :'season' => :'String',
404
+ :'season_year' => :'String',
405
+ :'unit_price' => :'Float',
406
+ :'tax' => :'Float',
407
+ :'status' => :'Integer',
408
+ :'tenant_id' => :'String',
409
+ :'last_updated_at' => :'Time',
410
+ :'po_status' => :'Integer',
411
+ :'so_status' => :'Integer',
412
+ :'quantity2' => :'Float',
413
+ :'approve_status' => :'Integer',
414
+ :'scope_code' => :'String',
415
+ :'so_unit' => :'String',
416
+ :'so_unit_name' => :'String',
417
+ :'so_unit_code' => :'String',
418
+ :'product_category_name' => :'String',
419
+ :'so_quantity' => :'Float',
420
+ :'master_approve_status' => :'Integer',
421
+ :'order_chain_status' => :'Boolean',
422
+ :'top_orderline_ids' => :'String',
423
+ :'so_unitgroup_consistent' => :'Integer',
424
+ :'max_so_quantity' => :'Float',
425
+ :'min_so_quantity' => :'Float',
426
+ :'scope_name' => :'String',
427
+ :'order_number' => :'String',
428
+ :'order_remarks' => :'String',
429
+ :'available_quantity' => :'Float',
430
+ :'unit_category' => :'String',
431
+ :'is_end_order' => :'Boolean',
432
+ :'product_final' => :'Boolean',
433
+ :'customer_id' => :'String',
434
+ :'supplier_id' => :'String',
435
+ :'customer_tenant_id' => :'String',
436
+ :'supplier_tenant_id' => :'String',
437
+ :'order_date' => :'Time',
438
+ :'order_type' => :'Integer',
439
+ :'is_approved' => :'Boolean',
440
+ :'attachments' => :'Array<Object>',
441
+ :'customer_confirm_status' => :'Integer',
442
+ :'loss' => :'Float',
443
+ :'bom_batch' => :'String',
444
+ :'order_name' => :'String',
445
+ :'chain_status' => :'Boolean',
446
+ :'chain_latest_updated_at' => :'Time',
447
+ :'push_early_delivery_date' => :'Time',
448
+ :'is_adjust_delivery' => :'Boolean',
449
+ :'adjust_delivery_remark' => :'String',
450
+ :'order_line_finish_time' => :'Time',
451
+ :'customer_confirm_time' => :'Time',
452
+ :'kpi_exclude_flag' => :'Boolean',
453
+ :'kpi_exclude_reason' => :'String',
454
+ :'ship_in_batches' => :'Integer',
455
+ :'gts_departure_date' => :'Time',
456
+ :'gts_arrival_date' => :'Time',
457
+ :'gts_ship_finished' => :'Integer',
458
+ :'is_need_transfer' => :'Integer',
459
+ :'single_component' => :'String',
460
+ :'use_factory_id' => :'String',
461
+ :'remain_trade_ship_quantity' => :'Float',
462
+ :'is_order_line_changed' => :'Boolean'
463
+ }
464
+ end
465
+
466
+ # List of attributes with nullable: true
467
+ def self.openapi_nullable
468
+ Set.new([
469
+ :'id',
470
+ :'unique_no',
471
+ :'order_id',
472
+ :'line_number',
473
+ :'product_category',
474
+ :'material_id',
475
+ :'material_code',
476
+ :'material_name',
477
+ :'product_id',
478
+ :'product_code',
479
+ :'product_name',
480
+ :'color',
481
+ :'batch',
482
+ :'destination_country',
483
+ :'component',
484
+ :'certification',
485
+ :'unit',
486
+ :'unit_name',
487
+ :'unit_code',
488
+ :'customer_ext_no',
489
+ :'supplier_ext_no',
490
+ :'remark',
491
+ :'origin_country',
492
+ :'gross_weight',
493
+ :'net_weight',
494
+ :'estimated_time_of_departure',
495
+ :'season',
496
+ :'season_year',
497
+ :'unit_price',
498
+ :'tax',
499
+ :'tenant_id',
500
+ :'last_updated_at',
501
+ :'quantity2',
502
+ :'approve_status',
503
+ :'scope_code',
504
+ :'so_unit',
505
+ :'so_unit_name',
506
+ :'so_unit_code',
507
+ :'product_category_name',
508
+ :'so_quantity',
509
+ :'master_approve_status',
510
+ :'order_chain_status',
511
+ :'top_orderline_ids',
512
+ :'so_unitgroup_consistent',
513
+ :'max_so_quantity',
514
+ :'min_so_quantity',
515
+ :'scope_name',
516
+ :'order_number',
517
+ :'order_remarks',
518
+ :'available_quantity',
519
+ :'unit_category',
520
+ :'is_end_order',
521
+ :'product_final',
522
+ :'customer_id',
523
+ :'supplier_id',
524
+ :'customer_tenant_id',
525
+ :'supplier_tenant_id',
526
+ :'order_date',
527
+ :'order_type',
528
+ :'is_approved',
529
+ :'attachments',
530
+ :'customer_confirm_status',
531
+ :'loss',
532
+ :'bom_batch',
533
+ :'order_name',
534
+ :'chain_status',
535
+ :'chain_latest_updated_at',
536
+ :'push_early_delivery_date',
537
+ :'is_adjust_delivery',
538
+ :'adjust_delivery_remark',
539
+ :'order_line_finish_time',
540
+ :'customer_confirm_time',
541
+ :'kpi_exclude_flag',
542
+ :'kpi_exclude_reason',
543
+ :'ship_in_batches',
544
+ :'gts_departure_date',
545
+ :'gts_arrival_date',
546
+ :'gts_ship_finished',
547
+ :'is_need_transfer',
548
+ :'single_component',
549
+ :'use_factory_id',
550
+ ])
551
+ end
552
+
553
+ # Initializes the object
554
+ # @param [Hash] attributes Model attributes in the form of hash
555
+ def initialize(attributes = {})
556
+ if (!attributes.is_a?(Hash))
557
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::OrderLine` initialize method"
558
+ end
559
+
560
+ # check to see if the attribute exists and convert string to symbol for hash key
561
+ acceptable_attribute_map = self.class.acceptable_attribute_map
562
+ attributes = attributes.each_with_object({}) { |(k, v), h|
563
+ if (!acceptable_attribute_map.key?(k.to_sym))
564
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::OrderLine`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
565
+ end
566
+ h[k.to_sym] = v
567
+ }
568
+
569
+ if attributes.key?(:'id')
570
+ self.id = attributes[:'id']
571
+ end
572
+
573
+ if attributes.key?(:'unique_no')
574
+ self.unique_no = attributes[:'unique_no']
575
+ end
576
+
577
+ if attributes.key?(:'order_id')
578
+ self.order_id = attributes[:'order_id']
579
+ end
580
+
581
+ if attributes.key?(:'line_number')
582
+ self.line_number = attributes[:'line_number']
583
+ end
584
+
585
+ if attributes.key?(:'product_category')
586
+ self.product_category = attributes[:'product_category']
587
+ end
588
+
589
+ if attributes.key?(:'material_id')
590
+ self.material_id = attributes[:'material_id']
591
+ end
592
+
593
+ if attributes.key?(:'material_code')
594
+ self.material_code = attributes[:'material_code']
595
+ end
596
+
597
+ if attributes.key?(:'material_name')
598
+ self.material_name = attributes[:'material_name']
599
+ end
600
+
601
+ if attributes.key?(:'product_id')
602
+ self.product_id = attributes[:'product_id']
603
+ end
604
+
605
+ if attributes.key?(:'product_code')
606
+ self.product_code = attributes[:'product_code']
607
+ end
608
+
609
+ if attributes.key?(:'product_name')
610
+ self.product_name = attributes[:'product_name']
611
+ end
612
+
613
+ if attributes.key?(:'color')
614
+ self.color = attributes[:'color']
615
+ end
616
+
617
+ if attributes.key?(:'batch')
618
+ self.batch = attributes[:'batch']
619
+ end
620
+
621
+ if attributes.key?(:'quantity')
622
+ self.quantity = attributes[:'quantity']
623
+ else
624
+ self.quantity = nil
625
+ end
626
+
627
+ if attributes.key?(:'destination_country')
628
+ self.destination_country = attributes[:'destination_country']
629
+ end
630
+
631
+ if attributes.key?(:'component')
632
+ self.component = attributes[:'component']
633
+ end
634
+
635
+ if attributes.key?(:'certification')
636
+ self.certification = attributes[:'certification']
637
+ end
638
+
639
+ if attributes.key?(:'unit')
640
+ self.unit = attributes[:'unit']
641
+ end
642
+
643
+ if attributes.key?(:'unit_name')
644
+ self.unit_name = attributes[:'unit_name']
645
+ end
646
+
647
+ if attributes.key?(:'unit_code')
648
+ self.unit_code = attributes[:'unit_code']
649
+ end
650
+
651
+ if attributes.key?(:'customer_ext_no')
652
+ self.customer_ext_no = attributes[:'customer_ext_no']
653
+ end
654
+
655
+ if attributes.key?(:'supplier_ext_no')
656
+ self.supplier_ext_no = attributes[:'supplier_ext_no']
657
+ end
658
+
659
+ if attributes.key?(:'remark')
660
+ self.remark = attributes[:'remark']
661
+ end
662
+
663
+ if attributes.key?(:'origin_country')
664
+ self.origin_country = attributes[:'origin_country']
665
+ end
666
+
667
+ if attributes.key?(:'gross_weight')
668
+ self.gross_weight = attributes[:'gross_weight']
669
+ end
670
+
671
+ if attributes.key?(:'net_weight')
672
+ self.net_weight = attributes[:'net_weight']
673
+ end
674
+
675
+ if attributes.key?(:'estimated_time_of_departure')
676
+ self.estimated_time_of_departure = attributes[:'estimated_time_of_departure']
677
+ end
678
+
679
+ if attributes.key?(:'season')
680
+ self.season = attributes[:'season']
681
+ end
682
+
683
+ if attributes.key?(:'season_year')
684
+ self.season_year = attributes[:'season_year']
685
+ end
686
+
687
+ if attributes.key?(:'unit_price')
688
+ self.unit_price = attributes[:'unit_price']
689
+ end
690
+
691
+ if attributes.key?(:'tax')
692
+ self.tax = attributes[:'tax']
693
+ end
694
+
695
+ if attributes.key?(:'status')
696
+ self.status = attributes[:'status']
697
+ else
698
+ self.status = nil
699
+ end
700
+
701
+ if attributes.key?(:'tenant_id')
702
+ self.tenant_id = attributes[:'tenant_id']
703
+ end
704
+
705
+ if attributes.key?(:'last_updated_at')
706
+ self.last_updated_at = attributes[:'last_updated_at']
707
+ end
708
+
709
+ if attributes.key?(:'po_status')
710
+ self.po_status = attributes[:'po_status']
711
+ else
712
+ self.po_status = nil
713
+ end
714
+
715
+ if attributes.key?(:'so_status')
716
+ self.so_status = attributes[:'so_status']
717
+ else
718
+ self.so_status = nil
719
+ end
720
+
721
+ if attributes.key?(:'quantity2')
722
+ self.quantity2 = attributes[:'quantity2']
723
+ end
724
+
725
+ if attributes.key?(:'approve_status')
726
+ self.approve_status = attributes[:'approve_status']
727
+ end
728
+
729
+ if attributes.key?(:'scope_code')
730
+ self.scope_code = attributes[:'scope_code']
731
+ end
732
+
733
+ if attributes.key?(:'so_unit')
734
+ self.so_unit = attributes[:'so_unit']
735
+ end
736
+
737
+ if attributes.key?(:'so_unit_name')
738
+ self.so_unit_name = attributes[:'so_unit_name']
739
+ end
740
+
741
+ if attributes.key?(:'so_unit_code')
742
+ self.so_unit_code = attributes[:'so_unit_code']
743
+ end
744
+
745
+ if attributes.key?(:'product_category_name')
746
+ self.product_category_name = attributes[:'product_category_name']
747
+ end
748
+
749
+ if attributes.key?(:'so_quantity')
750
+ self.so_quantity = attributes[:'so_quantity']
751
+ end
752
+
753
+ if attributes.key?(:'master_approve_status')
754
+ self.master_approve_status = attributes[:'master_approve_status']
755
+ end
756
+
757
+ if attributes.key?(:'order_chain_status')
758
+ self.order_chain_status = attributes[:'order_chain_status']
759
+ end
760
+
761
+ if attributes.key?(:'top_orderline_ids')
762
+ self.top_orderline_ids = attributes[:'top_orderline_ids']
763
+ end
764
+
765
+ if attributes.key?(:'so_unitgroup_consistent')
766
+ self.so_unitgroup_consistent = attributes[:'so_unitgroup_consistent']
767
+ end
768
+
769
+ if attributes.key?(:'max_so_quantity')
770
+ self.max_so_quantity = attributes[:'max_so_quantity']
771
+ end
772
+
773
+ if attributes.key?(:'min_so_quantity')
774
+ self.min_so_quantity = attributes[:'min_so_quantity']
775
+ end
776
+
777
+ if attributes.key?(:'scope_name')
778
+ self.scope_name = attributes[:'scope_name']
779
+ end
780
+
781
+ if attributes.key?(:'order_number')
782
+ self.order_number = attributes[:'order_number']
783
+ end
784
+
785
+ if attributes.key?(:'order_remarks')
786
+ self.order_remarks = attributes[:'order_remarks']
787
+ end
788
+
789
+ if attributes.key?(:'available_quantity')
790
+ self.available_quantity = attributes[:'available_quantity']
791
+ end
792
+
793
+ if attributes.key?(:'unit_category')
794
+ self.unit_category = attributes[:'unit_category']
795
+ end
796
+
797
+ if attributes.key?(:'is_end_order')
798
+ self.is_end_order = attributes[:'is_end_order']
799
+ end
800
+
801
+ if attributes.key?(:'product_final')
802
+ self.product_final = attributes[:'product_final']
803
+ end
804
+
805
+ if attributes.key?(:'customer_id')
806
+ self.customer_id = attributes[:'customer_id']
807
+ end
808
+
809
+ if attributes.key?(:'supplier_id')
810
+ self.supplier_id = attributes[:'supplier_id']
811
+ end
812
+
813
+ if attributes.key?(:'customer_tenant_id')
814
+ self.customer_tenant_id = attributes[:'customer_tenant_id']
815
+ end
816
+
817
+ if attributes.key?(:'supplier_tenant_id')
818
+ self.supplier_tenant_id = attributes[:'supplier_tenant_id']
819
+ end
820
+
821
+ if attributes.key?(:'order_date')
822
+ self.order_date = attributes[:'order_date']
823
+ end
824
+
825
+ if attributes.key?(:'order_type')
826
+ self.order_type = attributes[:'order_type']
827
+ end
828
+
829
+ if attributes.key?(:'is_approved')
830
+ self.is_approved = attributes[:'is_approved']
831
+ end
832
+
833
+ if attributes.key?(:'attachments')
834
+ if (value = attributes[:'attachments']).is_a?(Array)
835
+ self.attachments = value
836
+ end
837
+ end
838
+
839
+ if attributes.key?(:'customer_confirm_status')
840
+ self.customer_confirm_status = attributes[:'customer_confirm_status']
841
+ end
842
+
843
+ if attributes.key?(:'loss')
844
+ self.loss = attributes[:'loss']
845
+ end
846
+
847
+ if attributes.key?(:'bom_batch')
848
+ self.bom_batch = attributes[:'bom_batch']
849
+ end
850
+
851
+ if attributes.key?(:'order_name')
852
+ self.order_name = attributes[:'order_name']
853
+ end
854
+
855
+ if attributes.key?(:'chain_status')
856
+ self.chain_status = attributes[:'chain_status']
857
+ end
858
+
859
+ if attributes.key?(:'chain_latest_updated_at')
860
+ self.chain_latest_updated_at = attributes[:'chain_latest_updated_at']
861
+ end
862
+
863
+ if attributes.key?(:'push_early_delivery_date')
864
+ self.push_early_delivery_date = attributes[:'push_early_delivery_date']
865
+ end
866
+
867
+ if attributes.key?(:'is_adjust_delivery')
868
+ self.is_adjust_delivery = attributes[:'is_adjust_delivery']
869
+ end
870
+
871
+ if attributes.key?(:'adjust_delivery_remark')
872
+ self.adjust_delivery_remark = attributes[:'adjust_delivery_remark']
873
+ end
874
+
875
+ if attributes.key?(:'order_line_finish_time')
876
+ self.order_line_finish_time = attributes[:'order_line_finish_time']
877
+ end
878
+
879
+ if attributes.key?(:'customer_confirm_time')
880
+ self.customer_confirm_time = attributes[:'customer_confirm_time']
881
+ end
882
+
883
+ if attributes.key?(:'kpi_exclude_flag')
884
+ self.kpi_exclude_flag = attributes[:'kpi_exclude_flag']
885
+ end
886
+
887
+ if attributes.key?(:'kpi_exclude_reason')
888
+ self.kpi_exclude_reason = attributes[:'kpi_exclude_reason']
889
+ end
890
+
891
+ if attributes.key?(:'ship_in_batches')
892
+ self.ship_in_batches = attributes[:'ship_in_batches']
893
+ end
894
+
895
+ if attributes.key?(:'gts_departure_date')
896
+ self.gts_departure_date = attributes[:'gts_departure_date']
897
+ end
898
+
899
+ if attributes.key?(:'gts_arrival_date')
900
+ self.gts_arrival_date = attributes[:'gts_arrival_date']
901
+ end
902
+
903
+ if attributes.key?(:'gts_ship_finished')
904
+ self.gts_ship_finished = attributes[:'gts_ship_finished']
905
+ end
906
+
907
+ if attributes.key?(:'is_need_transfer')
908
+ self.is_need_transfer = attributes[:'is_need_transfer']
909
+ end
910
+
911
+ if attributes.key?(:'single_component')
912
+ self.single_component = attributes[:'single_component']
913
+ end
914
+
915
+ if attributes.key?(:'use_factory_id')
916
+ self.use_factory_id = attributes[:'use_factory_id']
917
+ end
918
+
919
+ if attributes.key?(:'remain_trade_ship_quantity')
920
+ self.remain_trade_ship_quantity = attributes[:'remain_trade_ship_quantity']
921
+ else
922
+ self.remain_trade_ship_quantity = nil
923
+ end
924
+
925
+ if attributes.key?(:'is_order_line_changed')
926
+ self.is_order_line_changed = attributes[:'is_order_line_changed']
927
+ else
928
+ self.is_order_line_changed = nil
929
+ end
930
+ end
931
+
932
+ # Show invalid properties with the reasons. Usually used together with valid?
933
+ # @return Array for valid properties with the reasons
934
+ def list_invalid_properties
935
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
936
+ invalid_properties = Array.new
937
+ if @quantity.nil?
938
+ invalid_properties.push('invalid value for "quantity", quantity cannot be nil.')
939
+ end
940
+
941
+ if @status.nil?
942
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
943
+ end
944
+
945
+ if @po_status.nil?
946
+ invalid_properties.push('invalid value for "po_status", po_status cannot be nil.')
947
+ end
948
+
949
+ if @so_status.nil?
950
+ invalid_properties.push('invalid value for "so_status", so_status cannot be nil.')
951
+ end
952
+
953
+ if @remain_trade_ship_quantity.nil?
954
+ invalid_properties.push('invalid value for "remain_trade_ship_quantity", remain_trade_ship_quantity cannot be nil.')
955
+ end
956
+
957
+ if @is_order_line_changed.nil?
958
+ invalid_properties.push('invalid value for "is_order_line_changed", is_order_line_changed cannot be nil.')
959
+ end
960
+
961
+ invalid_properties
962
+ end
963
+
964
+ # Check to see if the all the properties in the model are valid
965
+ # @return true if the model is valid
966
+ def valid?
967
+ warn '[DEPRECATED] the `valid?` method is obsolete'
968
+ return false if @quantity.nil?
969
+ return false if @status.nil?
970
+ return false if @po_status.nil?
971
+ return false if @so_status.nil?
972
+ return false if @remain_trade_ship_quantity.nil?
973
+ return false if @is_order_line_changed.nil?
974
+ true
975
+ end
976
+
977
+ # Custom attribute writer method with validation
978
+ # @param [Object] quantity Value to be assigned
979
+ def quantity=(quantity)
980
+ if quantity.nil?
981
+ fail ArgumentError, 'quantity cannot be nil'
982
+ end
983
+
984
+ @quantity = quantity
985
+ end
986
+
987
+ # Custom attribute writer method with validation
988
+ # @param [Object] status Value to be assigned
989
+ def status=(status)
990
+ if status.nil?
991
+ fail ArgumentError, 'status cannot be nil'
992
+ end
993
+
994
+ @status = status
995
+ end
996
+
997
+ # Custom attribute writer method with validation
998
+ # @param [Object] po_status Value to be assigned
999
+ def po_status=(po_status)
1000
+ if po_status.nil?
1001
+ fail ArgumentError, 'po_status cannot be nil'
1002
+ end
1003
+
1004
+ @po_status = po_status
1005
+ end
1006
+
1007
+ # Custom attribute writer method with validation
1008
+ # @param [Object] so_status Value to be assigned
1009
+ def so_status=(so_status)
1010
+ if so_status.nil?
1011
+ fail ArgumentError, 'so_status cannot be nil'
1012
+ end
1013
+
1014
+ @so_status = so_status
1015
+ end
1016
+
1017
+ # Custom attribute writer method with validation
1018
+ # @param [Object] remain_trade_ship_quantity Value to be assigned
1019
+ def remain_trade_ship_quantity=(remain_trade_ship_quantity)
1020
+ if remain_trade_ship_quantity.nil?
1021
+ fail ArgumentError, 'remain_trade_ship_quantity cannot be nil'
1022
+ end
1023
+
1024
+ @remain_trade_ship_quantity = remain_trade_ship_quantity
1025
+ end
1026
+
1027
+ # Custom attribute writer method with validation
1028
+ # @param [Object] is_order_line_changed Value to be assigned
1029
+ def is_order_line_changed=(is_order_line_changed)
1030
+ if is_order_line_changed.nil?
1031
+ fail ArgumentError, 'is_order_line_changed cannot be nil'
1032
+ end
1033
+
1034
+ @is_order_line_changed = is_order_line_changed
1035
+ end
1036
+
1037
+ # Checks equality by comparing each attribute.
1038
+ # @param [Object] Object to be compared
1039
+ def ==(o)
1040
+ return true if self.equal?(o)
1041
+ self.class == o.class &&
1042
+ id == o.id &&
1043
+ unique_no == o.unique_no &&
1044
+ order_id == o.order_id &&
1045
+ line_number == o.line_number &&
1046
+ product_category == o.product_category &&
1047
+ material_id == o.material_id &&
1048
+ material_code == o.material_code &&
1049
+ material_name == o.material_name &&
1050
+ product_id == o.product_id &&
1051
+ product_code == o.product_code &&
1052
+ product_name == o.product_name &&
1053
+ color == o.color &&
1054
+ batch == o.batch &&
1055
+ quantity == o.quantity &&
1056
+ destination_country == o.destination_country &&
1057
+ component == o.component &&
1058
+ certification == o.certification &&
1059
+ unit == o.unit &&
1060
+ unit_name == o.unit_name &&
1061
+ unit_code == o.unit_code &&
1062
+ customer_ext_no == o.customer_ext_no &&
1063
+ supplier_ext_no == o.supplier_ext_no &&
1064
+ remark == o.remark &&
1065
+ origin_country == o.origin_country &&
1066
+ gross_weight == o.gross_weight &&
1067
+ net_weight == o.net_weight &&
1068
+ estimated_time_of_departure == o.estimated_time_of_departure &&
1069
+ season == o.season &&
1070
+ season_year == o.season_year &&
1071
+ unit_price == o.unit_price &&
1072
+ tax == o.tax &&
1073
+ status == o.status &&
1074
+ tenant_id == o.tenant_id &&
1075
+ last_updated_at == o.last_updated_at &&
1076
+ po_status == o.po_status &&
1077
+ so_status == o.so_status &&
1078
+ quantity2 == o.quantity2 &&
1079
+ approve_status == o.approve_status &&
1080
+ scope_code == o.scope_code &&
1081
+ so_unit == o.so_unit &&
1082
+ so_unit_name == o.so_unit_name &&
1083
+ so_unit_code == o.so_unit_code &&
1084
+ product_category_name == o.product_category_name &&
1085
+ so_quantity == o.so_quantity &&
1086
+ master_approve_status == o.master_approve_status &&
1087
+ order_chain_status == o.order_chain_status &&
1088
+ top_orderline_ids == o.top_orderline_ids &&
1089
+ so_unitgroup_consistent == o.so_unitgroup_consistent &&
1090
+ max_so_quantity == o.max_so_quantity &&
1091
+ min_so_quantity == o.min_so_quantity &&
1092
+ scope_name == o.scope_name &&
1093
+ order_number == o.order_number &&
1094
+ order_remarks == o.order_remarks &&
1095
+ available_quantity == o.available_quantity &&
1096
+ unit_category == o.unit_category &&
1097
+ is_end_order == o.is_end_order &&
1098
+ product_final == o.product_final &&
1099
+ customer_id == o.customer_id &&
1100
+ supplier_id == o.supplier_id &&
1101
+ customer_tenant_id == o.customer_tenant_id &&
1102
+ supplier_tenant_id == o.supplier_tenant_id &&
1103
+ order_date == o.order_date &&
1104
+ order_type == o.order_type &&
1105
+ is_approved == o.is_approved &&
1106
+ attachments == o.attachments &&
1107
+ customer_confirm_status == o.customer_confirm_status &&
1108
+ loss == o.loss &&
1109
+ bom_batch == o.bom_batch &&
1110
+ order_name == o.order_name &&
1111
+ chain_status == o.chain_status &&
1112
+ chain_latest_updated_at == o.chain_latest_updated_at &&
1113
+ push_early_delivery_date == o.push_early_delivery_date &&
1114
+ is_adjust_delivery == o.is_adjust_delivery &&
1115
+ adjust_delivery_remark == o.adjust_delivery_remark &&
1116
+ order_line_finish_time == o.order_line_finish_time &&
1117
+ customer_confirm_time == o.customer_confirm_time &&
1118
+ kpi_exclude_flag == o.kpi_exclude_flag &&
1119
+ kpi_exclude_reason == o.kpi_exclude_reason &&
1120
+ ship_in_batches == o.ship_in_batches &&
1121
+ gts_departure_date == o.gts_departure_date &&
1122
+ gts_arrival_date == o.gts_arrival_date &&
1123
+ gts_ship_finished == o.gts_ship_finished &&
1124
+ is_need_transfer == o.is_need_transfer &&
1125
+ single_component == o.single_component &&
1126
+ use_factory_id == o.use_factory_id &&
1127
+ remain_trade_ship_quantity == o.remain_trade_ship_quantity &&
1128
+ is_order_line_changed == o.is_order_line_changed
1129
+ end
1130
+
1131
+ # @see the `==` method
1132
+ # @param [Object] Object to be compared
1133
+ def eql?(o)
1134
+ self == o
1135
+ end
1136
+
1137
+ # Calculates hash code according to all attributes.
1138
+ # @return [Integer] Hash code
1139
+ def hash
1140
+ [id, unique_no, order_id, line_number, product_category, material_id, material_code, material_name, product_id, product_code, product_name, color, batch, quantity, destination_country, component, certification, unit, unit_name, unit_code, customer_ext_no, supplier_ext_no, remark, origin_country, gross_weight, net_weight, estimated_time_of_departure, season, season_year, unit_price, tax, status, tenant_id, last_updated_at, po_status, so_status, quantity2, approve_status, scope_code, so_unit, so_unit_name, so_unit_code, product_category_name, so_quantity, master_approve_status, order_chain_status, top_orderline_ids, so_unitgroup_consistent, max_so_quantity, min_so_quantity, scope_name, order_number, order_remarks, available_quantity, unit_category, is_end_order, product_final, customer_id, supplier_id, customer_tenant_id, supplier_tenant_id, order_date, order_type, is_approved, attachments, customer_confirm_status, loss, bom_batch, order_name, chain_status, chain_latest_updated_at, push_early_delivery_date, is_adjust_delivery, adjust_delivery_remark, order_line_finish_time, customer_confirm_time, kpi_exclude_flag, kpi_exclude_reason, ship_in_batches, gts_departure_date, gts_arrival_date, gts_ship_finished, is_need_transfer, single_component, use_factory_id, remain_trade_ship_quantity, is_order_line_changed].hash
1141
+ end
1142
+
1143
+ # Builds the object from hash
1144
+ # @param [Hash] attributes Model attributes in the form of hash
1145
+ # @return [Object] Returns the model itself
1146
+ def self.build_from_hash(attributes)
1147
+ return nil unless attributes.is_a?(Hash)
1148
+ attributes = attributes.transform_keys(&:to_sym)
1149
+ transformed_hash = {}
1150
+ openapi_types.each_pair do |key, type|
1151
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
1152
+ transformed_hash["#{key}"] = nil
1153
+ elsif type =~ /\AArray<(.*)>/i
1154
+ # check to ensure the input is an array given that the attribute
1155
+ # is documented as an array but the input is not
1156
+ if attributes[attribute_map[key]].is_a?(Array)
1157
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
1158
+ end
1159
+ elsif !attributes[attribute_map[key]].nil?
1160
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
1161
+ end
1162
+ end
1163
+ new(transformed_hash)
1164
+ end
1165
+
1166
+ # Returns the object in the form of hash
1167
+ # @return [Hash] Returns the object in the form of hash
1168
+ def to_hash
1169
+ hash = {}
1170
+ self.class.attribute_map.each_pair do |attr, param|
1171
+ value = self.send(attr)
1172
+ if value.nil?
1173
+ is_nullable = self.class.openapi_nullable.include?(attr)
1174
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1175
+ end
1176
+
1177
+ hash[param] = _to_hash(value)
1178
+ end
1179
+ hash
1180
+ end
1181
+
1182
+ end
1183
+
1184
+ end