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,456 @@
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
+ class TemplateDtoBusinessRiskWarnInfoDto < ApiModelBase
18
+ # 风险主记录ID,用于区分同一业务明细上风险类型相同但风险实体不同的合法预警。
19
+ attr_accessor :risk_id
20
+
21
+ # 风险等级(1-低 2-中 3-高 4-极高)
22
+ attr_accessor :risk_level
23
+
24
+ # 风险等级多语言名称(如:高风险)
25
+ attr_accessor :risk_level_name
26
+
27
+ # 风险类型多语言名称(如:风险公司匹配/品牌黑名单供应商)
28
+ attr_accessor :risk_type_name
29
+
30
+ attr_accessor :risk_reasonkey
31
+
32
+ # 预警原因(多语言,含动态占位符替换,如:XX公司匹配到风险公司名单,风险等级极高)
33
+ attr_accessor :risk_reason
34
+
35
+ # 预警来源业务表(如:order_line/company/supplier)- 标识来源模块
36
+ attr_accessor :source_table
37
+
38
+ # 预警来源业务主ID(如:订单ID/公司ID/供应商ID)
39
+ attr_accessor :source_id
40
+
41
+ # 预警来源业务编码(如:订单号/公司名称/供应商编码)
42
+ attr_accessor :source_code
43
+
44
+ # 预警来源明细ID(如:订单明细ID,无则空)- 去重核心字段1
45
+ attr_accessor :source_line_id
46
+
47
+ # 风险类型唯一标识(如:company_risk/brand_blacklist)
48
+ attr_accessor :risk_type_key
49
+
50
+ # 风险描述多语言KEY(如:risk.desc.supplier.blacklist.brand.order.used)
51
+ attr_accessor :risk_placeholder_json
52
+
53
+ attr_accessor :order_source
54
+
55
+ attr_accessor :supplier_source
56
+
57
+ attr_accessor :company_source
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'risk_id' => :'riskId',
63
+ :'risk_level' => :'riskLevel',
64
+ :'risk_level_name' => :'riskLevelName',
65
+ :'risk_type_name' => :'riskTypeName',
66
+ :'risk_reasonkey' => :'riskReasonkey',
67
+ :'risk_reason' => :'riskReason',
68
+ :'source_table' => :'sourceTable',
69
+ :'source_id' => :'sourceId',
70
+ :'source_code' => :'sourceCode',
71
+ :'source_line_id' => :'sourceLineId',
72
+ :'risk_type_key' => :'riskTypeKey',
73
+ :'risk_placeholder_json' => :'riskPlaceholderJson',
74
+ :'order_source' => :'orderSource',
75
+ :'supplier_source' => :'supplierSource',
76
+ :'company_source' => :'companySource'
77
+ }
78
+ end
79
+
80
+ # Returns attribute mapping this model knows about
81
+ def self.acceptable_attribute_map
82
+ attribute_map
83
+ end
84
+
85
+ # Returns all the JSON keys this model knows about
86
+ def self.acceptable_attributes
87
+ acceptable_attribute_map.values
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.openapi_types
92
+ {
93
+ :'risk_id' => :'String',
94
+ :'risk_level' => :'Integer',
95
+ :'risk_level_name' => :'String',
96
+ :'risk_type_name' => :'String',
97
+ :'risk_reasonkey' => :'String',
98
+ :'risk_reason' => :'String',
99
+ :'source_table' => :'String',
100
+ :'source_id' => :'String',
101
+ :'source_code' => :'String',
102
+ :'source_line_id' => :'String',
103
+ :'risk_type_key' => :'String',
104
+ :'risk_placeholder_json' => :'String',
105
+ :'order_source' => :'Order',
106
+ :'supplier_source' => :'Supplier',
107
+ :'company_source' => :'Company'
108
+ }
109
+ end
110
+
111
+ # List of attributes with nullable: true
112
+ def self.openapi_nullable
113
+ Set.new([
114
+ :'source_line_id',
115
+ :'risk_placeholder_json',
116
+ ])
117
+ end
118
+
119
+ # Initializes the object
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ def initialize(attributes = {})
122
+ if (!attributes.is_a?(Hash))
123
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::TemplateDtoBusinessRiskWarnInfoDto` initialize method"
124
+ end
125
+
126
+ # check to see if the attribute exists and convert string to symbol for hash key
127
+ acceptable_attribute_map = self.class.acceptable_attribute_map
128
+ attributes = attributes.each_with_object({}) { |(k, v), h|
129
+ if (!acceptable_attribute_map.key?(k.to_sym))
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::TemplateDtoBusinessRiskWarnInfoDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
131
+ end
132
+ h[k.to_sym] = v
133
+ }
134
+
135
+ if attributes.key?(:'risk_id')
136
+ self.risk_id = attributes[:'risk_id']
137
+ else
138
+ self.risk_id = nil
139
+ end
140
+
141
+ if attributes.key?(:'risk_level')
142
+ self.risk_level = attributes[:'risk_level']
143
+ else
144
+ self.risk_level = nil
145
+ end
146
+
147
+ if attributes.key?(:'risk_level_name')
148
+ self.risk_level_name = attributes[:'risk_level_name']
149
+ else
150
+ self.risk_level_name = nil
151
+ end
152
+
153
+ if attributes.key?(:'risk_type_name')
154
+ self.risk_type_name = attributes[:'risk_type_name']
155
+ else
156
+ self.risk_type_name = nil
157
+ end
158
+
159
+ if attributes.key?(:'risk_reasonkey')
160
+ self.risk_reasonkey = attributes[:'risk_reasonkey']
161
+ else
162
+ self.risk_reasonkey = nil
163
+ end
164
+
165
+ if attributes.key?(:'risk_reason')
166
+ self.risk_reason = attributes[:'risk_reason']
167
+ else
168
+ self.risk_reason = nil
169
+ end
170
+
171
+ if attributes.key?(:'source_table')
172
+ self.source_table = attributes[:'source_table']
173
+ else
174
+ self.source_table = nil
175
+ end
176
+
177
+ if attributes.key?(:'source_id')
178
+ self.source_id = attributes[:'source_id']
179
+ else
180
+ self.source_id = nil
181
+ end
182
+
183
+ if attributes.key?(:'source_code')
184
+ self.source_code = attributes[:'source_code']
185
+ else
186
+ self.source_code = nil
187
+ end
188
+
189
+ if attributes.key?(:'source_line_id')
190
+ self.source_line_id = attributes[:'source_line_id']
191
+ end
192
+
193
+ if attributes.key?(:'risk_type_key')
194
+ self.risk_type_key = attributes[:'risk_type_key']
195
+ else
196
+ self.risk_type_key = nil
197
+ end
198
+
199
+ if attributes.key?(:'risk_placeholder_json')
200
+ self.risk_placeholder_json = attributes[:'risk_placeholder_json']
201
+ end
202
+
203
+ if attributes.key?(:'order_source')
204
+ self.order_source = attributes[:'order_source']
205
+ end
206
+
207
+ if attributes.key?(:'supplier_source')
208
+ self.supplier_source = attributes[:'supplier_source']
209
+ end
210
+
211
+ if attributes.key?(:'company_source')
212
+ self.company_source = attributes[:'company_source']
213
+ end
214
+ end
215
+
216
+ # Show invalid properties with the reasons. Usually used together with valid?
217
+ # @return Array for valid properties with the reasons
218
+ def list_invalid_properties
219
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
220
+ invalid_properties = Array.new
221
+ if @risk_id.nil?
222
+ invalid_properties.push('invalid value for "risk_id", risk_id cannot be nil.')
223
+ end
224
+
225
+ if @risk_level.nil?
226
+ invalid_properties.push('invalid value for "risk_level", risk_level cannot be nil.')
227
+ end
228
+
229
+ if @risk_level_name.nil?
230
+ invalid_properties.push('invalid value for "risk_level_name", risk_level_name cannot be nil.')
231
+ end
232
+
233
+ if @risk_type_name.nil?
234
+ invalid_properties.push('invalid value for "risk_type_name", risk_type_name cannot be nil.')
235
+ end
236
+
237
+ if @risk_reasonkey.nil?
238
+ invalid_properties.push('invalid value for "risk_reasonkey", risk_reasonkey cannot be nil.')
239
+ end
240
+
241
+ if @risk_reason.nil?
242
+ invalid_properties.push('invalid value for "risk_reason", risk_reason cannot be nil.')
243
+ end
244
+
245
+ if @source_table.nil?
246
+ invalid_properties.push('invalid value for "source_table", source_table cannot be nil.')
247
+ end
248
+
249
+ if @source_id.nil?
250
+ invalid_properties.push('invalid value for "source_id", source_id cannot be nil.')
251
+ end
252
+
253
+ if @source_code.nil?
254
+ invalid_properties.push('invalid value for "source_code", source_code cannot be nil.')
255
+ end
256
+
257
+ if @risk_type_key.nil?
258
+ invalid_properties.push('invalid value for "risk_type_key", risk_type_key cannot be nil.')
259
+ end
260
+
261
+ invalid_properties
262
+ end
263
+
264
+ # Check to see if the all the properties in the model are valid
265
+ # @return true if the model is valid
266
+ def valid?
267
+ warn '[DEPRECATED] the `valid?` method is obsolete'
268
+ return false if @risk_id.nil?
269
+ return false if @risk_level.nil?
270
+ return false if @risk_level_name.nil?
271
+ return false if @risk_type_name.nil?
272
+ return false if @risk_reasonkey.nil?
273
+ return false if @risk_reason.nil?
274
+ return false if @source_table.nil?
275
+ return false if @source_id.nil?
276
+ return false if @source_code.nil?
277
+ return false if @risk_type_key.nil?
278
+ true
279
+ end
280
+
281
+ # Custom attribute writer method with validation
282
+ # @param [Object] risk_id Value to be assigned
283
+ def risk_id=(risk_id)
284
+ if risk_id.nil?
285
+ fail ArgumentError, 'risk_id cannot be nil'
286
+ end
287
+
288
+ @risk_id = risk_id
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] risk_level Value to be assigned
293
+ def risk_level=(risk_level)
294
+ if risk_level.nil?
295
+ fail ArgumentError, 'risk_level cannot be nil'
296
+ end
297
+
298
+ @risk_level = risk_level
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] risk_level_name Value to be assigned
303
+ def risk_level_name=(risk_level_name)
304
+ if risk_level_name.nil?
305
+ fail ArgumentError, 'risk_level_name cannot be nil'
306
+ end
307
+
308
+ @risk_level_name = risk_level_name
309
+ end
310
+
311
+ # Custom attribute writer method with validation
312
+ # @param [Object] risk_type_name Value to be assigned
313
+ def risk_type_name=(risk_type_name)
314
+ if risk_type_name.nil?
315
+ fail ArgumentError, 'risk_type_name cannot be nil'
316
+ end
317
+
318
+ @risk_type_name = risk_type_name
319
+ end
320
+
321
+ # Custom attribute writer method with validation
322
+ # @param [Object] risk_reasonkey Value to be assigned
323
+ def risk_reasonkey=(risk_reasonkey)
324
+ if risk_reasonkey.nil?
325
+ fail ArgumentError, 'risk_reasonkey cannot be nil'
326
+ end
327
+
328
+ @risk_reasonkey = risk_reasonkey
329
+ end
330
+
331
+ # Custom attribute writer method with validation
332
+ # @param [Object] risk_reason Value to be assigned
333
+ def risk_reason=(risk_reason)
334
+ if risk_reason.nil?
335
+ fail ArgumentError, 'risk_reason cannot be nil'
336
+ end
337
+
338
+ @risk_reason = risk_reason
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] source_table Value to be assigned
343
+ def source_table=(source_table)
344
+ if source_table.nil?
345
+ fail ArgumentError, 'source_table cannot be nil'
346
+ end
347
+
348
+ @source_table = source_table
349
+ end
350
+
351
+ # Custom attribute writer method with validation
352
+ # @param [Object] source_id Value to be assigned
353
+ def source_id=(source_id)
354
+ if source_id.nil?
355
+ fail ArgumentError, 'source_id cannot be nil'
356
+ end
357
+
358
+ @source_id = source_id
359
+ end
360
+
361
+ # Custom attribute writer method with validation
362
+ # @param [Object] source_code Value to be assigned
363
+ def source_code=(source_code)
364
+ if source_code.nil?
365
+ fail ArgumentError, 'source_code cannot be nil'
366
+ end
367
+
368
+ @source_code = source_code
369
+ end
370
+
371
+ # Custom attribute writer method with validation
372
+ # @param [Object] risk_type_key Value to be assigned
373
+ def risk_type_key=(risk_type_key)
374
+ if risk_type_key.nil?
375
+ fail ArgumentError, 'risk_type_key cannot be nil'
376
+ end
377
+
378
+ @risk_type_key = risk_type_key
379
+ end
380
+
381
+ # Checks equality by comparing each attribute.
382
+ # @param [Object] Object to be compared
383
+ def ==(o)
384
+ return true if self.equal?(o)
385
+ self.class == o.class &&
386
+ risk_id == o.risk_id &&
387
+ risk_level == o.risk_level &&
388
+ risk_level_name == o.risk_level_name &&
389
+ risk_type_name == o.risk_type_name &&
390
+ risk_reasonkey == o.risk_reasonkey &&
391
+ risk_reason == o.risk_reason &&
392
+ source_table == o.source_table &&
393
+ source_id == o.source_id &&
394
+ source_code == o.source_code &&
395
+ source_line_id == o.source_line_id &&
396
+ risk_type_key == o.risk_type_key &&
397
+ risk_placeholder_json == o.risk_placeholder_json &&
398
+ order_source == o.order_source &&
399
+ supplier_source == o.supplier_source &&
400
+ company_source == o.company_source
401
+ end
402
+
403
+ # @see the `==` method
404
+ # @param [Object] Object to be compared
405
+ def eql?(o)
406
+ self == o
407
+ end
408
+
409
+ # Calculates hash code according to all attributes.
410
+ # @return [Integer] Hash code
411
+ def hash
412
+ [risk_id, risk_level, risk_level_name, risk_type_name, risk_reasonkey, risk_reason, source_table, source_id, source_code, source_line_id, risk_type_key, risk_placeholder_json, order_source, supplier_source, company_source].hash
413
+ end
414
+
415
+ # Builds the object from hash
416
+ # @param [Hash] attributes Model attributes in the form of hash
417
+ # @return [Object] Returns the model itself
418
+ def self.build_from_hash(attributes)
419
+ return nil unless attributes.is_a?(Hash)
420
+ attributes = attributes.transform_keys(&:to_sym)
421
+ transformed_hash = {}
422
+ openapi_types.each_pair do |key, type|
423
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
424
+ transformed_hash["#{key}"] = nil
425
+ elsif type =~ /\AArray<(.*)>/i
426
+ # check to ensure the input is an array given that the attribute
427
+ # is documented as an array but the input is not
428
+ if attributes[attribute_map[key]].is_a?(Array)
429
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
430
+ end
431
+ elsif !attributes[attribute_map[key]].nil?
432
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
433
+ end
434
+ end
435
+ new(transformed_hash)
436
+ end
437
+
438
+ # Returns the object in the form of hash
439
+ # @return [Hash] Returns the object in the form of hash
440
+ def to_hash
441
+ hash = {}
442
+ self.class.attribute_map.each_pair do |attr, param|
443
+ value = self.send(attr)
444
+ if value.nil?
445
+ is_nullable = self.class.openapi_nullable.include?(attr)
446
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
447
+ end
448
+
449
+ hash[param] = _to_hash(value)
450
+ end
451
+ hash
452
+ end
453
+
454
+ end
455
+
456
+ end
@@ -0,0 +1,227 @@
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 TemplateDtoMultiSoLineCompleteStatus < ApiModelBase
19
+ # 所属订单ID(对应订单主表ID)
20
+ attr_accessor :order_id
21
+
22
+ # 订单明细ID(传入的订单明细ID)
23
+ attr_accessor :order_line_id
24
+
25
+ # 映射完成销售订单行
26
+ attr_accessor :order_mapping_complete
27
+
28
+ # 映射未完成销售订单行
29
+ attr_accessor :order_mapping_un_complete
30
+
31
+ # 生产完成销售订单行
32
+ attr_accessor :production_complete
33
+
34
+ # 生产未完成销售订单行
35
+ attr_accessor :production_un_complete
36
+
37
+ # 发货完成销售订单行
38
+ attr_accessor :delivery_complete
39
+
40
+ # 发货未完成销售订单行
41
+ attr_accessor :delivery_un_complete
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'order_id' => :'orderId',
47
+ :'order_line_id' => :'orderLineId',
48
+ :'order_mapping_complete' => :'orderMappingComplete',
49
+ :'order_mapping_un_complete' => :'orderMappingUnComplete',
50
+ :'production_complete' => :'productionComplete',
51
+ :'production_un_complete' => :'productionUnComplete',
52
+ :'delivery_complete' => :'deliveryComplete',
53
+ :'delivery_un_complete' => :'deliveryUnComplete'
54
+ }
55
+ end
56
+
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
62
+ # Returns all the JSON keys this model knows about
63
+ def self.acceptable_attributes
64
+ acceptable_attribute_map.values
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'order_id' => :'String',
71
+ :'order_line_id' => :'String',
72
+ :'order_mapping_complete' => :'Integer',
73
+ :'order_mapping_un_complete' => :'Integer',
74
+ :'production_complete' => :'Integer',
75
+ :'production_un_complete' => :'Integer',
76
+ :'delivery_complete' => :'Integer',
77
+ :'delivery_un_complete' => :'Integer'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ :'order_id',
85
+ :'order_line_id',
86
+ :'order_mapping_complete',
87
+ :'order_mapping_un_complete',
88
+ :'production_complete',
89
+ :'production_un_complete',
90
+ :'delivery_complete',
91
+ :'delivery_un_complete'
92
+ ])
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::TemplateDtoMultiSoLineCompleteStatus` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ acceptable_attribute_map = self.class.acceptable_attribute_map
104
+ attributes = attributes.each_with_object({}) { |(k, v), h|
105
+ if (!acceptable_attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::TemplateDtoMultiSoLineCompleteStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
107
+ end
108
+ h[k.to_sym] = v
109
+ }
110
+
111
+ if attributes.key?(:'order_id')
112
+ self.order_id = attributes[:'order_id']
113
+ end
114
+
115
+ if attributes.key?(:'order_line_id')
116
+ self.order_line_id = attributes[:'order_line_id']
117
+ end
118
+
119
+ if attributes.key?(:'order_mapping_complete')
120
+ self.order_mapping_complete = attributes[:'order_mapping_complete']
121
+ end
122
+
123
+ if attributes.key?(:'order_mapping_un_complete')
124
+ self.order_mapping_un_complete = attributes[:'order_mapping_un_complete']
125
+ end
126
+
127
+ if attributes.key?(:'production_complete')
128
+ self.production_complete = attributes[:'production_complete']
129
+ end
130
+
131
+ if attributes.key?(:'production_un_complete')
132
+ self.production_un_complete = attributes[:'production_un_complete']
133
+ end
134
+
135
+ if attributes.key?(:'delivery_complete')
136
+ self.delivery_complete = attributes[:'delivery_complete']
137
+ end
138
+
139
+ if attributes.key?(:'delivery_un_complete')
140
+ self.delivery_un_complete = attributes[:'delivery_un_complete']
141
+ end
142
+ end
143
+
144
+ # Show invalid properties with the reasons. Usually used together with valid?
145
+ # @return Array for valid properties with the reasons
146
+ def list_invalid_properties
147
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ true
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(o)
162
+ return true if self.equal?(o)
163
+ self.class == o.class &&
164
+ order_id == o.order_id &&
165
+ order_line_id == o.order_line_id &&
166
+ order_mapping_complete == o.order_mapping_complete &&
167
+ order_mapping_un_complete == o.order_mapping_un_complete &&
168
+ production_complete == o.production_complete &&
169
+ production_un_complete == o.production_un_complete &&
170
+ delivery_complete == o.delivery_complete &&
171
+ delivery_un_complete == o.delivery_un_complete
172
+ end
173
+
174
+ # @see the `==` method
175
+ # @param [Object] Object to be compared
176
+ def eql?(o)
177
+ self == o
178
+ end
179
+
180
+ # Calculates hash code according to all attributes.
181
+ # @return [Integer] Hash code
182
+ def hash
183
+ [order_id, order_line_id, order_mapping_complete, order_mapping_un_complete, production_complete, production_un_complete, delivery_complete, delivery_un_complete].hash
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def self.build_from_hash(attributes)
190
+ return nil unless attributes.is_a?(Hash)
191
+ attributes = attributes.transform_keys(&:to_sym)
192
+ transformed_hash = {}
193
+ openapi_types.each_pair do |key, type|
194
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = nil
196
+ elsif type =~ /\AArray<(.*)>/i
197
+ # check to ensure the input is an array given that the attribute
198
+ # is documented as an array but the input is not
199
+ if attributes[attribute_map[key]].is_a?(Array)
200
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
+ end
202
+ elsif !attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
204
+ end
205
+ end
206
+ new(transformed_hash)
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ end
226
+
227
+ end