tachain-sdk 0.1.0 → 0.1.1

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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +148 -60
  3. data/lib/tachain-sdk/api/api_declaration_api.rb +155 -84
  4. data/lib/tachain-sdk/api/api_declaration_upload_api.rb +103 -0
  5. data/lib/tachain-sdk/api/api_delivery_api.rb +218 -138
  6. data/lib/tachain-sdk/api/api_enum_api.rb +2 -2
  7. data/lib/tachain-sdk/api/api_material_api.rb +414 -0
  8. data/lib/tachain-sdk/api/api_order_api.rb +185 -167
  9. data/lib/tachain-sdk/api/api_order_workflow_api.rb +227 -24
  10. data/lib/tachain-sdk/api/api_process_route_api.rb +414 -0
  11. data/lib/tachain-sdk/api/api_product_api.rb +414 -0
  12. data/lib/tachain-sdk/api/api_production_api.rb +141 -136
  13. data/lib/tachain-sdk/api/api_reference_api.rb +192 -0
  14. data/lib/tachain-sdk/models/{product_bom_grouping_dto.rb → api_bom_line_request.rb} +82 -107
  15. data/lib/tachain-sdk/models/api_bom_line_response.rb +205 -0
  16. data/lib/tachain-sdk/models/api_catalog_delete_request.rb +191 -0
  17. data/lib/tachain-sdk/models/{stage_attachment_api_dto.rb → api_declaration_attachment_response.rb} +16 -108
  18. data/lib/tachain-sdk/models/api_declaration_delete_request.rb +127 -17
  19. data/lib/tachain-sdk/models/api_declaration_document_request.rb +5 -27
  20. data/lib/tachain-sdk/models/api_declaration_file_request.rb +172 -0
  21. data/lib/tachain-sdk/models/api_declaration_form_request.rb +177 -0
  22. data/lib/tachain-sdk/models/{order_stage_form_datum_api_dto.rb → api_declaration_form_response.rb} +16 -49
  23. data/lib/tachain-sdk/models/api_declaration_list_response.rb +185 -0
  24. data/lib/tachain-sdk/models/api_declaration_submit_request.rb +171 -20
  25. data/lib/tachain-sdk/models/{api_declaration_submit_result_dto.rb → api_declaration_submit_response.rb} +10 -42
  26. data/lib/tachain-sdk/models/api_delivery_create_request.rb +292 -0
  27. data/lib/tachain-sdk/models/{result_brand_report_unlinked_order_detail.rb → api_delivery_delete_request.rb} +84 -60
  28. data/lib/tachain-sdk/models/api_delivery_detail_create_request.rb +353 -0
  29. data/lib/tachain-sdk/models/{delivery_note_detail_api_dto.rb → api_delivery_detail_response.rb} +23 -82
  30. data/lib/tachain-sdk/models/api_delivery_detail_update_request.rb +358 -0
  31. data/lib/tachain-sdk/models/{delivery_note_api_dto.rb → api_delivery_response.rb} +22 -192
  32. data/lib/tachain-sdk/models/api_delivery_update_request.rb +287 -0
  33. data/lib/tachain-sdk/models/{order_stage_form_dto.rb → api_document_form_response.rb} +16 -65
  34. data/lib/tachain-sdk/models/{document_type_api_dto.rb → api_document_type_response.rb} +30 -125
  35. data/lib/tachain-sdk/models/api_enum_value_response.rb +193 -0
  36. data/lib/tachain-sdk/models/{api_response_string.rb → api_error_response.rb} +22 -34
  37. data/lib/tachain-sdk/models/api_fiber_composition_request.rb +193 -0
  38. data/lib/tachain-sdk/models/api_fiber_composition_response.rb +160 -0
  39. data/lib/tachain-sdk/models/{attachment_in_api_dto.rb → api_file_response.rb} +23 -115
  40. data/lib/tachain-sdk/models/api_file_upload_response.rb +150 -0
  41. data/lib/tachain-sdk/models/api_mapping_response.rb +182 -0
  42. data/lib/tachain-sdk/models/api_material_create_request.rb +556 -0
  43. data/lib/tachain-sdk/models/api_material_response.rb +349 -0
  44. data/lib/tachain-sdk/models/api_material_update_request.rb +582 -0
  45. data/lib/tachain-sdk/models/{result_mapping_order_select.rb → api_order_accept_request.rb} +105 -70
  46. data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +106 -29
  47. data/lib/tachain-sdk/models/api_order_create_request.rb +379 -0
  48. data/lib/tachain-sdk/models/api_order_declaration_verification_request.rb +293 -0
  49. data/lib/tachain-sdk/models/api_order_declaration_verification_response.rb +203 -0
  50. data/lib/tachain-sdk/models/api_order_delete_line_request.rb +315 -0
  51. data/lib/tachain-sdk/models/api_order_delete_request.rb +315 -0
  52. data/lib/tachain-sdk/models/api_order_line_create_request.rb +445 -0
  53. data/lib/tachain-sdk/models/{order_line_api_dto.rb → api_order_line_response.rb} +39 -330
  54. data/lib/tachain-sdk/models/api_order_line_update_request.rb +416 -0
  55. data/lib/tachain-sdk/models/api_order_receipt_pending_line_response.rb +171 -0
  56. data/lib/tachain-sdk/models/{microsoft_asp_net_core_mvc_problem_details.rb → api_order_receipt_pending_response.rb} +28 -45
  57. data/lib/tachain-sdk/models/api_order_receipt_result.rb +185 -0
  58. data/lib/tachain-sdk/models/{order_api_dto.rb → api_order_response.rb} +35 -291
  59. data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +102 -42
  60. data/lib/tachain-sdk/models/api_order_submit_audit_response.rb +196 -0
  61. data/lib/tachain-sdk/models/api_order_update_request.rb +408 -0
  62. data/lib/tachain-sdk/models/api_page_result1_api_delivery_response.rb +220 -0
  63. data/lib/tachain-sdk/models/api_page_result1_api_material_response.rb +220 -0
  64. data/lib/tachain-sdk/models/api_page_result1_api_order_response.rb +220 -0
  65. data/lib/tachain-sdk/models/api_page_result1_api_process_route_response.rb +220 -0
  66. data/lib/tachain-sdk/models/{api_response_api_declaration_list_dto.rb → api_page_result1_api_product_response.rb} +48 -27
  67. data/lib/tachain-sdk/models/api_page_result1_api_production_response.rb +220 -0
  68. data/lib/tachain-sdk/models/{result_api_enum.rb → api_process_route_create_request.rb} +88 -62
  69. data/lib/tachain-sdk/models/api_process_route_response.rb +237 -0
  70. data/lib/tachain-sdk/models/{paged_response_delivery_note_api_dto.rb → api_process_route_update_request.rb} +102 -91
  71. data/lib/tachain-sdk/models/api_process_step_request.rb +201 -0
  72. data/lib/tachain-sdk/models/api_process_step_response.rb +171 -0
  73. data/lib/tachain-sdk/models/api_product_create_request.rb +595 -0
  74. data/lib/tachain-sdk/models/api_product_response.rb +373 -0
  75. data/lib/tachain-sdk/models/api_product_update_request.rb +621 -0
  76. data/lib/tachain-sdk/models/api_production_create_request.rb +381 -0
  77. data/lib/tachain-sdk/models/{api_integration_delete_request.rb → api_production_delete_request.rb} +22 -11
  78. data/lib/tachain-sdk/models/api_production_raw_material_create_request.rb +320 -0
  79. data/lib/tachain-sdk/models/{production_raw_material_api_dto.rb → api_production_raw_material_response.rb} +18 -118
  80. data/lib/tachain-sdk/models/api_production_raw_material_update_request.rb +325 -0
  81. data/lib/tachain-sdk/models/{production_api_dto.rb → api_production_response.rb} +23 -156
  82. data/lib/tachain-sdk/models/api_production_sales_order_create_request.rb +309 -0
  83. data/lib/tachain-sdk/models/{production_sales_order_api_dto.rb → api_production_sales_order_response.rb} +17 -94
  84. data/lib/tachain-sdk/models/api_production_sales_order_update_request.rb +314 -0
  85. data/lib/tachain-sdk/models/api_production_update_request.rb +392 -0
  86. data/lib/tachain-sdk/models/api_receipt_pending_item_response.rb +207 -0
  87. data/lib/tachain-sdk/models/api_reference_page_response1_api_enum_value_response.rb +162 -0
  88. data/lib/tachain-sdk/models/api_reference_page_response1_api_mapping_response.rb +162 -0
  89. data/lib/tachain-sdk/models/{api_response_production_api_dto.rb → api_result1_api_declaration_list_response.rb} +20 -33
  90. data/lib/tachain-sdk/models/api_result1_api_declaration_submit_response.rb +186 -0
  91. data/lib/tachain-sdk/models/{api_response_delivery_note_api_dto.rb → api_result1_api_delivery_response.rb} +20 -33
  92. data/lib/tachain-sdk/models/api_result1_api_file_upload_response.rb +186 -0
  93. data/lib/tachain-sdk/models/api_result1_api_material_response.rb +186 -0
  94. data/lib/tachain-sdk/models/api_result1_api_order_declaration_verification_response.rb +186 -0
  95. data/lib/tachain-sdk/models/{api_response_api_declaration_submit_result_dto.rb → api_result1_api_order_receipt_pending_response.rb} +20 -33
  96. data/lib/tachain-sdk/models/api_result1_api_order_receipt_result.rb +186 -0
  97. data/lib/tachain-sdk/models/api_result1_api_order_response.rb +186 -0
  98. data/lib/tachain-sdk/models/api_result1_api_order_submit_audit_response.rb +186 -0
  99. data/lib/tachain-sdk/models/api_result1_api_process_route_response.rb +186 -0
  100. data/lib/tachain-sdk/models/api_result1_api_product_response.rb +186 -0
  101. data/lib/tachain-sdk/models/api_result1_api_production_response.rb +186 -0
  102. data/lib/tachain-sdk/models/{api_response_order_api_dto.rb → api_result1_string.rb} +22 -33
  103. data/lib/tachain-sdk/models/{attachment_in_api_create_dto.rb → api_verification_file_response.rb} +106 -84
  104. data/lib/tachain-sdk/models/api_verification_response.rb +218 -0
  105. data/lib/tachain-sdk/models/delete_v1_declaration_delete200_response.rb +103 -0
  106. data/lib/tachain-sdk/models/get_v1_declaration_list_paging200_response.rb +103 -0
  107. data/lib/tachain-sdk/models/get_v1_declaration_required_documents200_response.rb +103 -0
  108. data/lib/tachain-sdk/models/get_v1_delivery_list_paging200_response.rb +103 -0
  109. data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +73 -171
  110. data/lib/tachain-sdk/models/get_v1_material_list_paging200_response.rb +103 -0
  111. data/lib/tachain-sdk/models/get_v1_order_po_list_paging200_response.rb +103 -0
  112. data/lib/tachain-sdk/models/get_v1_order_receipt_pending200_response.rb +103 -0
  113. data/lib/tachain-sdk/models/get_v1_process_route_list_paging200_response.rb +103 -0
  114. data/lib/tachain-sdk/models/get_v1_product_list_paging200_response.rb +103 -0
  115. data/lib/tachain-sdk/models/get_v1_production_list_paging200_response.rb +103 -0
  116. data/lib/tachain-sdk/models/get_v1_reference_enum_values200_response.rb +103 -0
  117. data/lib/tachain-sdk/models/get_v1_reference_mappings200_response.rb +103 -0
  118. data/lib/tachain-sdk/models/model1.rb +47 -14
  119. data/lib/tachain-sdk/models/model2.rb +190 -0
  120. data/lib/tachain-sdk/models/model3.rb +17 -33
  121. data/lib/tachain-sdk/models/model4.rb +17 -33
  122. data/lib/tachain-sdk/models/post_v1_declaration_submit200_response.rb +103 -0
  123. data/lib/tachain-sdk/models/post_v1_declaration_upload_file200_response.rb +103 -0
  124. data/lib/tachain-sdk/models/post_v1_material_create200_response.rb +103 -0
  125. data/lib/tachain-sdk/models/post_v1_order_create200_response.rb +103 -0
  126. data/lib/tachain-sdk/models/post_v1_order_declaration_verification200_response.rb +103 -0
  127. data/lib/tachain-sdk/models/post_v1_order_submit_audit200_response.rb +103 -0
  128. data/lib/tachain-sdk/models/post_v1_process_route_create200_response.rb +103 -0
  129. data/lib/tachain-sdk/models/post_v1_product_create200_response.rb +103 -0
  130. data/lib/tachain-sdk/models/post_v1_production_create200_response.rb +103 -0
  131. data/lib/tachain-sdk/models/put_v1_delivery_confirm_receipt200_response.rb +103 -0
  132. data/lib/tachain-sdk/models/put_v1_delivery_return_receipt200_response.rb +103 -0
  133. data/lib/tachain-sdk/models/put_v1_order_confirm_receipt200_response.rb +103 -0
  134. data/lib/tachain-sdk/version.rb +1 -1
  135. data/lib/tachain-sdk.rb +116 -51
  136. metadata +118 -53
  137. data/lib/tachain-sdk/models/api_declaration_list_dto.rb +0 -251
  138. data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +0 -334
  139. data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +0 -880
  140. data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +0 -749
  141. data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +0 -513
  142. data/lib/tachain-sdk/models/company.rb +0 -780
  143. data/lib/tachain-sdk/models/company_compliance_profile.rb +0 -547
  144. data/lib/tachain-sdk/models/company_utility_declaration.rb +0 -592
  145. data/lib/tachain-sdk/models/customer.rb +0 -569
  146. data/lib/tachain-sdk/models/factory.rb +0 -545
  147. data/lib/tachain-sdk/models/order.rb +0 -974
  148. data/lib/tachain-sdk/models/order_line.rb +0 -1184
  149. data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +0 -270
  150. data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +0 -296
  151. data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +0 -296
  152. data/lib/tachain-sdk/models/production_raw_material_dto.rb +0 -548
  153. data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +0 -331
  154. data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +0 -418
  155. data/lib/tachain-sdk/models/result_order_trace_report.rb +0 -721
  156. data/lib/tachain-sdk/models/supplier.rb +0 -585
  157. data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +0 -383
  158. data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +0 -456
  159. data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +0 -227
  160. data/lib/tachain-sdk/models/trader.rb +0 -506
