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,335 @@
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 ResultMappingOrderSelect < ApiModelBase
18
+ # 订单类型:SO/PO
19
+ attr_accessor :order_type
20
+
21
+ # 环境变量
22
+ attr_accessor :environment_type
23
+
24
+ # 客户租户ID
25
+ attr_accessor :customer_tenant_id
26
+
27
+ # 供应商租户ID
28
+ attr_accessor :supplier_tenant_id
29
+
30
+ # 客户ID
31
+ attr_accessor :customer
32
+
33
+ # 供应商ID
34
+ attr_accessor :supplier
35
+
36
+ # 客户外部系统流水号
37
+ attr_accessor :customer_ext_no
38
+
39
+ # 供应商外部系统流水号
40
+ attr_accessor :supplier_ext_no
41
+
42
+ attr_accessor :unique_no
43
+
44
+ # 订单号
45
+ attr_accessor :order_number
46
+
47
+ # 订购日期
48
+ attr_accessor :order_date
49
+
50
+ # 行项目序号
51
+ attr_accessor :line_number
52
+
53
+ # 成品ID
54
+ attr_accessor :product_id
55
+
56
+ # 成品编码
57
+ attr_accessor :product_code
58
+
59
+ # 成品名称
60
+ attr_accessor :product_name
61
+
62
+ # 计量单位
63
+ attr_accessor :unit
64
+
65
+ # 销售数量
66
+ attr_accessor :so_quantity
67
+
68
+ # 物料成分
69
+ attr_accessor :component
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'order_type' => :'orderType',
75
+ :'environment_type' => :'environmentType',
76
+ :'customer_tenant_id' => :'customerTenantId',
77
+ :'supplier_tenant_id' => :'supplierTenantId',
78
+ :'customer' => :'customer',
79
+ :'supplier' => :'supplier',
80
+ :'customer_ext_no' => :'customerExtNo',
81
+ :'supplier_ext_no' => :'supplierExtNo',
82
+ :'unique_no' => :'uniqueNo',
83
+ :'order_number' => :'orderNumber',
84
+ :'order_date' => :'orderDate',
85
+ :'line_number' => :'lineNumber',
86
+ :'product_id' => :'productId',
87
+ :'product_code' => :'productCode',
88
+ :'product_name' => :'productName',
89
+ :'unit' => :'unit',
90
+ :'so_quantity' => :'soQuantity',
91
+ :'component' => :'component'
92
+ }
93
+ end
94
+
95
+ # Returns attribute mapping this model knows about
96
+ def self.acceptable_attribute_map
97
+ attribute_map
98
+ end
99
+
100
+ # Returns all the JSON keys this model knows about
101
+ def self.acceptable_attributes
102
+ acceptable_attribute_map.values
103
+ end
104
+
105
+ # Attribute type mapping.
106
+ def self.openapi_types
107
+ {
108
+ :'order_type' => :'String',
109
+ :'environment_type' => :'Integer',
110
+ :'customer_tenant_id' => :'String',
111
+ :'supplier_tenant_id' => :'String',
112
+ :'customer' => :'String',
113
+ :'supplier' => :'String',
114
+ :'customer_ext_no' => :'String',
115
+ :'supplier_ext_no' => :'String',
116
+ :'unique_no' => :'String',
117
+ :'order_number' => :'String',
118
+ :'order_date' => :'Time',
119
+ :'line_number' => :'String',
120
+ :'product_id' => :'String',
121
+ :'product_code' => :'String',
122
+ :'product_name' => :'String',
123
+ :'unit' => :'String',
124
+ :'so_quantity' => :'Float',
125
+ :'component' => :'String'
126
+ }
127
+ end
128
+
129
+ # List of attributes with nullable: true
130
+ def self.openapi_nullable
131
+ Set.new([
132
+ :'order_type',
133
+ :'environment_type',
134
+ :'customer_tenant_id',
135
+ :'supplier_tenant_id',
136
+ :'customer',
137
+ :'supplier',
138
+ :'customer_ext_no',
139
+ :'supplier_ext_no',
140
+ :'unique_no',
141
+ :'order_number',
142
+ :'order_date',
143
+ :'line_number',
144
+ :'product_id',
145
+ :'product_code',
146
+ :'product_name',
147
+ :'unit',
148
+ :'so_quantity',
149
+ :'component'
150
+ ])
151
+ end
152
+
153
+ # Initializes the object
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ def initialize(attributes = {})
156
+ if (!attributes.is_a?(Hash))
157
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ResultMappingOrderSelect` initialize method"
158
+ end
159
+
160
+ # check to see if the attribute exists and convert string to symbol for hash key
161
+ acceptable_attribute_map = self.class.acceptable_attribute_map
162
+ attributes = attributes.each_with_object({}) { |(k, v), h|
163
+ if (!acceptable_attribute_map.key?(k.to_sym))
164
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ResultMappingOrderSelect`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
165
+ end
166
+ h[k.to_sym] = v
167
+ }
168
+
169
+ if attributes.key?(:'order_type')
170
+ self.order_type = attributes[:'order_type']
171
+ end
172
+
173
+ if attributes.key?(:'environment_type')
174
+ self.environment_type = attributes[:'environment_type']
175
+ end
176
+
177
+ if attributes.key?(:'customer_tenant_id')
178
+ self.customer_tenant_id = attributes[:'customer_tenant_id']
179
+ end
180
+
181
+ if attributes.key?(:'supplier_tenant_id')
182
+ self.supplier_tenant_id = attributes[:'supplier_tenant_id']
183
+ end
184
+
185
+ if attributes.key?(:'customer')
186
+ self.customer = attributes[:'customer']
187
+ end
188
+
189
+ if attributes.key?(:'supplier')
190
+ self.supplier = attributes[:'supplier']
191
+ end
192
+
193
+ if attributes.key?(:'customer_ext_no')
194
+ self.customer_ext_no = attributes[:'customer_ext_no']
195
+ end
196
+
197
+ if attributes.key?(:'supplier_ext_no')
198
+ self.supplier_ext_no = attributes[:'supplier_ext_no']
199
+ end
200
+
201
+ if attributes.key?(:'unique_no')
202
+ self.unique_no = attributes[:'unique_no']
203
+ end
204
+
205
+ if attributes.key?(:'order_number')
206
+ self.order_number = attributes[:'order_number']
207
+ end
208
+
209
+ if attributes.key?(:'order_date')
210
+ self.order_date = attributes[:'order_date']
211
+ end
212
+
213
+ if attributes.key?(:'line_number')
214
+ self.line_number = attributes[:'line_number']
215
+ end
216
+
217
+ if attributes.key?(:'product_id')
218
+ self.product_id = attributes[:'product_id']
219
+ end
220
+
221
+ if attributes.key?(:'product_code')
222
+ self.product_code = attributes[:'product_code']
223
+ end
224
+
225
+ if attributes.key?(:'product_name')
226
+ self.product_name = attributes[:'product_name']
227
+ end
228
+
229
+ if attributes.key?(:'unit')
230
+ self.unit = attributes[:'unit']
231
+ end
232
+
233
+ if attributes.key?(:'so_quantity')
234
+ self.so_quantity = attributes[:'so_quantity']
235
+ end
236
+
237
+ if attributes.key?(:'component')
238
+ self.component = attributes[:'component']
239
+ end
240
+ end
241
+
242
+ # Show invalid properties with the reasons. Usually used together with valid?
243
+ # @return Array for valid properties with the reasons
244
+ def list_invalid_properties
245
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
246
+ invalid_properties = Array.new
247
+ invalid_properties
248
+ end
249
+
250
+ # Check to see if the all the properties in the model are valid
251
+ # @return true if the model is valid
252
+ def valid?
253
+ warn '[DEPRECATED] the `valid?` method is obsolete'
254
+ true
255
+ end
256
+
257
+ # Checks equality by comparing each attribute.
258
+ # @param [Object] Object to be compared
259
+ def ==(o)
260
+ return true if self.equal?(o)
261
+ self.class == o.class &&
262
+ order_type == o.order_type &&
263
+ environment_type == o.environment_type &&
264
+ customer_tenant_id == o.customer_tenant_id &&
265
+ supplier_tenant_id == o.supplier_tenant_id &&
266
+ customer == o.customer &&
267
+ supplier == o.supplier &&
268
+ customer_ext_no == o.customer_ext_no &&
269
+ supplier_ext_no == o.supplier_ext_no &&
270
+ unique_no == o.unique_no &&
271
+ order_number == o.order_number &&
272
+ order_date == o.order_date &&
273
+ line_number == o.line_number &&
274
+ product_id == o.product_id &&
275
+ product_code == o.product_code &&
276
+ product_name == o.product_name &&
277
+ unit == o.unit &&
278
+ so_quantity == o.so_quantity &&
279
+ component == o.component
280
+ end
281
+
282
+ # @see the `==` method
283
+ # @param [Object] Object to be compared
284
+ def eql?(o)
285
+ self == o
286
+ end
287
+
288
+ # Calculates hash code according to all attributes.
289
+ # @return [Integer] Hash code
290
+ def hash
291
+ [order_type, environment_type, customer_tenant_id, supplier_tenant_id, customer, supplier, customer_ext_no, supplier_ext_no, unique_no, order_number, order_date, line_number, product_id, product_code, product_name, unit, so_quantity, component].hash
292
+ end
293
+
294
+ # Builds the object from hash
295
+ # @param [Hash] attributes Model attributes in the form of hash
296
+ # @return [Object] Returns the model itself
297
+ def self.build_from_hash(attributes)
298
+ return nil unless attributes.is_a?(Hash)
299
+ attributes = attributes.transform_keys(&:to_sym)
300
+ transformed_hash = {}
301
+ openapi_types.each_pair do |key, type|
302
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
303
+ transformed_hash["#{key}"] = nil
304
+ elsif type =~ /\AArray<(.*)>/i
305
+ # check to ensure the input is an array given that the attribute
306
+ # is documented as an array but the input is not
307
+ if attributes[attribute_map[key]].is_a?(Array)
308
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
309
+ end
310
+ elsif !attributes[attribute_map[key]].nil?
311
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
312
+ end
313
+ end
314
+ new(transformed_hash)
315
+ end
316
+
317
+ # Returns the object in the form of hash
318
+ # @return [Hash] Returns the object in the form of hash
319
+ def to_hash
320
+ hash = {}
321
+ self.class.attribute_map.each_pair do |attr, param|
322
+ value = self.send(attr)
323
+ if value.nil?
324
+ is_nullable = self.class.openapi_nullable.include?(attr)
325
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
326
+ end
327
+
328
+ hash[param] = _to_hash(value)
329
+ end
330
+ hash
331
+ end
332
+
333
+ end
334
+
335
+ end