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.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +226 -0
  5. data/Rakefile +10 -0
  6. data/git_push.sh +54 -0
  7. data/lib/tachain-sdk/api/api_declaration_api.rb +396 -0
  8. data/lib/tachain-sdk/api/api_delivery_api.rb +676 -0
  9. data/lib/tachain-sdk/api/api_enum_api.rb +94 -0
  10. data/lib/tachain-sdk/api/api_order_api.rb +846 -0
  11. data/lib/tachain-sdk/api/api_order_workflow_api.rb +170 -0
  12. data/lib/tachain-sdk/api/api_production_api.rb +466 -0
  13. data/lib/tachain-sdk/api_client.rb +397 -0
  14. data/lib/tachain-sdk/api_error.rb +58 -0
  15. data/lib/tachain-sdk/api_model_base.rb +88 -0
  16. data/lib/tachain-sdk/configuration.rb +329 -0
  17. data/lib/tachain-sdk/models/api_declaration_delete_request.rb +341 -0
  18. data/lib/tachain-sdk/models/api_declaration_document_request.rb +209 -0
  19. data/lib/tachain-sdk/models/api_declaration_list_dto.rb +251 -0
  20. data/lib/tachain-sdk/models/api_declaration_submit_request.rb +251 -0
  21. data/lib/tachain-sdk/models/api_declaration_submit_result_dto.rb +197 -0
  22. data/lib/tachain-sdk/models/api_integration_delete_request.rb +209 -0
  23. data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +216 -0
  24. data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +243 -0
  25. data/lib/tachain-sdk/models/api_response_api_declaration_list_dto.rb +199 -0
  26. data/lib/tachain-sdk/models/api_response_api_declaration_submit_result_dto.rb +199 -0
  27. data/lib/tachain-sdk/models/api_response_delivery_note_api_dto.rb +199 -0
  28. data/lib/tachain-sdk/models/api_response_order_api_dto.rb +199 -0
  29. data/lib/tachain-sdk/models/api_response_production_api_dto.rb +199 -0
  30. data/lib/tachain-sdk/models/api_response_string.rb +200 -0
  31. data/lib/tachain-sdk/models/attachment_in_api_create_dto.rb +262 -0
  32. data/lib/tachain-sdk/models/attachment_in_api_dto.rb +363 -0
  33. data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +334 -0
  34. data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +880 -0
  35. data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +749 -0
  36. data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +513 -0
  37. data/lib/tachain-sdk/models/company.rb +780 -0
  38. data/lib/tachain-sdk/models/company_compliance_profile.rb +547 -0
  39. data/lib/tachain-sdk/models/company_utility_declaration.rb +592 -0
  40. data/lib/tachain-sdk/models/customer.rb +569 -0
  41. data/lib/tachain-sdk/models/delivery_note_api_dto.rb +597 -0
  42. data/lib/tachain-sdk/models/delivery_note_detail_api_dto.rb +682 -0
  43. data/lib/tachain-sdk/models/document_type_api_dto.rb +480 -0
  44. data/lib/tachain-sdk/models/factory.rb +545 -0
  45. data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +201 -0
  46. data/lib/tachain-sdk/models/microsoft_asp_net_core_mvc_problem_details.rb +188 -0
  47. data/lib/tachain-sdk/models/model1.rb +157 -0
  48. data/lib/tachain-sdk/models/model3.rb +202 -0
  49. data/lib/tachain-sdk/models/model4.rb +202 -0
  50. data/lib/tachain-sdk/models/order.rb +974 -0
  51. data/lib/tachain-sdk/models/order_api_dto.rb +918 -0
  52. data/lib/tachain-sdk/models/order_line.rb +1184 -0
  53. data/lib/tachain-sdk/models/order_line_api_dto.rb +1277 -0
  54. data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +270 -0
  55. data/lib/tachain-sdk/models/order_stage_form_datum_api_dto.rb +260 -0
  56. data/lib/tachain-sdk/models/order_stage_form_dto.rb +254 -0
  57. data/lib/tachain-sdk/models/paged_response_delivery_note_api_dto.rb +296 -0
  58. data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +296 -0
  59. data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +296 -0
  60. data/lib/tachain-sdk/models/product_bom_grouping_dto.rb +280 -0
  61. data/lib/tachain-sdk/models/production_api_dto.rb +639 -0
  62. data/lib/tachain-sdk/models/production_raw_material_api_dto.rb +481 -0
  63. data/lib/tachain-sdk/models/production_raw_material_dto.rb +548 -0
  64. data/lib/tachain-sdk/models/production_sales_order_api_dto.rb +436 -0
  65. data/lib/tachain-sdk/models/result_api_enum.rb +270 -0
  66. data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +331 -0
  67. data/lib/tachain-sdk/models/result_brand_report_unlinked_order_detail.rb +229 -0
  68. data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +418 -0
  69. data/lib/tachain-sdk/models/result_mapping_order_select.rb +335 -0
  70. data/lib/tachain-sdk/models/result_order_trace_report.rb +721 -0
  71. data/lib/tachain-sdk/models/stage_attachment_api_dto.rb +398 -0
  72. data/lib/tachain-sdk/models/supplier.rb +585 -0
  73. data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +383 -0
  74. data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +456 -0
  75. data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +227 -0
  76. data/lib/tachain-sdk/models/trader.rb +506 -0
  77. data/lib/tachain-sdk/signed_api_client.rb +65 -0
  78. data/lib/tachain-sdk/version.rb +15 -0
  79. data/lib/tachain-sdk.rb +108 -0
  80. data/spec/spec_helper.rb +111 -0
  81. data/tachain-sdk.gemspec +39 -0
  82. metadata +165 -0
