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,721 @@
|
|
|
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
|
+
class ResultOrderTraceReport < ApiModelBase
|
|
18
|
+
# 已完成剔除项的本次有效考核结果;原始快照仍供追溯,不将政策合格回写数据库。
|
|
19
|
+
attr_accessor :policy_kpi_results
|
|
20
|
+
|
|
21
|
+
# 按品牌根明细保留当前有效考核快照,与归档差异的历史比较基线分离。
|
|
22
|
+
attr_accessor :active_kpi_snapshots
|
|
23
|
+
|
|
24
|
+
# 应归档但快照缺失或输入损坏的根明细 ID;非空时当前行汇总 KPI 不可考核,需后台补偿。
|
|
25
|
+
attr_accessor :kpi_snapshot_unavailable_order_line_ids
|
|
26
|
+
|
|
27
|
+
# 溯源状态(已完成/进行中/已超期)
|
|
28
|
+
attr_accessor :trace_status
|
|
29
|
+
|
|
30
|
+
attr_accessor :trace_status_name
|
|
31
|
+
|
|
32
|
+
# 链条上供应商数量(CustomerId + SupplierId 去重 -1)
|
|
33
|
+
attr_accessor :supplier_count
|
|
34
|
+
|
|
35
|
+
# 订单链条上的scope_code拼接(去重,逗号分隔,如T2,T3,T4)
|
|
36
|
+
attr_accessor :scope_code_chain
|
|
37
|
+
|
|
38
|
+
# 未完成链接的关联订单明细集合;为null代表当前链条已全部完成链接。
|
|
39
|
+
attr_accessor :unlinked_order_details
|
|
40
|
+
|
|
41
|
+
# 发货 KPI 明细集合;只要同一订单明细存在发货单数据就返回。
|
|
42
|
+
attr_accessor :allocated_delivery_kpi_details
|
|
43
|
+
|
|
44
|
+
# 当前报表行是否已经使用品牌订单 KPI 快照覆盖实时 KPI 结果。
|
|
45
|
+
attr_accessor :using_kpi_snapshot
|
|
46
|
+
|
|
47
|
+
# 当前报表行命中的品牌订单 KPI 快照 ID 集合,多个订单明细时逗号分隔。
|
|
48
|
+
attr_accessor :snapshot_ids
|
|
49
|
+
|
|
50
|
+
# 当前报表行命中的订单明细 ID 集合,多个订单明细时逗号分隔。
|
|
51
|
+
attr_accessor :snapshot_order_line_ids
|
|
52
|
+
|
|
53
|
+
# 当前报表行使用的最新快照时间。
|
|
54
|
+
attr_accessor :snapshot_at
|
|
55
|
+
|
|
56
|
+
# 快照时的 order_chain_status 聚合值,用于和当前实时状态比较。
|
|
57
|
+
attr_accessor :snapshot_order_chain_status
|
|
58
|
+
|
|
59
|
+
# 当前实时查询得到的 order_chain_status 聚合值。
|
|
60
|
+
attr_accessor :current_order_chain_status
|
|
61
|
+
|
|
62
|
+
# 快照 order_chain_status 与当前实时 order_chain_status 是否存在差异。
|
|
63
|
+
attr_accessor :snapshot_order_chain_status_changed
|
|
64
|
+
|
|
65
|
+
# 快照与当前 order_chain_status 不一致的订单明细 ID 集合,逗号分隔。
|
|
66
|
+
attr_accessor :snapshot_changed_order_line_ids
|
|
67
|
+
|
|
68
|
+
# KPI 归档后,影响完成判断的订单链条数据是否发生变化。
|
|
69
|
+
attr_accessor :kpi_archived_data_changed
|
|
70
|
+
|
|
71
|
+
# KPI 归档后数据是否被修改的多语言展示值。
|
|
72
|
+
attr_accessor :kpi_archived_data_changed_name
|
|
73
|
+
|
|
74
|
+
# KPI 归档后变化摘要;多条订单行用换行拼接,由独立快照差异接口返回。
|
|
75
|
+
attr_accessor :kpi_archived_data_change_summary
|
|
76
|
+
|
|
77
|
+
# KPI 归档后变化明细对象列表;品牌报表分页不再拼装,独立快照差异接口使用。
|
|
78
|
+
attr_accessor :kpi_archived_data_change_details
|
|
79
|
+
|
|
80
|
+
# 命中的供应商订单级快照集合;用于前端详情按归档口径查看供应商 KPI 和阻塞原因。
|
|
81
|
+
attr_accessor :supplier_order_snapshots
|
|
82
|
+
|
|
83
|
+
# 命中的申报未完成项快照集合;用于前端详情按归档口径查看未完成必要文件。
|
|
84
|
+
attr_accessor :uncompleted_declare_snapshots
|
|
85
|
+
|
|
86
|
+
# 整个链条的最新更新日期
|
|
87
|
+
attr_accessor :chain_last_updated_at
|
|
88
|
+
|
|
89
|
+
# 实际交货日期;来源为发货单交货时间,保留给前端展示交货时间。
|
|
90
|
+
attr_accessor :actual_delivery_date
|
|
91
|
+
|
|
92
|
+
# 到港日期;订单明细维度取当前 order_line.gts_arrival_date,订单维度取订单下明细的最大到港日期。
|
|
93
|
+
attr_accessor :arrival_dated
|
|
94
|
+
|
|
95
|
+
# GTS 离港日期,取 order_line.gts_departure_date;订单级取所属明细的最晚非空日期,全部为空时返回 null,不受 KPI 快照覆盖。
|
|
96
|
+
attr_accessor :gts_departure_date
|
|
97
|
+
|
|
98
|
+
# 链条溯源完成时间
|
|
99
|
+
attr_accessor :chain_trace_completed_at
|
|
100
|
+
|
|
101
|
+
# 单订单溯源完成时间
|
|
102
|
+
attr_accessor :single_order_trace_completed_at
|
|
103
|
+
|
|
104
|
+
# 是否逾期(品牌)
|
|
105
|
+
attr_accessor :brand_is_overdue
|
|
106
|
+
|
|
107
|
+
# 品牌 KPI 截止时间;命中归档快照时保留快照值,供日报按考核月份汇总。
|
|
108
|
+
attr_accessor :brand_kpi_deadline
|
|
109
|
+
|
|
110
|
+
# 品牌部门逾期日期差/天
|
|
111
|
+
attr_accessor :brand_overdue_days
|
|
112
|
+
|
|
113
|
+
# 是否逾期(供应商)
|
|
114
|
+
attr_accessor :supplier_is_overdue
|
|
115
|
+
|
|
116
|
+
# T1 供应商 KPI 截止时间;命中归档快照时保留快照值,避免历史月报受后续日期调整影响。
|
|
117
|
+
attr_accessor :supplier_kpi_deadline
|
|
118
|
+
|
|
119
|
+
# 供应商逾期日期差/天
|
|
120
|
+
attr_accessor :supplier_overdue_days
|
|
121
|
+
|
|
122
|
+
# 风险等级(默认低优先级)
|
|
123
|
+
attr_accessor :risk_level_name
|
|
124
|
+
|
|
125
|
+
# 完成率(保留两位小数)
|
|
126
|
+
attr_accessor :completion_rate
|
|
127
|
+
|
|
128
|
+
# 全链条完成率(如:74%)
|
|
129
|
+
attr_accessor :chain_completion_rate
|
|
130
|
+
|
|
131
|
+
# 已完成订单(如:10/24)
|
|
132
|
+
attr_accessor :completed_order_text
|
|
133
|
+
|
|
134
|
+
# 证据完整率(如:66%)
|
|
135
|
+
attr_accessor :proof_completion_rate
|
|
136
|
+
|
|
137
|
+
# 已上传附件(如:18/50)
|
|
138
|
+
attr_accessor :uploaded_attachment_text
|
|
139
|
+
|
|
140
|
+
# 订单名称
|
|
141
|
+
attr_accessor :order_name
|
|
142
|
+
|
|
143
|
+
# 链条完成状态,1完成;0未完成(不包含申报,是否关联至了最后一级订单)
|
|
144
|
+
attr_accessor :chain_status
|
|
145
|
+
|
|
146
|
+
attr_accessor :chain_status_name
|
|
147
|
+
|
|
148
|
+
# 审核状态:101 草稿 102 待审核 103 重新提交待审 111 取消审核 113 审核作废 114 审核驳回 115 审核拒绝 120 审核通过
|
|
149
|
+
attr_accessor :approve_status
|
|
150
|
+
|
|
151
|
+
attr_accessor :approve_status_name
|
|
152
|
+
|
|
153
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
154
|
+
def self.attribute_map
|
|
155
|
+
{
|
|
156
|
+
:'policy_kpi_results' => :'policyKpiResults',
|
|
157
|
+
:'active_kpi_snapshots' => :'activeKpiSnapshots',
|
|
158
|
+
:'kpi_snapshot_unavailable_order_line_ids' => :'kpiSnapshotUnavailableOrderLineIds',
|
|
159
|
+
:'trace_status' => :'traceStatus',
|
|
160
|
+
:'trace_status_name' => :'traceStatusName',
|
|
161
|
+
:'supplier_count' => :'supplierCount',
|
|
162
|
+
:'scope_code_chain' => :'scopeCodeChain',
|
|
163
|
+
:'unlinked_order_details' => :'unlinkedOrderDetails',
|
|
164
|
+
:'allocated_delivery_kpi_details' => :'allocatedDeliveryKpiDetails',
|
|
165
|
+
:'using_kpi_snapshot' => :'usingKpiSnapshot',
|
|
166
|
+
:'snapshot_ids' => :'snapshotIds',
|
|
167
|
+
:'snapshot_order_line_ids' => :'snapshotOrderLineIds',
|
|
168
|
+
:'snapshot_at' => :'snapshotAt',
|
|
169
|
+
:'snapshot_order_chain_status' => :'snapshotOrderChainStatus',
|
|
170
|
+
:'current_order_chain_status' => :'currentOrderChainStatus',
|
|
171
|
+
:'snapshot_order_chain_status_changed' => :'snapshotOrderChainStatusChanged',
|
|
172
|
+
:'snapshot_changed_order_line_ids' => :'snapshotChangedOrderLineIds',
|
|
173
|
+
:'kpi_archived_data_changed' => :'kpiArchivedDataChanged',
|
|
174
|
+
:'kpi_archived_data_changed_name' => :'kpiArchivedDataChangedName',
|
|
175
|
+
:'kpi_archived_data_change_summary' => :'kpiArchivedDataChangeSummary',
|
|
176
|
+
:'kpi_archived_data_change_details' => :'kpiArchivedDataChangeDetails',
|
|
177
|
+
:'supplier_order_snapshots' => :'supplierOrderSnapshots',
|
|
178
|
+
:'uncompleted_declare_snapshots' => :'uncompletedDeclareSnapshots',
|
|
179
|
+
:'chain_last_updated_at' => :'chainLastUpdatedAt',
|
|
180
|
+
:'actual_delivery_date' => :'actualDeliveryDate',
|
|
181
|
+
:'arrival_dated' => :'arrivalDated',
|
|
182
|
+
:'gts_departure_date' => :'gtsDepartureDate',
|
|
183
|
+
:'chain_trace_completed_at' => :'chainTraceCompletedAt',
|
|
184
|
+
:'single_order_trace_completed_at' => :'singleOrderTraceCompletedAt',
|
|
185
|
+
:'brand_is_overdue' => :'brandIsOverdue',
|
|
186
|
+
:'brand_kpi_deadline' => :'brandKpiDeadline',
|
|
187
|
+
:'brand_overdue_days' => :'brandOverdueDays',
|
|
188
|
+
:'supplier_is_overdue' => :'supplierIsOverdue',
|
|
189
|
+
:'supplier_kpi_deadline' => :'supplierKpiDeadline',
|
|
190
|
+
:'supplier_overdue_days' => :'supplierOverdueDays',
|
|
191
|
+
:'risk_level_name' => :'riskLevelName',
|
|
192
|
+
:'completion_rate' => :'completionRate',
|
|
193
|
+
:'chain_completion_rate' => :'chainCompletionRate',
|
|
194
|
+
:'completed_order_text' => :'completedOrderText',
|
|
195
|
+
:'proof_completion_rate' => :'proofCompletionRate',
|
|
196
|
+
:'uploaded_attachment_text' => :'uploadedAttachmentText',
|
|
197
|
+
:'order_name' => :'orderName',
|
|
198
|
+
:'chain_status' => :'chainStatus',
|
|
199
|
+
:'chain_status_name' => :'chainStatusName',
|
|
200
|
+
:'approve_status' => :'approveStatus',
|
|
201
|
+
:'approve_status_name' => :'approveStatusName'
|
|
202
|
+
}
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns attribute mapping this model knows about
|
|
206
|
+
def self.acceptable_attribute_map
|
|
207
|
+
attribute_map
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns all the JSON keys this model knows about
|
|
211
|
+
def self.acceptable_attributes
|
|
212
|
+
acceptable_attribute_map.values
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Attribute type mapping.
|
|
216
|
+
def self.openapi_types
|
|
217
|
+
{
|
|
218
|
+
:'policy_kpi_results' => :'Array<BrandKpiPolicyResult>',
|
|
219
|
+
:'active_kpi_snapshots' => :'Array<BrandOrderKpiSnapshotDto>',
|
|
220
|
+
:'kpi_snapshot_unavailable_order_line_ids' => :'Array<String>',
|
|
221
|
+
:'trace_status' => :'String',
|
|
222
|
+
:'trace_status_name' => :'String',
|
|
223
|
+
:'supplier_count' => :'Integer',
|
|
224
|
+
:'scope_code_chain' => :'String',
|
|
225
|
+
:'unlinked_order_details' => :'Array<ResultBrandReportUnlinkedOrderDetail>',
|
|
226
|
+
:'allocated_delivery_kpi_details' => :'Array<ResultBrandReportAllocatedDeliveryKpiDetail>',
|
|
227
|
+
:'using_kpi_snapshot' => :'Boolean',
|
|
228
|
+
:'snapshot_ids' => :'String',
|
|
229
|
+
:'snapshot_order_line_ids' => :'String',
|
|
230
|
+
:'snapshot_at' => :'Time',
|
|
231
|
+
:'snapshot_order_chain_status' => :'Boolean',
|
|
232
|
+
:'current_order_chain_status' => :'Boolean',
|
|
233
|
+
:'snapshot_order_chain_status_changed' => :'Boolean',
|
|
234
|
+
:'snapshot_changed_order_line_ids' => :'String',
|
|
235
|
+
:'kpi_archived_data_changed' => :'Boolean',
|
|
236
|
+
:'kpi_archived_data_changed_name' => :'String',
|
|
237
|
+
:'kpi_archived_data_change_summary' => :'String',
|
|
238
|
+
:'kpi_archived_data_change_details' => :'Array<ResultKpiArchivedDataChangeDetail>',
|
|
239
|
+
:'supplier_order_snapshots' => :'Array<BrandOrderSupplierOrderSnapshotDto>',
|
|
240
|
+
:'uncompleted_declare_snapshots' => :'Array<BrandOrderUncompletedDeclareSnapshotDto>',
|
|
241
|
+
:'chain_last_updated_at' => :'Time',
|
|
242
|
+
:'actual_delivery_date' => :'Time',
|
|
243
|
+
:'arrival_dated' => :'Time',
|
|
244
|
+
:'gts_departure_date' => :'Time',
|
|
245
|
+
:'chain_trace_completed_at' => :'Time',
|
|
246
|
+
:'single_order_trace_completed_at' => :'Time',
|
|
247
|
+
:'brand_is_overdue' => :'Boolean',
|
|
248
|
+
:'brand_kpi_deadline' => :'Time',
|
|
249
|
+
:'brand_overdue_days' => :'Integer',
|
|
250
|
+
:'supplier_is_overdue' => :'Boolean',
|
|
251
|
+
:'supplier_kpi_deadline' => :'Time',
|
|
252
|
+
:'supplier_overdue_days' => :'Integer',
|
|
253
|
+
:'risk_level_name' => :'String',
|
|
254
|
+
:'completion_rate' => :'String',
|
|
255
|
+
:'chain_completion_rate' => :'String',
|
|
256
|
+
:'completed_order_text' => :'String',
|
|
257
|
+
:'proof_completion_rate' => :'String',
|
|
258
|
+
:'uploaded_attachment_text' => :'String',
|
|
259
|
+
:'order_name' => :'String',
|
|
260
|
+
:'chain_status' => :'Boolean',
|
|
261
|
+
:'chain_status_name' => :'String',
|
|
262
|
+
:'approve_status' => :'Integer',
|
|
263
|
+
:'approve_status_name' => :'String'
|
|
264
|
+
}
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# List of attributes with nullable: true
|
|
268
|
+
def self.openapi_nullable
|
|
269
|
+
Set.new([
|
|
270
|
+
:'trace_status',
|
|
271
|
+
:'trace_status_name',
|
|
272
|
+
:'supplier_count',
|
|
273
|
+
:'scope_code_chain',
|
|
274
|
+
:'unlinked_order_details',
|
|
275
|
+
:'allocated_delivery_kpi_details',
|
|
276
|
+
:'snapshot_ids',
|
|
277
|
+
:'snapshot_order_line_ids',
|
|
278
|
+
:'snapshot_at',
|
|
279
|
+
:'snapshot_order_chain_status',
|
|
280
|
+
:'current_order_chain_status',
|
|
281
|
+
:'snapshot_order_chain_status_changed',
|
|
282
|
+
:'snapshot_changed_order_line_ids',
|
|
283
|
+
:'kpi_archived_data_changed',
|
|
284
|
+
:'kpi_archived_data_changed_name',
|
|
285
|
+
:'kpi_archived_data_change_summary',
|
|
286
|
+
:'kpi_archived_data_change_details',
|
|
287
|
+
:'supplier_order_snapshots',
|
|
288
|
+
:'uncompleted_declare_snapshots',
|
|
289
|
+
:'chain_last_updated_at',
|
|
290
|
+
:'actual_delivery_date',
|
|
291
|
+
:'arrival_dated',
|
|
292
|
+
:'gts_departure_date',
|
|
293
|
+
:'chain_trace_completed_at',
|
|
294
|
+
:'single_order_trace_completed_at',
|
|
295
|
+
:'brand_is_overdue',
|
|
296
|
+
:'brand_kpi_deadline',
|
|
297
|
+
:'brand_overdue_days',
|
|
298
|
+
:'supplier_is_overdue',
|
|
299
|
+
:'supplier_kpi_deadline',
|
|
300
|
+
:'supplier_overdue_days',
|
|
301
|
+
:'risk_level_name',
|
|
302
|
+
:'completion_rate',
|
|
303
|
+
:'chain_completion_rate',
|
|
304
|
+
:'completed_order_text',
|
|
305
|
+
:'proof_completion_rate',
|
|
306
|
+
:'uploaded_attachment_text',
|
|
307
|
+
:'order_name',
|
|
308
|
+
:'chain_status',
|
|
309
|
+
:'chain_status_name',
|
|
310
|
+
:'approve_status',
|
|
311
|
+
:'approve_status_name'
|
|
312
|
+
])
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Initializes the object
|
|
316
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
317
|
+
def initialize(attributes = {})
|
|
318
|
+
if (!attributes.is_a?(Hash))
|
|
319
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ResultOrderTraceReport` initialize method"
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
323
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
324
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
325
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
326
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ResultOrderTraceReport`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
327
|
+
end
|
|
328
|
+
h[k.to_sym] = v
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if attributes.key?(:'policy_kpi_results')
|
|
332
|
+
if (value = attributes[:'policy_kpi_results']).is_a?(Array)
|
|
333
|
+
self.policy_kpi_results = value
|
|
334
|
+
end
|
|
335
|
+
else
|
|
336
|
+
self.policy_kpi_results = nil
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
if attributes.key?(:'active_kpi_snapshots')
|
|
340
|
+
if (value = attributes[:'active_kpi_snapshots']).is_a?(Array)
|
|
341
|
+
self.active_kpi_snapshots = value
|
|
342
|
+
end
|
|
343
|
+
else
|
|
344
|
+
self.active_kpi_snapshots = nil
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
if attributes.key?(:'kpi_snapshot_unavailable_order_line_ids')
|
|
348
|
+
if (value = attributes[:'kpi_snapshot_unavailable_order_line_ids']).is_a?(Array)
|
|
349
|
+
self.kpi_snapshot_unavailable_order_line_ids = value
|
|
350
|
+
end
|
|
351
|
+
else
|
|
352
|
+
self.kpi_snapshot_unavailable_order_line_ids = nil
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
if attributes.key?(:'trace_status')
|
|
356
|
+
self.trace_status = attributes[:'trace_status']
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
if attributes.key?(:'trace_status_name')
|
|
360
|
+
self.trace_status_name = attributes[:'trace_status_name']
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
if attributes.key?(:'supplier_count')
|
|
364
|
+
self.supplier_count = attributes[:'supplier_count']
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
if attributes.key?(:'scope_code_chain')
|
|
368
|
+
self.scope_code_chain = attributes[:'scope_code_chain']
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
if attributes.key?(:'unlinked_order_details')
|
|
372
|
+
if (value = attributes[:'unlinked_order_details']).is_a?(Array)
|
|
373
|
+
self.unlinked_order_details = value
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if attributes.key?(:'allocated_delivery_kpi_details')
|
|
378
|
+
if (value = attributes[:'allocated_delivery_kpi_details']).is_a?(Array)
|
|
379
|
+
self.allocated_delivery_kpi_details = value
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
if attributes.key?(:'using_kpi_snapshot')
|
|
384
|
+
self.using_kpi_snapshot = attributes[:'using_kpi_snapshot']
|
|
385
|
+
else
|
|
386
|
+
self.using_kpi_snapshot = nil
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if attributes.key?(:'snapshot_ids')
|
|
390
|
+
self.snapshot_ids = attributes[:'snapshot_ids']
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if attributes.key?(:'snapshot_order_line_ids')
|
|
394
|
+
self.snapshot_order_line_ids = attributes[:'snapshot_order_line_ids']
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if attributes.key?(:'snapshot_at')
|
|
398
|
+
self.snapshot_at = attributes[:'snapshot_at']
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if attributes.key?(:'snapshot_order_chain_status')
|
|
402
|
+
self.snapshot_order_chain_status = attributes[:'snapshot_order_chain_status']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'current_order_chain_status')
|
|
406
|
+
self.current_order_chain_status = attributes[:'current_order_chain_status']
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if attributes.key?(:'snapshot_order_chain_status_changed')
|
|
410
|
+
self.snapshot_order_chain_status_changed = attributes[:'snapshot_order_chain_status_changed']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'snapshot_changed_order_line_ids')
|
|
414
|
+
self.snapshot_changed_order_line_ids = attributes[:'snapshot_changed_order_line_ids']
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
if attributes.key?(:'kpi_archived_data_changed')
|
|
418
|
+
self.kpi_archived_data_changed = attributes[:'kpi_archived_data_changed']
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if attributes.key?(:'kpi_archived_data_changed_name')
|
|
422
|
+
self.kpi_archived_data_changed_name = attributes[:'kpi_archived_data_changed_name']
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'kpi_archived_data_change_summary')
|
|
426
|
+
self.kpi_archived_data_change_summary = attributes[:'kpi_archived_data_change_summary']
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
if attributes.key?(:'kpi_archived_data_change_details')
|
|
430
|
+
if (value = attributes[:'kpi_archived_data_change_details']).is_a?(Array)
|
|
431
|
+
self.kpi_archived_data_change_details = value
|
|
432
|
+
end
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if attributes.key?(:'supplier_order_snapshots')
|
|
436
|
+
if (value = attributes[:'supplier_order_snapshots']).is_a?(Array)
|
|
437
|
+
self.supplier_order_snapshots = value
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
if attributes.key?(:'uncompleted_declare_snapshots')
|
|
442
|
+
if (value = attributes[:'uncompleted_declare_snapshots']).is_a?(Array)
|
|
443
|
+
self.uncompleted_declare_snapshots = value
|
|
444
|
+
end
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if attributes.key?(:'chain_last_updated_at')
|
|
448
|
+
self.chain_last_updated_at = attributes[:'chain_last_updated_at']
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
if attributes.key?(:'actual_delivery_date')
|
|
452
|
+
self.actual_delivery_date = attributes[:'actual_delivery_date']
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
if attributes.key?(:'arrival_dated')
|
|
456
|
+
self.arrival_dated = attributes[:'arrival_dated']
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if attributes.key?(:'gts_departure_date')
|
|
460
|
+
self.gts_departure_date = attributes[:'gts_departure_date']
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
if attributes.key?(:'chain_trace_completed_at')
|
|
464
|
+
self.chain_trace_completed_at = attributes[:'chain_trace_completed_at']
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
if attributes.key?(:'single_order_trace_completed_at')
|
|
468
|
+
self.single_order_trace_completed_at = attributes[:'single_order_trace_completed_at']
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
if attributes.key?(:'brand_is_overdue')
|
|
472
|
+
self.brand_is_overdue = attributes[:'brand_is_overdue']
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
if attributes.key?(:'brand_kpi_deadline')
|
|
476
|
+
self.brand_kpi_deadline = attributes[:'brand_kpi_deadline']
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
if attributes.key?(:'brand_overdue_days')
|
|
480
|
+
self.brand_overdue_days = attributes[:'brand_overdue_days']
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
if attributes.key?(:'supplier_is_overdue')
|
|
484
|
+
self.supplier_is_overdue = attributes[:'supplier_is_overdue']
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
if attributes.key?(:'supplier_kpi_deadline')
|
|
488
|
+
self.supplier_kpi_deadline = attributes[:'supplier_kpi_deadline']
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
if attributes.key?(:'supplier_overdue_days')
|
|
492
|
+
self.supplier_overdue_days = attributes[:'supplier_overdue_days']
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
if attributes.key?(:'risk_level_name')
|
|
496
|
+
self.risk_level_name = attributes[:'risk_level_name']
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
if attributes.key?(:'completion_rate')
|
|
500
|
+
self.completion_rate = attributes[:'completion_rate']
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
if attributes.key?(:'chain_completion_rate')
|
|
504
|
+
self.chain_completion_rate = attributes[:'chain_completion_rate']
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
if attributes.key?(:'completed_order_text')
|
|
508
|
+
self.completed_order_text = attributes[:'completed_order_text']
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
if attributes.key?(:'proof_completion_rate')
|
|
512
|
+
self.proof_completion_rate = attributes[:'proof_completion_rate']
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
if attributes.key?(:'uploaded_attachment_text')
|
|
516
|
+
self.uploaded_attachment_text = attributes[:'uploaded_attachment_text']
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
if attributes.key?(:'order_name')
|
|
520
|
+
self.order_name = attributes[:'order_name']
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
if attributes.key?(:'chain_status')
|
|
524
|
+
self.chain_status = attributes[:'chain_status']
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
if attributes.key?(:'chain_status_name')
|
|
528
|
+
self.chain_status_name = attributes[:'chain_status_name']
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
if attributes.key?(:'approve_status')
|
|
532
|
+
self.approve_status = attributes[:'approve_status']
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
if attributes.key?(:'approve_status_name')
|
|
536
|
+
self.approve_status_name = attributes[:'approve_status_name']
|
|
537
|
+
end
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
541
|
+
# @return Array for valid properties with the reasons
|
|
542
|
+
def list_invalid_properties
|
|
543
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
544
|
+
invalid_properties = Array.new
|
|
545
|
+
if @policy_kpi_results.nil?
|
|
546
|
+
invalid_properties.push('invalid value for "policy_kpi_results", policy_kpi_results cannot be nil.')
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
if @active_kpi_snapshots.nil?
|
|
550
|
+
invalid_properties.push('invalid value for "active_kpi_snapshots", active_kpi_snapshots cannot be nil.')
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
if @kpi_snapshot_unavailable_order_line_ids.nil?
|
|
554
|
+
invalid_properties.push('invalid value for "kpi_snapshot_unavailable_order_line_ids", kpi_snapshot_unavailable_order_line_ids cannot be nil.')
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
if @using_kpi_snapshot.nil?
|
|
558
|
+
invalid_properties.push('invalid value for "using_kpi_snapshot", using_kpi_snapshot cannot be nil.')
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
invalid_properties
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
# Check to see if the all the properties in the model are valid
|
|
565
|
+
# @return true if the model is valid
|
|
566
|
+
def valid?
|
|
567
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
568
|
+
return false if @policy_kpi_results.nil?
|
|
569
|
+
return false if @active_kpi_snapshots.nil?
|
|
570
|
+
return false if @kpi_snapshot_unavailable_order_line_ids.nil?
|
|
571
|
+
return false if @using_kpi_snapshot.nil?
|
|
572
|
+
true
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
# Custom attribute writer method with validation
|
|
576
|
+
# @param [Object] policy_kpi_results Value to be assigned
|
|
577
|
+
def policy_kpi_results=(policy_kpi_results)
|
|
578
|
+
if policy_kpi_results.nil?
|
|
579
|
+
fail ArgumentError, 'policy_kpi_results cannot be nil'
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
@policy_kpi_results = policy_kpi_results
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
# Custom attribute writer method with validation
|
|
586
|
+
# @param [Object] active_kpi_snapshots Value to be assigned
|
|
587
|
+
def active_kpi_snapshots=(active_kpi_snapshots)
|
|
588
|
+
if active_kpi_snapshots.nil?
|
|
589
|
+
fail ArgumentError, 'active_kpi_snapshots cannot be nil'
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
@active_kpi_snapshots = active_kpi_snapshots
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# Custom attribute writer method with validation
|
|
596
|
+
# @param [Object] kpi_snapshot_unavailable_order_line_ids Value to be assigned
|
|
597
|
+
def kpi_snapshot_unavailable_order_line_ids=(kpi_snapshot_unavailable_order_line_ids)
|
|
598
|
+
if kpi_snapshot_unavailable_order_line_ids.nil?
|
|
599
|
+
fail ArgumentError, 'kpi_snapshot_unavailable_order_line_ids cannot be nil'
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
@kpi_snapshot_unavailable_order_line_ids = kpi_snapshot_unavailable_order_line_ids
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# Custom attribute writer method with validation
|
|
606
|
+
# @param [Object] using_kpi_snapshot Value to be assigned
|
|
607
|
+
def using_kpi_snapshot=(using_kpi_snapshot)
|
|
608
|
+
if using_kpi_snapshot.nil?
|
|
609
|
+
fail ArgumentError, 'using_kpi_snapshot cannot be nil'
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
@using_kpi_snapshot = using_kpi_snapshot
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Checks equality by comparing each attribute.
|
|
616
|
+
# @param [Object] Object to be compared
|
|
617
|
+
def ==(o)
|
|
618
|
+
return true if self.equal?(o)
|
|
619
|
+
self.class == o.class &&
|
|
620
|
+
policy_kpi_results == o.policy_kpi_results &&
|
|
621
|
+
active_kpi_snapshots == o.active_kpi_snapshots &&
|
|
622
|
+
kpi_snapshot_unavailable_order_line_ids == o.kpi_snapshot_unavailable_order_line_ids &&
|
|
623
|
+
trace_status == o.trace_status &&
|
|
624
|
+
trace_status_name == o.trace_status_name &&
|
|
625
|
+
supplier_count == o.supplier_count &&
|
|
626
|
+
scope_code_chain == o.scope_code_chain &&
|
|
627
|
+
unlinked_order_details == o.unlinked_order_details &&
|
|
628
|
+
allocated_delivery_kpi_details == o.allocated_delivery_kpi_details &&
|
|
629
|
+
using_kpi_snapshot == o.using_kpi_snapshot &&
|
|
630
|
+
snapshot_ids == o.snapshot_ids &&
|
|
631
|
+
snapshot_order_line_ids == o.snapshot_order_line_ids &&
|
|
632
|
+
snapshot_at == o.snapshot_at &&
|
|
633
|
+
snapshot_order_chain_status == o.snapshot_order_chain_status &&
|
|
634
|
+
current_order_chain_status == o.current_order_chain_status &&
|
|
635
|
+
snapshot_order_chain_status_changed == o.snapshot_order_chain_status_changed &&
|
|
636
|
+
snapshot_changed_order_line_ids == o.snapshot_changed_order_line_ids &&
|
|
637
|
+
kpi_archived_data_changed == o.kpi_archived_data_changed &&
|
|
638
|
+
kpi_archived_data_changed_name == o.kpi_archived_data_changed_name &&
|
|
639
|
+
kpi_archived_data_change_summary == o.kpi_archived_data_change_summary &&
|
|
640
|
+
kpi_archived_data_change_details == o.kpi_archived_data_change_details &&
|
|
641
|
+
supplier_order_snapshots == o.supplier_order_snapshots &&
|
|
642
|
+
uncompleted_declare_snapshots == o.uncompleted_declare_snapshots &&
|
|
643
|
+
chain_last_updated_at == o.chain_last_updated_at &&
|
|
644
|
+
actual_delivery_date == o.actual_delivery_date &&
|
|
645
|
+
arrival_dated == o.arrival_dated &&
|
|
646
|
+
gts_departure_date == o.gts_departure_date &&
|
|
647
|
+
chain_trace_completed_at == o.chain_trace_completed_at &&
|
|
648
|
+
single_order_trace_completed_at == o.single_order_trace_completed_at &&
|
|
649
|
+
brand_is_overdue == o.brand_is_overdue &&
|
|
650
|
+
brand_kpi_deadline == o.brand_kpi_deadline &&
|
|
651
|
+
brand_overdue_days == o.brand_overdue_days &&
|
|
652
|
+
supplier_is_overdue == o.supplier_is_overdue &&
|
|
653
|
+
supplier_kpi_deadline == o.supplier_kpi_deadline &&
|
|
654
|
+
supplier_overdue_days == o.supplier_overdue_days &&
|
|
655
|
+
risk_level_name == o.risk_level_name &&
|
|
656
|
+
completion_rate == o.completion_rate &&
|
|
657
|
+
chain_completion_rate == o.chain_completion_rate &&
|
|
658
|
+
completed_order_text == o.completed_order_text &&
|
|
659
|
+
proof_completion_rate == o.proof_completion_rate &&
|
|
660
|
+
uploaded_attachment_text == o.uploaded_attachment_text &&
|
|
661
|
+
order_name == o.order_name &&
|
|
662
|
+
chain_status == o.chain_status &&
|
|
663
|
+
chain_status_name == o.chain_status_name &&
|
|
664
|
+
approve_status == o.approve_status &&
|
|
665
|
+
approve_status_name == o.approve_status_name
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
# @see the `==` method
|
|
669
|
+
# @param [Object] Object to be compared
|
|
670
|
+
def eql?(o)
|
|
671
|
+
self == o
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Calculates hash code according to all attributes.
|
|
675
|
+
# @return [Integer] Hash code
|
|
676
|
+
def hash
|
|
677
|
+
[policy_kpi_results, active_kpi_snapshots, kpi_snapshot_unavailable_order_line_ids, trace_status, trace_status_name, supplier_count, scope_code_chain, unlinked_order_details, allocated_delivery_kpi_details, using_kpi_snapshot, snapshot_ids, snapshot_order_line_ids, snapshot_at, snapshot_order_chain_status, current_order_chain_status, snapshot_order_chain_status_changed, snapshot_changed_order_line_ids, kpi_archived_data_changed, kpi_archived_data_changed_name, kpi_archived_data_change_summary, kpi_archived_data_change_details, supplier_order_snapshots, uncompleted_declare_snapshots, chain_last_updated_at, actual_delivery_date, arrival_dated, gts_departure_date, chain_trace_completed_at, single_order_trace_completed_at, brand_is_overdue, brand_kpi_deadline, brand_overdue_days, supplier_is_overdue, supplier_kpi_deadline, supplier_overdue_days, risk_level_name, completion_rate, chain_completion_rate, completed_order_text, proof_completion_rate, uploaded_attachment_text, order_name, chain_status, chain_status_name, approve_status, approve_status_name].hash
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
# Builds the object from hash
|
|
681
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
682
|
+
# @return [Object] Returns the model itself
|
|
683
|
+
def self.build_from_hash(attributes)
|
|
684
|
+
return nil unless attributes.is_a?(Hash)
|
|
685
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
686
|
+
transformed_hash = {}
|
|
687
|
+
openapi_types.each_pair do |key, type|
|
|
688
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
689
|
+
transformed_hash["#{key}"] = nil
|
|
690
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
691
|
+
# check to ensure the input is an array given that the attribute
|
|
692
|
+
# is documented as an array but the input is not
|
|
693
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
694
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
695
|
+
end
|
|
696
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
697
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
698
|
+
end
|
|
699
|
+
end
|
|
700
|
+
new(transformed_hash)
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
# Returns the object in the form of hash
|
|
704
|
+
# @return [Hash] Returns the object in the form of hash
|
|
705
|
+
def to_hash
|
|
706
|
+
hash = {}
|
|
707
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
708
|
+
value = self.send(attr)
|
|
709
|
+
if value.nil?
|
|
710
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
711
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
712
|
+
end
|
|
713
|
+
|
|
714
|
+
hash[param] = _to_hash(value)
|
|
715
|
+
end
|
|
716
|
+
hash
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
end
|
|
720
|
+
|
|
721
|
+
end
|