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,974 @@
|
|
|
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 Order < ApiModelBase
|
|
19
|
+
# 订单唯一标识
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 订单编号
|
|
23
|
+
attr_accessor :order_number
|
|
24
|
+
|
|
25
|
+
# 订购日期
|
|
26
|
+
attr_accessor :order_date
|
|
27
|
+
|
|
28
|
+
# 订单类型:0 正式, 1 测试,2 预下单
|
|
29
|
+
attr_accessor :order_type
|
|
30
|
+
|
|
31
|
+
# 客户ID
|
|
32
|
+
attr_accessor :customer_id
|
|
33
|
+
|
|
34
|
+
attr_accessor :customer_name
|
|
35
|
+
|
|
36
|
+
attr_accessor :supplier_name
|
|
37
|
+
|
|
38
|
+
# 供应商ID
|
|
39
|
+
attr_accessor :supplier_id
|
|
40
|
+
|
|
41
|
+
# 制造商ID
|
|
42
|
+
attr_accessor :facility_id
|
|
43
|
+
|
|
44
|
+
# 合同编号
|
|
45
|
+
attr_accessor :contract_no
|
|
46
|
+
|
|
47
|
+
# 发票号
|
|
48
|
+
attr_accessor :invoice_no
|
|
49
|
+
|
|
50
|
+
# 订单总额
|
|
51
|
+
attr_accessor :total_amount
|
|
52
|
+
|
|
53
|
+
# 交易币种
|
|
54
|
+
attr_accessor :currency_code
|
|
55
|
+
|
|
56
|
+
# 品牌
|
|
57
|
+
attr_accessor :brand
|
|
58
|
+
|
|
59
|
+
# 备注
|
|
60
|
+
attr_accessor :remarks
|
|
61
|
+
|
|
62
|
+
# -9 禁用, -1 删除, 0 正常
|
|
63
|
+
attr_accessor :status
|
|
64
|
+
|
|
65
|
+
# 客户租户ID
|
|
66
|
+
attr_accessor :customer_tenant_id
|
|
67
|
+
|
|
68
|
+
# 供应商租户ID
|
|
69
|
+
attr_accessor :supplier_tenant_id
|
|
70
|
+
|
|
71
|
+
# 租户ID(创建者)
|
|
72
|
+
attr_accessor :tenant_id
|
|
73
|
+
|
|
74
|
+
# 环境类型:0 正式, 1 测试
|
|
75
|
+
attr_accessor :environment_type
|
|
76
|
+
|
|
77
|
+
# 创建用户ID
|
|
78
|
+
attr_accessor :created_by
|
|
79
|
+
|
|
80
|
+
# 修改用户ID
|
|
81
|
+
attr_accessor :updated_by
|
|
82
|
+
|
|
83
|
+
# 部门ID
|
|
84
|
+
attr_accessor :division_id
|
|
85
|
+
|
|
86
|
+
# 创建时间
|
|
87
|
+
attr_accessor :created_at
|
|
88
|
+
|
|
89
|
+
# 更新时间
|
|
90
|
+
attr_accessor :updated_at
|
|
91
|
+
|
|
92
|
+
# 品牌商:可多个值,使用|分割,
|
|
93
|
+
attr_accessor :brand_company_id
|
|
94
|
+
|
|
95
|
+
# 纤维商:可多个值,使用|分割,
|
|
96
|
+
attr_accessor :fiber_company_id
|
|
97
|
+
|
|
98
|
+
attr_accessor :order_line
|
|
99
|
+
|
|
100
|
+
# 订单明细
|
|
101
|
+
attr_accessor :order_lines
|
|
102
|
+
|
|
103
|
+
# 采购头部回显使用工厂,优先取与对应明细原产国不同国家的工厂,不入库。
|
|
104
|
+
attr_accessor :use_factory_id
|
|
105
|
+
|
|
106
|
+
attr_accessor :order_t_name
|
|
107
|
+
|
|
108
|
+
# 是否是订单最后尾端一级默认否,当订单的供应商选择是无需上线时为true
|
|
109
|
+
attr_accessor :is_end_order
|
|
110
|
+
|
|
111
|
+
# 申报情况是否完成,1完成:0未完成
|
|
112
|
+
attr_accessor :declare_complete
|
|
113
|
+
|
|
114
|
+
# 销售订单贸易标识:0 非贸易,1 含贸易销售单
|
|
115
|
+
attr_accessor :trade_type
|
|
116
|
+
|
|
117
|
+
# 订单来源:0 默认创建,9 主数据抓取
|
|
118
|
+
attr_accessor :source
|
|
119
|
+
|
|
120
|
+
# 整单申报文件风险邮件提醒情况。0客户不需要邮件提醒,1客户需要邮件提醒,2已经邮件提醒,3ai审核存在
|
|
121
|
+
attr_accessor :po_riskattachment_email
|
|
122
|
+
|
|
123
|
+
# 整单申报文件风险邮件提醒情况。0供应商不需要邮件提醒,1供应商需要邮件提醒,2已经邮件提醒,3ai审核存在
|
|
124
|
+
attr_accessor :so_riskattachment_email
|
|
125
|
+
|
|
126
|
+
# 供应商国家
|
|
127
|
+
attr_accessor :supplier_country
|
|
128
|
+
|
|
129
|
+
# 供应商编码
|
|
130
|
+
attr_accessor :supplier_code
|
|
131
|
+
|
|
132
|
+
# 供应商销售范围
|
|
133
|
+
attr_accessor :sales_scope
|
|
134
|
+
|
|
135
|
+
attr_accessor :customer_code
|
|
136
|
+
|
|
137
|
+
attr_accessor :customer_country
|
|
138
|
+
|
|
139
|
+
attr_accessor :company_id
|
|
140
|
+
|
|
141
|
+
# 供应商邮箱
|
|
142
|
+
attr_accessor :contact_email
|
|
143
|
+
|
|
144
|
+
# 供应商联系人
|
|
145
|
+
attr_accessor :contact_person
|
|
146
|
+
|
|
147
|
+
# 供应商电话
|
|
148
|
+
attr_accessor :contact_phone
|
|
149
|
+
|
|
150
|
+
# 是否创建成品
|
|
151
|
+
attr_accessor :is_create_product
|
|
152
|
+
|
|
153
|
+
attr_accessor :po_status
|
|
154
|
+
|
|
155
|
+
# 销售状态:待接单 9|待生产 10|待发货 20|已发货 30|待收货 40|已收货 50|已使用 60|已用完 70
|
|
156
|
+
attr_accessor :so_status
|
|
157
|
+
|
|
158
|
+
# 订单中的文件信息
|
|
159
|
+
attr_accessor :attachments
|
|
160
|
+
|
|
161
|
+
attr_accessor :is_declare
|
|
162
|
+
|
|
163
|
+
attr_accessor :production_po_ids
|
|
164
|
+
|
|
165
|
+
attr_accessor :production_so_ids
|
|
166
|
+
|
|
167
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
168
|
+
def self.attribute_map
|
|
169
|
+
{
|
|
170
|
+
:'id' => :'id',
|
|
171
|
+
:'order_number' => :'orderNumber',
|
|
172
|
+
:'order_date' => :'orderDate',
|
|
173
|
+
:'order_type' => :'orderType',
|
|
174
|
+
:'customer_id' => :'customerId',
|
|
175
|
+
:'customer_name' => :'customerName',
|
|
176
|
+
:'supplier_name' => :'supplierName',
|
|
177
|
+
:'supplier_id' => :'supplierId',
|
|
178
|
+
:'facility_id' => :'facilityId',
|
|
179
|
+
:'contract_no' => :'contractNo',
|
|
180
|
+
:'invoice_no' => :'invoiceNo',
|
|
181
|
+
:'total_amount' => :'totalAmount',
|
|
182
|
+
:'currency_code' => :'currencyCode',
|
|
183
|
+
:'brand' => :'brand',
|
|
184
|
+
:'remarks' => :'remarks',
|
|
185
|
+
:'status' => :'status',
|
|
186
|
+
:'customer_tenant_id' => :'customerTenantId',
|
|
187
|
+
:'supplier_tenant_id' => :'supplierTenantId',
|
|
188
|
+
:'tenant_id' => :'tenantId',
|
|
189
|
+
:'environment_type' => :'environmentType',
|
|
190
|
+
:'created_by' => :'createdBy',
|
|
191
|
+
:'updated_by' => :'updatedBy',
|
|
192
|
+
:'division_id' => :'divisionId',
|
|
193
|
+
:'created_at' => :'createdAt',
|
|
194
|
+
:'updated_at' => :'updatedAt',
|
|
195
|
+
:'brand_company_id' => :'brandCompanyId',
|
|
196
|
+
:'fiber_company_id' => :'fiberCompanyId',
|
|
197
|
+
:'order_line' => :'orderLine',
|
|
198
|
+
:'order_lines' => :'orderLines',
|
|
199
|
+
:'use_factory_id' => :'useFactoryId',
|
|
200
|
+
:'order_t_name' => :'orderTName',
|
|
201
|
+
:'is_end_order' => :'isEndOrder',
|
|
202
|
+
:'declare_complete' => :'declareComplete',
|
|
203
|
+
:'trade_type' => :'tradeType',
|
|
204
|
+
:'source' => :'source',
|
|
205
|
+
:'po_riskattachment_email' => :'poRiskattachmentEmail',
|
|
206
|
+
:'so_riskattachment_email' => :'soRiskattachmentEmail',
|
|
207
|
+
:'supplier_country' => :'supplierCountry',
|
|
208
|
+
:'supplier_code' => :'supplierCode',
|
|
209
|
+
:'sales_scope' => :'salesScope',
|
|
210
|
+
:'customer_code' => :'customerCode',
|
|
211
|
+
:'customer_country' => :'customerCountry',
|
|
212
|
+
:'company_id' => :'companyId',
|
|
213
|
+
:'contact_email' => :'contactEmail',
|
|
214
|
+
:'contact_person' => :'contactPerson',
|
|
215
|
+
:'contact_phone' => :'contactPhone',
|
|
216
|
+
:'is_create_product' => :'isCreateProduct',
|
|
217
|
+
:'po_status' => :'poStatus',
|
|
218
|
+
:'so_status' => :'soStatus',
|
|
219
|
+
:'attachments' => :'attachments',
|
|
220
|
+
:'is_declare' => :'isDeclare',
|
|
221
|
+
:'production_po_ids' => :'productionPoIds',
|
|
222
|
+
:'production_so_ids' => :'productionSoIds'
|
|
223
|
+
}
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns attribute mapping this model knows about
|
|
227
|
+
def self.acceptable_attribute_map
|
|
228
|
+
attribute_map
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns all the JSON keys this model knows about
|
|
232
|
+
def self.acceptable_attributes
|
|
233
|
+
acceptable_attribute_map.values
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Attribute type mapping.
|
|
237
|
+
def self.openapi_types
|
|
238
|
+
{
|
|
239
|
+
:'id' => :'String',
|
|
240
|
+
:'order_number' => :'String',
|
|
241
|
+
:'order_date' => :'Time',
|
|
242
|
+
:'order_type' => :'Integer',
|
|
243
|
+
:'customer_id' => :'String',
|
|
244
|
+
:'customer_name' => :'String',
|
|
245
|
+
:'supplier_name' => :'String',
|
|
246
|
+
:'supplier_id' => :'String',
|
|
247
|
+
:'facility_id' => :'String',
|
|
248
|
+
:'contract_no' => :'String',
|
|
249
|
+
:'invoice_no' => :'String',
|
|
250
|
+
:'total_amount' => :'Float',
|
|
251
|
+
:'currency_code' => :'String',
|
|
252
|
+
:'brand' => :'String',
|
|
253
|
+
:'remarks' => :'String',
|
|
254
|
+
:'status' => :'Integer',
|
|
255
|
+
:'customer_tenant_id' => :'String',
|
|
256
|
+
:'supplier_tenant_id' => :'String',
|
|
257
|
+
:'tenant_id' => :'String',
|
|
258
|
+
:'environment_type' => :'Integer',
|
|
259
|
+
:'created_by' => :'String',
|
|
260
|
+
:'updated_by' => :'String',
|
|
261
|
+
:'division_id' => :'String',
|
|
262
|
+
:'created_at' => :'Time',
|
|
263
|
+
:'updated_at' => :'Time',
|
|
264
|
+
:'brand_company_id' => :'String',
|
|
265
|
+
:'fiber_company_id' => :'String',
|
|
266
|
+
:'order_line' => :'OrderLine',
|
|
267
|
+
:'order_lines' => :'Array<OrderLine>',
|
|
268
|
+
:'use_factory_id' => :'String',
|
|
269
|
+
:'order_t_name' => :'String',
|
|
270
|
+
:'is_end_order' => :'Boolean',
|
|
271
|
+
:'declare_complete' => :'Boolean',
|
|
272
|
+
:'trade_type' => :'Integer',
|
|
273
|
+
:'source' => :'Integer',
|
|
274
|
+
:'po_riskattachment_email' => :'Integer',
|
|
275
|
+
:'so_riskattachment_email' => :'Integer',
|
|
276
|
+
:'supplier_country' => :'String',
|
|
277
|
+
:'supplier_code' => :'String',
|
|
278
|
+
:'sales_scope' => :'String',
|
|
279
|
+
:'customer_code' => :'String',
|
|
280
|
+
:'customer_country' => :'String',
|
|
281
|
+
:'company_id' => :'String',
|
|
282
|
+
:'contact_email' => :'String',
|
|
283
|
+
:'contact_person' => :'String',
|
|
284
|
+
:'contact_phone' => :'String',
|
|
285
|
+
:'is_create_product' => :'Boolean',
|
|
286
|
+
:'po_status' => :'Integer',
|
|
287
|
+
:'so_status' => :'Integer',
|
|
288
|
+
:'attachments' => :'Array<Object>',
|
|
289
|
+
:'is_declare' => :'Boolean',
|
|
290
|
+
:'production_po_ids' => :'Array<String>',
|
|
291
|
+
:'production_so_ids' => :'Array<String>'
|
|
292
|
+
}
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# List of attributes with nullable: true
|
|
296
|
+
def self.openapi_nullable
|
|
297
|
+
Set.new([
|
|
298
|
+
:'customer_name',
|
|
299
|
+
:'supplier_name',
|
|
300
|
+
:'facility_id',
|
|
301
|
+
:'contract_no',
|
|
302
|
+
:'invoice_no',
|
|
303
|
+
:'total_amount',
|
|
304
|
+
:'currency_code',
|
|
305
|
+
:'brand',
|
|
306
|
+
:'remarks',
|
|
307
|
+
:'customer_tenant_id',
|
|
308
|
+
:'supplier_tenant_id',
|
|
309
|
+
:'updated_by',
|
|
310
|
+
:'division_id',
|
|
311
|
+
:'updated_at',
|
|
312
|
+
:'brand_company_id',
|
|
313
|
+
:'fiber_company_id',
|
|
314
|
+
:'use_factory_id',
|
|
315
|
+
:'order_t_name',
|
|
316
|
+
:'is_end_order',
|
|
317
|
+
:'declare_complete',
|
|
318
|
+
:'trade_type',
|
|
319
|
+
:'source',
|
|
320
|
+
:'po_riskattachment_email',
|
|
321
|
+
:'so_riskattachment_email',
|
|
322
|
+
:'supplier_country',
|
|
323
|
+
:'supplier_code',
|
|
324
|
+
:'sales_scope',
|
|
325
|
+
:'customer_code',
|
|
326
|
+
:'customer_country',
|
|
327
|
+
:'company_id',
|
|
328
|
+
:'contact_email',
|
|
329
|
+
:'contact_person',
|
|
330
|
+
:'contact_phone',
|
|
331
|
+
:'is_declare',
|
|
332
|
+
:'production_po_ids',
|
|
333
|
+
:'production_so_ids'
|
|
334
|
+
])
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Initializes the object
|
|
338
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
339
|
+
def initialize(attributes = {})
|
|
340
|
+
if (!attributes.is_a?(Hash))
|
|
341
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::Order` initialize method"
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
345
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
346
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
347
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
348
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::Order`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
349
|
+
end
|
|
350
|
+
h[k.to_sym] = v
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if attributes.key?(:'id')
|
|
354
|
+
self.id = attributes[:'id']
|
|
355
|
+
else
|
|
356
|
+
self.id = nil
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
if attributes.key?(:'order_number')
|
|
360
|
+
self.order_number = attributes[:'order_number']
|
|
361
|
+
else
|
|
362
|
+
self.order_number = nil
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if attributes.key?(:'order_date')
|
|
366
|
+
self.order_date = attributes[:'order_date']
|
|
367
|
+
else
|
|
368
|
+
self.order_date = nil
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
if attributes.key?(:'order_type')
|
|
372
|
+
self.order_type = attributes[:'order_type']
|
|
373
|
+
else
|
|
374
|
+
self.order_type = nil
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if attributes.key?(:'customer_id')
|
|
378
|
+
self.customer_id = attributes[:'customer_id']
|
|
379
|
+
else
|
|
380
|
+
self.customer_id = nil
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
if attributes.key?(:'customer_name')
|
|
384
|
+
self.customer_name = attributes[:'customer_name']
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
if attributes.key?(:'supplier_name')
|
|
388
|
+
self.supplier_name = attributes[:'supplier_name']
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
if attributes.key?(:'supplier_id')
|
|
392
|
+
self.supplier_id = attributes[:'supplier_id']
|
|
393
|
+
else
|
|
394
|
+
self.supplier_id = nil
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if attributes.key?(:'facility_id')
|
|
398
|
+
self.facility_id = attributes[:'facility_id']
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if attributes.key?(:'contract_no')
|
|
402
|
+
self.contract_no = attributes[:'contract_no']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'invoice_no')
|
|
406
|
+
self.invoice_no = attributes[:'invoice_no']
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if attributes.key?(:'total_amount')
|
|
410
|
+
self.total_amount = attributes[:'total_amount']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'currency_code')
|
|
414
|
+
self.currency_code = attributes[:'currency_code']
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
if attributes.key?(:'brand')
|
|
418
|
+
self.brand = attributes[:'brand']
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if attributes.key?(:'remarks')
|
|
422
|
+
self.remarks = attributes[:'remarks']
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'status')
|
|
426
|
+
self.status = attributes[:'status']
|
|
427
|
+
else
|
|
428
|
+
self.status = nil
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
if attributes.key?(:'customer_tenant_id')
|
|
432
|
+
self.customer_tenant_id = attributes[:'customer_tenant_id']
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if attributes.key?(:'supplier_tenant_id')
|
|
436
|
+
self.supplier_tenant_id = attributes[:'supplier_tenant_id']
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
if attributes.key?(:'tenant_id')
|
|
440
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
441
|
+
else
|
|
442
|
+
self.tenant_id = nil
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
if attributes.key?(:'environment_type')
|
|
446
|
+
self.environment_type = attributes[:'environment_type']
|
|
447
|
+
else
|
|
448
|
+
self.environment_type = nil
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
if attributes.key?(:'created_by')
|
|
452
|
+
self.created_by = attributes[:'created_by']
|
|
453
|
+
else
|
|
454
|
+
self.created_by = nil
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
if attributes.key?(:'updated_by')
|
|
458
|
+
self.updated_by = attributes[:'updated_by']
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
if attributes.key?(:'division_id')
|
|
462
|
+
self.division_id = attributes[:'division_id']
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
if attributes.key?(:'created_at')
|
|
466
|
+
self.created_at = attributes[:'created_at']
|
|
467
|
+
else
|
|
468
|
+
self.created_at = nil
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
if attributes.key?(:'updated_at')
|
|
472
|
+
self.updated_at = attributes[:'updated_at']
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
if attributes.key?(:'brand_company_id')
|
|
476
|
+
self.brand_company_id = attributes[:'brand_company_id']
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
if attributes.key?(:'fiber_company_id')
|
|
480
|
+
self.fiber_company_id = attributes[:'fiber_company_id']
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
if attributes.key?(:'order_line')
|
|
484
|
+
self.order_line = attributes[:'order_line']
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
if attributes.key?(:'order_lines')
|
|
488
|
+
if (value = attributes[:'order_lines']).is_a?(Array)
|
|
489
|
+
self.order_lines = value
|
|
490
|
+
end
|
|
491
|
+
else
|
|
492
|
+
self.order_lines = nil
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
if attributes.key?(:'use_factory_id')
|
|
496
|
+
self.use_factory_id = attributes[:'use_factory_id']
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
if attributes.key?(:'order_t_name')
|
|
500
|
+
self.order_t_name = attributes[:'order_t_name']
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
if attributes.key?(:'is_end_order')
|
|
504
|
+
self.is_end_order = attributes[:'is_end_order']
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
if attributes.key?(:'declare_complete')
|
|
508
|
+
self.declare_complete = attributes[:'declare_complete']
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
if attributes.key?(:'trade_type')
|
|
512
|
+
self.trade_type = attributes[:'trade_type']
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
if attributes.key?(:'source')
|
|
516
|
+
self.source = attributes[:'source']
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
if attributes.key?(:'po_riskattachment_email')
|
|
520
|
+
self.po_riskattachment_email = attributes[:'po_riskattachment_email']
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
if attributes.key?(:'so_riskattachment_email')
|
|
524
|
+
self.so_riskattachment_email = attributes[:'so_riskattachment_email']
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
if attributes.key?(:'supplier_country')
|
|
528
|
+
self.supplier_country = attributes[:'supplier_country']
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
if attributes.key?(:'supplier_code')
|
|
532
|
+
self.supplier_code = attributes[:'supplier_code']
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
if attributes.key?(:'sales_scope')
|
|
536
|
+
self.sales_scope = attributes[:'sales_scope']
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
if attributes.key?(:'customer_code')
|
|
540
|
+
self.customer_code = attributes[:'customer_code']
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
if attributes.key?(:'customer_country')
|
|
544
|
+
self.customer_country = attributes[:'customer_country']
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
if attributes.key?(:'company_id')
|
|
548
|
+
self.company_id = attributes[:'company_id']
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
if attributes.key?(:'contact_email')
|
|
552
|
+
self.contact_email = attributes[:'contact_email']
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
if attributes.key?(:'contact_person')
|
|
556
|
+
self.contact_person = attributes[:'contact_person']
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
if attributes.key?(:'contact_phone')
|
|
560
|
+
self.contact_phone = attributes[:'contact_phone']
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
if attributes.key?(:'is_create_product')
|
|
564
|
+
self.is_create_product = attributes[:'is_create_product']
|
|
565
|
+
else
|
|
566
|
+
self.is_create_product = nil
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
if attributes.key?(:'po_status')
|
|
570
|
+
self.po_status = attributes[:'po_status']
|
|
571
|
+
else
|
|
572
|
+
self.po_status = nil
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
if attributes.key?(:'so_status')
|
|
576
|
+
self.so_status = attributes[:'so_status']
|
|
577
|
+
else
|
|
578
|
+
self.so_status = nil
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
if attributes.key?(:'attachments')
|
|
582
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
583
|
+
self.attachments = value
|
|
584
|
+
end
|
|
585
|
+
else
|
|
586
|
+
self.attachments = nil
|
|
587
|
+
end
|
|
588
|
+
|
|
589
|
+
if attributes.key?(:'is_declare')
|
|
590
|
+
self.is_declare = attributes[:'is_declare']
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
if attributes.key?(:'production_po_ids')
|
|
594
|
+
if (value = attributes[:'production_po_ids']).is_a?(Array)
|
|
595
|
+
self.production_po_ids = value
|
|
596
|
+
end
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
if attributes.key?(:'production_so_ids')
|
|
600
|
+
if (value = attributes[:'production_so_ids']).is_a?(Array)
|
|
601
|
+
self.production_so_ids = value
|
|
602
|
+
end
|
|
603
|
+
end
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
607
|
+
# @return Array for valid properties with the reasons
|
|
608
|
+
def list_invalid_properties
|
|
609
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
610
|
+
invalid_properties = Array.new
|
|
611
|
+
if @id.nil?
|
|
612
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
if @order_number.nil?
|
|
616
|
+
invalid_properties.push('invalid value for "order_number", order_number cannot be nil.')
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
if @order_date.nil?
|
|
620
|
+
invalid_properties.push('invalid value for "order_date", order_date cannot be nil.')
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
if @order_type.nil?
|
|
624
|
+
invalid_properties.push('invalid value for "order_type", order_type cannot be nil.')
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
if @customer_id.nil?
|
|
628
|
+
invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
if @supplier_id.nil?
|
|
632
|
+
invalid_properties.push('invalid value for "supplier_id", supplier_id cannot be nil.')
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
if @status.nil?
|
|
636
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
if @tenant_id.nil?
|
|
640
|
+
invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
if @environment_type.nil?
|
|
644
|
+
invalid_properties.push('invalid value for "environment_type", environment_type cannot be nil.')
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
if @created_by.nil?
|
|
648
|
+
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
if @created_at.nil?
|
|
652
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
if @order_lines.nil?
|
|
656
|
+
invalid_properties.push('invalid value for "order_lines", order_lines cannot be nil.')
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
if @is_create_product.nil?
|
|
660
|
+
invalid_properties.push('invalid value for "is_create_product", is_create_product cannot be nil.')
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
if @po_status.nil?
|
|
664
|
+
invalid_properties.push('invalid value for "po_status", po_status cannot be nil.')
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
if @so_status.nil?
|
|
668
|
+
invalid_properties.push('invalid value for "so_status", so_status cannot be nil.')
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
if @attachments.nil?
|
|
672
|
+
invalid_properties.push('invalid value for "attachments", attachments cannot be nil.')
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
invalid_properties
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
# Check to see if the all the properties in the model are valid
|
|
679
|
+
# @return true if the model is valid
|
|
680
|
+
def valid?
|
|
681
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
682
|
+
return false if @id.nil?
|
|
683
|
+
return false if @order_number.nil?
|
|
684
|
+
return false if @order_date.nil?
|
|
685
|
+
return false if @order_type.nil?
|
|
686
|
+
return false if @customer_id.nil?
|
|
687
|
+
return false if @supplier_id.nil?
|
|
688
|
+
return false if @status.nil?
|
|
689
|
+
return false if @tenant_id.nil?
|
|
690
|
+
return false if @environment_type.nil?
|
|
691
|
+
return false if @created_by.nil?
|
|
692
|
+
return false if @created_at.nil?
|
|
693
|
+
return false if @order_lines.nil?
|
|
694
|
+
return false if @is_create_product.nil?
|
|
695
|
+
return false if @po_status.nil?
|
|
696
|
+
return false if @so_status.nil?
|
|
697
|
+
return false if @attachments.nil?
|
|
698
|
+
true
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# Custom attribute writer method with validation
|
|
702
|
+
# @param [Object] id Value to be assigned
|
|
703
|
+
def id=(id)
|
|
704
|
+
if id.nil?
|
|
705
|
+
fail ArgumentError, 'id cannot be nil'
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
@id = id
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
# Custom attribute writer method with validation
|
|
712
|
+
# @param [Object] order_number Value to be assigned
|
|
713
|
+
def order_number=(order_number)
|
|
714
|
+
if order_number.nil?
|
|
715
|
+
fail ArgumentError, 'order_number cannot be nil'
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
@order_number = order_number
|
|
719
|
+
end
|
|
720
|
+
|
|
721
|
+
# Custom attribute writer method with validation
|
|
722
|
+
# @param [Object] order_date Value to be assigned
|
|
723
|
+
def order_date=(order_date)
|
|
724
|
+
if order_date.nil?
|
|
725
|
+
fail ArgumentError, 'order_date cannot be nil'
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
@order_date = order_date
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Custom attribute writer method with validation
|
|
732
|
+
# @param [Object] order_type Value to be assigned
|
|
733
|
+
def order_type=(order_type)
|
|
734
|
+
if order_type.nil?
|
|
735
|
+
fail ArgumentError, 'order_type cannot be nil'
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
@order_type = order_type
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
# Custom attribute writer method with validation
|
|
742
|
+
# @param [Object] customer_id Value to be assigned
|
|
743
|
+
def customer_id=(customer_id)
|
|
744
|
+
if customer_id.nil?
|
|
745
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
@customer_id = customer_id
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# Custom attribute writer method with validation
|
|
752
|
+
# @param [Object] supplier_id Value to be assigned
|
|
753
|
+
def supplier_id=(supplier_id)
|
|
754
|
+
if supplier_id.nil?
|
|
755
|
+
fail ArgumentError, 'supplier_id cannot be nil'
|
|
756
|
+
end
|
|
757
|
+
|
|
758
|
+
@supplier_id = supplier_id
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
# Custom attribute writer method with validation
|
|
762
|
+
# @param [Object] status Value to be assigned
|
|
763
|
+
def status=(status)
|
|
764
|
+
if status.nil?
|
|
765
|
+
fail ArgumentError, 'status cannot be nil'
|
|
766
|
+
end
|
|
767
|
+
|
|
768
|
+
@status = status
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# Custom attribute writer method with validation
|
|
772
|
+
# @param [Object] tenant_id Value to be assigned
|
|
773
|
+
def tenant_id=(tenant_id)
|
|
774
|
+
if tenant_id.nil?
|
|
775
|
+
fail ArgumentError, 'tenant_id cannot be nil'
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
@tenant_id = tenant_id
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
# Custom attribute writer method with validation
|
|
782
|
+
# @param [Object] environment_type Value to be assigned
|
|
783
|
+
def environment_type=(environment_type)
|
|
784
|
+
if environment_type.nil?
|
|
785
|
+
fail ArgumentError, 'environment_type cannot be nil'
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
@environment_type = environment_type
|
|
789
|
+
end
|
|
790
|
+
|
|
791
|
+
# Custom attribute writer method with validation
|
|
792
|
+
# @param [Object] created_by Value to be assigned
|
|
793
|
+
def created_by=(created_by)
|
|
794
|
+
if created_by.nil?
|
|
795
|
+
fail ArgumentError, 'created_by cannot be nil'
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
@created_by = created_by
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
# Custom attribute writer method with validation
|
|
802
|
+
# @param [Object] created_at Value to be assigned
|
|
803
|
+
def created_at=(created_at)
|
|
804
|
+
if created_at.nil?
|
|
805
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
806
|
+
end
|
|
807
|
+
|
|
808
|
+
@created_at = created_at
|
|
809
|
+
end
|
|
810
|
+
|
|
811
|
+
# Custom attribute writer method with validation
|
|
812
|
+
# @param [Object] order_lines Value to be assigned
|
|
813
|
+
def order_lines=(order_lines)
|
|
814
|
+
if order_lines.nil?
|
|
815
|
+
fail ArgumentError, 'order_lines cannot be nil'
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
@order_lines = order_lines
|
|
819
|
+
end
|
|
820
|
+
|
|
821
|
+
# Custom attribute writer method with validation
|
|
822
|
+
# @param [Object] is_create_product Value to be assigned
|
|
823
|
+
def is_create_product=(is_create_product)
|
|
824
|
+
if is_create_product.nil?
|
|
825
|
+
fail ArgumentError, 'is_create_product cannot be nil'
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
@is_create_product = is_create_product
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# Custom attribute writer method with validation
|
|
832
|
+
# @param [Object] po_status Value to be assigned
|
|
833
|
+
def po_status=(po_status)
|
|
834
|
+
if po_status.nil?
|
|
835
|
+
fail ArgumentError, 'po_status cannot be nil'
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
@po_status = po_status
|
|
839
|
+
end
|
|
840
|
+
|
|
841
|
+
# Custom attribute writer method with validation
|
|
842
|
+
# @param [Object] so_status Value to be assigned
|
|
843
|
+
def so_status=(so_status)
|
|
844
|
+
if so_status.nil?
|
|
845
|
+
fail ArgumentError, 'so_status cannot be nil'
|
|
846
|
+
end
|
|
847
|
+
|
|
848
|
+
@so_status = so_status
|
|
849
|
+
end
|
|
850
|
+
|
|
851
|
+
# Custom attribute writer method with validation
|
|
852
|
+
# @param [Object] attachments Value to be assigned
|
|
853
|
+
def attachments=(attachments)
|
|
854
|
+
if attachments.nil?
|
|
855
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
856
|
+
end
|
|
857
|
+
|
|
858
|
+
@attachments = attachments
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
# Checks equality by comparing each attribute.
|
|
862
|
+
# @param [Object] Object to be compared
|
|
863
|
+
def ==(o)
|
|
864
|
+
return true if self.equal?(o)
|
|
865
|
+
self.class == o.class &&
|
|
866
|
+
id == o.id &&
|
|
867
|
+
order_number == o.order_number &&
|
|
868
|
+
order_date == o.order_date &&
|
|
869
|
+
order_type == o.order_type &&
|
|
870
|
+
customer_id == o.customer_id &&
|
|
871
|
+
customer_name == o.customer_name &&
|
|
872
|
+
supplier_name == o.supplier_name &&
|
|
873
|
+
supplier_id == o.supplier_id &&
|
|
874
|
+
facility_id == o.facility_id &&
|
|
875
|
+
contract_no == o.contract_no &&
|
|
876
|
+
invoice_no == o.invoice_no &&
|
|
877
|
+
total_amount == o.total_amount &&
|
|
878
|
+
currency_code == o.currency_code &&
|
|
879
|
+
brand == o.brand &&
|
|
880
|
+
remarks == o.remarks &&
|
|
881
|
+
status == o.status &&
|
|
882
|
+
customer_tenant_id == o.customer_tenant_id &&
|
|
883
|
+
supplier_tenant_id == o.supplier_tenant_id &&
|
|
884
|
+
tenant_id == o.tenant_id &&
|
|
885
|
+
environment_type == o.environment_type &&
|
|
886
|
+
created_by == o.created_by &&
|
|
887
|
+
updated_by == o.updated_by &&
|
|
888
|
+
division_id == o.division_id &&
|
|
889
|
+
created_at == o.created_at &&
|
|
890
|
+
updated_at == o.updated_at &&
|
|
891
|
+
brand_company_id == o.brand_company_id &&
|
|
892
|
+
fiber_company_id == o.fiber_company_id &&
|
|
893
|
+
order_line == o.order_line &&
|
|
894
|
+
order_lines == o.order_lines &&
|
|
895
|
+
use_factory_id == o.use_factory_id &&
|
|
896
|
+
order_t_name == o.order_t_name &&
|
|
897
|
+
is_end_order == o.is_end_order &&
|
|
898
|
+
declare_complete == o.declare_complete &&
|
|
899
|
+
trade_type == o.trade_type &&
|
|
900
|
+
source == o.source &&
|
|
901
|
+
po_riskattachment_email == o.po_riskattachment_email &&
|
|
902
|
+
so_riskattachment_email == o.so_riskattachment_email &&
|
|
903
|
+
supplier_country == o.supplier_country &&
|
|
904
|
+
supplier_code == o.supplier_code &&
|
|
905
|
+
sales_scope == o.sales_scope &&
|
|
906
|
+
customer_code == o.customer_code &&
|
|
907
|
+
customer_country == o.customer_country &&
|
|
908
|
+
company_id == o.company_id &&
|
|
909
|
+
contact_email == o.contact_email &&
|
|
910
|
+
contact_person == o.contact_person &&
|
|
911
|
+
contact_phone == o.contact_phone &&
|
|
912
|
+
is_create_product == o.is_create_product &&
|
|
913
|
+
po_status == o.po_status &&
|
|
914
|
+
so_status == o.so_status &&
|
|
915
|
+
attachments == o.attachments &&
|
|
916
|
+
is_declare == o.is_declare &&
|
|
917
|
+
production_po_ids == o.production_po_ids &&
|
|
918
|
+
production_so_ids == o.production_so_ids
|
|
919
|
+
end
|
|
920
|
+
|
|
921
|
+
# @see the `==` method
|
|
922
|
+
# @param [Object] Object to be compared
|
|
923
|
+
def eql?(o)
|
|
924
|
+
self == o
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
# Calculates hash code according to all attributes.
|
|
928
|
+
# @return [Integer] Hash code
|
|
929
|
+
def hash
|
|
930
|
+
[id, order_number, order_date, order_type, customer_id, customer_name, supplier_name, supplier_id, facility_id, contract_no, invoice_no, total_amount, currency_code, brand, remarks, status, customer_tenant_id, supplier_tenant_id, tenant_id, environment_type, created_by, updated_by, division_id, created_at, updated_at, brand_company_id, fiber_company_id, order_line, order_lines, use_factory_id, order_t_name, is_end_order, declare_complete, trade_type, source, po_riskattachment_email, so_riskattachment_email, supplier_country, supplier_code, sales_scope, customer_code, customer_country, company_id, contact_email, contact_person, contact_phone, is_create_product, po_status, so_status, attachments, is_declare, production_po_ids, production_so_ids].hash
|
|
931
|
+
end
|
|
932
|
+
|
|
933
|
+
# Builds the object from hash
|
|
934
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
935
|
+
# @return [Object] Returns the model itself
|
|
936
|
+
def self.build_from_hash(attributes)
|
|
937
|
+
return nil unless attributes.is_a?(Hash)
|
|
938
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
939
|
+
transformed_hash = {}
|
|
940
|
+
openapi_types.each_pair do |key, type|
|
|
941
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
942
|
+
transformed_hash["#{key}"] = nil
|
|
943
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
944
|
+
# check to ensure the input is an array given that the attribute
|
|
945
|
+
# is documented as an array but the input is not
|
|
946
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
947
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
948
|
+
end
|
|
949
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
950
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
951
|
+
end
|
|
952
|
+
end
|
|
953
|
+
new(transformed_hash)
|
|
954
|
+
end
|
|
955
|
+
|
|
956
|
+
# Returns the object in the form of hash
|
|
957
|
+
# @return [Hash] Returns the object in the form of hash
|
|
958
|
+
def to_hash
|
|
959
|
+
hash = {}
|
|
960
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
961
|
+
value = self.send(attr)
|
|
962
|
+
if value.nil?
|
|
963
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
964
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
hash[param] = _to_hash(value)
|
|
968
|
+
end
|
|
969
|
+
hash
|
|
970
|
+
end
|
|
971
|
+
|
|
972
|
+
end
|
|
973
|
+
|
|
974
|
+
end
|