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
|
@@ -14,19 +14,35 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TachainSdk
|
|
17
|
-
|
|
17
|
+
# 集成分页响应。
|
|
18
|
+
class ApiPageResult1ApiProductResponse < ApiModelBase
|
|
19
|
+
# 业务状态码。
|
|
18
20
|
attr_accessor :code
|
|
19
21
|
|
|
22
|
+
# 业务返回数据。
|
|
23
|
+
attr_accessor :data
|
|
24
|
+
|
|
25
|
+
# 按请求语言返回的提示,未指定语言时默认中文。
|
|
20
26
|
attr_accessor :message
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
# 当前页码,从 1 开始。
|
|
29
|
+
attr_accessor :page_index
|
|
30
|
+
|
|
31
|
+
# 每页条数。
|
|
32
|
+
attr_accessor :page_size
|
|
33
|
+
|
|
34
|
+
# 符合查询条件的总条数。
|
|
35
|
+
attr_accessor :total_count
|
|
23
36
|
|
|
24
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
38
|
def self.attribute_map
|
|
26
39
|
{
|
|
27
40
|
:'code' => :'code',
|
|
41
|
+
:'data' => :'data',
|
|
28
42
|
:'message' => :'message',
|
|
29
|
-
:'
|
|
43
|
+
:'page_index' => :'pageIndex',
|
|
44
|
+
:'page_size' => :'pageSize',
|
|
45
|
+
:'total_count' => :'totalCount'
|
|
30
46
|
}
|
|
31
47
|
end
|
|
32
48
|
|
|
@@ -44,14 +60,19 @@ module TachainSdk
|
|
|
44
60
|
def self.openapi_types
|
|
45
61
|
{
|
|
46
62
|
:'code' => :'Integer',
|
|
63
|
+
:'data' => :'Array<ApiProductResponse>',
|
|
47
64
|
:'message' => :'String',
|
|
48
|
-
:'
|
|
65
|
+
:'page_index' => :'Integer',
|
|
66
|
+
:'page_size' => :'Integer',
|
|
67
|
+
:'total_count' => :'Integer'
|
|
49
68
|
}
|
|
50
69
|
end
|
|
51
70
|
|
|
52
71
|
# List of attributes with nullable: true
|
|
53
72
|
def self.openapi_nullable
|
|
54
73
|
Set.new([
|
|
74
|
+
:'data',
|
|
75
|
+
:'message',
|
|
55
76
|
])
|
|
56
77
|
end
|
|
57
78
|
|
|
@@ -59,14 +80,14 @@ module TachainSdk
|
|
|
59
80
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
81
|
def initialize(attributes = {})
|
|
61
82
|
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiPageResult1ApiProductResponse` initialize method"
|
|
63
84
|
end
|
|
64
85
|
|
|
65
86
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
87
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
88
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
89
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiPageResult1ApiProductResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
91
|
end
|
|
71
92
|
h[k.to_sym] = v
|
|
72
93
|
}
|
|
@@ -77,14 +98,26 @@ module TachainSdk
|
|
|
77
98
|
self.code = nil
|
|
78
99
|
end
|
|
79
100
|
|
|
101
|
+
if attributes.key?(:'data')
|
|
102
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
103
|
+
self.data = value
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
80
107
|
if attributes.key?(:'message')
|
|
81
108
|
self.message = attributes[:'message']
|
|
82
|
-
else
|
|
83
|
-
self.message = nil
|
|
84
109
|
end
|
|
85
110
|
|
|
86
|
-
if attributes.key?(:'
|
|
87
|
-
self.
|
|
111
|
+
if attributes.key?(:'page_index')
|
|
112
|
+
self.page_index = attributes[:'page_index']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'page_size')
|
|
116
|
+
self.page_size = attributes[:'page_size']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'total_count')
|
|
120
|
+
self.total_count = attributes[:'total_count']
|
|
88
121
|
end
|
|
89
122
|
end
|
|
90
123
|
|
|
@@ -97,10 +130,6 @@ module TachainSdk
|
|
|
97
130
|
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
98
131
|
end
|
|
99
132
|
|
|
100
|
-
if @message.nil?
|
|
101
|
-
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
102
|
-
end
|
|
103
|
-
|
|
104
133
|
invalid_properties
|
|
105
134
|
end
|
|
106
135
|
|
|
@@ -109,7 +138,6 @@ module TachainSdk
|
|
|
109
138
|
def valid?
|
|
110
139
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
140
|
return false if @code.nil?
|
|
112
|
-
return false if @message.nil?
|
|
113
141
|
true
|
|
114
142
|
end
|
|
115
143
|
|
|
@@ -123,24 +151,17 @@ module TachainSdk
|
|
|
123
151
|
@code = code
|
|
124
152
|
end
|
|
125
153
|
|
|
126
|
-
# Custom attribute writer method with validation
|
|
127
|
-
# @param [Object] message Value to be assigned
|
|
128
|
-
def message=(message)
|
|
129
|
-
if message.nil?
|
|
130
|
-
fail ArgumentError, 'message cannot be nil'
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
@message = message
|
|
134
|
-
end
|
|
135
|
-
|
|
136
154
|
# Checks equality by comparing each attribute.
|
|
137
155
|
# @param [Object] Object to be compared
|
|
138
156
|
def ==(o)
|
|
139
157
|
return true if self.equal?(o)
|
|
140
158
|
self.class == o.class &&
|
|
141
159
|
code == o.code &&
|
|
160
|
+
data == o.data &&
|
|
142
161
|
message == o.message &&
|
|
143
|
-
|
|
162
|
+
page_index == o.page_index &&
|
|
163
|
+
page_size == o.page_size &&
|
|
164
|
+
total_count == o.total_count
|
|
144
165
|
end
|
|
145
166
|
|
|
146
167
|
# @see the `==` method
|
|
@@ -152,7 +173,7 @@ module TachainSdk
|
|
|
152
173
|
# Calculates hash code according to all attributes.
|
|
153
174
|
# @return [Integer] Hash code
|
|
154
175
|
def hash
|
|
155
|
-
[code, message,
|
|
176
|
+
[code, data, message, page_index, page_size, total_count].hash
|
|
156
177
|
end
|
|
157
178
|
|
|
158
179
|
# Builds the object from hash
|
|
@@ -0,0 +1,220 @@
|
|
|
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 ApiPageResult1ApiProductionResponse < ApiModelBase
|
|
19
|
+
# 业务状态码。
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
# 业务返回数据。
|
|
23
|
+
attr_accessor :data
|
|
24
|
+
|
|
25
|
+
# 按请求语言返回的提示,未指定语言时默认中文。
|
|
26
|
+
attr_accessor :message
|
|
27
|
+
|
|
28
|
+
# 当前页码,从 1 开始。
|
|
29
|
+
attr_accessor :page_index
|
|
30
|
+
|
|
31
|
+
# 每页条数。
|
|
32
|
+
attr_accessor :page_size
|
|
33
|
+
|
|
34
|
+
# 符合查询条件的总条数。
|
|
35
|
+
attr_accessor :total_count
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'code' => :'code',
|
|
41
|
+
:'data' => :'data',
|
|
42
|
+
:'message' => :'message',
|
|
43
|
+
:'page_index' => :'pageIndex',
|
|
44
|
+
:'page_size' => :'pageSize',
|
|
45
|
+
:'total_count' => :'totalCount'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'code' => :'Integer',
|
|
63
|
+
:'data' => :'Array<ApiProductionResponse>',
|
|
64
|
+
:'message' => :'String',
|
|
65
|
+
:'page_index' => :'Integer',
|
|
66
|
+
:'page_size' => :'Integer',
|
|
67
|
+
:'total_count' => :'Integer'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
:'data',
|
|
75
|
+
:'message',
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiPageResult1ApiProductionResponse` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiPageResult1ApiProductionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'code')
|
|
96
|
+
self.code = attributes[:'code']
|
|
97
|
+
else
|
|
98
|
+
self.code = nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'data')
|
|
102
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
103
|
+
self.data = value
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'message')
|
|
108
|
+
self.message = attributes[:'message']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'page_index')
|
|
112
|
+
self.page_index = attributes[:'page_index']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'page_size')
|
|
116
|
+
self.page_size = attributes[:'page_size']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'total_count')
|
|
120
|
+
self.total_count = attributes[:'total_count']
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
125
|
+
# @return Array for valid properties with the reasons
|
|
126
|
+
def list_invalid_properties
|
|
127
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
128
|
+
invalid_properties = Array.new
|
|
129
|
+
if @code.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
140
|
+
return false if @code.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] code Value to be assigned
|
|
146
|
+
def code=(code)
|
|
147
|
+
if code.nil?
|
|
148
|
+
fail ArgumentError, 'code cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@code = code
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
code == o.code &&
|
|
160
|
+
data == o.data &&
|
|
161
|
+
message == o.message &&
|
|
162
|
+
page_index == o.page_index &&
|
|
163
|
+
page_size == o.page_size &&
|
|
164
|
+
total_count == o.total_count
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[code, data, message, page_index, page_size, total_count].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
190
|
+
# check to ensure the input is an array given that the attribute
|
|
191
|
+
# is documented as an array but the input is not
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
194
|
+
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
new(transformed_hash)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
@@ -14,25 +14,35 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TachainSdk
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
# API 专用业务模型。
|
|
18
|
+
class ApiProcessRouteCreateRequest < ApiModelBase
|
|
19
|
+
# 租户和环境内唯一的路线编码,英文、数字及允许的英文符号。
|
|
20
20
|
attr_accessor :code
|
|
21
21
|
|
|
22
|
+
# 路线名称,使用英文、数字及允许的英文符号。
|
|
22
23
|
attr_accessor :name
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
# 加工阶段编码,取 Scope 枚举 code。
|
|
26
|
+
attr_accessor :scope_code
|
|
27
|
+
|
|
28
|
+
# 是否默认路线,默认 false。
|
|
29
|
+
attr_accessor :is_default
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
# 备注。
|
|
32
|
+
attr_accessor :remark
|
|
33
|
+
|
|
34
|
+
# 工序顺序由数组顺序决定;创建省略为空,修改省略保留、空数组清空。
|
|
35
|
+
attr_accessor :steps
|
|
27
36
|
|
|
28
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
38
|
def self.attribute_map
|
|
30
39
|
{
|
|
31
|
-
:'type' => :'type',
|
|
32
40
|
:'code' => :'code',
|
|
33
41
|
:'name' => :'name',
|
|
34
|
-
:'
|
|
35
|
-
:'
|
|
42
|
+
:'scope_code' => :'scopeCode',
|
|
43
|
+
:'is_default' => :'isDefault',
|
|
44
|
+
:'remark' => :'remark',
|
|
45
|
+
:'steps' => :'steps'
|
|
36
46
|
}
|
|
37
47
|
end
|
|
38
48
|
|
|
@@ -49,17 +59,20 @@ module TachainSdk
|
|
|
49
59
|
# Attribute type mapping.
|
|
50
60
|
def self.openapi_types
|
|
51
61
|
{
|
|
52
|
-
:'type' => :'String',
|
|
53
62
|
:'code' => :'String',
|
|
54
63
|
:'name' => :'String',
|
|
55
|
-
:'
|
|
56
|
-
:'
|
|
64
|
+
:'scope_code' => :'String',
|
|
65
|
+
:'is_default' => :'Boolean',
|
|
66
|
+
:'remark' => :'String',
|
|
67
|
+
:'steps' => :'Array<ApiProcessStepRequest>'
|
|
57
68
|
}
|
|
58
69
|
end
|
|
59
70
|
|
|
60
71
|
# List of attributes with nullable: true
|
|
61
72
|
def self.openapi_nullable
|
|
62
73
|
Set.new([
|
|
74
|
+
:'remark',
|
|
75
|
+
:'steps'
|
|
63
76
|
])
|
|
64
77
|
end
|
|
65
78
|
|
|
@@ -67,24 +80,18 @@ module TachainSdk
|
|
|
67
80
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
81
|
def initialize(attributes = {})
|
|
69
82
|
if (!attributes.is_a?(Hash))
|
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiProcessRouteCreateRequest` initialize method"
|
|
71
84
|
end
|
|
72
85
|
|
|
73
86
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
87
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
88
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
89
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiProcessRouteCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
91
|
end
|
|
79
92
|
h[k.to_sym] = v
|
|
80
93
|
}
|
|
81
94
|
|
|
82
|
-
if attributes.key?(:'type')
|
|
83
|
-
self.type = attributes[:'type']
|
|
84
|
-
else
|
|
85
|
-
self.type = nil
|
|
86
|
-
end
|
|
87
|
-
|
|
88
95
|
if attributes.key?(:'code')
|
|
89
96
|
self.code = attributes[:'code']
|
|
90
97
|
else
|
|
@@ -97,18 +104,24 @@ module TachainSdk
|
|
|
97
104
|
self.name = nil
|
|
98
105
|
end
|
|
99
106
|
|
|
100
|
-
if attributes.key?(:'
|
|
101
|
-
self.
|
|
107
|
+
if attributes.key?(:'scope_code')
|
|
108
|
+
self.scope_code = attributes[:'scope_code']
|
|
102
109
|
else
|
|
103
|
-
self.
|
|
110
|
+
self.scope_code = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'is_default')
|
|
114
|
+
self.is_default = attributes[:'is_default']
|
|
104
115
|
end
|
|
105
116
|
|
|
106
|
-
if attributes.key?(:'
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
if attributes.key?(:'remark')
|
|
118
|
+
self.remark = attributes[:'remark']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'steps')
|
|
122
|
+
if (value = attributes[:'steps']).is_a?(Array)
|
|
123
|
+
self.steps = value
|
|
109
124
|
end
|
|
110
|
-
else
|
|
111
|
-
self.extensions = nil
|
|
112
125
|
end
|
|
113
126
|
end
|
|
114
127
|
|
|
@@ -117,24 +130,32 @@ module TachainSdk
|
|
|
117
130
|
def list_invalid_properties
|
|
118
131
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
132
|
invalid_properties = Array.new
|
|
120
|
-
if @type.nil?
|
|
121
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
122
|
-
end
|
|
123
|
-
|
|
124
133
|
if @code.nil?
|
|
125
134
|
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
126
135
|
end
|
|
127
136
|
|
|
137
|
+
if @code.to_s.length > 64
|
|
138
|
+
invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 64.')
|
|
139
|
+
end
|
|
140
|
+
|
|
128
141
|
if @name.nil?
|
|
129
142
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
130
143
|
end
|
|
131
144
|
|
|
132
|
-
if @
|
|
133
|
-
invalid_properties.push('invalid value for "
|
|
145
|
+
if @name.to_s.length > 128
|
|
146
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.')
|
|
134
147
|
end
|
|
135
148
|
|
|
136
|
-
if @
|
|
137
|
-
invalid_properties.push('invalid value for "
|
|
149
|
+
if @scope_code.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "scope_code", scope_code cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @scope_code.to_s.length > 36
|
|
154
|
+
invalid_properties.push('invalid value for "scope_code", the character length must be smaller than or equal to 36.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if !@remark.nil? && @remark.to_s.length > 500
|
|
158
|
+
invalid_properties.push('invalid value for "remark", the character length must be smaller than or equal to 500.')
|
|
138
159
|
end
|
|
139
160
|
|
|
140
161
|
invalid_properties
|
|
@@ -144,24 +165,16 @@ module TachainSdk
|
|
|
144
165
|
# @return true if the model is valid
|
|
145
166
|
def valid?
|
|
146
167
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
147
|
-
return false if @type.nil?
|
|
148
168
|
return false if @code.nil?
|
|
169
|
+
return false if @code.to_s.length > 64
|
|
149
170
|
return false if @name.nil?
|
|
150
|
-
return false if @
|
|
151
|
-
return false if @
|
|
171
|
+
return false if @name.to_s.length > 128
|
|
172
|
+
return false if @scope_code.nil?
|
|
173
|
+
return false if @scope_code.to_s.length > 36
|
|
174
|
+
return false if !@remark.nil? && @remark.to_s.length > 500
|
|
152
175
|
true
|
|
153
176
|
end
|
|
154
177
|
|
|
155
|
-
# Custom attribute writer method with validation
|
|
156
|
-
# @param [Object] type Value to be assigned
|
|
157
|
-
def type=(type)
|
|
158
|
-
if type.nil?
|
|
159
|
-
fail ArgumentError, 'type cannot be nil'
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
@type = type
|
|
163
|
-
end
|
|
164
|
-
|
|
165
178
|
# Custom attribute writer method with validation
|
|
166
179
|
# @param [Object] code Value to be assigned
|
|
167
180
|
def code=(code)
|
|
@@ -169,6 +182,10 @@ module TachainSdk
|
|
|
169
182
|
fail ArgumentError, 'code cannot be nil'
|
|
170
183
|
end
|
|
171
184
|
|
|
185
|
+
if code.to_s.length > 64
|
|
186
|
+
fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 64.'
|
|
187
|
+
end
|
|
188
|
+
|
|
172
189
|
@code = code
|
|
173
190
|
end
|
|
174
191
|
|
|
@@ -179,27 +196,35 @@ module TachainSdk
|
|
|
179
196
|
fail ArgumentError, 'name cannot be nil'
|
|
180
197
|
end
|
|
181
198
|
|
|
199
|
+
if name.to_s.length > 128
|
|
200
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
|
|
201
|
+
end
|
|
202
|
+
|
|
182
203
|
@name = name
|
|
183
204
|
end
|
|
184
205
|
|
|
185
206
|
# Custom attribute writer method with validation
|
|
186
|
-
# @param [Object]
|
|
187
|
-
def
|
|
188
|
-
if
|
|
189
|
-
fail ArgumentError, '
|
|
207
|
+
# @param [Object] scope_code Value to be assigned
|
|
208
|
+
def scope_code=(scope_code)
|
|
209
|
+
if scope_code.nil?
|
|
210
|
+
fail ArgumentError, 'scope_code cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if scope_code.to_s.length > 36
|
|
214
|
+
fail ArgumentError, 'invalid value for "scope_code", the character length must be smaller than or equal to 36.'
|
|
190
215
|
end
|
|
191
216
|
|
|
192
|
-
@
|
|
217
|
+
@scope_code = scope_code
|
|
193
218
|
end
|
|
194
219
|
|
|
195
220
|
# Custom attribute writer method with validation
|
|
196
|
-
# @param [Object]
|
|
197
|
-
def
|
|
198
|
-
if
|
|
199
|
-
fail ArgumentError, '
|
|
221
|
+
# @param [Object] remark Value to be assigned
|
|
222
|
+
def remark=(remark)
|
|
223
|
+
if !remark.nil? && remark.to_s.length > 500
|
|
224
|
+
fail ArgumentError, 'invalid value for "remark", the character length must be smaller than or equal to 500.'
|
|
200
225
|
end
|
|
201
226
|
|
|
202
|
-
@
|
|
227
|
+
@remark = remark
|
|
203
228
|
end
|
|
204
229
|
|
|
205
230
|
# Checks equality by comparing each attribute.
|
|
@@ -207,11 +232,12 @@ module TachainSdk
|
|
|
207
232
|
def ==(o)
|
|
208
233
|
return true if self.equal?(o)
|
|
209
234
|
self.class == o.class &&
|
|
210
|
-
type == o.type &&
|
|
211
235
|
code == o.code &&
|
|
212
236
|
name == o.name &&
|
|
213
|
-
|
|
214
|
-
|
|
237
|
+
scope_code == o.scope_code &&
|
|
238
|
+
is_default == o.is_default &&
|
|
239
|
+
remark == o.remark &&
|
|
240
|
+
steps == o.steps
|
|
215
241
|
end
|
|
216
242
|
|
|
217
243
|
# @see the `==` method
|
|
@@ -223,7 +249,7 @@ module TachainSdk
|
|
|
223
249
|
# Calculates hash code according to all attributes.
|
|
224
250
|
# @return [Integer] Hash code
|
|
225
251
|
def hash
|
|
226
|
-
[
|
|
252
|
+
[code, name, scope_code, is_default, remark, steps].hash
|
|
227
253
|
end
|
|
228
254
|
|
|
229
255
|
# Builds the object from hash
|