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
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
# API 专用业务模型。
|
|
18
|
+
class ApiFiberCompositionRequest < ApiModelBase
|
|
19
|
+
# 纤维编码,取 FiberType 枚举 code。
|
|
20
|
+
attr_accessor :fiber_code
|
|
21
|
+
|
|
22
|
+
# 百分比,大于 0 且不超过 100。
|
|
23
|
+
attr_accessor :ratio
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'fiber_code' => :'fiberCode',
|
|
29
|
+
:'ratio' => :'ratio'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'fiber_code' => :'String',
|
|
47
|
+
:'ratio' => :'Float'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiFiberCompositionRequest` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiFiberCompositionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'fiber_code')
|
|
74
|
+
self.fiber_code = attributes[:'fiber_code']
|
|
75
|
+
else
|
|
76
|
+
self.fiber_code = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'ratio')
|
|
80
|
+
self.ratio = attributes[:'ratio']
|
|
81
|
+
else
|
|
82
|
+
self.ratio = nil
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @fiber_code.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "fiber_code", fiber_code cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @ratio.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "ratio", ratio cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
return false if @fiber_code.nil?
|
|
107
|
+
return false if @ratio.nil?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Custom attribute writer method with validation
|
|
112
|
+
# @param [Object] fiber_code Value to be assigned
|
|
113
|
+
def fiber_code=(fiber_code)
|
|
114
|
+
if fiber_code.nil?
|
|
115
|
+
fail ArgumentError, 'fiber_code cannot be nil'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
@fiber_code = fiber_code
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] ratio Value to be assigned
|
|
123
|
+
def ratio=(ratio)
|
|
124
|
+
if ratio.nil?
|
|
125
|
+
fail ArgumentError, 'ratio cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@ratio = ratio
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
fiber_code == o.fiber_code &&
|
|
137
|
+
ratio == o.ratio
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[fiber_code, ratio].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
if value.nil?
|
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash[param] = _to_hash(value)
|
|
187
|
+
end
|
|
188
|
+
hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
# API 专用业务模型。
|
|
18
|
+
class ApiFiberCompositionResponse < ApiModelBase
|
|
19
|
+
# 纤维业务编码。
|
|
20
|
+
attr_accessor :fiber_code
|
|
21
|
+
|
|
22
|
+
# 纤维百分比。
|
|
23
|
+
attr_accessor :ratio
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'fiber_code' => :'fiberCode',
|
|
29
|
+
:'ratio' => :'ratio'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'fiber_code' => :'String',
|
|
47
|
+
:'ratio' => :'Float'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
:'fiber_code',
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiFiberCompositionResponse` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiFiberCompositionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'fiber_code')
|
|
75
|
+
self.fiber_code = attributes[:'fiber_code']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'ratio')
|
|
79
|
+
self.ratio = attributes[:'ratio']
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Checks equality by comparing each attribute.
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
fiber_code == o.fiber_code &&
|
|
104
|
+
ratio == o.ratio
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[fiber_code, ratio].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
125
|
+
transformed_hash = {}
|
|
126
|
+
openapi_types.each_pair do |key, type|
|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
128
|
+
transformed_hash["#{key}"] = nil
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
130
|
+
# check to ensure the input is an array given that the attribute
|
|
131
|
+
# is documented as an array but the input is not
|
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
134
|
+
end
|
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
new(transformed_hash)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns the object in the form of hash
|
|
143
|
+
# @return [Hash] Returns the object in the form of hash
|
|
144
|
+
def to_hash
|
|
145
|
+
hash = {}
|
|
146
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
147
|
+
value = self.send(attr)
|
|
148
|
+
if value.nil?
|
|
149
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
150
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
hash[param] = _to_hash(value)
|
|
154
|
+
end
|
|
155
|
+
hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
end
|
|
@@ -14,70 +14,59 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TachainSdk
|
|
17
|
-
|
|
17
|
+
# 集成接口专用 ApiFileResponse;只读业务返回字段,不参与写入模型。
|
|
18
|
+
class ApiFileResponse < ApiModelBase
|
|
19
|
+
# 附件申报记录标识;对应已提交资料中的记录,不等同于 attachmentId 上传文件标识。
|
|
18
20
|
attr_accessor :id
|
|
19
21
|
|
|
20
|
-
# 文件存储路径
|
|
21
|
-
attr_accessor :file_path
|
|
22
|
-
|
|
23
22
|
# 原文件名称
|
|
24
23
|
attr_accessor :file_name
|
|
25
24
|
|
|
25
|
+
# 记录状态:0 正常,-1 已删除,-9 禁用。
|
|
26
26
|
attr_accessor :status
|
|
27
27
|
|
|
28
|
+
# 该记录提交时间。
|
|
28
29
|
attr_accessor :submitted_at
|
|
29
30
|
|
|
31
|
+
# 文件大小,单位 MiB(字节数除以 1024²)。
|
|
30
32
|
attr_accessor :file_size
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
# 文件类型或扩展名。
|
|
34
35
|
attr_accessor :file_type
|
|
35
36
|
|
|
37
|
+
# 文件访问地址;为空时表示当前结果未提供访问地址。
|
|
36
38
|
attr_accessor :file_url
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
attr_accessor :is_ai_anaysis_flag
|
|
41
|
-
|
|
42
|
-
attr_accessor :doc_id
|
|
43
|
-
|
|
40
|
+
# 文件识别结果的高亮区域描述;为空时没有高亮信息。
|
|
44
41
|
attr_accessor :highlight_areas
|
|
45
42
|
|
|
43
|
+
# 上传文件标识;与申报记录 ID 不同。
|
|
46
44
|
attr_accessor :attachment_id
|
|
47
45
|
|
|
46
|
+
# 人工复核状态:10 未复核,20 通过,30 未通过。
|
|
48
47
|
attr_accessor :manual_review_status
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
# AI 文件校验状态;结合校验提示查看结果。
|
|
52
50
|
attr_accessor :ai_status
|
|
53
51
|
|
|
52
|
+
# 是否启用 AI 文件审核。
|
|
54
53
|
attr_accessor :is_aireview
|
|
55
54
|
|
|
56
|
-
# 文件的 SHA-256 十六进制摘要
|
|
57
|
-
attr_accessor :file_hash256
|
|
58
|
-
|
|
59
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
60
56
|
def self.attribute_map
|
|
61
57
|
{
|
|
62
58
|
:'id' => :'id',
|
|
63
|
-
:'file_path' => :'filePath',
|
|
64
59
|
:'file_name' => :'fileName',
|
|
65
60
|
:'status' => :'status',
|
|
66
61
|
:'submitted_at' => :'submittedAt',
|
|
67
62
|
:'file_size' => :'fileSize',
|
|
68
|
-
:'tenant_id' => :'tenantId',
|
|
69
63
|
:'file_type' => :'fileType',
|
|
70
64
|
:'file_url' => :'fileUrl',
|
|
71
|
-
:'anaysis_status' => :'anaysisStatus',
|
|
72
|
-
:'is_ai_anaysis_flag' => :'isAiAnaysisFlag',
|
|
73
|
-
:'doc_id' => :'docId',
|
|
74
65
|
:'highlight_areas' => :'highlightAreas',
|
|
75
66
|
:'attachment_id' => :'attachmentId',
|
|
76
67
|
:'manual_review_status' => :'manualReviewStatus',
|
|
77
|
-
:'is_operated' => :'isOperated',
|
|
78
68
|
:'ai_status' => :'aiStatus',
|
|
79
|
-
:'is_aireview' => :'isAireview'
|
|
80
|
-
:'file_hash256' => :'fileHash256'
|
|
69
|
+
:'is_aireview' => :'isAireview'
|
|
81
70
|
}
|
|
82
71
|
end
|
|
83
72
|
|
|
@@ -95,24 +84,17 @@ module TachainSdk
|
|
|
95
84
|
def self.openapi_types
|
|
96
85
|
{
|
|
97
86
|
:'id' => :'String',
|
|
98
|
-
:'file_path' => :'String',
|
|
99
87
|
:'file_name' => :'String',
|
|
100
88
|
:'status' => :'Integer',
|
|
101
89
|
:'submitted_at' => :'Time',
|
|
102
90
|
:'file_size' => :'Float',
|
|
103
|
-
:'tenant_id' => :'String',
|
|
104
91
|
:'file_type' => :'String',
|
|
105
92
|
:'file_url' => :'String',
|
|
106
|
-
:'
|
|
107
|
-
:'is_ai_anaysis_flag' => :'Boolean',
|
|
108
|
-
:'doc_id' => :'String',
|
|
109
|
-
:'highlight_areas' => :'Object',
|
|
93
|
+
:'highlight_areas' => :'String',
|
|
110
94
|
:'attachment_id' => :'String',
|
|
111
95
|
:'manual_review_status' => :'Integer',
|
|
112
|
-
:'is_operated' => :'Boolean',
|
|
113
96
|
:'ai_status' => :'Integer',
|
|
114
|
-
:'is_aireview' => :'Boolean'
|
|
115
|
-
:'file_hash256' => :'String'
|
|
97
|
+
:'is_aireview' => :'Boolean'
|
|
116
98
|
}
|
|
117
99
|
end
|
|
118
100
|
|
|
@@ -120,22 +102,17 @@ module TachainSdk
|
|
|
120
102
|
def self.openapi_nullable
|
|
121
103
|
Set.new([
|
|
122
104
|
:'id',
|
|
123
|
-
:'file_path',
|
|
124
105
|
:'file_name',
|
|
106
|
+
:'status',
|
|
107
|
+
:'submitted_at',
|
|
125
108
|
:'file_size',
|
|
126
|
-
:'tenant_id',
|
|
127
109
|
:'file_type',
|
|
128
110
|
:'file_url',
|
|
129
|
-
:'anaysis_status',
|
|
130
|
-
:'is_ai_anaysis_flag',
|
|
131
|
-
:'doc_id',
|
|
132
111
|
:'highlight_areas',
|
|
133
112
|
:'attachment_id',
|
|
134
113
|
:'manual_review_status',
|
|
135
|
-
:'is_operated',
|
|
136
114
|
:'ai_status',
|
|
137
|
-
:'is_aireview'
|
|
138
|
-
:'file_hash256'
|
|
115
|
+
:'is_aireview'
|
|
139
116
|
])
|
|
140
117
|
end
|
|
141
118
|
|
|
@@ -143,14 +120,14 @@ module TachainSdk
|
|
|
143
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
121
|
def initialize(attributes = {})
|
|
145
122
|
if (!attributes.is_a?(Hash))
|
|
146
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::
|
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiFileResponse` initialize method"
|
|
147
124
|
end
|
|
148
125
|
|
|
149
126
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
127
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
151
128
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
152
129
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
153
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiFileResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
154
131
|
end
|
|
155
132
|
h[k.to_sym] = v
|
|
156
133
|
}
|
|
@@ -159,34 +136,22 @@ module TachainSdk
|
|
|
159
136
|
self.id = attributes[:'id']
|
|
160
137
|
end
|
|
161
138
|
|
|
162
|
-
if attributes.key?(:'file_path')
|
|
163
|
-
self.file_path = attributes[:'file_path']
|
|
164
|
-
end
|
|
165
|
-
|
|
166
139
|
if attributes.key?(:'file_name')
|
|
167
140
|
self.file_name = attributes[:'file_name']
|
|
168
141
|
end
|
|
169
142
|
|
|
170
143
|
if attributes.key?(:'status')
|
|
171
144
|
self.status = attributes[:'status']
|
|
172
|
-
else
|
|
173
|
-
self.status = nil
|
|
174
145
|
end
|
|
175
146
|
|
|
176
147
|
if attributes.key?(:'submitted_at')
|
|
177
148
|
self.submitted_at = attributes[:'submitted_at']
|
|
178
|
-
else
|
|
179
|
-
self.submitted_at = nil
|
|
180
149
|
end
|
|
181
150
|
|
|
182
151
|
if attributes.key?(:'file_size')
|
|
183
152
|
self.file_size = attributes[:'file_size']
|
|
184
153
|
end
|
|
185
154
|
|
|
186
|
-
if attributes.key?(:'tenant_id')
|
|
187
|
-
self.tenant_id = attributes[:'tenant_id']
|
|
188
|
-
end
|
|
189
|
-
|
|
190
155
|
if attributes.key?(:'file_type')
|
|
191
156
|
self.file_type = attributes[:'file_type']
|
|
192
157
|
end
|
|
@@ -195,18 +160,6 @@ module TachainSdk
|
|
|
195
160
|
self.file_url = attributes[:'file_url']
|
|
196
161
|
end
|
|
197
162
|
|
|
198
|
-
if attributes.key?(:'anaysis_status')
|
|
199
|
-
self.anaysis_status = attributes[:'anaysis_status']
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
if attributes.key?(:'is_ai_anaysis_flag')
|
|
203
|
-
self.is_ai_anaysis_flag = attributes[:'is_ai_anaysis_flag']
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
if attributes.key?(:'doc_id')
|
|
207
|
-
self.doc_id = attributes[:'doc_id']
|
|
208
|
-
end
|
|
209
|
-
|
|
210
163
|
if attributes.key?(:'highlight_areas')
|
|
211
164
|
self.highlight_areas = attributes[:'highlight_areas']
|
|
212
165
|
end
|
|
@@ -219,10 +172,6 @@ module TachainSdk
|
|
|
219
172
|
self.manual_review_status = attributes[:'manual_review_status']
|
|
220
173
|
end
|
|
221
174
|
|
|
222
|
-
if attributes.key?(:'is_operated')
|
|
223
|
-
self.is_operated = attributes[:'is_operated']
|
|
224
|
-
end
|
|
225
|
-
|
|
226
175
|
if attributes.key?(:'ai_status')
|
|
227
176
|
self.ai_status = attributes[:'ai_status']
|
|
228
177
|
end
|
|
@@ -230,10 +179,6 @@ module TachainSdk
|
|
|
230
179
|
if attributes.key?(:'is_aireview')
|
|
231
180
|
self.is_aireview = attributes[:'is_aireview']
|
|
232
181
|
end
|
|
233
|
-
|
|
234
|
-
if attributes.key?(:'file_hash256')
|
|
235
|
-
self.file_hash256 = attributes[:'file_hash256']
|
|
236
|
-
end
|
|
237
182
|
end
|
|
238
183
|
|
|
239
184
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -241,14 +186,6 @@ module TachainSdk
|
|
|
241
186
|
def list_invalid_properties
|
|
242
187
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
243
188
|
invalid_properties = Array.new
|
|
244
|
-
if @status.nil?
|
|
245
|
-
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
if @submitted_at.nil?
|
|
249
|
-
invalid_properties.push('invalid value for "submitted_at", submitted_at cannot be nil.')
|
|
250
|
-
end
|
|
251
|
-
|
|
252
189
|
invalid_properties
|
|
253
190
|
end
|
|
254
191
|
|
|
@@ -256,55 +193,26 @@ module TachainSdk
|
|
|
256
193
|
# @return true if the model is valid
|
|
257
194
|
def valid?
|
|
258
195
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
259
|
-
return false if @status.nil?
|
|
260
|
-
return false if @submitted_at.nil?
|
|
261
196
|
true
|
|
262
197
|
end
|
|
263
198
|
|
|
264
|
-
# Custom attribute writer method with validation
|
|
265
|
-
# @param [Object] status Value to be assigned
|
|
266
|
-
def status=(status)
|
|
267
|
-
if status.nil?
|
|
268
|
-
fail ArgumentError, 'status cannot be nil'
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
@status = status
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
# Custom attribute writer method with validation
|
|
275
|
-
# @param [Object] submitted_at Value to be assigned
|
|
276
|
-
def submitted_at=(submitted_at)
|
|
277
|
-
if submitted_at.nil?
|
|
278
|
-
fail ArgumentError, 'submitted_at cannot be nil'
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
@submitted_at = submitted_at
|
|
282
|
-
end
|
|
283
|
-
|
|
284
199
|
# Checks equality by comparing each attribute.
|
|
285
200
|
# @param [Object] Object to be compared
|
|
286
201
|
def ==(o)
|
|
287
202
|
return true if self.equal?(o)
|
|
288
203
|
self.class == o.class &&
|
|
289
204
|
id == o.id &&
|
|
290
|
-
file_path == o.file_path &&
|
|
291
205
|
file_name == o.file_name &&
|
|
292
206
|
status == o.status &&
|
|
293
207
|
submitted_at == o.submitted_at &&
|
|
294
208
|
file_size == o.file_size &&
|
|
295
|
-
tenant_id == o.tenant_id &&
|
|
296
209
|
file_type == o.file_type &&
|
|
297
210
|
file_url == o.file_url &&
|
|
298
|
-
anaysis_status == o.anaysis_status &&
|
|
299
|
-
is_ai_anaysis_flag == o.is_ai_anaysis_flag &&
|
|
300
|
-
doc_id == o.doc_id &&
|
|
301
211
|
highlight_areas == o.highlight_areas &&
|
|
302
212
|
attachment_id == o.attachment_id &&
|
|
303
213
|
manual_review_status == o.manual_review_status &&
|
|
304
|
-
is_operated == o.is_operated &&
|
|
305
214
|
ai_status == o.ai_status &&
|
|
306
|
-
is_aireview == o.is_aireview
|
|
307
|
-
file_hash256 == o.file_hash256
|
|
215
|
+
is_aireview == o.is_aireview
|
|
308
216
|
end
|
|
309
217
|
|
|
310
218
|
# @see the `==` method
|
|
@@ -316,7 +224,7 @@ module TachainSdk
|
|
|
316
224
|
# Calculates hash code according to all attributes.
|
|
317
225
|
# @return [Integer] Hash code
|
|
318
226
|
def hash
|
|
319
|
-
[id,
|
|
227
|
+
[id, file_name, status, submitted_at, file_size, file_type, file_url, highlight_areas, attachment_id, manual_review_status, ai_status, is_aireview].hash
|
|
320
228
|
end
|
|
321
229
|
|
|
322
230
|
# Builds the object from hash
|