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,749 @@
|
|
|
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 BrandOrderSupplierOrderSnapshotDto < ApiModelBase
|
|
19
|
+
# 品牌关联供应商订单级快照ID,建议使用Guid字符串
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 品牌订单KPI快照ID,关联brand_order_kpi_snapshot.id
|
|
23
|
+
attr_accessor :brand_order_kpi_snapshot_id
|
|
24
|
+
|
|
25
|
+
# 租户ID
|
|
26
|
+
attr_accessor :tenant_id
|
|
27
|
+
|
|
28
|
+
# 环境类型:0正式,1测试
|
|
29
|
+
attr_accessor :environment_type
|
|
30
|
+
|
|
31
|
+
# 品牌主订单ID
|
|
32
|
+
attr_accessor :order_id
|
|
33
|
+
|
|
34
|
+
# 品牌主订单明细ID
|
|
35
|
+
attr_accessor :order_line_id
|
|
36
|
+
|
|
37
|
+
# 链路层级排序,品牌主单为0,供应商订单逐级递增
|
|
38
|
+
attr_accessor :chain_level
|
|
39
|
+
|
|
40
|
+
# childOrderGroup分组键,用于还原品牌关联供应商订单关系
|
|
41
|
+
attr_accessor :child_order_group_key
|
|
42
|
+
|
|
43
|
+
# 上游订单明细ID,用于还原链路父子关系
|
|
44
|
+
attr_accessor :parent_order_line_id
|
|
45
|
+
|
|
46
|
+
# 供应商订单ID
|
|
47
|
+
attr_accessor :supplier_order_id
|
|
48
|
+
|
|
49
|
+
# 供应商订单明细ID
|
|
50
|
+
attr_accessor :supplier_order_line_id
|
|
51
|
+
|
|
52
|
+
# 供应商订单号
|
|
53
|
+
attr_accessor :supplier_order_number
|
|
54
|
+
|
|
55
|
+
# 供应商订单行号
|
|
56
|
+
attr_accessor :supplier_line_number
|
|
57
|
+
|
|
58
|
+
# 该供应商订单客户公司ID
|
|
59
|
+
attr_accessor :customer_id
|
|
60
|
+
|
|
61
|
+
# 该供应商订单供应商公司ID
|
|
62
|
+
attr_accessor :supplier_id
|
|
63
|
+
|
|
64
|
+
# 快照时供应商订单明细status
|
|
65
|
+
attr_accessor :order_line_status
|
|
66
|
+
|
|
67
|
+
# 快照时供应商订单销售状态
|
|
68
|
+
attr_accessor :so_status
|
|
69
|
+
|
|
70
|
+
# 快照时供应商订单采购状态
|
|
71
|
+
attr_accessor :po_status
|
|
72
|
+
|
|
73
|
+
# 快照时供应商订单主链路审核状态
|
|
74
|
+
attr_accessor :master_approve_status
|
|
75
|
+
|
|
76
|
+
# 快照时供应商订单明细审核状态
|
|
77
|
+
attr_accessor :approve_status
|
|
78
|
+
|
|
79
|
+
# 快照时供应商订单买方确认收货状态
|
|
80
|
+
attr_accessor :customer_confirm_status
|
|
81
|
+
|
|
82
|
+
# 快照时供应商订单主订单链条完成状态:0未完成,1完成
|
|
83
|
+
attr_accessor :order_chain_status
|
|
84
|
+
|
|
85
|
+
# 快照时供应商订单链条完成状态:0未完成,1完成
|
|
86
|
+
attr_accessor :chain_status
|
|
87
|
+
|
|
88
|
+
# 快照时供应商订单链条最后更新时间
|
|
89
|
+
attr_accessor :chain_latest_updated_at
|
|
90
|
+
|
|
91
|
+
# 快照时客户是否分批发货:0按需发货,1分批发货,2无法按需发货实际发货完成
|
|
92
|
+
attr_accessor :ship_in_batches
|
|
93
|
+
|
|
94
|
+
# 快照时供应商最新提交审核时间
|
|
95
|
+
attr_accessor :order_line_finish_time
|
|
96
|
+
|
|
97
|
+
# 快照时客户确认收货最新通过时间
|
|
98
|
+
attr_accessor :customer_confirm_time
|
|
99
|
+
|
|
100
|
+
# 快照计算结果-该供应商订单KPI:0进行中,1合格,2逾期,3剔除/不计入
|
|
101
|
+
attr_accessor :supplier_kpi_status
|
|
102
|
+
|
|
103
|
+
# 快照计算结果-该供应商订单KPI截止时间
|
|
104
|
+
attr_accessor :supplier_kpi_deadline
|
|
105
|
+
|
|
106
|
+
# 快照计算结果-该供应商订单KPI逾期天数;未逾期为0,无法计算为空
|
|
107
|
+
attr_accessor :supplier_kpi_overdue_days
|
|
108
|
+
|
|
109
|
+
# 是否为快照时影响品牌订单完成计算的阻塞订单:0否,1是
|
|
110
|
+
attr_accessor :is_completion_blocker
|
|
111
|
+
|
|
112
|
+
# 客户侧是否完成:0未完成,1完成
|
|
113
|
+
attr_accessor :is_completion_customer
|
|
114
|
+
|
|
115
|
+
# 供应商侧是否完成:0未完成,1完成
|
|
116
|
+
attr_accessor :is_completion_supplier
|
|
117
|
+
|
|
118
|
+
# 阻塞原因,例如未关联末级订单、必要申报文件未完成
|
|
119
|
+
attr_accessor :block_reason
|
|
120
|
+
|
|
121
|
+
# 该供应商订单所属childOrderGroup核心信息JSON,仅用于详情只存ID关系
|
|
122
|
+
attr_accessor :child_order_group_json
|
|
123
|
+
|
|
124
|
+
# 创建时间
|
|
125
|
+
attr_accessor :created_at
|
|
126
|
+
|
|
127
|
+
# 更新时间
|
|
128
|
+
attr_accessor :updated_at
|
|
129
|
+
|
|
130
|
+
# -1删除,0正常
|
|
131
|
+
attr_accessor :status
|
|
132
|
+
|
|
133
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
134
|
+
def self.attribute_map
|
|
135
|
+
{
|
|
136
|
+
:'id' => :'id',
|
|
137
|
+
:'brand_order_kpi_snapshot_id' => :'brandOrderKpiSnapshotId',
|
|
138
|
+
:'tenant_id' => :'tenantId',
|
|
139
|
+
:'environment_type' => :'environmentType',
|
|
140
|
+
:'order_id' => :'orderId',
|
|
141
|
+
:'order_line_id' => :'orderLineId',
|
|
142
|
+
:'chain_level' => :'chainLevel',
|
|
143
|
+
:'child_order_group_key' => :'childOrderGroupKey',
|
|
144
|
+
:'parent_order_line_id' => :'parentOrderLineId',
|
|
145
|
+
:'supplier_order_id' => :'supplierOrderId',
|
|
146
|
+
:'supplier_order_line_id' => :'supplierOrderLineId',
|
|
147
|
+
:'supplier_order_number' => :'supplierOrderNumber',
|
|
148
|
+
:'supplier_line_number' => :'supplierLineNumber',
|
|
149
|
+
:'customer_id' => :'customerId',
|
|
150
|
+
:'supplier_id' => :'supplierId',
|
|
151
|
+
:'order_line_status' => :'orderLineStatus',
|
|
152
|
+
:'so_status' => :'soStatus',
|
|
153
|
+
:'po_status' => :'poStatus',
|
|
154
|
+
:'master_approve_status' => :'masterApproveStatus',
|
|
155
|
+
:'approve_status' => :'approveStatus',
|
|
156
|
+
:'customer_confirm_status' => :'customerConfirmStatus',
|
|
157
|
+
:'order_chain_status' => :'orderChainStatus',
|
|
158
|
+
:'chain_status' => :'chainStatus',
|
|
159
|
+
:'chain_latest_updated_at' => :'chainLatestUpdatedAt',
|
|
160
|
+
:'ship_in_batches' => :'shipInBatches',
|
|
161
|
+
:'order_line_finish_time' => :'orderLineFinishTime',
|
|
162
|
+
:'customer_confirm_time' => :'customerConfirmTime',
|
|
163
|
+
:'supplier_kpi_status' => :'supplierKpiStatus',
|
|
164
|
+
:'supplier_kpi_deadline' => :'supplierKpiDeadline',
|
|
165
|
+
:'supplier_kpi_overdue_days' => :'supplierKpiOverdueDays',
|
|
166
|
+
:'is_completion_blocker' => :'isCompletionBlocker',
|
|
167
|
+
:'is_completion_customer' => :'isCompletionCustomer',
|
|
168
|
+
:'is_completion_supplier' => :'isCompletionSupplier',
|
|
169
|
+
:'block_reason' => :'blockReason',
|
|
170
|
+
:'child_order_group_json' => :'childOrderGroupJson',
|
|
171
|
+
:'created_at' => :'createdAt',
|
|
172
|
+
:'updated_at' => :'updatedAt',
|
|
173
|
+
:'status' => :'status'
|
|
174
|
+
}
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns attribute mapping this model knows about
|
|
178
|
+
def self.acceptable_attribute_map
|
|
179
|
+
attribute_map
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns all the JSON keys this model knows about
|
|
183
|
+
def self.acceptable_attributes
|
|
184
|
+
acceptable_attribute_map.values
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Attribute type mapping.
|
|
188
|
+
def self.openapi_types
|
|
189
|
+
{
|
|
190
|
+
:'id' => :'String',
|
|
191
|
+
:'brand_order_kpi_snapshot_id' => :'String',
|
|
192
|
+
:'tenant_id' => :'String',
|
|
193
|
+
:'environment_type' => :'Integer',
|
|
194
|
+
:'order_id' => :'String',
|
|
195
|
+
:'order_line_id' => :'String',
|
|
196
|
+
:'chain_level' => :'Integer',
|
|
197
|
+
:'child_order_group_key' => :'String',
|
|
198
|
+
:'parent_order_line_id' => :'String',
|
|
199
|
+
:'supplier_order_id' => :'String',
|
|
200
|
+
:'supplier_order_line_id' => :'String',
|
|
201
|
+
:'supplier_order_number' => :'String',
|
|
202
|
+
:'supplier_line_number' => :'String',
|
|
203
|
+
:'customer_id' => :'String',
|
|
204
|
+
:'supplier_id' => :'String',
|
|
205
|
+
:'order_line_status' => :'Integer',
|
|
206
|
+
:'so_status' => :'Integer',
|
|
207
|
+
:'po_status' => :'Integer',
|
|
208
|
+
:'master_approve_status' => :'Integer',
|
|
209
|
+
:'approve_status' => :'Integer',
|
|
210
|
+
:'customer_confirm_status' => :'Integer',
|
|
211
|
+
:'order_chain_status' => :'Integer',
|
|
212
|
+
:'chain_status' => :'Integer',
|
|
213
|
+
:'chain_latest_updated_at' => :'Time',
|
|
214
|
+
:'ship_in_batches' => :'Integer',
|
|
215
|
+
:'order_line_finish_time' => :'Time',
|
|
216
|
+
:'customer_confirm_time' => :'Time',
|
|
217
|
+
:'supplier_kpi_status' => :'Integer',
|
|
218
|
+
:'supplier_kpi_deadline' => :'Time',
|
|
219
|
+
:'supplier_kpi_overdue_days' => :'Integer',
|
|
220
|
+
:'is_completion_blocker' => :'Integer',
|
|
221
|
+
:'is_completion_customer' => :'Integer',
|
|
222
|
+
:'is_completion_supplier' => :'Integer',
|
|
223
|
+
:'block_reason' => :'String',
|
|
224
|
+
:'child_order_group_json' => :'String',
|
|
225
|
+
:'created_at' => :'Time',
|
|
226
|
+
:'updated_at' => :'Time',
|
|
227
|
+
:'status' => :'Integer'
|
|
228
|
+
}
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# List of attributes with nullable: true
|
|
232
|
+
def self.openapi_nullable
|
|
233
|
+
Set.new([
|
|
234
|
+
:'chain_level',
|
|
235
|
+
:'child_order_group_key',
|
|
236
|
+
:'parent_order_line_id',
|
|
237
|
+
:'supplier_order_id',
|
|
238
|
+
:'supplier_order_number',
|
|
239
|
+
:'supplier_line_number',
|
|
240
|
+
:'customer_id',
|
|
241
|
+
:'supplier_id',
|
|
242
|
+
:'order_line_status',
|
|
243
|
+
:'so_status',
|
|
244
|
+
:'po_status',
|
|
245
|
+
:'master_approve_status',
|
|
246
|
+
:'approve_status',
|
|
247
|
+
:'customer_confirm_status',
|
|
248
|
+
:'order_chain_status',
|
|
249
|
+
:'chain_status',
|
|
250
|
+
:'chain_latest_updated_at',
|
|
251
|
+
:'ship_in_batches',
|
|
252
|
+
:'order_line_finish_time',
|
|
253
|
+
:'customer_confirm_time',
|
|
254
|
+
:'supplier_kpi_status',
|
|
255
|
+
:'supplier_kpi_deadline',
|
|
256
|
+
:'supplier_kpi_overdue_days',
|
|
257
|
+
:'block_reason',
|
|
258
|
+
:'child_order_group_json',
|
|
259
|
+
:'updated_at',
|
|
260
|
+
])
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Initializes the object
|
|
264
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
265
|
+
def initialize(attributes = {})
|
|
266
|
+
if (!attributes.is_a?(Hash))
|
|
267
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::BrandOrderSupplierOrderSnapshotDto` initialize method"
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
271
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
272
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
273
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
274
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::BrandOrderSupplierOrderSnapshotDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
275
|
+
end
|
|
276
|
+
h[k.to_sym] = v
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'id')
|
|
280
|
+
self.id = attributes[:'id']
|
|
281
|
+
else
|
|
282
|
+
self.id = nil
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if attributes.key?(:'brand_order_kpi_snapshot_id')
|
|
286
|
+
self.brand_order_kpi_snapshot_id = attributes[:'brand_order_kpi_snapshot_id']
|
|
287
|
+
else
|
|
288
|
+
self.brand_order_kpi_snapshot_id = nil
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'tenant_id')
|
|
292
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
293
|
+
else
|
|
294
|
+
self.tenant_id = nil
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if attributes.key?(:'environment_type')
|
|
298
|
+
self.environment_type = attributes[:'environment_type']
|
|
299
|
+
else
|
|
300
|
+
self.environment_type = nil
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'order_id')
|
|
304
|
+
self.order_id = attributes[:'order_id']
|
|
305
|
+
else
|
|
306
|
+
self.order_id = nil
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if attributes.key?(:'order_line_id')
|
|
310
|
+
self.order_line_id = attributes[:'order_line_id']
|
|
311
|
+
else
|
|
312
|
+
self.order_line_id = nil
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'chain_level')
|
|
316
|
+
self.chain_level = attributes[:'chain_level']
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
if attributes.key?(:'child_order_group_key')
|
|
320
|
+
self.child_order_group_key = attributes[:'child_order_group_key']
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if attributes.key?(:'parent_order_line_id')
|
|
324
|
+
self.parent_order_line_id = attributes[:'parent_order_line_id']
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if attributes.key?(:'supplier_order_id')
|
|
328
|
+
self.supplier_order_id = attributes[:'supplier_order_id']
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
if attributes.key?(:'supplier_order_line_id')
|
|
332
|
+
self.supplier_order_line_id = attributes[:'supplier_order_line_id']
|
|
333
|
+
else
|
|
334
|
+
self.supplier_order_line_id = nil
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if attributes.key?(:'supplier_order_number')
|
|
338
|
+
self.supplier_order_number = attributes[:'supplier_order_number']
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
if attributes.key?(:'supplier_line_number')
|
|
342
|
+
self.supplier_line_number = attributes[:'supplier_line_number']
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if attributes.key?(:'customer_id')
|
|
346
|
+
self.customer_id = attributes[:'customer_id']
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if attributes.key?(:'supplier_id')
|
|
350
|
+
self.supplier_id = attributes[:'supplier_id']
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
if attributes.key?(:'order_line_status')
|
|
354
|
+
self.order_line_status = attributes[:'order_line_status']
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if attributes.key?(:'so_status')
|
|
358
|
+
self.so_status = attributes[:'so_status']
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
if attributes.key?(:'po_status')
|
|
362
|
+
self.po_status = attributes[:'po_status']
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if attributes.key?(:'master_approve_status')
|
|
366
|
+
self.master_approve_status = attributes[:'master_approve_status']
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if attributes.key?(:'approve_status')
|
|
370
|
+
self.approve_status = attributes[:'approve_status']
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
if attributes.key?(:'customer_confirm_status')
|
|
374
|
+
self.customer_confirm_status = attributes[:'customer_confirm_status']
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if attributes.key?(:'order_chain_status')
|
|
378
|
+
self.order_chain_status = attributes[:'order_chain_status']
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if attributes.key?(:'chain_status')
|
|
382
|
+
self.chain_status = attributes[:'chain_status']
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
if attributes.key?(:'chain_latest_updated_at')
|
|
386
|
+
self.chain_latest_updated_at = attributes[:'chain_latest_updated_at']
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if attributes.key?(:'ship_in_batches')
|
|
390
|
+
self.ship_in_batches = attributes[:'ship_in_batches']
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if attributes.key?(:'order_line_finish_time')
|
|
394
|
+
self.order_line_finish_time = attributes[:'order_line_finish_time']
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if attributes.key?(:'customer_confirm_time')
|
|
398
|
+
self.customer_confirm_time = attributes[:'customer_confirm_time']
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if attributes.key?(:'supplier_kpi_status')
|
|
402
|
+
self.supplier_kpi_status = attributes[:'supplier_kpi_status']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'supplier_kpi_deadline')
|
|
406
|
+
self.supplier_kpi_deadline = attributes[:'supplier_kpi_deadline']
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if attributes.key?(:'supplier_kpi_overdue_days')
|
|
410
|
+
self.supplier_kpi_overdue_days = attributes[:'supplier_kpi_overdue_days']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'is_completion_blocker')
|
|
414
|
+
self.is_completion_blocker = attributes[:'is_completion_blocker']
|
|
415
|
+
else
|
|
416
|
+
self.is_completion_blocker = nil
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
if attributes.key?(:'is_completion_customer')
|
|
420
|
+
self.is_completion_customer = attributes[:'is_completion_customer']
|
|
421
|
+
else
|
|
422
|
+
self.is_completion_customer = nil
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'is_completion_supplier')
|
|
426
|
+
self.is_completion_supplier = attributes[:'is_completion_supplier']
|
|
427
|
+
else
|
|
428
|
+
self.is_completion_supplier = nil
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
if attributes.key?(:'block_reason')
|
|
432
|
+
self.block_reason = attributes[:'block_reason']
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if attributes.key?(:'child_order_group_json')
|
|
436
|
+
self.child_order_group_json = attributes[:'child_order_group_json']
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
if attributes.key?(:'created_at')
|
|
440
|
+
self.created_at = attributes[:'created_at']
|
|
441
|
+
else
|
|
442
|
+
self.created_at = nil
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
if attributes.key?(:'updated_at')
|
|
446
|
+
self.updated_at = attributes[:'updated_at']
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
if attributes.key?(:'status')
|
|
450
|
+
self.status = attributes[:'status']
|
|
451
|
+
else
|
|
452
|
+
self.status = nil
|
|
453
|
+
end
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
457
|
+
# @return Array for valid properties with the reasons
|
|
458
|
+
def list_invalid_properties
|
|
459
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
460
|
+
invalid_properties = Array.new
|
|
461
|
+
if @id.nil?
|
|
462
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
if @brand_order_kpi_snapshot_id.nil?
|
|
466
|
+
invalid_properties.push('invalid value for "brand_order_kpi_snapshot_id", brand_order_kpi_snapshot_id cannot be nil.')
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
if @tenant_id.nil?
|
|
470
|
+
invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
if @environment_type.nil?
|
|
474
|
+
invalid_properties.push('invalid value for "environment_type", environment_type cannot be nil.')
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
if @order_id.nil?
|
|
478
|
+
invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
if @order_line_id.nil?
|
|
482
|
+
invalid_properties.push('invalid value for "order_line_id", order_line_id cannot be nil.')
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
if @supplier_order_line_id.nil?
|
|
486
|
+
invalid_properties.push('invalid value for "supplier_order_line_id", supplier_order_line_id cannot be nil.')
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
if @is_completion_blocker.nil?
|
|
490
|
+
invalid_properties.push('invalid value for "is_completion_blocker", is_completion_blocker cannot be nil.')
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
if @is_completion_customer.nil?
|
|
494
|
+
invalid_properties.push('invalid value for "is_completion_customer", is_completion_customer cannot be nil.')
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
if @is_completion_supplier.nil?
|
|
498
|
+
invalid_properties.push('invalid value for "is_completion_supplier", is_completion_supplier cannot be nil.')
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
if @created_at.nil?
|
|
502
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
if @status.nil?
|
|
506
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
invalid_properties
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# Check to see if the all the properties in the model are valid
|
|
513
|
+
# @return true if the model is valid
|
|
514
|
+
def valid?
|
|
515
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
516
|
+
return false if @id.nil?
|
|
517
|
+
return false if @brand_order_kpi_snapshot_id.nil?
|
|
518
|
+
return false if @tenant_id.nil?
|
|
519
|
+
return false if @environment_type.nil?
|
|
520
|
+
return false if @order_id.nil?
|
|
521
|
+
return false if @order_line_id.nil?
|
|
522
|
+
return false if @supplier_order_line_id.nil?
|
|
523
|
+
return false if @is_completion_blocker.nil?
|
|
524
|
+
return false if @is_completion_customer.nil?
|
|
525
|
+
return false if @is_completion_supplier.nil?
|
|
526
|
+
return false if @created_at.nil?
|
|
527
|
+
return false if @status.nil?
|
|
528
|
+
true
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Custom attribute writer method with validation
|
|
532
|
+
# @param [Object] id Value to be assigned
|
|
533
|
+
def id=(id)
|
|
534
|
+
if id.nil?
|
|
535
|
+
fail ArgumentError, 'id cannot be nil'
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
@id = id
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# Custom attribute writer method with validation
|
|
542
|
+
# @param [Object] brand_order_kpi_snapshot_id Value to be assigned
|
|
543
|
+
def brand_order_kpi_snapshot_id=(brand_order_kpi_snapshot_id)
|
|
544
|
+
if brand_order_kpi_snapshot_id.nil?
|
|
545
|
+
fail ArgumentError, 'brand_order_kpi_snapshot_id cannot be nil'
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
@brand_order_kpi_snapshot_id = brand_order_kpi_snapshot_id
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Custom attribute writer method with validation
|
|
552
|
+
# @param [Object] tenant_id Value to be assigned
|
|
553
|
+
def tenant_id=(tenant_id)
|
|
554
|
+
if tenant_id.nil?
|
|
555
|
+
fail ArgumentError, 'tenant_id cannot be nil'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
@tenant_id = tenant_id
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Custom attribute writer method with validation
|
|
562
|
+
# @param [Object] environment_type Value to be assigned
|
|
563
|
+
def environment_type=(environment_type)
|
|
564
|
+
if environment_type.nil?
|
|
565
|
+
fail ArgumentError, 'environment_type cannot be nil'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
@environment_type = environment_type
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Custom attribute writer method with validation
|
|
572
|
+
# @param [Object] order_id Value to be assigned
|
|
573
|
+
def order_id=(order_id)
|
|
574
|
+
if order_id.nil?
|
|
575
|
+
fail ArgumentError, 'order_id cannot be nil'
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
@order_id = order_id
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Custom attribute writer method with validation
|
|
582
|
+
# @param [Object] order_line_id Value to be assigned
|
|
583
|
+
def order_line_id=(order_line_id)
|
|
584
|
+
if order_line_id.nil?
|
|
585
|
+
fail ArgumentError, 'order_line_id cannot be nil'
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
@order_line_id = order_line_id
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
# Custom attribute writer method with validation
|
|
592
|
+
# @param [Object] supplier_order_line_id Value to be assigned
|
|
593
|
+
def supplier_order_line_id=(supplier_order_line_id)
|
|
594
|
+
if supplier_order_line_id.nil?
|
|
595
|
+
fail ArgumentError, 'supplier_order_line_id cannot be nil'
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
@supplier_order_line_id = supplier_order_line_id
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Custom attribute writer method with validation
|
|
602
|
+
# @param [Object] is_completion_blocker Value to be assigned
|
|
603
|
+
def is_completion_blocker=(is_completion_blocker)
|
|
604
|
+
if is_completion_blocker.nil?
|
|
605
|
+
fail ArgumentError, 'is_completion_blocker cannot be nil'
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
@is_completion_blocker = is_completion_blocker
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# Custom attribute writer method with validation
|
|
612
|
+
# @param [Object] is_completion_customer Value to be assigned
|
|
613
|
+
def is_completion_customer=(is_completion_customer)
|
|
614
|
+
if is_completion_customer.nil?
|
|
615
|
+
fail ArgumentError, 'is_completion_customer cannot be nil'
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
@is_completion_customer = is_completion_customer
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# Custom attribute writer method with validation
|
|
622
|
+
# @param [Object] is_completion_supplier Value to be assigned
|
|
623
|
+
def is_completion_supplier=(is_completion_supplier)
|
|
624
|
+
if is_completion_supplier.nil?
|
|
625
|
+
fail ArgumentError, 'is_completion_supplier cannot be nil'
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
@is_completion_supplier = is_completion_supplier
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
# Custom attribute writer method with validation
|
|
632
|
+
# @param [Object] created_at Value to be assigned
|
|
633
|
+
def created_at=(created_at)
|
|
634
|
+
if created_at.nil?
|
|
635
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
@created_at = created_at
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
# Custom attribute writer method with validation
|
|
642
|
+
# @param [Object] status Value to be assigned
|
|
643
|
+
def status=(status)
|
|
644
|
+
if status.nil?
|
|
645
|
+
fail ArgumentError, 'status cannot be nil'
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
@status = status
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
# Checks equality by comparing each attribute.
|
|
652
|
+
# @param [Object] Object to be compared
|
|
653
|
+
def ==(o)
|
|
654
|
+
return true if self.equal?(o)
|
|
655
|
+
self.class == o.class &&
|
|
656
|
+
id == o.id &&
|
|
657
|
+
brand_order_kpi_snapshot_id == o.brand_order_kpi_snapshot_id &&
|
|
658
|
+
tenant_id == o.tenant_id &&
|
|
659
|
+
environment_type == o.environment_type &&
|
|
660
|
+
order_id == o.order_id &&
|
|
661
|
+
order_line_id == o.order_line_id &&
|
|
662
|
+
chain_level == o.chain_level &&
|
|
663
|
+
child_order_group_key == o.child_order_group_key &&
|
|
664
|
+
parent_order_line_id == o.parent_order_line_id &&
|
|
665
|
+
supplier_order_id == o.supplier_order_id &&
|
|
666
|
+
supplier_order_line_id == o.supplier_order_line_id &&
|
|
667
|
+
supplier_order_number == o.supplier_order_number &&
|
|
668
|
+
supplier_line_number == o.supplier_line_number &&
|
|
669
|
+
customer_id == o.customer_id &&
|
|
670
|
+
supplier_id == o.supplier_id &&
|
|
671
|
+
order_line_status == o.order_line_status &&
|
|
672
|
+
so_status == o.so_status &&
|
|
673
|
+
po_status == o.po_status &&
|
|
674
|
+
master_approve_status == o.master_approve_status &&
|
|
675
|
+
approve_status == o.approve_status &&
|
|
676
|
+
customer_confirm_status == o.customer_confirm_status &&
|
|
677
|
+
order_chain_status == o.order_chain_status &&
|
|
678
|
+
chain_status == o.chain_status &&
|
|
679
|
+
chain_latest_updated_at == o.chain_latest_updated_at &&
|
|
680
|
+
ship_in_batches == o.ship_in_batches &&
|
|
681
|
+
order_line_finish_time == o.order_line_finish_time &&
|
|
682
|
+
customer_confirm_time == o.customer_confirm_time &&
|
|
683
|
+
supplier_kpi_status == o.supplier_kpi_status &&
|
|
684
|
+
supplier_kpi_deadline == o.supplier_kpi_deadline &&
|
|
685
|
+
supplier_kpi_overdue_days == o.supplier_kpi_overdue_days &&
|
|
686
|
+
is_completion_blocker == o.is_completion_blocker &&
|
|
687
|
+
is_completion_customer == o.is_completion_customer &&
|
|
688
|
+
is_completion_supplier == o.is_completion_supplier &&
|
|
689
|
+
block_reason == o.block_reason &&
|
|
690
|
+
child_order_group_json == o.child_order_group_json &&
|
|
691
|
+
created_at == o.created_at &&
|
|
692
|
+
updated_at == o.updated_at &&
|
|
693
|
+
status == o.status
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# @see the `==` method
|
|
697
|
+
# @param [Object] Object to be compared
|
|
698
|
+
def eql?(o)
|
|
699
|
+
self == o
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
# Calculates hash code according to all attributes.
|
|
703
|
+
# @return [Integer] Hash code
|
|
704
|
+
def hash
|
|
705
|
+
[id, brand_order_kpi_snapshot_id, tenant_id, environment_type, order_id, order_line_id, chain_level, child_order_group_key, parent_order_line_id, supplier_order_id, supplier_order_line_id, supplier_order_number, supplier_line_number, customer_id, supplier_id, order_line_status, so_status, po_status, master_approve_status, approve_status, customer_confirm_status, order_chain_status, chain_status, chain_latest_updated_at, ship_in_batches, order_line_finish_time, customer_confirm_time, supplier_kpi_status, supplier_kpi_deadline, supplier_kpi_overdue_days, is_completion_blocker, is_completion_customer, is_completion_supplier, block_reason, child_order_group_json, created_at, updated_at, status].hash
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
# Builds the object from hash
|
|
709
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
710
|
+
# @return [Object] Returns the model itself
|
|
711
|
+
def self.build_from_hash(attributes)
|
|
712
|
+
return nil unless attributes.is_a?(Hash)
|
|
713
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
714
|
+
transformed_hash = {}
|
|
715
|
+
openapi_types.each_pair do |key, type|
|
|
716
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
717
|
+
transformed_hash["#{key}"] = nil
|
|
718
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
719
|
+
# check to ensure the input is an array given that the attribute
|
|
720
|
+
# is documented as an array but the input is not
|
|
721
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
722
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
723
|
+
end
|
|
724
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
725
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
726
|
+
end
|
|
727
|
+
end
|
|
728
|
+
new(transformed_hash)
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Returns the object in the form of hash
|
|
732
|
+
# @return [Hash] Returns the object in the form of hash
|
|
733
|
+
def to_hash
|
|
734
|
+
hash = {}
|
|
735
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
736
|
+
value = self.send(attr)
|
|
737
|
+
if value.nil?
|
|
738
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
739
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
hash[param] = _to_hash(value)
|
|
743
|
+
end
|
|
744
|
+
hash
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
end
|