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,676 @@
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 'cgi'
14
+
15
+ module TachainSdk
16
+ class ApiDeliveryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # 删除发货单。
23
+ #
24
+ # @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :id query 方式传入的单个 ID。
27
+ # @option opts [String] :number
28
+ # @option opts [ApiIntegrationDeleteRequest] :api_integration_delete_request
29
+ # @return [Model4]
30
+ def delete_v1_delivery_delete(x_credential_type, opts = {})
31
+ data, _status_code, _headers = delete_v1_delivery_delete_with_http_info(x_credential_type, opts)
32
+ data
33
+ end
34
+
35
+ # 删除发货单。
36
+ #
37
+ # @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :id query 方式传入的单个 ID。
40
+ # @option opts [String] :number
41
+ # @option opts [ApiIntegrationDeleteRequest] :api_integration_delete_request
42
+ # @return [Array<(Model4, Integer, Hash)>] Model4 data, response status code and response headers
43
+ def delete_v1_delivery_delete_with_http_info(x_credential_type, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.delete_v1_delivery_delete ...'
46
+ end
47
+ # verify the required parameter 'x_credential_type' is set
48
+ if @api_client.config.client_side_validation && x_credential_type.nil?
49
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.delete_v1_delivery_delete"
50
+ end
51
+ # verify enum value
52
+ allowable_values = ["Token", "API Key"]
53
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
54
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
55
+ end
56
+ # resource path
57
+ local_var_path = '/v1/delivery/Delete'
58
+
59
+ # query parameters
60
+ query_params = opts[:query_params] || {}
61
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
62
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
63
+
64
+ # header parameters
65
+ header_params = opts[:header_params] || {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
68
+ # HTTP header 'Content-Type'
69
+ content_type = @api_client.select_header_content_type(['application/json'])
70
+ if !content_type.nil?
71
+ header_params['Content-Type'] = content_type
72
+ end
73
+ header_params[:'X-Credential-Type'] = x_credential_type
74
+
75
+ # form parameters
76
+ form_params = opts[:form_params] || {}
77
+
78
+ # http body (model)
79
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'api_integration_delete_request'])
80
+
81
+ # return_type
82
+ return_type = opts[:debug_return_type] || 'Model4'
83
+
84
+ # auth_names
85
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
86
+
87
+ new_options = opts.merge(
88
+ :operation => :"ApiDeliveryApi.delete_v1_delivery_delete",
89
+ :header_params => header_params,
90
+ :query_params => query_params,
91
+ :form_params => form_params,
92
+ :body => post_body,
93
+ :auth_names => auth_names,
94
+ :return_type => return_type
95
+ )
96
+
97
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#delete_v1_delivery_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
+ end
101
+ return data, status_code, headers
102
+ end
103
+
104
+ # 查询发货单信息及明细信息。
105
+ # 发货单查询固定以当前集成公司作为供应商/发货方,避免第三方越权查询其他公司的发货数据。 返回数据中的 `DeliveryNoteDetailList` 为该发货单的明细集合。
106
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [Integer] :id
109
+ # @option opts [Integer] :is_transfer
110
+ # @option opts [String] :match_number
111
+ # @option opts [String] :from_country
112
+ # @option opts [String] :to_country
113
+ # @option opts [String] :search_text 关键词搜索:支持送货单号(Number)。使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
114
+ # @option opts [String] :number
115
+ # @option opts [String] :order_id
116
+ # @option opts [Time] :delivery_date_start
117
+ # @option opts [Time] :delivery_date_end
118
+ # @option opts [String] :order_line_id
119
+ # @option opts [String] :order_number
120
+ # @option opts [Time] :order_date
121
+ # @option opts [String] :line_number
122
+ # @option opts [String] :unique_no
123
+ # @option opts [Array<Integer>] :status
124
+ # @option opts [Array<String>] :customer_id
125
+ # @option opts [Array<String>] :customer_code
126
+ # @option opts [Integer] :business_status
127
+ # @option opts [String] :sort_by
128
+ # @option opts [Integer] :page (default to 1)
129
+ # @option opts [Integer] :page_size (default to 10)
130
+ # @return [PagedResponseDeliveryNoteApiDto]
131
+ def get_v1_delivery_list_paging(x_credential_type, opts = {})
132
+ data, _status_code, _headers = get_v1_delivery_list_paging_with_http_info(x_credential_type, opts)
133
+ data
134
+ end
135
+
136
+ # 查询发货单信息及明细信息。
137
+ # 发货单查询固定以当前集成公司作为供应商/发货方,避免第三方越权查询其他公司的发货数据。 返回数据中的 &#x60;DeliveryNoteDetailList&#x60; 为该发货单的明细集合。
138
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
139
+ # @param [Hash] opts the optional parameters
140
+ # @option opts [Integer] :id
141
+ # @option opts [Integer] :is_transfer
142
+ # @option opts [String] :match_number
143
+ # @option opts [String] :from_country
144
+ # @option opts [String] :to_country
145
+ # @option opts [String] :search_text 关键词搜索:支持送货单号(Number)。使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
146
+ # @option opts [String] :number
147
+ # @option opts [String] :order_id
148
+ # @option opts [Time] :delivery_date_start
149
+ # @option opts [Time] :delivery_date_end
150
+ # @option opts [String] :order_line_id
151
+ # @option opts [String] :order_number
152
+ # @option opts [Time] :order_date
153
+ # @option opts [String] :line_number
154
+ # @option opts [String] :unique_no
155
+ # @option opts [Array<Integer>] :status
156
+ # @option opts [Array<String>] :customer_id
157
+ # @option opts [Array<String>] :customer_code
158
+ # @option opts [Integer] :business_status
159
+ # @option opts [String] :sort_by
160
+ # @option opts [Integer] :page (default to 1)
161
+ # @option opts [Integer] :page_size (default to 10)
162
+ # @return [Array<(PagedResponseDeliveryNoteApiDto, Integer, Hash)>] PagedResponseDeliveryNoteApiDto data, response status code and response headers
163
+ def get_v1_delivery_list_paging_with_http_info(x_credential_type, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.get_v1_delivery_list_paging ...'
166
+ end
167
+ # verify the required parameter 'x_credential_type' is set
168
+ if @api_client.config.client_side_validation && x_credential_type.nil?
169
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.get_v1_delivery_list_paging"
170
+ end
171
+ # verify enum value
172
+ allowable_values = ["Token", "API Key"]
173
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
174
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
175
+ end
176
+ # resource path
177
+ local_var_path = '/v1/delivery/ListPaging'
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
182
+ query_params[:'isTransfer'] = opts[:'is_transfer'] if !opts[:'is_transfer'].nil?
183
+ query_params[:'matchNumber'] = opts[:'match_number'] if !opts[:'match_number'].nil?
184
+ query_params[:'fromCountry'] = opts[:'from_country'] if !opts[:'from_country'].nil?
185
+ query_params[:'toCountry'] = opts[:'to_country'] if !opts[:'to_country'].nil?
186
+ query_params[:'searchText'] = opts[:'search_text'] if !opts[:'search_text'].nil?
187
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
188
+ query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
189
+ query_params[:'deliveryDateStart'] = opts[:'delivery_date_start'] if !opts[:'delivery_date_start'].nil?
190
+ query_params[:'deliveryDateEnd'] = opts[:'delivery_date_end'] if !opts[:'delivery_date_end'].nil?
191
+ query_params[:'orderLineId'] = opts[:'order_line_id'] if !opts[:'order_line_id'].nil?
192
+ query_params[:'orderNumber'] = opts[:'order_number'] if !opts[:'order_number'].nil?
193
+ query_params[:'orderDate'] = opts[:'order_date'] if !opts[:'order_date'].nil?
194
+ query_params[:'lineNumber'] = opts[:'line_number'] if !opts[:'line_number'].nil?
195
+ query_params[:'uniqueNo'] = opts[:'unique_no'] if !opts[:'unique_no'].nil?
196
+ query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi) if !opts[:'status'].nil?
197
+ query_params[:'customerId'] = @api_client.build_collection_param(opts[:'customer_id'], :multi) if !opts[:'customer_id'].nil?
198
+ query_params[:'customerCode'] = @api_client.build_collection_param(opts[:'customer_code'], :multi) if !opts[:'customer_code'].nil?
199
+ query_params[:'businessStatus'] = opts[:'business_status'] if !opts[:'business_status'].nil?
200
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
201
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
202
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
203
+
204
+ # header parameters
205
+ header_params = opts[:header_params] || {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
208
+ header_params[:'X-Credential-Type'] = x_credential_type
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:debug_body]
215
+
216
+ # return_type
217
+ return_type = opts[:debug_return_type] || 'PagedResponseDeliveryNoteApiDto'
218
+
219
+ # auth_names
220
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
221
+
222
+ new_options = opts.merge(
223
+ :operation => :"ApiDeliveryApi.get_v1_delivery_list_paging",
224
+ :header_params => header_params,
225
+ :query_params => query_params,
226
+ :form_params => form_params,
227
+ :body => post_body,
228
+ :auth_names => auth_names,
229
+ :return_type => return_type
230
+ )
231
+
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#get_v1_delivery_list_paging\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+
239
+ # 查询收货单集合,核对收货信息。
240
+ # 收货单查询固定以当前集成公司作为客户/收货方,结果可直接用于确认收货或收货退回。
241
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
242
+ # @param [Hash] opts the optional parameters
243
+ # @option opts [Integer] :id
244
+ # @option opts [Integer] :is_transfer
245
+ # @option opts [String] :match_number
246
+ # @option opts [String] :from_country
247
+ # @option opts [String] :to_country
248
+ # @option opts [String] :search_text 关键词搜索:支持送货单号(Number)。使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
249
+ # @option opts [String] :number
250
+ # @option opts [String] :order_id
251
+ # @option opts [Time] :delivery_date_start
252
+ # @option opts [Time] :delivery_date_end
253
+ # @option opts [String] :order_line_id
254
+ # @option opts [String] :order_number
255
+ # @option opts [Time] :order_date
256
+ # @option opts [String] :line_number
257
+ # @option opts [String] :unique_no
258
+ # @option opts [Array<Integer>] :status
259
+ # @option opts [Array<String>] :supplier_id
260
+ # @option opts [Array<String>] :supplier_code
261
+ # @option opts [Integer] :business_status
262
+ # @option opts [String] :sort_by
263
+ # @option opts [Integer] :page (default to 1)
264
+ # @option opts [Integer] :page_size (default to 10)
265
+ # @return [PagedResponseDeliveryNoteApiDto]
266
+ def get_v1_delivery_receipt_list_paging(x_credential_type, opts = {})
267
+ data, _status_code, _headers = get_v1_delivery_receipt_list_paging_with_http_info(x_credential_type, opts)
268
+ data
269
+ end
270
+
271
+ # 查询收货单集合,核对收货信息。
272
+ # 收货单查询固定以当前集成公司作为客户/收货方,结果可直接用于确认收货或收货退回。
273
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [Integer] :id
276
+ # @option opts [Integer] :is_transfer
277
+ # @option opts [String] :match_number
278
+ # @option opts [String] :from_country
279
+ # @option opts [String] :to_country
280
+ # @option opts [String] :search_text 关键词搜索:支持送货单号(Number)。使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
281
+ # @option opts [String] :number
282
+ # @option opts [String] :order_id
283
+ # @option opts [Time] :delivery_date_start
284
+ # @option opts [Time] :delivery_date_end
285
+ # @option opts [String] :order_line_id
286
+ # @option opts [String] :order_number
287
+ # @option opts [Time] :order_date
288
+ # @option opts [String] :line_number
289
+ # @option opts [String] :unique_no
290
+ # @option opts [Array<Integer>] :status
291
+ # @option opts [Array<String>] :supplier_id
292
+ # @option opts [Array<String>] :supplier_code
293
+ # @option opts [Integer] :business_status
294
+ # @option opts [String] :sort_by
295
+ # @option opts [Integer] :page (default to 1)
296
+ # @option opts [Integer] :page_size (default to 10)
297
+ # @return [Array<(PagedResponseDeliveryNoteApiDto, Integer, Hash)>] PagedResponseDeliveryNoteApiDto data, response status code and response headers
298
+ def get_v1_delivery_receipt_list_paging_with_http_info(x_credential_type, opts = {})
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.get_v1_delivery_receipt_list_paging ...'
301
+ end
302
+ # verify the required parameter 'x_credential_type' is set
303
+ if @api_client.config.client_side_validation && x_credential_type.nil?
304
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.get_v1_delivery_receipt_list_paging"
305
+ end
306
+ # verify enum value
307
+ allowable_values = ["Token", "API Key"]
308
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
309
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
310
+ end
311
+ # resource path
312
+ local_var_path = '/v1/delivery/ReceiptListPaging'
313
+
314
+ # query parameters
315
+ query_params = opts[:query_params] || {}
316
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
317
+ query_params[:'isTransfer'] = opts[:'is_transfer'] if !opts[:'is_transfer'].nil?
318
+ query_params[:'matchNumber'] = opts[:'match_number'] if !opts[:'match_number'].nil?
319
+ query_params[:'fromCountry'] = opts[:'from_country'] if !opts[:'from_country'].nil?
320
+ query_params[:'toCountry'] = opts[:'to_country'] if !opts[:'to_country'].nil?
321
+ query_params[:'searchText'] = opts[:'search_text'] if !opts[:'search_text'].nil?
322
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
323
+ query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
324
+ query_params[:'deliveryDateStart'] = opts[:'delivery_date_start'] if !opts[:'delivery_date_start'].nil?
325
+ query_params[:'deliveryDateEnd'] = opts[:'delivery_date_end'] if !opts[:'delivery_date_end'].nil?
326
+ query_params[:'orderLineId'] = opts[:'order_line_id'] if !opts[:'order_line_id'].nil?
327
+ query_params[:'orderNumber'] = opts[:'order_number'] if !opts[:'order_number'].nil?
328
+ query_params[:'orderDate'] = opts[:'order_date'] if !opts[:'order_date'].nil?
329
+ query_params[:'lineNumber'] = opts[:'line_number'] if !opts[:'line_number'].nil?
330
+ query_params[:'uniqueNo'] = opts[:'unique_no'] if !opts[:'unique_no'].nil?
331
+ query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi) if !opts[:'status'].nil?
332
+ query_params[:'supplierId'] = @api_client.build_collection_param(opts[:'supplier_id'], :multi) if !opts[:'supplier_id'].nil?
333
+ query_params[:'supplierCode'] = @api_client.build_collection_param(opts[:'supplier_code'], :multi) if !opts[:'supplier_code'].nil?
334
+ query_params[:'businessStatus'] = opts[:'business_status'] if !opts[:'business_status'].nil?
335
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
336
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
337
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
338
+
339
+ # header parameters
340
+ header_params = opts[:header_params] || {}
341
+ # HTTP header 'Accept' (if needed)
342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
343
+ header_params[:'X-Credential-Type'] = x_credential_type
344
+
345
+ # form parameters
346
+ form_params = opts[:form_params] || {}
347
+
348
+ # http body (model)
349
+ post_body = opts[:debug_body]
350
+
351
+ # return_type
352
+ return_type = opts[:debug_return_type] || 'PagedResponseDeliveryNoteApiDto'
353
+
354
+ # auth_names
355
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
356
+
357
+ new_options = opts.merge(
358
+ :operation => :"ApiDeliveryApi.get_v1_delivery_receipt_list_paging",
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type
365
+ )
366
+
367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#get_v1_delivery_receipt_list_paging\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+
374
+ # 创建发货单。
375
+ # 本接口只创建普通发货单,`FreightType` 由接口内部固定为 `1`,当前集成公司会被写入供应商/发货方。 收货确认和退回请使用独立的收货接口,不通过创建发货单接口创建收货数据。 发货单明细必须至少有一条有效记录,且有效明细数量必须大于 0。
376
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [DeliveryNoteApiDto] :delivery_note_api_dto
379
+ # @return [ApiResponseDeliveryNoteApiDto]
380
+ def post_v1_delivery_create(x_credential_type, opts = {})
381
+ data, _status_code, _headers = post_v1_delivery_create_with_http_info(x_credential_type, opts)
382
+ data
383
+ end
384
+
385
+ # 创建发货单。
386
+ # 本接口只创建普通发货单,&#x60;FreightType&#x60; 由接口内部固定为 &#x60;1&#x60;,当前集成公司会被写入供应商/发货方。 收货确认和退回请使用独立的收货接口,不通过创建发货单接口创建收货数据。 发货单明细必须至少有一条有效记录,且有效明细数量必须大于 0。
387
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
388
+ # @param [Hash] opts the optional parameters
389
+ # @option opts [DeliveryNoteApiDto] :delivery_note_api_dto
390
+ # @return [Array<(ApiResponseDeliveryNoteApiDto, Integer, Hash)>] ApiResponseDeliveryNoteApiDto data, response status code and response headers
391
+ def post_v1_delivery_create_with_http_info(x_credential_type, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.post_v1_delivery_create ...'
394
+ end
395
+ # verify the required parameter 'x_credential_type' is set
396
+ if @api_client.config.client_side_validation && x_credential_type.nil?
397
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.post_v1_delivery_create"
398
+ end
399
+ # verify enum value
400
+ allowable_values = ["Token", "API Key"]
401
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
402
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
403
+ end
404
+ # resource path
405
+ local_var_path = '/v1/delivery/Create'
406
+
407
+ # query parameters
408
+ query_params = opts[:query_params] || {}
409
+
410
+ # header parameters
411
+ header_params = opts[:header_params] || {}
412
+ # HTTP header 'Accept' (if needed)
413
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
414
+ # HTTP header 'Content-Type'
415
+ content_type = @api_client.select_header_content_type(['application/json'])
416
+ if !content_type.nil?
417
+ header_params['Content-Type'] = content_type
418
+ end
419
+ header_params[:'X-Credential-Type'] = x_credential_type
420
+
421
+ # form parameters
422
+ form_params = opts[:form_params] || {}
423
+
424
+ # http body (model)
425
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delivery_note_api_dto'])
426
+
427
+ # return_type
428
+ return_type = opts[:debug_return_type] || 'ApiResponseDeliveryNoteApiDto'
429
+
430
+ # auth_names
431
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
432
+
433
+ new_options = opts.merge(
434
+ :operation => :"ApiDeliveryApi.post_v1_delivery_create",
435
+ :header_params => header_params,
436
+ :query_params => query_params,
437
+ :form_params => form_params,
438
+ :body => post_body,
439
+ :auth_names => auth_names,
440
+ :return_type => return_type
441
+ )
442
+
443
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
444
+ if @api_client.config.debugging
445
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#post_v1_delivery_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
446
+ end
447
+ return data, status_code, headers
448
+ end
449
+
450
+ # 确认收货。
451
+ # 确认成功后会更新对应采购订单的实时状态,并重算发货阶段申报完成度。
452
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
453
+ # @param [Hash] opts the optional parameters
454
+ # @option opts [String] :id 需要确认收货的发货/收货流转单 ID。
455
+ # @option opts [String] :number
456
+ # @return [ApiResponseDeliveryNoteApiDto]
457
+ def put_v1_delivery_confirm_receipt(x_credential_type, opts = {})
458
+ data, _status_code, _headers = put_v1_delivery_confirm_receipt_with_http_info(x_credential_type, opts)
459
+ data
460
+ end
461
+
462
+ # 确认收货。
463
+ # 确认成功后会更新对应采购订单的实时状态,并重算发货阶段申报完成度。
464
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
465
+ # @param [Hash] opts the optional parameters
466
+ # @option opts [String] :id 需要确认收货的发货/收货流转单 ID。
467
+ # @option opts [String] :number
468
+ # @return [Array<(ApiResponseDeliveryNoteApiDto, Integer, Hash)>] ApiResponseDeliveryNoteApiDto data, response status code and response headers
469
+ def put_v1_delivery_confirm_receipt_with_http_info(x_credential_type, opts = {})
470
+ if @api_client.config.debugging
471
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.put_v1_delivery_confirm_receipt ...'
472
+ end
473
+ # verify the required parameter 'x_credential_type' is set
474
+ if @api_client.config.client_side_validation && x_credential_type.nil?
475
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.put_v1_delivery_confirm_receipt"
476
+ end
477
+ # verify enum value
478
+ allowable_values = ["Token", "API Key"]
479
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
480
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
481
+ end
482
+ # resource path
483
+ local_var_path = '/v1/delivery/ConfirmReceipt'
484
+
485
+ # query parameters
486
+ query_params = opts[:query_params] || {}
487
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
488
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
489
+
490
+ # header parameters
491
+ header_params = opts[:header_params] || {}
492
+ # HTTP header 'Accept' (if needed)
493
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
494
+ header_params[:'X-Credential-Type'] = x_credential_type
495
+
496
+ # form parameters
497
+ form_params = opts[:form_params] || {}
498
+
499
+ # http body (model)
500
+ post_body = opts[:debug_body]
501
+
502
+ # return_type
503
+ return_type = opts[:debug_return_type] || 'ApiResponseDeliveryNoteApiDto'
504
+
505
+ # auth_names
506
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
507
+
508
+ new_options = opts.merge(
509
+ :operation => :"ApiDeliveryApi.put_v1_delivery_confirm_receipt",
510
+ :header_params => header_params,
511
+ :query_params => query_params,
512
+ :form_params => form_params,
513
+ :body => post_body,
514
+ :auth_names => auth_names,
515
+ :return_type => return_type
516
+ )
517
+
518
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
519
+ if @api_client.config.debugging
520
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#put_v1_delivery_confirm_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
521
+ end
522
+ return data, status_code, headers
523
+ end
524
+
525
+ # 收货退回。
526
+ # 退回成功后会更新对应采购订单的实时状态,并重算发货阶段申报完成度。
527
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
528
+ # @param [Hash] opts the optional parameters
529
+ # @option opts [String] :id 需要退回的发货/收货流转单 ID。
530
+ # @option opts [String] :number
531
+ # @return [ApiResponseString]
532
+ def put_v1_delivery_return_receipt(x_credential_type, opts = {})
533
+ data, _status_code, _headers = put_v1_delivery_return_receipt_with_http_info(x_credential_type, opts)
534
+ data
535
+ end
536
+
537
+ # 收货退回。
538
+ # 退回成功后会更新对应采购订单的实时状态,并重算发货阶段申报完成度。
539
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
540
+ # @param [Hash] opts the optional parameters
541
+ # @option opts [String] :id 需要退回的发货/收货流转单 ID。
542
+ # @option opts [String] :number
543
+ # @return [Array<(ApiResponseString, Integer, Hash)>] ApiResponseString data, response status code and response headers
544
+ def put_v1_delivery_return_receipt_with_http_info(x_credential_type, opts = {})
545
+ if @api_client.config.debugging
546
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.put_v1_delivery_return_receipt ...'
547
+ end
548
+ # verify the required parameter 'x_credential_type' is set
549
+ if @api_client.config.client_side_validation && x_credential_type.nil?
550
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.put_v1_delivery_return_receipt"
551
+ end
552
+ # verify enum value
553
+ allowable_values = ["Token", "API Key"]
554
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
555
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
556
+ end
557
+ # resource path
558
+ local_var_path = '/v1/delivery/ReturnReceipt'
559
+
560
+ # query parameters
561
+ query_params = opts[:query_params] || {}
562
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
563
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
564
+
565
+ # header parameters
566
+ header_params = opts[:header_params] || {}
567
+ # HTTP header 'Accept' (if needed)
568
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
569
+ header_params[:'X-Credential-Type'] = x_credential_type
570
+
571
+ # form parameters
572
+ form_params = opts[:form_params] || {}
573
+
574
+ # http body (model)
575
+ post_body = opts[:debug_body]
576
+
577
+ # return_type
578
+ return_type = opts[:debug_return_type] || 'ApiResponseString'
579
+
580
+ # auth_names
581
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
582
+
583
+ new_options = opts.merge(
584
+ :operation => :"ApiDeliveryApi.put_v1_delivery_return_receipt",
585
+ :header_params => header_params,
586
+ :query_params => query_params,
587
+ :form_params => form_params,
588
+ :body => post_body,
589
+ :auth_names => auth_names,
590
+ :return_type => return_type
591
+ )
592
+
593
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
594
+ if @api_client.config.debugging
595
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#put_v1_delivery_return_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
596
+ end
597
+ return data, status_code, headers
598
+ end
599
+
600
+ # 修改发货单。
601
+ # 新增明细不需要传 `UniqueCode`,接口会按系统规则生成; 已有明细保留原 `UniqueCode`,传入 `Status = -1` 可删除明细。
602
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
603
+ # @param [Hash] opts the optional parameters
604
+ # @option opts [DeliveryNoteApiDto] :delivery_note_api_dto
605
+ # @return [ApiResponseDeliveryNoteApiDto]
606
+ def put_v1_delivery_update(x_credential_type, opts = {})
607
+ data, _status_code, _headers = put_v1_delivery_update_with_http_info(x_credential_type, opts)
608
+ data
609
+ end
610
+
611
+ # 修改发货单。
612
+ # 新增明细不需要传 &#x60;UniqueCode&#x60;,接口会按系统规则生成; 已有明细保留原 &#x60;UniqueCode&#x60;,传入 &#x60;Status &#x3D; -1&#x60; 可删除明细。
613
+ # @param x_credential_type [String] Use &#39;Token&#39; with bearer authorization, or &#39;API Key&#39; with signed API key headers. This header is mandatory in the deployed API.
614
+ # @param [Hash] opts the optional parameters
615
+ # @option opts [DeliveryNoteApiDto] :delivery_note_api_dto
616
+ # @return [Array<(ApiResponseDeliveryNoteApiDto, Integer, Hash)>] ApiResponseDeliveryNoteApiDto data, response status code and response headers
617
+ def put_v1_delivery_update_with_http_info(x_credential_type, opts = {})
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug 'Calling API: ApiDeliveryApi.put_v1_delivery_update ...'
620
+ end
621
+ # verify the required parameter 'x_credential_type' is set
622
+ if @api_client.config.client_side_validation && x_credential_type.nil?
623
+ fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiDeliveryApi.put_v1_delivery_update"
624
+ end
625
+ # verify enum value
626
+ allowable_values = ["Token", "API Key"]
627
+ if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
628
+ fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
629
+ end
630
+ # resource path
631
+ local_var_path = '/v1/delivery/Update'
632
+
633
+ # query parameters
634
+ query_params = opts[:query_params] || {}
635
+
636
+ # header parameters
637
+ header_params = opts[:header_params] || {}
638
+ # HTTP header 'Accept' (if needed)
639
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
640
+ # HTTP header 'Content-Type'
641
+ content_type = @api_client.select_header_content_type(['application/json'])
642
+ if !content_type.nil?
643
+ header_params['Content-Type'] = content_type
644
+ end
645
+ header_params[:'X-Credential-Type'] = x_credential_type
646
+
647
+ # form parameters
648
+ form_params = opts[:form_params] || {}
649
+
650
+ # http body (model)
651
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delivery_note_api_dto'])
652
+
653
+ # return_type
654
+ return_type = opts[:debug_return_type] || 'ApiResponseDeliveryNoteApiDto'
655
+
656
+ # auth_names
657
+ auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
658
+
659
+ new_options = opts.merge(
660
+ :operation => :"ApiDeliveryApi.put_v1_delivery_update",
661
+ :header_params => header_params,
662
+ :query_params => query_params,
663
+ :form_params => form_params,
664
+ :body => post_body,
665
+ :auth_names => auth_names,
666
+ :return_type => return_type
667
+ )
668
+
669
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug "API called: ApiDeliveryApi#put_v1_delivery_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ end
673
+ return data, status_code, headers
674
+ end
675
+ end
676
+ end