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.
- checksums.yaml +4 -4
- data/README.md +148 -60
- data/lib/tachain-sdk/api/api_declaration_api.rb +155 -84
- data/lib/tachain-sdk/api/api_declaration_upload_api.rb +103 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +218 -138
- data/lib/tachain-sdk/api/api_enum_api.rb +2 -2
- data/lib/tachain-sdk/api/api_material_api.rb +414 -0
- data/lib/tachain-sdk/api/api_order_api.rb +185 -167
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +227 -24
- data/lib/tachain-sdk/api/api_process_route_api.rb +414 -0
- data/lib/tachain-sdk/api/api_product_api.rb +414 -0
- data/lib/tachain-sdk/api/api_production_api.rb +141 -136
- data/lib/tachain-sdk/api/api_reference_api.rb +192 -0
- data/lib/tachain-sdk/models/{product_bom_grouping_dto.rb → api_bom_line_request.rb} +82 -107
- data/lib/tachain-sdk/models/api_bom_line_response.rb +205 -0
- data/lib/tachain-sdk/models/api_catalog_delete_request.rb +191 -0
- data/lib/tachain-sdk/models/{stage_attachment_api_dto.rb → api_declaration_attachment_response.rb} +16 -108
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +127 -17
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +5 -27
- data/lib/tachain-sdk/models/api_declaration_file_request.rb +172 -0
- data/lib/tachain-sdk/models/api_declaration_form_request.rb +177 -0
- data/lib/tachain-sdk/models/{order_stage_form_datum_api_dto.rb → api_declaration_form_response.rb} +16 -49
- data/lib/tachain-sdk/models/api_declaration_list_response.rb +185 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +171 -20
- data/lib/tachain-sdk/models/{api_declaration_submit_result_dto.rb → api_declaration_submit_response.rb} +10 -42
- data/lib/tachain-sdk/models/api_delivery_create_request.rb +292 -0
- data/lib/tachain-sdk/models/{result_brand_report_unlinked_order_detail.rb → api_delivery_delete_request.rb} +84 -60
- data/lib/tachain-sdk/models/api_delivery_detail_create_request.rb +353 -0
- data/lib/tachain-sdk/models/{delivery_note_detail_api_dto.rb → api_delivery_detail_response.rb} +23 -82
- data/lib/tachain-sdk/models/api_delivery_detail_update_request.rb +358 -0
- data/lib/tachain-sdk/models/{delivery_note_api_dto.rb → api_delivery_response.rb} +22 -192
- data/lib/tachain-sdk/models/api_delivery_update_request.rb +287 -0
- data/lib/tachain-sdk/models/{order_stage_form_dto.rb → api_document_form_response.rb} +16 -65
- data/lib/tachain-sdk/models/{document_type_api_dto.rb → api_document_type_response.rb} +30 -125
- data/lib/tachain-sdk/models/api_enum_value_response.rb +193 -0
- data/lib/tachain-sdk/models/{api_response_string.rb → api_error_response.rb} +22 -34
- data/lib/tachain-sdk/models/api_fiber_composition_request.rb +193 -0
- data/lib/tachain-sdk/models/api_fiber_composition_response.rb +160 -0
- data/lib/tachain-sdk/models/{attachment_in_api_dto.rb → api_file_response.rb} +23 -115
- data/lib/tachain-sdk/models/api_file_upload_response.rb +150 -0
- data/lib/tachain-sdk/models/api_mapping_response.rb +182 -0
- data/lib/tachain-sdk/models/api_material_create_request.rb +556 -0
- data/lib/tachain-sdk/models/api_material_response.rb +349 -0
- data/lib/tachain-sdk/models/api_material_update_request.rb +582 -0
- data/lib/tachain-sdk/models/{result_mapping_order_select.rb → api_order_accept_request.rb} +105 -70
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +106 -29
- data/lib/tachain-sdk/models/api_order_create_request.rb +379 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_request.rb +293 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_response.rb +203 -0
- data/lib/tachain-sdk/models/api_order_delete_line_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_delete_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_line_create_request.rb +445 -0
- data/lib/tachain-sdk/models/{order_line_api_dto.rb → api_order_line_response.rb} +39 -330
- data/lib/tachain-sdk/models/api_order_line_update_request.rb +416 -0
- data/lib/tachain-sdk/models/api_order_receipt_pending_line_response.rb +171 -0
- data/lib/tachain-sdk/models/{microsoft_asp_net_core_mvc_problem_details.rb → api_order_receipt_pending_response.rb} +28 -45
- data/lib/tachain-sdk/models/api_order_receipt_result.rb +185 -0
- data/lib/tachain-sdk/models/{order_api_dto.rb → api_order_response.rb} +35 -291
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +102 -42
- data/lib/tachain-sdk/models/api_order_submit_audit_response.rb +196 -0
- data/lib/tachain-sdk/models/api_order_update_request.rb +408 -0
- data/lib/tachain-sdk/models/api_page_result1_api_delivery_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_material_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_order_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_process_route_response.rb +220 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_list_dto.rb → api_page_result1_api_product_response.rb} +48 -27
- data/lib/tachain-sdk/models/api_page_result1_api_production_response.rb +220 -0
- data/lib/tachain-sdk/models/{result_api_enum.rb → api_process_route_create_request.rb} +88 -62
- data/lib/tachain-sdk/models/api_process_route_response.rb +237 -0
- data/lib/tachain-sdk/models/{paged_response_delivery_note_api_dto.rb → api_process_route_update_request.rb} +102 -91
- data/lib/tachain-sdk/models/api_process_step_request.rb +201 -0
- data/lib/tachain-sdk/models/api_process_step_response.rb +171 -0
- data/lib/tachain-sdk/models/api_product_create_request.rb +595 -0
- data/lib/tachain-sdk/models/api_product_response.rb +373 -0
- data/lib/tachain-sdk/models/api_product_update_request.rb +621 -0
- data/lib/tachain-sdk/models/api_production_create_request.rb +381 -0
- data/lib/tachain-sdk/models/{api_integration_delete_request.rb → api_production_delete_request.rb} +22 -11
- data/lib/tachain-sdk/models/api_production_raw_material_create_request.rb +320 -0
- data/lib/tachain-sdk/models/{production_raw_material_api_dto.rb → api_production_raw_material_response.rb} +18 -118
- data/lib/tachain-sdk/models/api_production_raw_material_update_request.rb +325 -0
- data/lib/tachain-sdk/models/{production_api_dto.rb → api_production_response.rb} +23 -156
- data/lib/tachain-sdk/models/api_production_sales_order_create_request.rb +309 -0
- data/lib/tachain-sdk/models/{production_sales_order_api_dto.rb → api_production_sales_order_response.rb} +17 -94
- data/lib/tachain-sdk/models/api_production_sales_order_update_request.rb +314 -0
- data/lib/tachain-sdk/models/api_production_update_request.rb +392 -0
- data/lib/tachain-sdk/models/api_receipt_pending_item_response.rb +207 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_enum_value_response.rb +162 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_mapping_response.rb +162 -0
- data/lib/tachain-sdk/models/{api_response_production_api_dto.rb → api_result1_api_declaration_list_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_declaration_submit_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_delivery_note_api_dto.rb → api_result1_api_delivery_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_file_upload_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_material_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_declaration_verification_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_submit_result_dto.rb → api_result1_api_order_receipt_pending_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_order_receipt_result.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_submit_audit_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_process_route_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_product_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_production_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_order_api_dto.rb → api_result1_string.rb} +22 -33
- data/lib/tachain-sdk/models/{attachment_in_api_create_dto.rb → api_verification_file_response.rb} +106 -84
- data/lib/tachain-sdk/models/api_verification_response.rb +218 -0
- data/lib/tachain-sdk/models/delete_v1_declaration_delete200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_required_documents200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_delivery_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +73 -171
- data/lib/tachain-sdk/models/get_v1_material_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_po_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_receipt_pending200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_process_route_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_product_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_production_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_enum_values200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_mappings200_response.rb +103 -0
- data/lib/tachain-sdk/models/model1.rb +47 -14
- data/lib/tachain-sdk/models/model2.rb +190 -0
- data/lib/tachain-sdk/models/model3.rb +17 -33
- data/lib/tachain-sdk/models/model4.rb +17 -33
- data/lib/tachain-sdk/models/post_v1_declaration_submit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_declaration_upload_file200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_material_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_declaration_verification200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_submit_audit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_process_route_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_product_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_production_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_return_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_order_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/version.rb +1 -1
- data/lib/tachain-sdk.rb +116 -51
- metadata +118 -53
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +0 -251
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +0 -334
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +0 -880
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +0 -749
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +0 -513
- data/lib/tachain-sdk/models/company.rb +0 -780
- data/lib/tachain-sdk/models/company_compliance_profile.rb +0 -547
- data/lib/tachain-sdk/models/company_utility_declaration.rb +0 -592
- data/lib/tachain-sdk/models/customer.rb +0 -569
- data/lib/tachain-sdk/models/factory.rb +0 -545
- data/lib/tachain-sdk/models/order.rb +0 -974
- data/lib/tachain-sdk/models/order_line.rb +0 -1184
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +0 -270
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +0 -548
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +0 -331
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +0 -418
- data/lib/tachain-sdk/models/result_order_trace_report.rb +0 -721
- data/lib/tachain-sdk/models/supplier.rb +0 -585
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +0 -383
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +0 -456
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +0 -227
- data/lib/tachain-sdk/models/trader.rb +0 -506
data/lib/tachain-sdk/models/{attachment_in_api_create_dto.rb → api_verification_file_response.rb}
RENAMED
|
@@ -14,39 +14,63 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TachainSdk
|
|
17
|
-
|
|
17
|
+
# 校验问题关联的业务文件;只读返回,用于定位需要补充或修正的资料。
|
|
18
|
+
class ApiVerificationFileResponse < ApiModelBase
|
|
19
|
+
# 查询返回的文件记录标识。
|
|
18
20
|
attr_accessor :id
|
|
19
21
|
|
|
20
|
-
#
|
|
21
|
-
attr_accessor :file_path
|
|
22
|
-
|
|
23
|
-
# 原文件名称
|
|
22
|
+
# 原始文件名。
|
|
24
23
|
attr_accessor :file_name
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
# 文件上传时间。
|
|
26
|
+
attr_accessor :uploaded_at
|
|
27
27
|
|
|
28
|
+
# 文件大小,单位 MiB。
|
|
28
29
|
attr_accessor :file_size
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
# 相关申报记录标识。
|
|
32
|
+
attr_accessor :doc_id
|
|
33
|
+
|
|
34
|
+
# 相关业务编号。
|
|
35
|
+
attr_accessor :number
|
|
36
|
+
|
|
37
|
+
# 申报阶段代码。
|
|
38
|
+
attr_accessor :stage_id
|
|
39
|
+
|
|
40
|
+
# 名称。
|
|
41
|
+
attr_accessor :name
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
# 按请求语言返回的资料名称。
|
|
44
|
+
attr_accessor :local_name
|
|
33
45
|
|
|
34
|
-
|
|
46
|
+
# AI 文件校验状态;结合校验提示查看结果。
|
|
47
|
+
attr_accessor :ai_status
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
# 订单号。
|
|
50
|
+
attr_accessor :order_number
|
|
51
|
+
|
|
52
|
+
# 关联订单日期。
|
|
53
|
+
attr_accessor :order_date
|
|
54
|
+
|
|
55
|
+
# 该资料下的文件。
|
|
56
|
+
attr_accessor :file_list
|
|
37
57
|
|
|
38
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
59
|
def self.attribute_map
|
|
40
60
|
{
|
|
41
61
|
:'id' => :'id',
|
|
42
|
-
:'file_path' => :'filePath',
|
|
43
62
|
:'file_name' => :'fileName',
|
|
44
|
-
:'
|
|
63
|
+
:'uploaded_at' => :'uploadedAt',
|
|
45
64
|
:'file_size' => :'fileSize',
|
|
46
|
-
:'
|
|
47
|
-
:'
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
65
|
+
:'doc_id' => :'docId',
|
|
66
|
+
:'number' => :'number',
|
|
67
|
+
:'stage_id' => :'stageId',
|
|
68
|
+
:'name' => :'name',
|
|
69
|
+
:'local_name' => :'localName',
|
|
70
|
+
:'ai_status' => :'aiStatus',
|
|
71
|
+
:'order_number' => :'orderNumber',
|
|
72
|
+
:'order_date' => :'orderDate',
|
|
73
|
+
:'file_list' => :'fileList'
|
|
50
74
|
}
|
|
51
75
|
end
|
|
52
76
|
|
|
@@ -64,14 +88,18 @@ module TachainSdk
|
|
|
64
88
|
def self.openapi_types
|
|
65
89
|
{
|
|
66
90
|
:'id' => :'String',
|
|
67
|
-
:'file_path' => :'String',
|
|
68
91
|
:'file_name' => :'String',
|
|
69
|
-
:'
|
|
92
|
+
:'uploaded_at' => :'Time',
|
|
70
93
|
:'file_size' => :'Float',
|
|
71
|
-
:'
|
|
72
|
-
:'
|
|
73
|
-
:'
|
|
74
|
-
:'
|
|
94
|
+
:'doc_id' => :'String',
|
|
95
|
+
:'number' => :'String',
|
|
96
|
+
:'stage_id' => :'String',
|
|
97
|
+
:'name' => :'String',
|
|
98
|
+
:'local_name' => :'String',
|
|
99
|
+
:'ai_status' => :'Integer',
|
|
100
|
+
:'order_number' => :'String',
|
|
101
|
+
:'order_date' => :'Time',
|
|
102
|
+
:'file_list' => :'Array<ApiVerificationFileResponse>'
|
|
75
103
|
}
|
|
76
104
|
end
|
|
77
105
|
|
|
@@ -79,12 +107,18 @@ module TachainSdk
|
|
|
79
107
|
def self.openapi_nullable
|
|
80
108
|
Set.new([
|
|
81
109
|
:'id',
|
|
82
|
-
:'
|
|
110
|
+
:'file_name',
|
|
111
|
+
:'uploaded_at',
|
|
83
112
|
:'file_size',
|
|
84
|
-
:'
|
|
85
|
-
:'
|
|
86
|
-
:'
|
|
87
|
-
:'
|
|
113
|
+
:'doc_id',
|
|
114
|
+
:'number',
|
|
115
|
+
:'stage_id',
|
|
116
|
+
:'name',
|
|
117
|
+
:'local_name',
|
|
118
|
+
:'ai_status',
|
|
119
|
+
:'order_number',
|
|
120
|
+
:'order_date',
|
|
121
|
+
:'file_list'
|
|
88
122
|
])
|
|
89
123
|
end
|
|
90
124
|
|
|
@@ -92,14 +126,14 @@ module TachainSdk
|
|
|
92
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
127
|
def initialize(attributes = {})
|
|
94
128
|
if (!attributes.is_a?(Hash))
|
|
95
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::
|
|
129
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiVerificationFileResponse` initialize method"
|
|
96
130
|
end
|
|
97
131
|
|
|
98
132
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
99
133
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
100
134
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
135
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
102
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiVerificationFileResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
103
137
|
end
|
|
104
138
|
h[k.to_sym] = v
|
|
105
139
|
}
|
|
@@ -108,40 +142,54 @@ module TachainSdk
|
|
|
108
142
|
self.id = attributes[:'id']
|
|
109
143
|
end
|
|
110
144
|
|
|
111
|
-
if attributes.key?(:'file_path')
|
|
112
|
-
self.file_path = attributes[:'file_path']
|
|
113
|
-
else
|
|
114
|
-
self.file_path = nil
|
|
115
|
-
end
|
|
116
|
-
|
|
117
145
|
if attributes.key?(:'file_name')
|
|
118
146
|
self.file_name = attributes[:'file_name']
|
|
119
|
-
else
|
|
120
|
-
self.file_name = nil
|
|
121
147
|
end
|
|
122
148
|
|
|
123
|
-
if attributes.key?(:'
|
|
124
|
-
self.
|
|
149
|
+
if attributes.key?(:'uploaded_at')
|
|
150
|
+
self.uploaded_at = attributes[:'uploaded_at']
|
|
125
151
|
end
|
|
126
152
|
|
|
127
153
|
if attributes.key?(:'file_size')
|
|
128
154
|
self.file_size = attributes[:'file_size']
|
|
129
155
|
end
|
|
130
156
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
self.
|
|
157
|
+
if attributes.key?(:'doc_id')
|
|
158
|
+
self.doc_id = attributes[:'doc_id']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'number')
|
|
162
|
+
self.number = attributes[:'number']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'stage_id')
|
|
166
|
+
self.stage_id = attributes[:'stage_id']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'name')
|
|
170
|
+
self.name = attributes[:'name']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'local_name')
|
|
174
|
+
self.local_name = attributes[:'local_name']
|
|
133
175
|
end
|
|
134
176
|
|
|
135
|
-
if attributes.key?(:'
|
|
136
|
-
self.
|
|
177
|
+
if attributes.key?(:'ai_status')
|
|
178
|
+
self.ai_status = attributes[:'ai_status']
|
|
137
179
|
end
|
|
138
180
|
|
|
139
|
-
if attributes.key?(:'
|
|
140
|
-
self.
|
|
181
|
+
if attributes.key?(:'order_number')
|
|
182
|
+
self.order_number = attributes[:'order_number']
|
|
141
183
|
end
|
|
142
184
|
|
|
143
|
-
if attributes.key?(:'
|
|
144
|
-
self.
|
|
185
|
+
if attributes.key?(:'order_date')
|
|
186
|
+
self.order_date = attributes[:'order_date']
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'file_list')
|
|
190
|
+
if (value = attributes[:'file_list']).is_a?(Array)
|
|
191
|
+
self.file_list = value
|
|
192
|
+
end
|
|
145
193
|
end
|
|
146
194
|
end
|
|
147
195
|
|
|
@@ -150,14 +198,6 @@ module TachainSdk
|
|
|
150
198
|
def list_invalid_properties
|
|
151
199
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
152
200
|
invalid_properties = Array.new
|
|
153
|
-
if @file_path.nil?
|
|
154
|
-
invalid_properties.push('invalid value for "file_path", file_path cannot be nil.')
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
if @file_name.nil?
|
|
158
|
-
invalid_properties.push('invalid value for "file_name", file_name cannot be nil.')
|
|
159
|
-
end
|
|
160
|
-
|
|
161
201
|
invalid_properties
|
|
162
202
|
end
|
|
163
203
|
|
|
@@ -165,45 +205,27 @@ module TachainSdk
|
|
|
165
205
|
# @return true if the model is valid
|
|
166
206
|
def valid?
|
|
167
207
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
168
|
-
return false if @file_path.nil?
|
|
169
|
-
return false if @file_name.nil?
|
|
170
208
|
true
|
|
171
209
|
end
|
|
172
210
|
|
|
173
|
-
# Custom attribute writer method with validation
|
|
174
|
-
# @param [Object] file_path Value to be assigned
|
|
175
|
-
def file_path=(file_path)
|
|
176
|
-
if file_path.nil?
|
|
177
|
-
fail ArgumentError, 'file_path cannot be nil'
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
@file_path = file_path
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Custom attribute writer method with validation
|
|
184
|
-
# @param [Object] file_name Value to be assigned
|
|
185
|
-
def file_name=(file_name)
|
|
186
|
-
if file_name.nil?
|
|
187
|
-
fail ArgumentError, 'file_name cannot be nil'
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
@file_name = file_name
|
|
191
|
-
end
|
|
192
|
-
|
|
193
211
|
# Checks equality by comparing each attribute.
|
|
194
212
|
# @param [Object] Object to be compared
|
|
195
213
|
def ==(o)
|
|
196
214
|
return true if self.equal?(o)
|
|
197
215
|
self.class == o.class &&
|
|
198
216
|
id == o.id &&
|
|
199
|
-
file_path == o.file_path &&
|
|
200
217
|
file_name == o.file_name &&
|
|
201
|
-
|
|
218
|
+
uploaded_at == o.uploaded_at &&
|
|
202
219
|
file_size == o.file_size &&
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
220
|
+
doc_id == o.doc_id &&
|
|
221
|
+
number == o.number &&
|
|
222
|
+
stage_id == o.stage_id &&
|
|
223
|
+
name == o.name &&
|
|
224
|
+
local_name == o.local_name &&
|
|
225
|
+
ai_status == o.ai_status &&
|
|
226
|
+
order_number == o.order_number &&
|
|
227
|
+
order_date == o.order_date &&
|
|
228
|
+
file_list == o.file_list
|
|
207
229
|
end
|
|
208
230
|
|
|
209
231
|
# @see the `==` method
|
|
@@ -215,7 +237,7 @@ module TachainSdk
|
|
|
215
237
|
# Calculates hash code according to all attributes.
|
|
216
238
|
# @return [Integer] Hash code
|
|
217
239
|
def hash
|
|
218
|
-
[id,
|
|
240
|
+
[id, file_name, uploaded_at, file_size, doc_id, number, stage_id, name, local_name, ai_status, order_number, order_date, file_list].hash
|
|
219
241
|
end
|
|
220
242
|
|
|
221
243
|
# Builds the object from hash
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
# 业务校验提示;Type=0 为可确认警告,Type=1 为阻断错误。
|
|
18
|
+
class ApiVerificationResponse < ApiModelBase
|
|
19
|
+
# 校验类型:1 阻断错误;0 待确认警告;2/3 AI 文件提示;9 通过项;-5 整单汇总。
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
# 校验问题对应的位置。
|
|
23
|
+
attr_accessor :position
|
|
24
|
+
|
|
25
|
+
# 按请求语言返回的提示,未指定语言时默认中文。
|
|
26
|
+
attr_accessor :message
|
|
27
|
+
|
|
28
|
+
# 模块:1 订单、2 生产、3 发货。
|
|
29
|
+
attr_accessor :_module
|
|
30
|
+
|
|
31
|
+
# 定位问题的业务单号集合。
|
|
32
|
+
attr_accessor :module_key
|
|
33
|
+
|
|
34
|
+
# 是否为整单校验。
|
|
35
|
+
attr_accessor :whole
|
|
36
|
+
|
|
37
|
+
# 校验涉及的文件与 AI 状态。
|
|
38
|
+
attr_accessor :file_results
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
def self.attribute_map
|
|
42
|
+
{
|
|
43
|
+
:'type' => :'type',
|
|
44
|
+
:'position' => :'position',
|
|
45
|
+
:'message' => :'message',
|
|
46
|
+
:'_module' => :'module',
|
|
47
|
+
:'module_key' => :'moduleKey',
|
|
48
|
+
:'whole' => :'whole',
|
|
49
|
+
:'file_results' => :'fileResults'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'type' => :'Integer',
|
|
67
|
+
:'position' => :'String',
|
|
68
|
+
:'message' => :'String',
|
|
69
|
+
:'_module' => :'Integer',
|
|
70
|
+
:'module_key' => :'Array<String>',
|
|
71
|
+
:'whole' => :'Boolean',
|
|
72
|
+
:'file_results' => :'Array<ApiVerificationFileResponse>'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# List of attributes with nullable: true
|
|
77
|
+
def self.openapi_nullable
|
|
78
|
+
Set.new([
|
|
79
|
+
:'position',
|
|
80
|
+
:'message',
|
|
81
|
+
:'module_key',
|
|
82
|
+
:'whole',
|
|
83
|
+
:'file_results'
|
|
84
|
+
])
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Initializes the object
|
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
|
+
def initialize(attributes = {})
|
|
90
|
+
if (!attributes.is_a?(Hash))
|
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiVerificationResponse` initialize method"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
95
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
96
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
97
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
98
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiVerificationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
99
|
+
end
|
|
100
|
+
h[k.to_sym] = v
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'type')
|
|
104
|
+
self.type = attributes[:'type']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'position')
|
|
108
|
+
self.position = attributes[:'position']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'message')
|
|
112
|
+
self.message = attributes[:'message']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'_module')
|
|
116
|
+
self._module = attributes[:'_module']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'module_key')
|
|
120
|
+
if (value = attributes[:'module_key']).is_a?(Array)
|
|
121
|
+
self.module_key = value
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'whole')
|
|
126
|
+
self.whole = attributes[:'whole']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'file_results')
|
|
130
|
+
if (value = attributes[:'file_results']).is_a?(Array)
|
|
131
|
+
self.file_results = value
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
137
|
+
# @return Array for valid properties with the reasons
|
|
138
|
+
def list_invalid_properties
|
|
139
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
140
|
+
invalid_properties = Array.new
|
|
141
|
+
invalid_properties
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Check to see if the all the properties in the model are valid
|
|
145
|
+
# @return true if the model is valid
|
|
146
|
+
def valid?
|
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
148
|
+
true
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Checks equality by comparing each attribute.
|
|
152
|
+
# @param [Object] Object to be compared
|
|
153
|
+
def ==(o)
|
|
154
|
+
return true if self.equal?(o)
|
|
155
|
+
self.class == o.class &&
|
|
156
|
+
type == o.type &&
|
|
157
|
+
position == o.position &&
|
|
158
|
+
message == o.message &&
|
|
159
|
+
_module == o._module &&
|
|
160
|
+
module_key == o.module_key &&
|
|
161
|
+
whole == o.whole &&
|
|
162
|
+
file_results == o.file_results
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# @see the `==` method
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def eql?(o)
|
|
168
|
+
self == o
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Calculates hash code according to all attributes.
|
|
172
|
+
# @return [Integer] Hash code
|
|
173
|
+
def hash
|
|
174
|
+
[type, position, message, _module, module_key, whole, file_results].hash
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Builds the object from hash
|
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
179
|
+
# @return [Object] Returns the model itself
|
|
180
|
+
def self.build_from_hash(attributes)
|
|
181
|
+
return nil unless attributes.is_a?(Hash)
|
|
182
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
183
|
+
transformed_hash = {}
|
|
184
|
+
openapi_types.each_pair do |key, type|
|
|
185
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = nil
|
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
|
+
# is documented as an array but the input is not
|
|
190
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
191
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
192
|
+
end
|
|
193
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
new(transformed_hash)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
if value.nil?
|
|
207
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
hash[param] = _to_hash(value)
|
|
212
|
+
end
|
|
213
|
+
hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
module DeleteV1DeclarationDelete200Response
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'ApiErrorResponse',
|
|
23
|
+
:'Model2'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
+
# - TODO: logging when debugging is set.
|
|
37
|
+
openapi_any_of.each do |klass|
|
|
38
|
+
begin
|
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
|
40
|
+
return find_and_cast_into_type(klass, data)
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.iso8601(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = TachainSdk.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|