@@ -14,9 +14,9 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TachainSdk
17
- # 生产成品明细记录表(仅MTO时需要)
18
- class ProductionSalesOrderApiDto < ApiModelBase
19
- # 成品记录ID
17
+ # 集成接口专用 ApiProductionSalesOrderResponse;只读业务返回字段,不参与写入模型。
18
+ class ApiProductionSalesOrderResponse < ApiModelBase
19
+ # 生产销售分配关联记录 ID;与 salesOrderLineId 销售订单明细 ID 不同。
20
20
  attr_accessor :id
21
21
 
22
22
  # 生产批次ID
@@ -25,46 +25,25 @@ module TachainSdk
25
25
  # 销售订单明细ID
26
26
  attr_accessor :sales_order_line_id
27
27
 
28
- # 为该订单生产数量
28
+ # 本次分配给销售订单行的生产数量,使用生产产品的单位;订单行必须关联同一产品。
29
29
  attr_accessor :quantity_produced
30
30
 
31
- # 单位
31
+ # 本次生产分配数量 quantityProduced 的计量单位,自动取自生产产品的单位,与 productionUnit 相同。
32
32
  attr_accessor :unit
33
33
 
34
- # 租户ID
35
- attr_accessor :tenant_id
36
-
37
- # 环境类型:0正式,1测试
38
- attr_accessor :environment_type
39
-
40
- # 创建用户ID
41
- attr_accessor :created_by
42
-
43
34
  # 创建时间
