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,780 @@
|
|
|
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 Company < ApiModelBase
|
|
19
|
+
# 唯一的公司ID
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 公司英文全称
|
|
23
|
+
attr_accessor :name
|
|
24
|
+
|
|
25
|
+
# 公司当地语言全称
|
|
26
|
+
attr_accessor :navite_name
|
|
27
|
+
|
|
28
|
+
# 公司简称
|
|
29
|
+
attr_accessor :short_name
|
|
30
|
+
|
|
31
|
+
# 注册编码
|
|
32
|
+
attr_accessor :registration_number
|
|
33
|
+
|
|
34
|
+
# 增值税号码
|
|
35
|
+
attr_accessor :vat_number
|
|
36
|
+
|
|
37
|
+
# 国家
|
|
38
|
+
attr_accessor :country
|
|
39
|
+
|
|
40
|
+
# 省份
|
|
41
|
+
attr_accessor :province
|
|
42
|
+
|
|
43
|
+
# 区、县
|
|
44
|
+
attr_accessor :district
|
|
45
|
+
|
|
46
|
+
# 城市、镇
|
|
47
|
+
attr_accessor :town
|
|
48
|
+
|
|
49
|
+
# 详细地址
|
|
50
|
+
attr_accessor :address
|
|
51
|
+
|
|
52
|
+
# 地址2
|
|
53
|
+
attr_accessor :address2
|
|
54
|
+
|
|
55
|
+
# 最后一级的地址编号,关联GeoAddress
|
|
56
|
+
attr_accessor :last_geo_id
|
|
57
|
+
|
|
58
|
+
# 地址路径,会以国家Code|其余级别geoId展示
|
|
59
|
+
attr_accessor :geo_path
|
|
60
|
+
|
|
61
|
+
# 销售定义,只需要到第一级,多个使用 , 分隔
|
|
62
|
+
attr_accessor :sales_scopes
|
|
63
|
+
|
|
64
|
+
# 联系人
|
|
65
|
+
attr_accessor :contact_person
|
|
66
|
+
|
|
67
|
+
# 联系电话
|
|
68
|
+
attr_accessor :phone
|
|
69
|
+
|
|
70
|
+
# 联系邮箱
|
|
71
|
+
attr_accessor :email
|
|
72
|
+
|
|
73
|
+
# 备注
|
|
74
|
+
attr_accessor :remarks
|
|
75
|
+
|
|
76
|
+
# -9 禁用, -1 删除, 0 正常,1未开户
|
|
77
|
+
attr_accessor :status
|
|
78
|
+
|
|
79
|
+
# 审核状态:101 草稿&待注册,102 待审核 ,103 重新提交待审, 111 取消审核, 113 审核作废, 114 审核驳回, 115 审核拒绝, 120 审核通过
|
|
80
|
+
attr_accessor :audit_status
|
|
81
|
+
|
|
82
|
+
# 租户ID,决定了编辑权,为空时仅平台可编辑
|
|
83
|
+
attr_accessor :tenant_id
|
|
84
|
+
|
|
85
|
+
# 环境类型:0 正式,1 测试(测试的公司不允许切换到正式环境)
|
|
86
|
+
attr_accessor :environment_type
|
|
87
|
+
|
|
88
|
+
# 创建用户ID
|
|
89
|
+
attr_accessor :created_by
|
|
90
|
+
|
|
91
|
+
# 修改用户ID
|
|
92
|
+
attr_accessor :updated_by
|
|
93
|
+
|
|
94
|
+
# 创建时间
|
|
95
|
+
attr_accessor :created_at
|
|
96
|
+
|
|
97
|
+
# 更新时间
|
|
98
|
+
attr_accessor :updated_at
|
|
99
|
+
|
|
100
|
+
# 类型 0 注册公司,1 无需上线,2 品牌,3 认证机构, 4 NGO,5 加工工厂,
|
|
101
|
+
attr_accessor :type
|
|
102
|
+
|
|
103
|
+
# 公司别名(目前ai审核使用)
|
|
104
|
+
attr_accessor :company_alias
|
|
105
|
+
|
|
106
|
+
attr_accessor :company_compliance_profiles
|
|
107
|
+
|
|
108
|
+
attr_accessor :company_utility_declarations
|
|
109
|
+
|
|
110
|
+
attr_accessor :supplier_onboarding_ext
|
|
111
|
+
|
|
112
|
+
attr_accessor :factory_list
|
|
113
|
+
|
|
114
|
+
attr_accessor :out_factory_list
|
|
115
|
+
|
|
116
|
+
attr_accessor :trader_list
|
|
117
|
+
|
|
118
|
+
attr_accessor :customer_list
|
|
119
|
+
|
|
120
|
+
attr_accessor :supplier_list
|
|
121
|
+
|
|
122
|
+
attr_accessor :risk_key
|
|
123
|
+
|
|
124
|
+
# 是否拥有 1:是,0 :否
|
|
125
|
+
attr_accessor :is_have
|
|
126
|
+
|
|
127
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
128
|
+
def self.attribute_map
|
|
129
|
+
{
|
|
130
|
+
:'id' => :'id',
|
|
131
|
+
:'name' => :'name',
|
|
132
|
+
:'navite_name' => :'naviteName',
|
|
133
|
+
:'short_name' => :'shortName',
|
|
134
|
+
:'registration_number' => :'registrationNumber',
|
|
135
|
+
:'vat_number' => :'vatNumber',
|
|
136
|
+
:'country' => :'country',
|
|
137
|
+
:'province' => :'province',
|
|
138
|
+
:'district' => :'district',
|
|
139
|
+
:'town' => :'town',
|
|
140
|
+
:'address' => :'address',
|
|
141
|
+
:'address2' => :'address2',
|
|
142
|
+
:'last_geo_id' => :'lastGeoId',
|
|
143
|
+
:'geo_path' => :'geoPath',
|
|
144
|
+
:'sales_scopes' => :'salesScopes',
|
|
145
|
+
:'contact_person' => :'contactPerson',
|
|
146
|
+
:'phone' => :'phone',
|
|
147
|
+
:'email' => :'email',
|
|
148
|
+
:'remarks' => :'remarks',
|
|
149
|
+
:'status' => :'status',
|
|
150
|
+
:'audit_status' => :'auditStatus',
|
|
151
|
+
:'tenant_id' => :'tenantId',
|
|
152
|
+
:'environment_type' => :'environmentType',
|
|
153
|
+
:'created_by' => :'createdBy',
|
|
154
|
+
:'updated_by' => :'updatedBy',
|
|
155
|
+
:'created_at' => :'createdAt',
|
|
156
|
+
:'updated_at' => :'updatedAt',
|
|
157
|
+
:'type' => :'type',
|
|
158
|
+
:'company_alias' => :'companyAlias',
|
|
159
|
+
:'company_compliance_profiles' => :'companyComplianceProfiles',
|
|
160
|
+
:'company_utility_declarations' => :'companyUtilityDeclarations',
|
|
161
|
+
:'supplier_onboarding_ext' => :'supplierOnboardingExt',
|
|
162
|
+
:'factory_list' => :'factoryList',
|
|
163
|
+
:'out_factory_list' => :'outFactoryList',
|
|
164
|
+
:'trader_list' => :'traderList',
|
|
165
|
+
:'customer_list' => :'customerList',
|
|
166
|
+
:'supplier_list' => :'supplierList',
|
|
167
|
+
:'risk_key' => :'riskKey',
|
|
168
|
+
:'is_have' => :'isHave'
|
|
169
|
+
}
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns attribute mapping this model knows about
|
|
173
|
+
def self.acceptable_attribute_map
|
|
174
|
+
attribute_map
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns all the JSON keys this model knows about
|
|
178
|
+
def self.acceptable_attributes
|
|
179
|
+
acceptable_attribute_map.values
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Attribute type mapping.
|
|
183
|
+
def self.openapi_types
|
|
184
|
+
{
|
|
185
|
+
:'id' => :'String',
|
|
186
|
+
:'name' => :'String',
|
|
187
|
+
:'navite_name' => :'String',
|
|
188
|
+
:'short_name' => :'String',
|
|
189
|
+
:'registration_number' => :'String',
|
|
190
|
+
:'vat_number' => :'String',
|
|
191
|
+
:'country' => :'String',
|
|
192
|
+
:'province' => :'String',
|
|
193
|
+
:'district' => :'String',
|
|
194
|
+
:'town' => :'String',
|
|
195
|
+
:'address' => :'String',
|
|
196
|
+
:'address2' => :'String',
|
|
197
|
+
:'last_geo_id' => :'Integer',
|
|
198
|
+
:'geo_path' => :'String',
|
|
199
|
+
:'sales_scopes' => :'String',
|
|
200
|
+
:'contact_person' => :'String',
|
|
201
|
+
:'phone' => :'String',
|
|
202
|
+
:'email' => :'String',
|
|
203
|
+
:'remarks' => :'String',
|
|
204
|
+
:'status' => :'Integer',
|
|
205
|
+
:'audit_status' => :'Integer',
|
|
206
|
+
:'tenant_id' => :'String',
|
|
207
|
+
:'environment_type' => :'Integer',
|
|
208
|
+
:'created_by' => :'String',
|
|
209
|
+
:'updated_by' => :'String',
|
|
210
|
+
:'created_at' => :'Time',
|
|
211
|
+
:'updated_at' => :'Time',
|
|
212
|
+
:'type' => :'Integer',
|
|
213
|
+
:'company_alias' => :'String',
|
|
214
|
+
:'company_compliance_profiles' => :'Array<CompanyComplianceProfile>',
|
|
215
|
+
:'company_utility_declarations' => :'Array<CompanyUtilityDeclaration>',
|
|
216
|
+
:'supplier_onboarding_ext' => :'SupplierOnboardingExt',
|
|
217
|
+
:'factory_list' => :'Array<Factory>',
|
|
218
|
+
:'out_factory_list' => :'Array<Factory>',
|
|
219
|
+
:'trader_list' => :'Array<Trader>',
|
|
220
|
+
:'customer_list' => :'Array<Customer>',
|
|
221
|
+
:'supplier_list' => :'Array<Supplier>',
|
|
222
|
+
:'risk_key' => :'String',
|
|
223
|
+
:'is_have' => :'Integer'
|
|
224
|
+
}
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# List of attributes with nullable: true
|
|
228
|
+
def self.openapi_nullable
|
|
229
|
+
Set.new([
|
|
230
|
+
:'navite_name',
|
|
231
|
+
:'short_name',
|
|
232
|
+
:'registration_number',
|
|
233
|
+
:'vat_number',
|
|
234
|
+
:'province',
|
|
235
|
+
:'district',
|
|
236
|
+
:'town',
|
|
237
|
+
:'address2',
|
|
238
|
+
:'geo_path',
|
|
239
|
+
:'sales_scopes',
|
|
240
|
+
:'contact_person',
|
|
241
|
+
:'phone',
|
|
242
|
+
:'email',
|
|
243
|
+
:'remarks',
|
|
244
|
+
:'tenant_id',
|
|
245
|
+
:'updated_by',
|
|
246
|
+
:'updated_at',
|
|
247
|
+
:'company_alias',
|
|
248
|
+
:'factory_list',
|
|
249
|
+
:'out_factory_list',
|
|
250
|
+
:'trader_list',
|
|
251
|
+
:'customer_list',
|
|
252
|
+
:'supplier_list',
|
|
253
|
+
:'risk_key',
|
|
254
|
+
:'is_have'
|
|
255
|
+
])
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Initializes the object
|
|
259
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
260
|
+
def initialize(attributes = {})
|
|
261
|
+
if (!attributes.is_a?(Hash))
|
|
262
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::Company` initialize method"
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
266
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
267
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
268
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
269
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::Company`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
270
|
+
end
|
|
271
|
+
h[k.to_sym] = v
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if attributes.key?(:'id')
|
|
275
|
+
self.id = attributes[:'id']
|
|
276
|
+
else
|
|
277
|
+
self.id = nil
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.key?(:'name')
|
|
281
|
+
self.name = attributes[:'name']
|
|
282
|
+
else
|
|
283
|
+
self.name = nil
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.key?(:'navite_name')
|
|
287
|
+
self.navite_name = attributes[:'navite_name']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.key?(:'short_name')
|
|
291
|
+
self.short_name = attributes[:'short_name']
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'registration_number')
|
|
295
|
+
self.registration_number = attributes[:'registration_number']
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if attributes.key?(:'vat_number')
|
|
299
|
+
self.vat_number = attributes[:'vat_number']
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if attributes.key?(:'country')
|
|
303
|
+
self.country = attributes[:'country']
|
|
304
|
+
else
|
|
305
|
+
self.country = nil
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'province')
|
|
309
|
+
self.province = attributes[:'province']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'district')
|
|
313
|
+
self.district = attributes[:'district']
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.key?(:'town')
|
|
317
|
+
self.town = attributes[:'town']
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.key?(:'address')
|
|
321
|
+
self.address = attributes[:'address']
|
|
322
|
+
else
|
|
323
|
+
self.address = nil
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if attributes.key?(:'address2')
|
|
327
|
+
self.address2 = attributes[:'address2']
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if attributes.key?(:'last_geo_id')
|
|
331
|
+
self.last_geo_id = attributes[:'last_geo_id']
|
|
332
|
+
else
|
|
333
|
+
self.last_geo_id = nil
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
if attributes.key?(:'geo_path')
|
|
337
|
+
self.geo_path = attributes[:'geo_path']
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if attributes.key?(:'sales_scopes')
|
|
341
|
+
self.sales_scopes = attributes[:'sales_scopes']
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if attributes.key?(:'contact_person')
|
|
345
|
+
self.contact_person = attributes[:'contact_person']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if attributes.key?(:'phone')
|
|
349
|
+
self.phone = attributes[:'phone']
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if attributes.key?(:'email')
|
|
353
|
+
self.email = attributes[:'email']
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
if attributes.key?(:'remarks')
|
|
357
|
+
self.remarks = attributes[:'remarks']
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
if attributes.key?(:'status')
|
|
361
|
+
self.status = attributes[:'status']
|
|
362
|
+
else
|
|
363
|
+
self.status = nil
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if attributes.key?(:'audit_status')
|
|
367
|
+
self.audit_status = attributes[:'audit_status']
|
|
368
|
+
else
|
|
369
|
+
self.audit_status = nil
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if attributes.key?(:'tenant_id')
|
|
373
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
if attributes.key?(:'environment_type')
|
|
377
|
+
self.environment_type = attributes[:'environment_type']
|
|
378
|
+
else
|
|
379
|
+
self.environment_type = nil
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
if attributes.key?(:'created_by')
|
|
383
|
+
self.created_by = attributes[:'created_by']
|
|
384
|
+
else
|
|
385
|
+
self.created_by = nil
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
if attributes.key?(:'updated_by')
|
|
389
|
+
self.updated_by = attributes[:'updated_by']
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
if attributes.key?(:'created_at')
|
|
393
|
+
self.created_at = attributes[:'created_at']
|
|
394
|
+
else
|
|
395
|
+
self.created_at = nil
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
if attributes.key?(:'updated_at')
|
|
399
|
+
self.updated_at = attributes[:'updated_at']
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
if attributes.key?(:'type')
|
|
403
|
+
self.type = attributes[:'type']
|
|
404
|
+
else
|
|
405
|
+
self.type = nil
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
if attributes.key?(:'company_alias')
|
|
409
|
+
self.company_alias = attributes[:'company_alias']
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
if attributes.key?(:'company_compliance_profiles')
|
|
413
|
+
if (value = attributes[:'company_compliance_profiles']).is_a?(Array)
|
|
414
|
+
self.company_compliance_profiles = value
|
|
415
|
+
end
|
|
416
|
+
else
|
|
417
|
+
self.company_compliance_profiles = nil
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
if attributes.key?(:'company_utility_declarations')
|
|
421
|
+
if (value = attributes[:'company_utility_declarations']).is_a?(Array)
|
|
422
|
+
self.company_utility_declarations = value
|
|
423
|
+
end
|
|
424
|
+
else
|
|
425
|
+
self.company_utility_declarations = nil
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
if attributes.key?(:'supplier_onboarding_ext')
|
|
429
|
+
self.supplier_onboarding_ext = attributes[:'supplier_onboarding_ext']
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
if attributes.key?(:'factory_list')
|
|
433
|
+
if (value = attributes[:'factory_list']).is_a?(Array)
|
|
434
|
+
self.factory_list = value
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if attributes.key?(:'out_factory_list')
|
|
439
|
+
if (value = attributes[:'out_factory_list']).is_a?(Array)
|
|
440
|
+
self.out_factory_list = value
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
if attributes.key?(:'trader_list')
|
|
445
|
+
if (value = attributes[:'trader_list']).is_a?(Array)
|
|
446
|
+
self.trader_list = value
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
if attributes.key?(:'customer_list')
|
|
451
|
+
if (value = attributes[:'customer_list']).is_a?(Array)
|
|
452
|
+
self.customer_list = value
|
|
453
|
+
end
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
if attributes.key?(:'supplier_list')
|
|
457
|
+
if (value = attributes[:'supplier_list']).is_a?(Array)
|
|
458
|
+
self.supplier_list = value
|
|
459
|
+
end
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
if attributes.key?(:'risk_key')
|
|
463
|
+
self.risk_key = attributes[:'risk_key']
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
if attributes.key?(:'is_have')
|
|
467
|
+
self.is_have = attributes[:'is_have']
|
|
468
|
+
end
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
472
|
+
# @return Array for valid properties with the reasons
|
|
473
|
+
def list_invalid_properties
|
|
474
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
475
|
+
invalid_properties = Array.new
|
|
476
|
+
if @id.nil?
|
|
477
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
if @name.nil?
|
|
481
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if @country.nil?
|
|
485
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
if @address.nil?
|
|
489
|
+
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
if @last_geo_id.nil?
|
|
493
|
+
invalid_properties.push('invalid value for "last_geo_id", last_geo_id cannot be nil.')
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
if @status.nil?
|
|
497
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
if @audit_status.nil?
|
|
501
|
+
invalid_properties.push('invalid value for "audit_status", audit_status cannot be nil.')
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
if @environment_type.nil?
|
|
505
|
+
invalid_properties.push('invalid value for "environment_type", environment_type cannot be nil.')
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
if @created_by.nil?
|
|
509
|
+
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
if @created_at.nil?
|
|
513
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
if @type.nil?
|
|
517
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
if @company_compliance_profiles.nil?
|
|
521
|
+
invalid_properties.push('invalid value for "company_compliance_profiles", company_compliance_profiles cannot be nil.')
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
if @company_utility_declarations.nil?
|
|
525
|
+
invalid_properties.push('invalid value for "company_utility_declarations", company_utility_declarations cannot be nil.')
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
invalid_properties
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Check to see if the all the properties in the model are valid
|
|
532
|
+
# @return true if the model is valid
|
|
533
|
+
def valid?
|
|
534
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
535
|
+
return false if @id.nil?
|
|
536
|
+
return false if @name.nil?
|
|
537
|
+
return false if @country.nil?
|
|
538
|
+
return false if @address.nil?
|
|
539
|
+
return false if @last_geo_id.nil?
|
|
540
|
+
return false if @status.nil?
|
|
541
|
+
return false if @audit_status.nil?
|
|
542
|
+
return false if @environment_type.nil?
|
|
543
|
+
return false if @created_by.nil?
|
|
544
|
+
return false if @created_at.nil?
|
|
545
|
+
return false if @type.nil?
|
|
546
|
+
return false if @company_compliance_profiles.nil?
|
|
547
|
+
return false if @company_utility_declarations.nil?
|
|
548
|
+
true
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Custom attribute writer method with validation
|
|
552
|
+
# @param [Object] id Value to be assigned
|
|
553
|
+
def id=(id)
|
|
554
|
+
if id.nil?
|
|
555
|
+
fail ArgumentError, 'id cannot be nil'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
@id = id
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Custom attribute writer method with validation
|
|
562
|
+
# @param [Object] name Value to be assigned
|
|
563
|
+
def name=(name)
|
|
564
|
+
if name.nil?
|
|
565
|
+
fail ArgumentError, 'name cannot be nil'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
@name = name
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Custom attribute writer method with validation
|
|
572
|
+
# @param [Object] country Value to be assigned
|
|
573
|
+
def country=(country)
|
|
574
|
+
if country.nil?
|
|
575
|
+
fail ArgumentError, 'country cannot be nil'
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
@country = country
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Custom attribute writer method with validation
|
|
582
|
+
# @param [Object] address Value to be assigned
|
|
583
|
+
def address=(address)
|
|
584
|
+
if address.nil?
|
|
585
|
+
fail ArgumentError, 'address cannot be nil'
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
@address = address
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
# Custom attribute writer method with validation
|
|
592
|
+
# @param [Object] last_geo_id Value to be assigned
|
|
593
|
+
def last_geo_id=(last_geo_id)
|
|
594
|
+
if last_geo_id.nil?
|
|
595
|
+
fail ArgumentError, 'last_geo_id cannot be nil'
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
@last_geo_id = last_geo_id
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Custom attribute writer method with validation
|
|
602
|
+
# @param [Object] status Value to be assigned
|
|
603
|
+
def status=(status)
|
|
604
|
+
if status.nil?
|
|
605
|
+
fail ArgumentError, 'status cannot be nil'
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
@status = status
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# Custom attribute writer method with validation
|
|
612
|
+
# @param [Object] audit_status Value to be assigned
|
|
613
|
+
def audit_status=(audit_status)
|
|
614
|
+
if audit_status.nil?
|
|
615
|
+
fail ArgumentError, 'audit_status cannot be nil'
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
@audit_status = audit_status
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# Custom attribute writer method with validation
|
|
622
|
+
# @param [Object] environment_type Value to be assigned
|
|
623
|
+
def environment_type=(environment_type)
|
|
624
|
+
if environment_type.nil?
|
|
625
|
+
fail ArgumentError, 'environment_type cannot be nil'
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
@environment_type = environment_type
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
# Custom attribute writer method with validation
|
|
632
|
+
# @param [Object] created_by Value to be assigned
|
|
633
|
+
def created_by=(created_by)
|
|
634
|
+
if created_by.nil?
|
|
635
|
+
fail ArgumentError, 'created_by cannot be nil'
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
@created_by = created_by
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
# Custom attribute writer method with validation
|
|
642
|
+
# @param [Object] created_at Value to be assigned
|
|
643
|
+
def created_at=(created_at)
|
|
644
|
+
if created_at.nil?
|
|
645
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
@created_at = created_at
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
# Custom attribute writer method with validation
|
|
652
|
+
# @param [Object] type Value to be assigned
|
|
653
|
+
def type=(type)
|
|
654
|
+
if type.nil?
|
|
655
|
+
fail ArgumentError, 'type cannot be nil'
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
@type = type
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Custom attribute writer method with validation
|
|
662
|
+
# @param [Object] company_compliance_profiles Value to be assigned
|
|
663
|
+
def company_compliance_profiles=(company_compliance_profiles)
|
|
664
|
+
if company_compliance_profiles.nil?
|
|
665
|
+
fail ArgumentError, 'company_compliance_profiles cannot be nil'
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
@company_compliance_profiles = company_compliance_profiles
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# Custom attribute writer method with validation
|
|
672
|
+
# @param [Object] company_utility_declarations Value to be assigned
|
|
673
|
+
def company_utility_declarations=(company_utility_declarations)
|
|
674
|
+
if company_utility_declarations.nil?
|
|
675
|
+
fail ArgumentError, 'company_utility_declarations cannot be nil'
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
@company_utility_declarations = company_utility_declarations
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
# Checks equality by comparing each attribute.
|
|
682
|
+
# @param [Object] Object to be compared
|
|
683
|
+
def ==(o)
|
|
684
|
+
return true if self.equal?(o)
|
|
685
|
+
self.class == o.class &&
|
|
686
|
+
id == o.id &&
|
|
687
|
+
name == o.name &&
|
|
688
|
+
navite_name == o.navite_name &&
|
|
689
|
+
short_name == o.short_name &&
|
|
690
|
+
registration_number == o.registration_number &&
|
|
691
|
+
vat_number == o.vat_number &&
|
|
692
|
+
country == o.country &&
|
|
693
|
+
province == o.province &&
|
|
694
|
+
district == o.district &&
|
|
695
|
+
town == o.town &&
|
|
696
|
+
address == o.address &&
|
|
697
|
+
address2 == o.address2 &&
|
|
698
|
+
last_geo_id == o.last_geo_id &&
|
|
699
|
+
geo_path == o.geo_path &&
|
|
700
|
+
sales_scopes == o.sales_scopes &&
|
|
701
|
+
contact_person == o.contact_person &&
|
|
702
|
+
phone == o.phone &&
|
|
703
|
+
email == o.email &&
|
|
704
|
+
remarks == o.remarks &&
|
|
705
|
+
status == o.status &&
|
|
706
|
+
audit_status == o.audit_status &&
|
|
707
|
+
tenant_id == o.tenant_id &&
|
|
708
|
+
environment_type == o.environment_type &&
|
|
709
|
+
created_by == o.created_by &&
|
|
710
|
+
updated_by == o.updated_by &&
|
|
711
|
+
created_at == o.created_at &&
|
|
712
|
+
updated_at == o.updated_at &&
|
|
713
|
+
type == o.type &&
|
|
714
|
+
company_alias == o.company_alias &&
|
|
715
|
+
company_compliance_profiles == o.company_compliance_profiles &&
|
|
716
|
+
company_utility_declarations == o.company_utility_declarations &&
|
|
717
|
+
supplier_onboarding_ext == o.supplier_onboarding_ext &&
|
|
718
|
+
factory_list == o.factory_list &&
|
|
719
|
+
out_factory_list == o.out_factory_list &&
|
|
720
|
+
trader_list == o.trader_list &&
|
|
721
|
+
customer_list == o.customer_list &&
|
|
722
|
+
supplier_list == o.supplier_list &&
|
|
723
|
+
risk_key == o.risk_key &&
|
|
724
|
+
is_have == o.is_have
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# @see the `==` method
|
|
728
|
+
# @param [Object] Object to be compared
|
|
729
|
+
def eql?(o)
|
|
730
|
+
self == o
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Calculates hash code according to all attributes.
|
|
734
|
+
# @return [Integer] Hash code
|
|
735
|
+
def hash
|
|
736
|
+
[id, name, navite_name, short_name, registration_number, vat_number, country, province, district, town, address, address2, last_geo_id, geo_path, sales_scopes, contact_person, phone, email, remarks, status, audit_status, tenant_id, environment_type, created_by, updated_by, created_at, updated_at, type, company_alias, company_compliance_profiles, company_utility_declarations, supplier_onboarding_ext, factory_list, out_factory_list, trader_list, customer_list, supplier_list, risk_key, is_have].hash
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# Builds the object from hash
|
|
740
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
741
|
+
# @return [Object] Returns the model itself
|
|
742
|
+
def self.build_from_hash(attributes)
|
|
743
|
+
return nil unless attributes.is_a?(Hash)
|
|
744
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
745
|
+
transformed_hash = {}
|
|
746
|
+
openapi_types.each_pair do |key, type|
|
|
747
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
748
|
+
transformed_hash["#{key}"] = nil
|
|
749
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
750
|
+
# check to ensure the input is an array given that the attribute
|
|
751
|
+
# is documented as an array but the input is not
|
|
752
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
753
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
754
|
+
end
|
|
755
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
756
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
757
|
+
end
|
|
758
|
+
end
|
|
759
|
+
new(transformed_hash)
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
# Returns the object in the form of hash
|
|
763
|
+
# @return [Hash] Returns the object in the form of hash
|
|
764
|
+
def to_hash
|
|
765
|
+
hash = {}
|
|
766
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
767
|
+
value = self.send(attr)
|
|
768
|
+
if value.nil?
|
|
769
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
770
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
hash[param] = _to_hash(value)
|
|
774
|
+
end
|
|
775
|
+
hash
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
end
|