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,481 @@
|
|
|
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 ProductionRawMaterialApiDto < ApiModelBase
|
|
19
|
+
# 原料记录ID
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 生产批次ID
|
|
23
|
+
attr_accessor :production_id
|
|
24
|
+
|
|
25
|
+
# 采购订单明细ID
|
|
26
|
+
attr_accessor :purchase_order_detail_id
|
|
27
|
+
|
|
28
|
+
# 原料名称(冗余)
|
|
29
|
+
attr_accessor :material_name
|
|
30
|
+
|
|
31
|
+
# 使用数量
|
|
32
|
+
attr_accessor :quantity_used
|
|
33
|
+
|
|
34
|
+
# 单位
|
|
35
|
+
attr_accessor :unit
|
|
36
|
+
|
|
37
|
+
# 租户ID
|
|
38
|
+
attr_accessor :tenant_id
|
|
39
|
+
|
|
40
|
+
# 环境类型:0正式,1测试
|
|
41
|
+
attr_accessor :environment_type
|
|
42
|
+
|
|
43
|
+
# 创建用户ID
|
|
44
|
+
attr_accessor :created_by
|
|
45
|
+
|
|
46
|
+
# 创建时间
|
|
47
|
+
attr_accessor :created_at
|
|
48
|
+
|
|
49
|
+
# 公司ID
|
|
50
|
+
attr_accessor :company_id
|
|
51
|
+
|
|
52
|
+
# 成品入库单ID,(MTS Only)
|
|
53
|
+
attr_accessor :receipt_id
|
|
54
|
+
|
|
55
|
+
# -9 禁用, -1 删除, 0 正常
|
|
56
|
+
attr_accessor :status
|
|
57
|
+
|
|
58
|
+
# 修改用户ID
|
|
59
|
+
attr_accessor :updated_by
|
|
60
|
+
|
|
61
|
+
# 更新时间
|
|
62
|
+
attr_accessor :updated_at
|
|
63
|
+
|
|
64
|
+
# 生产损耗率(%)
|
|
65
|
+
attr_accessor :loss
|
|
66
|
+
|
|
67
|
+
# 订单可用量
|
|
68
|
+
attr_accessor :available_quantity
|
|
69
|
+
|
|
70
|
+
# 单位名称
|
|
71
|
+
attr_accessor :u_name
|
|
72
|
+
|
|
73
|
+
# 订单编号
|
|
74
|
+
attr_accessor :order_number
|
|
75
|
+
|
|
76
|
+
# 采购订单日期。外部生产接口按订单号+日期+行号解析采购订单明细时使用。
|
|
77
|
+
attr_accessor :order_date
|
|
78
|
+
|
|
79
|
+
# 订单行号
|
|
80
|
+
attr_accessor :line_number
|
|
81
|
+
|
|
82
|
+
# 订单唯一标识
|
|
83
|
+
attr_accessor :unique_no
|
|
84
|
+
|
|
85
|
+
# 原料编码
|
|
86
|
+
attr_accessor :material_code
|
|
87
|
+
|
|
88
|
+
# 关联采购订单行的阶段编码,用于快速申报领料回显和草稿保存。
|
|
89
|
+
attr_accessor :scope_code
|
|
90
|
+
|
|
91
|
+
# 关联采购订单行用于纤维申报匹配的代表成分编码。
|
|
92
|
+
attr_accessor :single_component
|
|
93
|
+
|
|
94
|
+
# BOM 分组父级 ID,按 BOM 分组展开领料明细时用于保留层级关系。
|
|
95
|
+
attr_accessor :parent_id
|
|
96
|
+
|
|
97
|
+
# 供应商名称
|
|
98
|
+
attr_accessor :supplier_name
|
|
99
|
+
|
|
100
|
+
# 采购附件列表(合同/发票/付款证明/宣誓书)
|
|
101
|
+
attr_accessor :attachments
|
|
102
|
+
|
|
103
|
+
# 采购单订单数量
|
|
104
|
+
attr_accessor :quantity
|
|
105
|
+
|
|
106
|
+
# 采购单单位
|
|
107
|
+
attr_accessor :po_unit
|
|
108
|
+
|
|
109
|
+
attr_accessor :is_transfer
|
|
110
|
+
|
|
111
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
112
|
+
def self.attribute_map
|
|
113
|
+
{
|
|
114
|
+
:'id' => :'id',
|
|
115
|
+
:'production_id' => :'productionId',
|
|
116
|
+
:'purchase_order_detail_id' => :'purchaseOrderDetailId',
|
|
117
|
+
:'material_name' => :'materialName',
|
|
118
|
+
:'quantity_used' => :'quantityUsed',
|
|
119
|
+
:'unit' => :'unit',
|
|
120
|
+
:'tenant_id' => :'tenantId',
|
|
121
|
+
:'environment_type' => :'environmentType',
|
|
122
|
+
:'created_by' => :'createdBy',
|
|
123
|
+
:'created_at' => :'createdAt',
|
|
124
|
+
:'company_id' => :'companyId',
|
|
125
|
+
:'receipt_id' => :'receiptId',
|
|
126
|
+
:'status' => :'status',
|
|
127
|
+
:'updated_by' => :'updatedBy',
|
|
128
|
+
:'updated_at' => :'updatedAt',
|
|
129
|
+
:'loss' => :'loss',
|
|
130
|
+
:'available_quantity' => :'availableQuantity',
|
|
131
|
+
:'u_name' => :'uName',
|
|
132
|
+
:'order_number' => :'orderNumber',
|
|
133
|
+
:'order_date' => :'orderDate',
|
|
134
|
+
:'line_number' => :'lineNumber',
|
|
135
|
+
:'unique_no' => :'uniqueNo',
|
|
136
|
+
:'material_code' => :'materialCode',
|
|
137
|
+
:'scope_code' => :'scopeCode',
|
|
138
|
+
:'single_component' => :'singleComponent',
|
|
139
|
+
:'parent_id' => :'parentId',
|
|
140
|
+
:'supplier_name' => :'supplierName',
|
|
141
|
+
:'attachments' => :'attachments',
|
|
142
|
+
:'quantity' => :'quantity',
|
|
143
|
+
:'po_unit' => :'poUnit',
|
|
144
|
+
:'is_transfer' => :'isTransfer'
|
|
145
|
+
}
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns attribute mapping this model knows about
|
|
149
|
+
def self.acceptable_attribute_map
|
|
150
|
+
attribute_map
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Returns all the JSON keys this model knows about
|
|
154
|
+
def self.acceptable_attributes
|
|
155
|
+
acceptable_attribute_map.values
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Attribute type mapping.
|
|
159
|
+
def self.openapi_types
|
|
160
|
+
{
|
|
161
|
+
:'id' => :'Integer',
|
|
162
|
+
:'production_id' => :'String',
|
|
163
|
+
:'purchase_order_detail_id' => :'String',
|
|
164
|
+
:'material_name' => :'String',
|
|
165
|
+
:'quantity_used' => :'Float',
|
|
166
|
+
:'unit' => :'String',
|
|
167
|
+
:'tenant_id' => :'String',
|
|
168
|
+
:'environment_type' => :'Integer',
|
|
169
|
+
:'created_by' => :'String',
|
|
170
|
+
:'created_at' => :'Time',
|
|
171
|
+
:'company_id' => :'String',
|
|
172
|
+
:'receipt_id' => :'Integer',
|
|
173
|
+
:'status' => :'Integer',
|
|
174
|
+
:'updated_by' => :'String',
|
|
175
|
+
:'updated_at' => :'Time',
|
|
176
|
+
:'loss' => :'Float',
|
|
177
|
+
:'available_quantity' => :'Float',
|
|
178
|
+
:'u_name' => :'String',
|
|
179
|
+
:'order_number' => :'String',
|
|
180
|
+
:'order_date' => :'Time',
|
|
181
|
+
:'line_number' => :'String',
|
|
182
|
+
:'unique_no' => :'String',
|
|
183
|
+
:'material_code' => :'String',
|
|
184
|
+
:'scope_code' => :'String',
|
|
185
|
+
:'single_component' => :'String',
|
|
186
|
+
:'parent_id' => :'String',
|
|
187
|
+
:'supplier_name' => :'String',
|
|
188
|
+
:'attachments' => :'Array<Object>',
|
|
189
|
+
:'quantity' => :'Float',
|
|
190
|
+
:'po_unit' => :'String',
|
|
191
|
+
:'is_transfer' => :'Integer'
|
|
192
|
+
}
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# List of attributes with nullable: true
|
|
196
|
+
def self.openapi_nullable
|
|
197
|
+
Set.new([
|
|
198
|
+
:'id',
|
|
199
|
+
:'production_id',
|
|
200
|
+
:'purchase_order_detail_id',
|
|
201
|
+
:'material_name',
|
|
202
|
+
:'quantity_used',
|
|
203
|
+
:'unit',
|
|
204
|
+
:'tenant_id',
|
|
205
|
+
:'environment_type',
|
|
206
|
+
:'created_by',
|
|
207
|
+
:'created_at',
|
|
208
|
+
:'company_id',
|
|
209
|
+
:'receipt_id',
|
|
210
|
+
:'status',
|
|
211
|
+
:'updated_by',
|
|
212
|
+
:'updated_at',
|
|
213
|
+
:'loss',
|
|
214
|
+
:'available_quantity',
|
|
215
|
+
:'u_name',
|
|
216
|
+
:'order_number',
|
|
217
|
+
:'order_date',
|
|
218
|
+
:'line_number',
|
|
219
|
+
:'unique_no',
|
|
220
|
+
:'material_code',
|
|
221
|
+
:'scope_code',
|
|
222
|
+
:'single_component',
|
|
223
|
+
:'parent_id',
|
|
224
|
+
:'supplier_name',
|
|
225
|
+
:'attachments',
|
|
226
|
+
:'quantity',
|
|
227
|
+
:'po_unit',
|
|
228
|
+
:'is_transfer'
|
|
229
|
+
])
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Initializes the object
|
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
234
|
+
def initialize(attributes = {})
|
|
235
|
+
if (!attributes.is_a?(Hash))
|
|
236
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ProductionRawMaterialApiDto` initialize method"
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
240
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
241
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
242
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
243
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ProductionRawMaterialApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
244
|
+
end
|
|
245
|
+
h[k.to_sym] = v
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'id')
|
|
249
|
+
self.id = attributes[:'id']
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.key?(:'production_id')
|
|
253
|
+
self.production_id = attributes[:'production_id']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.key?(:'purchase_order_detail_id')
|
|
257
|
+
self.purchase_order_detail_id = attributes[:'purchase_order_detail_id']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'material_name')
|
|
261
|
+
self.material_name = attributes[:'material_name']
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if attributes.key?(:'quantity_used')
|
|
265
|
+
self.quantity_used = attributes[:'quantity_used']
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'unit')
|
|
269
|
+
self.unit = attributes[:'unit']
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if attributes.key?(:'tenant_id')
|
|
273
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.key?(:'environment_type')
|
|
277
|
+
self.environment_type = attributes[:'environment_type']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.key?(:'created_by')
|
|
281
|
+
self.created_by = attributes[:'created_by']
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if attributes.key?(:'created_at')
|
|
285
|
+
self.created_at = attributes[:'created_at']
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if attributes.key?(:'company_id')
|
|
289
|
+
self.company_id = attributes[:'company_id']
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if attributes.key?(:'receipt_id')
|
|
293
|
+
self.receipt_id = attributes[:'receipt_id']
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if attributes.key?(:'status')
|
|
297
|
+
self.status = attributes[:'status']
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
if attributes.key?(:'updated_by')
|
|
301
|
+
self.updated_by = attributes[:'updated_by']
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'updated_at')
|
|
305
|
+
self.updated_at = attributes[:'updated_at']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'loss')
|
|
309
|
+
self.loss = attributes[:'loss']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'available_quantity')
|
|
313
|
+
self.available_quantity = attributes[:'available_quantity']
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.key?(:'u_name')
|
|
317
|
+
self.u_name = attributes[:'u_name']
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.key?(:'order_number')
|
|
321
|
+
self.order_number = attributes[:'order_number']
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.key?(:'order_date')
|
|
325
|
+
self.order_date = attributes[:'order_date']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.key?(:'line_number')
|
|
329
|
+
self.line_number = attributes[:'line_number']
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if attributes.key?(:'unique_no')
|
|
333
|
+
self.unique_no = attributes[:'unique_no']
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
if attributes.key?(:'material_code')
|
|
337
|
+
self.material_code = attributes[:'material_code']
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if attributes.key?(:'scope_code')
|
|
341
|
+
self.scope_code = attributes[:'scope_code']
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if attributes.key?(:'single_component')
|
|
345
|
+
self.single_component = attributes[:'single_component']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if attributes.key?(:'parent_id')
|
|
349
|
+
self.parent_id = attributes[:'parent_id']
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if attributes.key?(:'supplier_name')
|
|
353
|
+
self.supplier_name = attributes[:'supplier_name']
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
if attributes.key?(:'attachments')
|
|
357
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
358
|
+
self.attachments = value
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if attributes.key?(:'quantity')
|
|
363
|
+
self.quantity = attributes[:'quantity']
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if attributes.key?(:'po_unit')
|
|
367
|
+
self.po_unit = attributes[:'po_unit']
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if attributes.key?(:'is_transfer')
|
|
371
|
+
self.is_transfer = attributes[:'is_transfer']
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
376
|
+
# @return Array for valid properties with the reasons
|
|
377
|
+
def list_invalid_properties
|
|
378
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
379
|
+
invalid_properties = Array.new
|
|
380
|
+
invalid_properties
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Check to see if the all the properties in the model are valid
|
|
384
|
+
# @return true if the model is valid
|
|
385
|
+
def valid?
|
|
386
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
387
|
+
true
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Checks equality by comparing each attribute.
|
|
391
|
+
# @param [Object] Object to be compared
|
|
392
|
+
def ==(o)
|
|
393
|
+
return true if self.equal?(o)
|
|
394
|
+
self.class == o.class &&
|
|
395
|
+
id == o.id &&
|
|
396
|
+
production_id == o.production_id &&
|
|
397
|
+
purchase_order_detail_id == o.purchase_order_detail_id &&
|
|
398
|
+
material_name == o.material_name &&
|
|
399
|
+
quantity_used == o.quantity_used &&
|
|
400
|
+
unit == o.unit &&
|
|
401
|
+
tenant_id == o.tenant_id &&
|
|
402
|
+
environment_type == o.environment_type &&
|
|
403
|
+
created_by == o.created_by &&
|
|
404
|
+
created_at == o.created_at &&
|
|
405
|
+
company_id == o.company_id &&
|
|
406
|
+
receipt_id == o.receipt_id &&
|
|
407
|
+
status == o.status &&
|
|
408
|
+
updated_by == o.updated_by &&
|
|
409
|
+
updated_at == o.updated_at &&
|
|
410
|
+
loss == o.loss &&
|
|
411
|
+
available_quantity == o.available_quantity &&
|
|
412
|
+
u_name == o.u_name &&
|
|
413
|
+
order_number == o.order_number &&
|
|
414
|
+
order_date == o.order_date &&
|
|
415
|
+
line_number == o.line_number &&
|
|
416
|
+
unique_no == o.unique_no &&
|
|
417
|
+
material_code == o.material_code &&
|
|
418
|
+
scope_code == o.scope_code &&
|
|
419
|
+
single_component == o.single_component &&
|
|
420
|
+
parent_id == o.parent_id &&
|
|
421
|
+
supplier_name == o.supplier_name &&
|
|
422
|
+
attachments == o.attachments &&
|
|
423
|
+
quantity == o.quantity &&
|
|
424
|
+
po_unit == o.po_unit &&
|
|
425
|
+
is_transfer == o.is_transfer
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# @see the `==` method
|
|
429
|
+
# @param [Object] Object to be compared
|
|
430
|
+
def eql?(o)
|
|
431
|
+
self == o
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Calculates hash code according to all attributes.
|
|
435
|
+
# @return [Integer] Hash code
|
|
436
|
+
def hash
|
|
437
|
+
[id, production_id, purchase_order_detail_id, material_name, quantity_used, unit, tenant_id, environment_type, created_by, created_at, company_id, receipt_id, status, updated_by, updated_at, loss, available_quantity, u_name, order_number, order_date, line_number, unique_no, material_code, scope_code, single_component, parent_id, supplier_name, attachments, quantity, po_unit, is_transfer].hash
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Builds the object from hash
|
|
441
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
442
|
+
# @return [Object] Returns the model itself
|
|
443
|
+
def self.build_from_hash(attributes)
|
|
444
|
+
return nil unless attributes.is_a?(Hash)
|
|
445
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
446
|
+
transformed_hash = {}
|
|
447
|
+
openapi_types.each_pair do |key, type|
|
|
448
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
449
|
+
transformed_hash["#{key}"] = nil
|
|
450
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
451
|
+
# check to ensure the input is an array given that the attribute
|
|
452
|
+
# is documented as an array but the input is not
|
|
453
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
454
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
455
|
+
end
|
|
456
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
457
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
new(transformed_hash)
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# Returns the object in the form of hash
|
|
464
|
+
# @return [Hash] Returns the object in the form of hash
|
|
465
|
+
def to_hash
|
|
466
|
+
hash = {}
|
|
467
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
468
|
+
value = self.send(attr)
|
|
469
|
+
if value.nil?
|
|
470
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
471
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
hash[param] = _to_hash(value)
|
|
475
|
+
end
|
|
476
|
+
hash
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
end
|