44
35
  attr_accessor :created_at
45
36
 
46
- # 公司ID
47
- attr_accessor :company_id
48
-
49
- # -9 禁用, -1 删除, 0 正常
37
+ # 记录状态:0 正常,-1 已删除,-9 禁用。
50
38
  attr_accessor :status
51
39
 
52
- # 修改用户ID
53
- attr_accessor :updated_by
54
-
55
40
  # 更新时间
56
41
  attr_accessor :updated_at
57
42
 
58
- # 生产自定义组合key(大申报使用)
59
- attr_accessor :combination_key
60
-
61
- # 生产分组类型(大申报使用)
62
- attr_accessor :combination_type
63
-
64
- # 单位名称
43
+ # 计量单位名称。
65
44
  attr_accessor :u_name
66
45
 
67
- # 订单编号
46
+ # 订单号。
68
47
  attr_accessor :order_number
69
48
 
70
49
  # 销售订单日期。外部生产接口按订单号+日期+行号解析销售订单明细时使用。
@@ -76,22 +55,22 @@ module TachainSdk
76
55
  # 订单唯一标识
77
56
  attr_accessor :unique_no
78
57
 
79
- # 销售数量
58
+ # 所选订单行的原始订单数量,来源为订单行 quantity。
80
59
  attr_accessor :quantity
