tachain-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +226 -0
- data/Rakefile +10 -0
- data/git_push.sh +54 -0
- data/lib/tachain-sdk/api/api_declaration_api.rb +396 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +676 -0
- data/lib/tachain-sdk/api/api_enum_api.rb +94 -0
- data/lib/tachain-sdk/api/api_order_api.rb +846 -0
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +170 -0
- data/lib/tachain-sdk/api/api_production_api.rb +466 -0
- data/lib/tachain-sdk/api_client.rb +397 -0
- data/lib/tachain-sdk/api_error.rb +58 -0
- data/lib/tachain-sdk/api_model_base.rb +88 -0
- data/lib/tachain-sdk/configuration.rb +329 -0
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +341 -0
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +209 -0
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_result_dto.rb +197 -0
- data/lib/tachain-sdk/models/api_integration_delete_request.rb +209 -0
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +216 -0
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +243 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_list_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_submit_result_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_delivery_note_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_order_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_production_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_string.rb +200 -0
- data/lib/tachain-sdk/models/attachment_in_api_create_dto.rb +262 -0
- data/lib/tachain-sdk/models/attachment_in_api_dto.rb +363 -0
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +334 -0
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +880 -0
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +749 -0
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +513 -0
- data/lib/tachain-sdk/models/company.rb +780 -0
- data/lib/tachain-sdk/models/company_compliance_profile.rb +547 -0
- data/lib/tachain-sdk/models/company_utility_declaration.rb +592 -0
- data/lib/tachain-sdk/models/customer.rb +569 -0
- data/lib/tachain-sdk/models/delivery_note_api_dto.rb +597 -0
- data/lib/tachain-sdk/models/delivery_note_detail_api_dto.rb +682 -0
- data/lib/tachain-sdk/models/document_type_api_dto.rb +480 -0
- data/lib/tachain-sdk/models/factory.rb +545 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +201 -0
- data/lib/tachain-sdk/models/microsoft_asp_net_core_mvc_problem_details.rb +188 -0
- data/lib/tachain-sdk/models/model1.rb +157 -0
- data/lib/tachain-sdk/models/model3.rb +202 -0
- data/lib/tachain-sdk/models/model4.rb +202 -0
- data/lib/tachain-sdk/models/order.rb +974 -0
- data/lib/tachain-sdk/models/order_api_dto.rb +918 -0
- data/lib/tachain-sdk/models/order_line.rb +1184 -0
- data/lib/tachain-sdk/models/order_line_api_dto.rb +1277 -0
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +270 -0
- data/lib/tachain-sdk/models/order_stage_form_datum_api_dto.rb +260 -0
- data/lib/tachain-sdk/models/order_stage_form_dto.rb +254 -0
- data/lib/tachain-sdk/models/paged_response_delivery_note_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/product_bom_grouping_dto.rb +280 -0
- data/lib/tachain-sdk/models/production_api_dto.rb +639 -0
- data/lib/tachain-sdk/models/production_raw_material_api_dto.rb +481 -0
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +548 -0
- data/lib/tachain-sdk/models/production_sales_order_api_dto.rb +436 -0
- data/lib/tachain-sdk/models/result_api_enum.rb +270 -0
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +331 -0
- data/lib/tachain-sdk/models/result_brand_report_unlinked_order_detail.rb +229 -0
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +418 -0
- data/lib/tachain-sdk/models/result_mapping_order_select.rb +335 -0
- data/lib/tachain-sdk/models/result_order_trace_report.rb +721 -0
- data/lib/tachain-sdk/models/stage_attachment_api_dto.rb +398 -0
- data/lib/tachain-sdk/models/supplier.rb +585 -0
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +383 -0
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +456 -0
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +227 -0
- data/lib/tachain-sdk/models/trader.rb +506 -0
- data/lib/tachain-sdk/signed_api_client.rb +65 -0
- data/lib/tachain-sdk/version.rb +15 -0
- data/lib/tachain-sdk.rb +108 -0
- data/spec/spec_helper.rb +111 -0
- data/tachain-sdk.gemspec +39 -0
- metadata +165 -0
|
@@ -0,0 +1,331 @@
|
|
|
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
|
+
# 品牌报表中分批发货的 KPI 明细信息。
|
|
18
|
+
class ResultBrandReportAllocatedDeliveryKpiDetail < ApiModelBase
|
|
19
|
+
# 订单明细 ID。
|
|
20
|
+
attr_accessor :order_line_id
|
|
21
|
+
|
|
22
|
+
# 订单行号,便于订单级聚合时区分不同明细。
|
|
23
|
+
attr_accessor :line_number
|
|
24
|
+
|
|
25
|
+
# 发货单 ID。
|
|
26
|
+
attr_accessor :delivery_note_id
|
|
27
|
+
|
|
28
|
+
# 发货单号。
|
|
29
|
+
attr_accessor :delivery_note_number
|
|
30
|
+
|
|
31
|
+
# 发货时间。
|
|
32
|
+
attr_accessor :delivery_date
|
|
33
|
+
|
|
34
|
+
# 到港日期,优先读取发货单明细的 GTS 到港日期。
|
|
35
|
+
attr_accessor :arrival_date
|
|
36
|
+
|
|
37
|
+
# 发货数量。
|
|
38
|
+
attr_accessor :quantity
|
|
39
|
+
|
|
40
|
+
# 单位 ID,服务层会继续转换为展示用单位名称。
|
|
41
|
+
attr_accessor :unit_id
|
|
42
|
+
|
|
43
|
+
# 单位名称。
|
|
44
|
+
attr_accessor :unit
|
|
45
|
+
|
|
46
|
+
# 本次发货对应链条最后更新时间。
|
|
47
|
+
attr_accessor :chain_latest_updated_at
|
|
48
|
+
|
|
49
|
+
# 品牌 KPI 截止时间。
|
|
50
|
+
attr_accessor :brand_deadline
|
|
51
|
+
|
|
52
|
+
# 是否品牌逾期。
|
|
53
|
+
attr_accessor :brand_is_overdue
|
|
54
|
+
|
|
55
|
+
# 品牌逾期天数。
|
|
56
|
+
attr_accessor :brand_overdue_days
|
|
57
|
+
|
|
58
|
+
# 供应商 KPI 截止时间。
|
|
59
|
+
attr_accessor :supplier_deadline
|
|
60
|
+
|
|
61
|
+
# 是否供应商逾期。
|
|
62
|
+
attr_accessor :supplier_is_overdue
|
|
63
|
+
|
|
64
|
+
# 供应商逾期天数。
|
|
65
|
+
attr_accessor :supplier_overdue_days
|
|
66
|
+
|
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
68
|
+
def self.attribute_map
|
|
69
|
+
{
|
|
70
|
+
:'order_line_id' => :'orderLineId',
|
|
71
|
+
:'line_number' => :'lineNumber',
|
|
72
|
+
:'delivery_note_id' => :'deliveryNoteId',
|
|
73
|
+
:'delivery_note_number' => :'deliveryNoteNumber',
|
|
74
|
+
:'delivery_date' => :'deliveryDate',
|
|
75
|
+
:'arrival_date' => :'arrivalDate',
|
|
76
|
+
:'quantity' => :'quantity',
|
|
77
|
+
:'unit_id' => :'unitId',
|
|
78
|
+
:'unit' => :'unit',
|
|
79
|
+
:'chain_latest_updated_at' => :'chainLatestUpdatedAt',
|
|
80
|
+
:'brand_deadline' => :'brandDeadline',
|
|
81
|
+
:'brand_is_overdue' => :'brandIsOverdue',
|
|
82
|
+
:'brand_overdue_days' => :'brandOverdueDays',
|
|
83
|
+
:'supplier_deadline' => :'supplierDeadline',
|
|
84
|
+
:'supplier_is_overdue' => :'supplierIsOverdue',
|
|
85
|
+
:'supplier_overdue_days' => :'supplierOverdueDays'
|
|
86
|
+
}
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Returns attribute mapping this model knows about
|
|
90
|
+
def self.acceptable_attribute_map
|
|
91
|
+
attribute_map
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Returns all the JSON keys this model knows about
|
|
95
|
+
def self.acceptable_attributes
|
|
96
|
+
acceptable_attribute_map.values
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Attribute type mapping.
|
|
100
|
+
def self.openapi_types
|
|
101
|
+
{
|
|
102
|
+
:'order_line_id' => :'String',
|
|
103
|
+
:'line_number' => :'String',
|
|
104
|
+
:'delivery_note_id' => :'Integer',
|
|
105
|
+
:'delivery_note_number' => :'String',
|
|
106
|
+
:'delivery_date' => :'Time',
|
|
107
|
+
:'arrival_date' => :'Time',
|
|
108
|
+
:'quantity' => :'Float',
|
|
109
|
+
:'unit_id' => :'String',
|
|
110
|
+
:'unit' => :'String',
|
|
111
|
+
:'chain_latest_updated_at' => :'Time',
|
|
112
|
+
:'brand_deadline' => :'Time',
|
|
113
|
+
:'brand_is_overdue' => :'Boolean',
|
|
114
|
+
:'brand_overdue_days' => :'Integer',
|
|
115
|
+
:'supplier_deadline' => :'Time',
|
|
116
|
+
:'supplier_is_overdue' => :'Boolean',
|
|
117
|
+
:'supplier_overdue_days' => :'Integer'
|
|
118
|
+
}
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# List of attributes with nullable: true
|
|
122
|
+
def self.openapi_nullable
|
|
123
|
+
Set.new([
|
|
124
|
+
:'order_line_id',
|
|
125
|
+
:'line_number',
|
|
126
|
+
:'delivery_note_number',
|
|
127
|
+
:'delivery_date',
|
|
128
|
+
:'arrival_date',
|
|
129
|
+
:'quantity',
|
|
130
|
+
:'unit_id',
|
|
131
|
+
:'unit',
|
|
132
|
+
:'chain_latest_updated_at',
|
|
133
|
+
:'brand_deadline',
|
|
134
|
+
:'brand_is_overdue',
|
|
135
|
+
:'brand_overdue_days',
|
|
136
|
+
:'supplier_deadline',
|
|
137
|
+
:'supplier_is_overdue',
|
|
138
|
+
:'supplier_overdue_days'
|
|
139
|
+
])
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Initializes the object
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
def initialize(attributes = {})
|
|
145
|
+
if (!attributes.is_a?(Hash))
|
|
146
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ResultBrandReportAllocatedDeliveryKpiDetail` initialize method"
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
151
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
152
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
153
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ResultBrandReportAllocatedDeliveryKpiDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
154
|
+
end
|
|
155
|
+
h[k.to_sym] = v
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'order_line_id')
|
|
159
|
+
self.order_line_id = attributes[:'order_line_id']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'line_number')
|
|
163
|
+
self.line_number = attributes[:'line_number']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'delivery_note_id')
|
|
167
|
+
self.delivery_note_id = attributes[:'delivery_note_id']
|
|
168
|
+
else
|
|
169
|
+
self.delivery_note_id = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'delivery_note_number')
|
|
173
|
+
self.delivery_note_number = attributes[:'delivery_note_number']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'delivery_date')
|
|
177
|
+
self.delivery_date = attributes[:'delivery_date']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'arrival_date')
|
|
181
|
+
self.arrival_date = attributes[:'arrival_date']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'quantity')
|
|
185
|
+
self.quantity = attributes[:'quantity']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'unit_id')
|
|
189
|
+
self.unit_id = attributes[:'unit_id']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'unit')
|
|
193
|
+
self.unit = attributes[:'unit']
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'chain_latest_updated_at')
|
|
197
|
+
self.chain_latest_updated_at = attributes[:'chain_latest_updated_at']
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'brand_deadline')
|
|
201
|
+
self.brand_deadline = attributes[:'brand_deadline']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'brand_is_overdue')
|
|
205
|
+
self.brand_is_overdue = attributes[:'brand_is_overdue']
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'brand_overdue_days')
|
|
209
|
+
self.brand_overdue_days = attributes[:'brand_overdue_days']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'supplier_deadline')
|
|
213
|
+
self.supplier_deadline = attributes[:'supplier_deadline']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'supplier_is_overdue')
|
|
217
|
+
self.supplier_is_overdue = attributes[:'supplier_is_overdue']
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'supplier_overdue_days')
|
|
221
|
+
self.supplier_overdue_days = attributes[:'supplier_overdue_days']
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
226
|
+
# @return Array for valid properties with the reasons
|
|
227
|
+
def list_invalid_properties
|
|
228
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
229
|
+
invalid_properties = Array.new
|
|
230
|
+
if @delivery_note_id.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "delivery_note_id", delivery_note_id cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
invalid_properties
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Check to see if the all the properties in the model are valid
|
|
238
|
+
# @return true if the model is valid
|
|
239
|
+
def valid?
|
|
240
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
241
|
+
return false if @delivery_note_id.nil?
|
|
242
|
+
true
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Custom attribute writer method with validation
|
|
246
|
+
# @param [Object] delivery_note_id Value to be assigned
|
|
247
|
+
def delivery_note_id=(delivery_note_id)
|
|
248
|
+
if delivery_note_id.nil?
|
|
249
|
+
fail ArgumentError, 'delivery_note_id cannot be nil'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
@delivery_note_id = delivery_note_id
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Checks equality by comparing each attribute.
|
|
256
|
+
# @param [Object] Object to be compared
|
|
257
|
+
def ==(o)
|
|
258
|
+
return true if self.equal?(o)
|
|
259
|
+
self.class == o.class &&
|
|
260
|
+
order_line_id == o.order_line_id &&
|
|
261
|
+
line_number == o.line_number &&
|
|
262
|
+
delivery_note_id == o.delivery_note_id &&
|
|
263
|
+
delivery_note_number == o.delivery_note_number &&
|
|
264
|
+
delivery_date == o.delivery_date &&
|
|
265
|
+
arrival_date == o.arrival_date &&
|
|
266
|
+
quantity == o.quantity &&
|
|
267
|
+
unit_id == o.unit_id &&
|
|
268
|
+
unit == o.unit &&
|
|
269
|
+
chain_latest_updated_at == o.chain_latest_updated_at &&
|
|
270
|
+
brand_deadline == o.brand_deadline &&
|
|
271
|
+
brand_is_overdue == o.brand_is_overdue &&
|
|
272
|
+
brand_overdue_days == o.brand_overdue_days &&
|
|
273
|
+
supplier_deadline == o.supplier_deadline &&
|
|
274
|
+
supplier_is_overdue == o.supplier_is_overdue &&
|
|
275
|
+
supplier_overdue_days == o.supplier_overdue_days
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# @see the `==` method
|
|
279
|
+
# @param [Object] Object to be compared
|
|
280
|
+
def eql?(o)
|
|
281
|
+
self == o
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Calculates hash code according to all attributes.
|
|
285
|
+
# @return [Integer] Hash code
|
|
286
|
+
def hash
|
|
287
|
+
[order_line_id, line_number, delivery_note_id, delivery_note_number, delivery_date, arrival_date, quantity, unit_id, unit, chain_latest_updated_at, brand_deadline, brand_is_overdue, brand_overdue_days, supplier_deadline, supplier_is_overdue, supplier_overdue_days].hash
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Builds the object from hash
|
|
291
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
292
|
+
# @return [Object] Returns the model itself
|
|
293
|
+
def self.build_from_hash(attributes)
|
|
294
|
+
return nil unless attributes.is_a?(Hash)
|
|
295
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
296
|
+
transformed_hash = {}
|
|
297
|
+
openapi_types.each_pair do |key, type|
|
|
298
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
299
|
+
transformed_hash["#{key}"] = nil
|
|
300
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
301
|
+
# check to ensure the input is an array given that the attribute
|
|
302
|
+
# is documented as an array but the input is not
|
|
303
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
304
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
305
|
+
end
|
|
306
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
307
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
new(transformed_hash)
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Returns the object in the form of hash
|
|
314
|
+
# @return [Hash] Returns the object in the form of hash
|
|
315
|
+
def to_hash
|
|
316
|
+
hash = {}
|
|
317
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
318
|
+
value = self.send(attr)
|
|
319
|
+
if value.nil?
|
|
320
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
321
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
hash[param] = _to_hash(value)
|
|
325
|
+
end
|
|
326
|
+
hash
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
end
|
|
@@ -0,0 +1,229 @@
|
|
|
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 ResultBrandReportUnlinkedOrderDetail < ApiModelBase
|
|
19
|
+
attr_accessor :order_line_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :order_number
|
|
22
|
+
|
|
23
|
+
attr_accessor :line_number
|
|
24
|
+
|
|
25
|
+
attr_accessor :supplier_id
|
|
26
|
+
|
|
27
|
+
attr_accessor :supplier_name
|
|
28
|
+
|
|
29
|
+
attr_accessor :material_code
|
|
30
|
+
|
|
31
|
+
attr_accessor :material_name
|
|
32
|
+
|
|
33
|
+
attr_accessor :quantity
|
|
34
|
+
|
|
35
|
+
attr_accessor :unit
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'order_line_id' => :'orderLineId',
|
|
41
|
+
:'order_number' => :'orderNumber',
|
|
42
|
+
:'line_number' => :'lineNumber',
|
|
43
|
+
:'supplier_id' => :'supplierId',
|
|
44
|
+
:'supplier_name' => :'supplierName',
|
|
45
|
+
:'material_code' => :'materialCode',
|
|
46
|
+
:'material_name' => :'materialName',
|
|
47
|
+
:'quantity' => :'quantity',
|
|
48
|
+
:'unit' => :'unit'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'order_line_id' => :'String',
|
|
66
|
+
:'order_number' => :'String',
|
|
67
|
+
:'line_number' => :'String',
|
|
68
|
+
:'supplier_id' => :'String',
|
|
69
|
+
:'supplier_name' => :'String',
|
|
70
|
+
:'material_code' => :'String',
|
|
71
|
+
:'material_name' => :'String',
|
|
72
|
+
:'quantity' => :'Float',
|
|
73
|
+
:'unit' => :'String'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
:'order_line_id',
|
|
81
|
+
:'order_number',
|
|
82
|
+
:'line_number',
|
|
83
|
+
:'supplier_id',
|
|
84
|
+
:'supplier_name',
|
|
85
|
+
:'material_code',
|
|
86
|
+
:'material_name',
|
|
87
|
+
:'quantity',
|
|
88
|
+
:'unit'
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ResultBrandReportUnlinkedOrderDetail` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ResultBrandReportUnlinkedOrderDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
|
+
end
|
|
105
|
+
h[k.to_sym] = v
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'order_line_id')
|
|
109
|
+
self.order_line_id = attributes[:'order_line_id']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'order_number')
|
|
113
|
+
self.order_number = attributes[:'order_number']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'line_number')
|
|
117
|
+
self.line_number = attributes[:'line_number']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'supplier_id')
|
|
121
|
+
self.supplier_id = attributes[:'supplier_id']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'supplier_name')
|
|
125
|
+
self.supplier_name = attributes[:'supplier_name']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'material_code')
|
|
129
|
+
self.material_code = attributes[:'material_code']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'material_name')
|
|
133
|
+
self.material_name = attributes[:'material_name']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'quantity')
|
|
137
|
+
self.quantity = attributes[:'quantity']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'unit')
|
|
141
|
+
self.unit = attributes[:'unit']
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
146
|
+
# @return Array for valid properties with the reasons
|
|
147
|
+
def list_invalid_properties
|
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
149
|
+
invalid_properties = Array.new
|
|
150
|
+
invalid_properties
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Check to see if the all the properties in the model are valid
|
|
154
|
+
# @return true if the model is valid
|
|
155
|
+
def valid?
|
|
156
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
157
|
+
true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Checks equality by comparing each attribute.
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def ==(o)
|
|
163
|
+
return true if self.equal?(o)
|
|
164
|
+
self.class == o.class &&
|
|
165
|
+
order_line_id == o.order_line_id &&
|
|
166
|
+
order_number == o.order_number &&
|
|
167
|
+
line_number == o.line_number &&
|
|
168
|
+
supplier_id == o.supplier_id &&
|
|
169
|
+
supplier_name == o.supplier_name &&
|
|
170
|
+
material_code == o.material_code &&
|
|
171
|
+
material_name == o.material_name &&
|
|
172
|
+
quantity == o.quantity &&
|
|
173
|
+
unit == o.unit
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @see the `==` method
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def eql?(o)
|
|
179
|
+
self == o
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Calculates hash code according to all attributes.
|
|
183
|
+
# @return [Integer] Hash code
|
|
184
|
+
def hash
|
|
185
|
+
[order_line_id, order_number, line_number, supplier_id, supplier_name, material_code, material_name, quantity, unit].hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Builds the object from hash
|
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
190
|
+
# @return [Object] Returns the model itself
|
|
191
|
+
def self.build_from_hash(attributes)
|
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
|
193
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
194
|
+
transformed_hash = {}
|
|
195
|
+
openapi_types.each_pair do |key, type|
|
|
196
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = nil
|
|
198
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
199
|
+
# check to ensure the input is an array given that the attribute
|
|
200
|
+
# is documented as an array but the input is not
|
|
201
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
202
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
203
|
+
end
|
|
204
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
new(transformed_hash)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Returns the object in the form of hash
|
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
|
213
|
+
def to_hash
|
|
214
|
+
hash = {}
|
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
216
|
+
value = self.send(attr)
|
|
217
|
+
if value.nil?
|
|
218
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
219
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
hash[param] = _to_hash(value)
|
|
223
|
+
end
|
|
224
|
+
hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|