@@ -0,0 +1,270 @@
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 OrderStageFormApiDto < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :form_data
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :submitted_at
25
+
26
+ attr_accessor :tenant_id
27
+
28
+ attr_accessor :file_type
29
+
30
+ attr_accessor :file_url
31
+
32
+ attr_accessor :anaysis_status
33
+
34
+ attr_accessor :is_ai_anaysis_flag
35
+
36
+ attr_accessor :is_operated
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'form_data' => :'formData',
43
+ :'status' => :'status',
44
+ :'submitted_at' => :'submittedAt',
45
+ :'tenant_id' => :'tenantId',
46
+ :'file_type' => :'fileType',
47
+ :'file_url' => :'fileUrl',
48
+ :'anaysis_status' => :'anaysisStatus',
49
+ :'is_ai_anaysis_flag' => :'isAiAnaysisFlag',
50
+ :'is_operated' => :'isOperated'
51
+ }
52
+ end
53
+
54
+ # Returns attribute mapping this model knows about
55
+ def self.acceptable_attribute_map
56
+ attribute_map
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ acceptable_attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'id' => :'String',
68
+ :'form_data' => :'String',
69
+ :'status' => :'Integer',
70
+ :'submitted_at' => :'Time',
71
+ :'tenant_id' => :'String',
72
+ :'file_type' => :'String',
73
+ :'file_url' => :'String',
74
+ :'anaysis_status' => :'String',
75
+ :'is_ai_anaysis_flag' => :'Boolean',
76
+ :'is_operated' => :'Boolean'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ :'id',
84
+ :'status',
85
+ :'tenant_id',
86
+ :'file_type',
87
+ :'file_url',
88
+ :'anaysis_status',
89
+ :'is_ai_anaysis_flag',
90
+ :'is_operated'
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::OrderStageFormApiDto` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ acceptable_attribute_map = self.class.acceptable_attribute_map
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!acceptable_attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::OrderStageFormApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'id')
111
+ self.id = attributes[:'id']
112
+ end
113
+
114
+ if attributes.key?(:'form_data')
115
+ self.form_data = attributes[:'form_data']
116
+ else
117
+ self.form_data = nil
118
+ end
119
+
120
+ if attributes.key?(:'status')
121
+ self.status = attributes[:'status']
122
+ end
123
+
124
+ if attributes.key?(:'submitted_at')
125
+ self.submitted_at = attributes[:'submitted_at']
126
+ else
127
+ self.submitted_at = nil
128
+ end
129
+
130
+ if attributes.key?(:'tenant_id')
131
+ self.tenant_id = attributes[:'tenant_id']
132
+ end
133
+
134
+ if attributes.key?(:'file_type')
135
+ self.file_type = attributes[:'file_type']
136
+ end
137
+
138
+ if attributes.key?(:'file_url')
139
+ self.file_url = attributes[:'file_url']
140
+ end
141
+
142
+ if attributes.key?(:'anaysis_status')
143
+ self.anaysis_status = attributes[:'anaysis_status']
144
+ end
145
+
146
+ if attributes.key?(:'is_ai_anaysis_flag')
147
+ self.is_ai_anaysis_flag = attributes[:'is_ai_anaysis_flag']
148
+ end
149
+
150
+ if attributes.key?(:'is_operated')
151
+ self.is_operated = attributes[:'is_operated']
152
+ end
153
+ end
154
+
155
+ # Show invalid properties with the reasons. Usually used together with valid?
156
+ # @return Array for valid properties with the reasons
157
+ def list_invalid_properties
158
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
159
+ invalid_properties = Array.new
160
+ if @form_data.nil?
161
+ invalid_properties.push('invalid value for "form_data", form_data cannot be nil.')
162
+ end
163
+
164
+ if @submitted_at.nil?
165
+ invalid_properties.push('invalid value for "submitted_at", submitted_at cannot be nil.')
166
+ end
167
+
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
+ return false if @form_data.nil?
176
+ return false if @submitted_at.nil?
177
+ true
178
+ end
179
+
180
+ # Custom attribute writer method with validation
181
+ # @param [Object] form_data Value to be assigned
182
+ def form_data=(form_data)
183
+ if form_data.nil?
184
+ fail ArgumentError, 'form_data cannot be nil'
185
+ end
186
+
187
+ @form_data = form_data
188
+ end
189
+
190
+ # Custom attribute writer method with validation
191
+ # @param [Object] submitted_at Value to be assigned
192
+ def submitted_at=(submitted_at)
193
+ if submitted_at.nil?
194
+ fail ArgumentError, 'submitted_at cannot be nil'
195
+ end
196
+
197
+ @submitted_at = submitted_at
198
+ end
199
+
200
+ # Checks equality by comparing each attribute.
201
+ # @param [Object] Object to be compared
202
+ def ==(o)
203
+ return true if self.equal?(o)
204
+ self.class == o.class &&
205
+ id == o.id &&
206
+ form_data == o.form_data &&
207
+ status == o.status &&
208
+ submitted_at == o.submitted_at &&
209
+ tenant_id == o.tenant_id &&
210
+ file_type == o.file_type &&
211
+ file_url == o.file_url &&
212
+ anaysis_status == o.anaysis_status &&
213
+ is_ai_anaysis_flag == o.is_ai_anaysis_flag &&
214
+ is_operated == o.is_operated
215
+ end
216
+
217
+ # @see the `==` method
218
+ # @param [Object] Object to be compared
219
+ def eql?(o)
220
+ self == o
221
+ end
222
+
223
+ # Calculates hash code according to all attributes.
224
+ # @return [Integer] Hash code
225
+ def hash
226
+ [id, form_data, status, submitted_at, tenant_id, file_type, file_url, anaysis_status, is_ai_anaysis_flag, is_operated].hash
227
+ end
228
+
229
+ # Builds the object from hash
230
+ # @param [Hash] attributes Model attributes in the form of hash
231
+ # @return [Object] Returns the model itself
232
+ def self.build_from_hash(attributes)
233
+ return nil unless attributes.is_a?(Hash)
234
+ attributes = attributes.transform_keys(&:to_sym)
235
+ transformed_hash = {}
236
+ openapi_types.each_pair do |key, type|
237
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
238
+ transformed_hash["#{key}"] = nil
239
+ elsif type =~ /\AArray<(.*)>/i
240
+ # check to ensure the input is an array given that the attribute
241
+ # is documented as an array but the input is not
242
+ if attributes[attribute_map[key]].is_a?(Array)
243
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
244
+ end
245
+ elsif !attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
247
+ end
248
+ end
249
+ new(transformed_hash)
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ if value.nil?
259
+ is_nullable = self.class.openapi_nullable.include?(attr)
260
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
261
+ end
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ end
269
+
270
+ end
@@ -0,0 +1,260 @@
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
+ # Table, order_stage_form_data
18
+ class OrderStageFormDatumApiDto < ApiModelBase
19
+ # 订单特定配置表ID
20
+ attr_accessor :id
21
+
22
+ # 订单/⽣产单/发货单/⼊库单ID
23
+ attr_accessor :extend_id
24
+
25
+ # 流程阶段表id
26
+ attr_accessor :stage_id
27
+
28
+ # 文档类型表id
29
+ attr_accessor :document_type_id
30
+
31
+ # 表单数据json
32
+ attr_accessor :form_data
33
+
34
+ # 备注
35
+ attr_accessor :remark
36
+
37
+ # -9 禁用, -1 删除, 0 正常
38
+ attr_accessor :status
39
+
40
+ # 提交用户ID
41
+ attr_accessor :submitted_by
42
+
43
+ # 提交时间
44
+ attr_accessor :submitted_at
45
+
46
+ # 租户ID
47
+ attr_accessor :tenant_id
48
+
49
+ # 环境类型:0 正式, 1 测试
50
+ attr_accessor :environment_type
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'id' => :'id',
56
+ :'extend_id' => :'extendId',
57
+ :'stage_id' => :'stageId',
58
+ :'document_type_id' => :'documentTypeId',
59
+ :'form_data' => :'formData',
60
+ :'remark' => :'remark',
61
+ :'status' => :'status',
62
+ :'submitted_by' => :'submittedBy',
63
+ :'submitted_at' => :'submittedAt',
64
+ :'tenant_id' => :'tenantId',
65
+ :'environment_type' => :'environmentType'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'id' => :'String',
83
+ :'extend_id' => :'String',
84
+ :'stage_id' => :'String',
85
+ :'document_type_id' => :'String',
86
+ :'form_data' => :'String',
87
+ :'remark' => :'String',
88
+ :'status' => :'Integer',
89
+ :'submitted_by' => :'String',
90
+ :'submitted_at' => :'Time',
91
+ :'tenant_id' => :'String',
92
+ :'environment_type' => :'Integer'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ :'id',
100
+ :'extend_id',
101
+ :'stage_id',
102
+ :'document_type_id',
103
+ :'form_data',
104
+ :'remark',
105
+ :'status',
106
+ :'submitted_by',
107
+ :'submitted_at',
108
+ :'tenant_id',
109
+ :'environment_type'
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::OrderStageFormDatumApiDto` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ acceptable_attribute_map = self.class.acceptable_attribute_map
122
+ attributes = attributes.each_with_object({}) { |(k, v), h|
123
+ if (!acceptable_attribute_map.key?(k.to_sym))
124
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::OrderStageFormDatumApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
125
+ end
126
+ h[k.to_sym] = v
127
+ }
128
+
129
+ if attributes.key?(:'id')
130
+ self.id = attributes[:'id']
131
+ end
132
+
133
+ if attributes.key?(:'extend_id')
134
+ self.extend_id = attributes[:'extend_id']
135
+ end
136
+
137
+ if attributes.key?(:'stage_id')
138
+ self.stage_id = attributes[:'stage_id']
139
+ end
140
+
141
+ if attributes.key?(:'document_type_id')
142
+ self.document_type_id = attributes[:'document_type_id']
143
+ end
144
+
145
+ if attributes.key?(:'form_data')
146
+ self.form_data = attributes[:'form_data']
147
+ end
148
+
149
+ if attributes.key?(:'remark')
150
+ self.remark = attributes[:'remark']
151
+ end
152
+
153
+ if attributes.key?(:'status')
154
+ self.status = attributes[:'status']
155
+ end
156
+
157
+ if attributes.key?(:'submitted_by')
158
+ self.submitted_by = attributes[:'submitted_by']
159
+ end
160
+
161
+ if attributes.key?(:'submitted_at')
162
+ self.submitted_at = attributes[:'submitted_at']
163
+ end
164
+
165
+ if attributes.key?(:'tenant_id')
166
+ self.tenant_id = attributes[:'tenant_id']
167
+ end
168
+
169
+ if attributes.key?(:'environment_type')
170
+ self.environment_type = attributes[:'environment_type']
171
+ end
172
+ end
173
+
174
+ # Show invalid properties with the reasons. Usually used together with valid?
175
+ # @return Array for valid properties with the reasons
176
+ def list_invalid_properties
177
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
178
+ invalid_properties = Array.new
179
+ invalid_properties
180
+ end
181
+
182
+ # Check to see if the all the properties in the model are valid
183
+ # @return true if the model is valid
184
+ def valid?
185
+ warn '[DEPRECATED] the `valid?` method is obsolete'
186
+ true
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ id == o.id &&
195
+ extend_id == o.extend_id &&
196
+ stage_id == o.stage_id &&
197
+ document_type_id == o.document_type_id &&
198
+ form_data == o.form_data &&
199
+ remark == o.remark &&
200
+ status == o.status &&
201
+ submitted_by == o.submitted_by &&
202
+ submitted_at == o.submitted_at &&
203
+ tenant_id == o.tenant_id &&
204
+ environment_type == o.environment_type
205
+ end
206
+
207
+ # @see the `==` method
208
+ # @param [Object] Object to be compared
209
+ def eql?(o)
210
+ self == o
211
+ end
212
+
213
+ # Calculates hash code according to all attributes.
214
+ # @return [Integer] Hash code
215
+ def hash
216
+ [id, extend_id, stage_id, document_type_id, form_data, remark, status, submitted_by, submitted_at, tenant_id, environment_type].hash
217
+ end
218
+
219
+ # Builds the object from hash
220
+ # @param [Hash] attributes Model attributes in the form of hash
221
+ # @return [Object] Returns the model itself
222
+ def self.build_from_hash(attributes)
223
+ return nil unless attributes.is_a?(Hash)
224
+ attributes = attributes.transform_keys(&:to_sym)
225
+ transformed_hash = {}
226
+ openapi_types.each_pair do |key, type|
227
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = nil
229
+ elsif type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[attribute_map[key]].is_a?(Array)
233
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
234
+ end
235
+ elsif !attributes[attribute_map[key]].nil?
236
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
237
+ end
238
+ end
239
+ new(transformed_hash)
240
+ end
241
+
242
+ # Returns the object in the form of hash
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_hash
245
+ hash = {}
246
+ self.class.attribute_map.each_pair do |attr, param|
247
+ value = self.send(attr)
248
+ if value.nil?
249
+ is_nullable = self.class.openapi_nullable.include?(attr)
250
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
+ end
252
+
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ end
259
+
260
+ end