81
60
 
82
- # 销售单数量
61
+ # 所选销售订单行的销售数量,来源为订单行 soQuantity;不是本次生产分配数量。
83
62
  attr_accessor :so_quantity
84
63
 
85
- # 销售单位
64
+ # 所选销售订单行的销售单位,来源为订单行 soUnit;用于展示核对,不作为生产分配数量的单位。
86
65
  attr_accessor :so_unit
87
66
 
88
- # 销售单位名称
67
+ # 销售单位名称。
89
68
  attr_accessor :so_unit_name
90
69
 
91
- # 生产单位
70
+ # 生产产品的计量单位,自动带出;对应 quantityProduced,不能由调用方指定。
92
71
  attr_accessor :production_unit
93
72
 
94
- # 生产单位名称
73
+ # 生产计量单位名称。
95
74
  attr_accessor :production_unit_name
96
75
 
97
76
  # 链条是否审核通过
@@ -105,16 +84,9 @@ module TachainSdk
105
84
  :'sales_order_line_id' => :'salesOrderLineId',
106
85
  :'quantity_produced' => :'quantityProduced',
107
86
  :'unit' => :'unit',
108
- :'tenant_id' => :'tenantId',
109
- :'environment_type' => :'environmentType',
110
- :'created_by' => :'createdBy',
111
87
  :'created_at' => :'createdAt',
112
- :'company_id' => :'companyId',
113
88
  :'status' => :'status',
114
- :'updated_by' => :'updatedBy',
115
89
  :'updated_at' => :'updatedAt',
116
- :'combination_key' => :'combinationKey',
117
- :'combination_type' => :'combinationType',
118
90
  :'u_name' => :'uName',
119
91
  :'order_number' => :'orderNumber',
120
92
  :'order_date' => :'orderDate',
@@ -148,16 +120,9 @@ module TachainSdk
148
120
  :'sales_order_line_id' => :'String',
149
121
  :'quantity_produced' => :'Float',
150
122
  :'unit' => :'String',
151
- :'tenant_id' => :'String',
152
- :'environment_type' => :'Integer',
153
- :'created_by' => :'String',
154
123
  :'created_at' => :'Time',
155
- :'company_id' => :'String',
156
124
  :'status' => :'Integer',
157
- :'updated_by' => :'String',
158
125
  :'updated_at' => :'Time',
159
- :'combination_key' => :'String',
160
- :'combination_type' => :'String',
161
126
  :'u_name' => :'String',
162
127
  :'order_number' => :'String',
163
128
  :'order_date' => :'Time',
@@ -181,16 +146,9 @@ module TachainSdk
181
146
  :'sales_order_line_id',
182
147
  :'quantity_produced',
183
148
  :'unit',
184
- :'tenant_id',
185
- :'environment_type',
186
- :'created_by',
187
149
  :'created_at',
188
- :'company_id',
189
150
  :'status',
190
- :'updated_by',
191
151
  :'updated_at',
192
- :'combination_key',
193
- :'combination_type',
194
152
  :'u_name',
195
153
  :'order_number',
196
154
  :'order_date',
@@ -210,14 +168,14 @@ module TachainSdk
210
168
  # @param [Hash] attributes Model attributes in the form of hash
211
169
  def initialize(attributes = {})
212
170
  if (!attributes.is_a?(Hash))
213
- fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ProductionSalesOrderApiDto` initialize method"
171
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiProductionSalesOrderResponse` initialize method"
214
172
  end
215
173
 
216
174
  # check to see if the attribute exists and convert string to symbol for hash key
217
175
  acceptable_attribute_map = self.class.acceptable_attribute_map
218
176
  attributes = attributes.each_with_object({}) { |(k, v), h|
219
177
  if (!acceptable_attribute_map.key?(k.to_sym))
220
- fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ProductionSalesOrderApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
178
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiProductionSalesOrderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
221
179
  end
222
180
  h[k.to_sym] = v
223
181
  }
@@ -242,46 +200,18 @@ module TachainSdk
242
200
  self.unit = attributes[:'unit']
243
201
  end
244
202
 
245
- if attributes.key?(:'tenant_id')
246
- self.tenant_id = attributes[:'tenant_id']
247
- end
248
-
249
- if attributes.key?(:'environment_type')
250
- self.environment_type = attributes[:'environment_type']
251
- end
252
-
253
- if attributes.key?(:'created_by')
254
- self.created_by = attributes[:'created_by']
255
- end
256
-
257
203
  if attributes.key?(:'created_at')
258
204
  self.created_at = attributes[:'created_at']
259
205
  end
260
206
 
261
- if attributes.key?(:'company_id')
262
- self.company_id = attributes[:'company_id']
263
- end
264
-
265
207
  if attributes.key?(:'status')
266
208
  self.status = attributes[:'status']
267
209
  end
268
210
 
269
- if attributes.key?(:'updated_by')
270
- self.updated_by = attributes[:'updated_by']
271
- end
272
-
273
211
  if attributes.key?(:'updated_at')
274
212
  self.updated_at = attributes[:'updated_at']
275
213
  end
276
214
 
277
- if attributes.key?(:'combination_key')
278
- self.combination_key = attributes[:'combination_key']
279
- end
280
-
281
- if attributes.key?(:'combination_type')
282
- self.combination_type = attributes[:'combination_type']
283
- end
284
-
285
215
  if attributes.key?(:'u_name')
286
216
  self.u_name = attributes[:'u_name']
287
217
  end
@@ -356,16 +286,9 @@ module TachainSdk
356
286
  sales_order_line_id == o.sales_order_line_id &&
357
287
  quantity_produced == o.quantity_produced &&
358
288
  unit == o.unit &&
359
- tenant_id == o.tenant_id &&
360
- environment_type == o.environment_type &&
361
- created_by == o.created_by &&
362
289
  created_at == o.created_at &&
363
- company_id == o.company_id &&
364
290
  status == o.status &&
365
- updated_by == o.updated_by &&
366
291
  updated_at == o.updated_at &&
367
- combination_key == o.combination_key &&
368
- combination_type == o.combination_type &&
369
292
  u_name == o.u_name &&
370
293
  order_number == o.order_number &&
371
294
  order_date == o.order_date &&
@@ -389,7 +312,7 @@ module TachainSdk
389
312
  # Calculates hash code according to all attributes.
390
313
  # @return [Integer] Hash code
391
314
  def hash
392
- [id, production_id, sales_order_line_id, quantity_produced, unit, tenant_id, environment_type, created_by, created_at, company_id, status, updated_by, updated_at, combination_key, combination_type, u_name, order_number, order_date, line_number, unique_no, quantity, so_quantity, so_unit, so_unit_name, production_unit, production_unit_name, chain_review_status].hash
315
+ [id, production_id, sales_order_line_id, quantity_produced, unit, created_at, status, updated_at, u_name, order_number, order_date, line_number, unique_no, quantity, so_quantity, so_unit, so_unit_name, production_unit, production_unit_name, chain_review_status].hash
393
316
  end
394
317
 
395
318
  # Builds the object from hash
@@ -0,0 +1,314 @@
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 ApiProductionSalesOrderUpdateRequest < ApiModelBase
19
+ # 修改/删除时可使用查询返回的内部 ID;必须属于当前单据,保留原有 ID 调用方式。
20
+ attr_accessor :id
21
+
22
+ # 销售订单明细ID
23
+ attr_accessor :sales_order_line_id
24
+
25
+ # 分配给所选销售订单行的生产数量;计量单位自动使用当前生产产品的单位,所选订单行必须关联同一产品。 条件:非删除明细时需填写相应业务数据;删除时可省略。
26
+ attr_accessor :quantity_produced
27
+
28
+ # 订单编号
29
+ attr_accessor :order_number
30
+
31
+ # 销售订单日期。外部生产接口按订单号+日期+行号解析销售订单明细时使用。
32
+ attr_accessor :order_date
33
+
34
+ # 订单行号
35
+ attr_accessor :line_number
36
+
37
+ # 删除此关联明细;默认 false。仍需按订单业务键校验归属。
38
+ attr_accessor :delete
39
+
40
+ # 查询返回的客户公司 ID,可选。优先使用 CustomerName 或 CustomerCode。
41
+ attr_accessor :customer_id
42
+
43
+ # 客户英文名、当地语言名称或简称,精确匹配当前公司的有效客户关系。
44
+ attr_accessor :customer_name
45
+
46
+ # 当前公司维护的客户编码或启用的 Customer/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个客户字段必须一致。
47
+ attr_accessor :customer_code
48
+
49
+ # 查询返回的供应商公司 ID,可选。优先使用 SupplierName 或 SupplierCode。
50
+ attr_accessor :supplier_id
51
+
52
+ # 供应商英文名、当地语言名称或简称,精确匹配当前公司的有效供应商关系。
53
+ attr_accessor :supplier_name
54
+
55
+ # 当前公司维护的供应商编码或启用的 Supplier/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个供应商字段必须一致。
56
+ attr_accessor :supplier_code
57
+
58
+ # 买方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
59
+ attr_accessor :customer_ext_no
60
+
61
+ # 卖方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
62
+ attr_accessor :supplier_ext_no
63
+
64
+ # 查询返回的系统订单明细唯一流水号。
65
+ attr_accessor :unique_no
66
+
67
+ # Attribute mapping from ruby-style variable name to JSON key.
68
+ def self.attribute_map
69
+ {
70
+ :'id' => :'id',
71
+ :'sales_order_line_id' => :'salesOrderLineId',
72
+ :'quantity_produced' => :'quantityProduced',
73
+ :'order_number' => :'orderNumber',
74
+ :'order_date' => :'orderDate',
75
+ :'line_number' => :'lineNumber',
76
+ :'delete' => :'delete',
77
+ :'customer_id' => :'customerId',
78
+ :'customer_name' => :'customerName',
79
+ :'customer_code' => :'customerCode',
80
+ :'supplier_id' => :'supplierId',
81
+ :'supplier_name' => :'supplierName',
82
+ :'supplier_code' => :'supplierCode',
83
+ :'customer_ext_no' => :'customerExtNo',
84
+ :'supplier_ext_no' => :'supplierExtNo',
85
+ :'unique_no' => :'uniqueNo'
86
+ }
87
+ end
88
+
89
+ # Returns attribute mapping this model knows about
90
+ def self.acceptable_attribute_map
91
+ attribute_map
92
+ end
93
+
94
+ # Returns all the JSON keys this model knows about
95
+ def self.acceptable_attributes
96
+ acceptable_attribute_map.values
97
+ end
98
+
99
+ # Attribute type mapping.
100
+ def self.openapi_types
101
+ {
102
+ :'id' => :'Integer',
103
+ :'sales_order_line_id' => :'String',
104
+ :'quantity_produced' => :'Float',
105
+ :'order_number' => :'String',
106
+ :'order_date' => :'Time',
107
+ :'line_number' => :'String',
108
+ :'delete' => :'Boolean',
109
+ :'customer_id' => :'String',
110
+ :'customer_name' => :'String',
111
+ :'customer_code' => :'String',
112
+ :'supplier_id' => :'String',
113
+ :'supplier_name' => :'String',
114
+ :'supplier_code' => :'String',
115
+ :'customer_ext_no' => :'String',
116
+ :'supplier_ext_no' => :'String',
117
+ :'unique_no' => :'String'
118
+ }
119
+ end
120
+
121
+ # List of attributes with nullable: true
122
+ def self.openapi_nullable
123
+ Set.new([
124
+ :'id',
125
+ :'sales_order_line_id',
126
+ :'quantity_produced',
127
+ :'order_number',
128
+ :'order_date',
129
+ :'line_number',
130
+ :'customer_id',
131
+ :'customer_name',
132
+ :'customer_code',
133
+ :'supplier_id',
134
+ :'supplier_name',
135
+ :'supplier_code',
136
+ :'customer_ext_no',
137
+ :'supplier_ext_no',
138
+ :'unique_no'
139
+ ])
140
+ end
141
+
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ if (!attributes.is_a?(Hash))
146
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiProductionSalesOrderUpdateRequest` initialize method"
147
+ end
148
+
149
+ # check to see if the attribute exists and convert string to symbol for hash key
150
+ acceptable_attribute_map = self.class.acceptable_attribute_map
151
+ attributes = attributes.each_with_object({}) { |(k, v), h|
152
+ if (!acceptable_attribute_map.key?(k.to_sym))
153
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiProductionSalesOrderUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
154
+ end
155
+ h[k.to_sym] = v
156
+ }
157
+
158
+ if attributes.key?(:'id')
159
+ self.id = attributes[:'id']
160
+ end
161
+
162
+ if attributes.key?(:'sales_order_line_id')
163
+ self.sales_order_line_id = attributes[:'sales_order_line_id']
164
+ end
165
+
166
+ if attributes.key?(:'quantity_produced')
167
+ self.quantity_produced = attributes[:'quantity_produced']
168
+ end
169
+
170
+ if attributes.key?(:'order_number')
171
+ self.order_number = attributes[:'order_number']
172
+ end
173
+
174
+ if attributes.key?(:'order_date')
175
+ self.order_date = attributes[:'order_date']
176
+ end
177
+
178
+ if attributes.key?(:'line_number')
179
+ self.line_number = attributes[:'line_number']
180
+ end
181
+
182
+ if attributes.key?(:'delete')
183
+ self.delete = attributes[:'delete']
184
+ end
185
+
186
+ if attributes.key?(:'customer_id')
187
+ self.customer_id = attributes[:'customer_id']
188
+ end
189
+
190
+ if attributes.key?(:'customer_name')
191
+ self.customer_name = attributes[:'customer_name']
192
+ end
193
+
194
+ if attributes.key?(:'customer_code')
195
+ self.customer_code = attributes[:'customer_code']
196
+ end
197
+
198
+ if attributes.key?(:'supplier_id')
199
+ self.supplier_id = attributes[:'supplier_id']
200
+ end
201
+
202
+ if attributes.key?(:'supplier_name')
203
+ self.supplier_name = attributes[:'supplier_name']
204
+ end
205
+
206
+ if attributes.key?(:'supplier_code')
207
+ self.supplier_code = attributes[:'supplier_code']
208
+ end
209
+
210
+ if attributes.key?(:'customer_ext_no')
211
+ self.customer_ext_no = attributes[:'customer_ext_no']
212
+ end
213
+
214
+ if attributes.key?(:'supplier_ext_no')
215
+ self.supplier_ext_no = attributes[:'supplier_ext_no']
216
+ end
217
+
218
+ if attributes.key?(:'unique_no')
219
+ self.unique_no = attributes[:'unique_no']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
227
+ invalid_properties = Array.new
228
+ invalid_properties
229
+ end
230
+
231
+ # Check to see if the all the properties in the model are valid
232
+ # @return true if the model is valid
233
+ def valid?
234
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
+ true
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ id == o.id &&
244
+ sales_order_line_id == o.sales_order_line_id &&
245
+ quantity_produced == o.quantity_produced &&
246
+ order_number == o.order_number &&
247
+ order_date == o.order_date &&
248
+ line_number == o.line_number &&
249
+ delete == o.delete &&
250
+ customer_id == o.customer_id &&
251
+ customer_name == o.customer_name &&
252
+ customer_code == o.customer_code &&
253
+ supplier_id == o.supplier_id &&
254
+ supplier_name == o.supplier_name &&
255
+ supplier_code == o.supplier_code &&
256
+ customer_ext_no == o.customer_ext_no &&
257
+ supplier_ext_no == o.supplier_ext_no &&
258
+ unique_no == o.unique_no
259
+ end
260
+
261
+ # @see the `==` method
262
+ # @param [Object] Object to be compared
263
+ def eql?(o)
264
+ self == o
265
+ end
266
+
267
+ # Calculates hash code according to all attributes.
268
+ # @return [Integer] Hash code
269
+ def hash
270
+ [id, sales_order_line_id, quantity_produced, order_number, order_date, line_number, delete, customer_id, customer_name, customer_code, supplier_id, supplier_name, supplier_code, customer_ext_no, supplier_ext_no, unique_no].hash
271
+ end
272
+
273
+ # Builds the object from hash
274
+ # @param [Hash] attributes Model attributes in the form of hash
275
+ # @return [Object] Returns the model itself
276
+ def self.build_from_hash(attributes)
277
+ return nil unless attributes.is_a?(Hash)
278
+ attributes = attributes.transform_keys(&:to_sym)
279
+ transformed_hash = {}
280
+ openapi_types.each_pair do |key, type|
281
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
282
+ transformed_hash["#{key}"] = nil
283
+ elsif type =~ /\AArray<(.*)>/i
284
+ # check to ensure the input is an array given that the attribute
285
+ # is documented as an array but the input is not
286
+ if attributes[attribute_map[key]].is_a?(Array)
287
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
288
+ end
289
+ elsif !attributes[attribute_map[key]].nil?
290
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
291
+ end
292
+ end
293
+ new(transformed_hash)
294
+ end
295
+
296
+ # Returns the object in the form of hash
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_hash
299
+ hash = {}
300
+ self.class.attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ end
313
+
314
+ end