ultracart_api 4.1.19 → 4.1.21

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -10
  3. data/docs/CustomDashboardSchedule.md +26 -0
  4. data/docs/{ChargebackDisputesResponse.md → CustomDashboardScheduleResponse.md} +4 -4
  5. data/docs/CustomDashboardSchedulesResponse.md +26 -0
  6. data/docs/CustomReport.md +2 -0
  7. data/docs/CustomReportAccountConfig.md +2 -0
  8. data/docs/CustomReportAnalysisRequest.md +20 -0
  9. data/docs/{ChargebackDisputeResponse.md → CustomReportAnalysisResponse.md} +4 -4
  10. data/docs/CustomReportChartPngUploadResponse.md +28 -0
  11. data/docs/DatawarehouseApi.md +329 -0
  12. data/docs/EmailCampaign.md +4 -0
  13. data/docs/ItemTag.md +1 -1
  14. data/docs/OrderApi.md +56 -0
  15. data/docs/ReplaceOrderItemIdRequest.md +24 -0
  16. data/lib/ultracart_api/api/datawarehouse_api.rb +429 -0
  17. data/lib/ultracart_api/api/order_api.rb +78 -0
  18. data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
  19. data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedule_response.rb} +13 -15
  20. data/lib/ultracart_api/models/custom_dashboard_schedules_response.rb +259 -0
  21. data/lib/ultracart_api/models/custom_report.rb +10 -1
  22. data/lib/ultracart_api/models/custom_report_account_config.rb +10 -1
  23. data/lib/ultracart_api/models/custom_report_analysis_request.rb +228 -0
  24. data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_report_analysis_response.rb} +13 -13
  25. data/lib/ultracart_api/models/custom_report_chart_png_upload_response.rb +265 -0
  26. data/lib/ultracart_api/models/email_campaign.rb +21 -1
  27. data/lib/ultracart_api/models/item_tag.rb +1 -1
  28. data/lib/ultracart_api/models/order_payment.rb +2 -2
  29. data/lib/ultracart_api/models/replace_order_item_id_request.rb +280 -0
  30. data/lib/ultracart_api/version.rb +1 -1
  31. data/lib/ultracart_api.rb +7 -4
  32. metadata +16 -10
  33. data/docs/ChargebackApi.md +0 -297
  34. data/docs/ChargebackDispute.md +0 -62
  35. data/lib/ultracart_api/api/chargeback_api.rb +0 -410
  36. data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
@@ -0,0 +1,258 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CustomDashboardSchedule
18
+ attr_accessor :cron_trigger_expression
19
+
20
+ attr_accessor :data_warehouse_custom_dashboard_oid
21
+
22
+ attr_accessor :data_warehouse_custom_dashboard_schedule_oid
23
+
24
+ attr_accessor :emails
25
+
26
+ # Date/time that the next send will occur.
27
+ attr_accessor :next_send_dts
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'cron_trigger_expression' => :'cron_trigger_expression',
33
+ :'data_warehouse_custom_dashboard_oid' => :'data_warehouse_custom_dashboard_oid',
34
+ :'data_warehouse_custom_dashboard_schedule_oid' => :'data_warehouse_custom_dashboard_schedule_oid',
35
+ :'emails' => :'emails',
36
+ :'next_send_dts' => :'next_send_dts'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'cron_trigger_expression' => :'String',
49
+ :'data_warehouse_custom_dashboard_oid' => :'Integer',
50
+ :'data_warehouse_custom_dashboard_schedule_oid' => :'Integer',
51
+ :'emails' => :'Array<String>',
52
+ :'next_send_dts' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomDashboardSchedule` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomDashboardSchedule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'cron_trigger_expression')
78
+ self.cron_trigger_expression = attributes[:'cron_trigger_expression']
79
+ end
80
+
81
+ if attributes.key?(:'data_warehouse_custom_dashboard_oid')
82
+ self.data_warehouse_custom_dashboard_oid = attributes[:'data_warehouse_custom_dashboard_oid']
83
+ end
84
+
85
+ if attributes.key?(:'data_warehouse_custom_dashboard_schedule_oid')
86
+ self.data_warehouse_custom_dashboard_schedule_oid = attributes[:'data_warehouse_custom_dashboard_schedule_oid']
87
+ end
88
+
89
+ if attributes.key?(:'emails')
90
+ if (value = attributes[:'emails']).is_a?(Array)
91
+ self.emails = value
92
+ end
93
+ end
94
+
95
+ if attributes.key?(:'next_send_dts')
96
+ self.next_send_dts = attributes[:'next_send_dts']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ cron_trigger_expression == o.cron_trigger_expression &&
119
+ data_warehouse_custom_dashboard_oid == o.data_warehouse_custom_dashboard_oid &&
120
+ data_warehouse_custom_dashboard_schedule_oid == o.data_warehouse_custom_dashboard_schedule_oid &&
121
+ emails == o.emails &&
122
+ next_send_dts == o.next_send_dts
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [cron_trigger_expression, data_warehouse_custom_dashboard_oid, data_warehouse_custom_dashboard_schedule_oid, emails, next_send_dts].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ new.build_from_hash(attributes)
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ self.class.openapi_types.each_pair do |key, type|
151
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
152
+ self.send("#{key}=", nil)
153
+ elsif type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
157
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ end
159
+ elsif !attributes[self.class.attribute_map[key]].nil?
160
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ end
162
+ end
163
+
164
+ self
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def _deserialize(type, value)
172
+ case type.to_sym
173
+ when :Time
174
+ Time.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :Boolean
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ # models (e.g. Pet) or oneOf
205
+ klass = UltracartClient.const_get(type)
206
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end
@@ -14,13 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module UltracartClient
17
- class ChargebackDisputesResponse
18
- attr_accessor :chargebacks
19
-
17
+ class CustomDashboardScheduleResponse
20
18
  attr_accessor :error
21
19
 
22
20
  attr_accessor :metadata
23
21
 
22
+ attr_accessor :schedule
23
+
24
24
  # Indicates if API call was successful
25
25
  attr_accessor :success
26
26
 
@@ -29,9 +29,9 @@ module UltracartClient
29
29
  # Attribute mapping from ruby-style variable name to JSON key.
30
30
  def self.attribute_map
31
31
  {
32
- :'chargebacks' => :'chargebacks',
33
32
  :'error' => :'error',
34
33
  :'metadata' => :'metadata',
34
+ :'schedule' => :'schedule',
35
35
  :'success' => :'success',
36
36
  :'warning' => :'warning'
37
37
  }
@@ -45,9 +45,9 @@ module UltracartClient
45
45
  # Attribute type mapping.
46
46
  def self.openapi_types
47
47
  {
48
- :'chargebacks' => :'Array<ChargebackDispute>',
49
48
  :'error' => :'Error',
50
49
  :'metadata' => :'ResponseMetadata',
50
+ :'schedule' => :'CustomDashboardSchedule',
51
51
  :'success' => :'Boolean',
52
52
  :'warning' => :'Warning'
53
53
  }
@@ -63,23 +63,17 @@ module UltracartClient
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChargebackDisputesResponse` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomDashboardScheduleResponse` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
71
  if (!self.class.attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChargebackDisputesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomDashboardScheduleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
73
  end
74
74
  h[k.to_sym] = v
75
75
  }
76
76
 
77
- if attributes.key?(:'chargebacks')
78
- if (value = attributes[:'chargebacks']).is_a?(Array)
79
- self.chargebacks = value
80
- end
81
- end
82
-
83
77
  if attributes.key?(:'error')
84
78
  self.error = attributes[:'error']
85
79
  end
@@ -88,6 +82,10 @@ module UltracartClient
88
82
  self.metadata = attributes[:'metadata']
89
83
  end
90
84
 
85
+ if attributes.key?(:'schedule')
86
+ self.schedule = attributes[:'schedule']
87
+ end
88
+
91
89
  if attributes.key?(:'success')
92
90
  self.success = attributes[:'success']
93
91
  end
@@ -115,9 +113,9 @@ module UltracartClient
115
113
  def ==(o)
116
114
  return true if self.equal?(o)
117
115
  self.class == o.class &&
118
- chargebacks == o.chargebacks &&
119
116
  error == o.error &&
120
117
  metadata == o.metadata &&
118
+ schedule == o.schedule &&
121
119
  success == o.success &&
122
120
  warning == o.warning
123
121
  end
@@ -131,7 +129,7 @@ module UltracartClient
131
129
  # Calculates hash code according to all attributes.
132
130
  # @return [Integer] Hash code
133
131
  def hash
134
- [chargebacks, error, metadata, success, warning].hash
132
+ [error, metadata, schedule, success, warning].hash
135
133
  end
136
134
 
137
135
  # Builds the object from hash
@@ -0,0 +1,259 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CustomDashboardSchedulesResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # schedules
23
+ attr_accessor :schedules
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :warning
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'error' => :'error',
34
+ :'metadata' => :'metadata',
35
+ :'schedules' => :'schedules',
36
+ :'success' => :'success',
37
+ :'warning' => :'warning'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'error' => :'Error',
50
+ :'metadata' => :'ResponseMetadata',
51
+ :'schedules' => :'Array<CustomDashboardSchedule>',
52
+ :'success' => :'Boolean',
53
+ :'warning' => :'Warning'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomDashboardSchedulesResponse` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomDashboardSchedulesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'error')
79
+ self.error = attributes[:'error']
80
+ end
81
+
82
+ if attributes.key?(:'metadata')
83
+ self.metadata = attributes[:'metadata']
84
+ end
85
+
86
+ if attributes.key?(:'schedules')
87
+ if (value = attributes[:'schedules']).is_a?(Array)
88
+ self.schedules = value
89
+ end
90
+ end
91
+
92
+ if attributes.key?(:'success')
93
+ self.success = attributes[:'success']
94
+ end
95
+
96
+ if attributes.key?(:'warning')
97
+ self.warning = attributes[:'warning']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ error == o.error &&
120
+ metadata == o.metadata &&
121
+ schedules == o.schedules &&
122
+ success == o.success &&
123
+ warning == o.warning
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [error, metadata, schedules, success, warning].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ new.build_from_hash(attributes)
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
158
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = UltracartClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class CustomReport
18
+ attr_accessor :business_analysis_prompt
19
+
18
20
  attr_accessor :chart_javascript
19
21
 
20
22
  attr_accessor :chart_javascript_url
@@ -38,6 +40,7 @@ module UltracartClient
38
40
  # Attribute mapping from ruby-style variable name to JSON key.
39
41
  def self.attribute_map
40
42
  {
43
+ :'business_analysis_prompt' => :'business_analysis_prompt',
41
44
  :'chart_javascript' => :'chart_javascript',
42
45
  :'chart_javascript_url' => :'chart_javascript_url',
43
46
  :'data_warehouse_report_config_oid' => :'data_warehouse_report_config_oid',
@@ -59,6 +62,7 @@ module UltracartClient
59
62
  # Attribute type mapping.
60
63
  def self.openapi_types
61
64
  {
65
+ :'business_analysis_prompt' => :'String',
62
66
  :'chart_javascript' => :'String',
63
67
  :'chart_javascript_url' => :'String',
64
68
  :'data_warehouse_report_config_oid' => :'Integer',
@@ -93,6 +97,10 @@ module UltracartClient
93
97
  h[k.to_sym] = v
94
98
  }
95
99
 
100
+ if attributes.key?(:'business_analysis_prompt')
101
+ self.business_analysis_prompt = attributes[:'business_analysis_prompt']
102
+ end
103
+
96
104
  if attributes.key?(:'chart_javascript')
97
105
  self.chart_javascript = attributes[:'chart_javascript']
98
106
  end
@@ -158,6 +166,7 @@ module UltracartClient
158
166
  def ==(o)
159
167
  return true if self.equal?(o)
160
168
  self.class == o.class &&
169
+ business_analysis_prompt == o.business_analysis_prompt &&
161
170
  chart_javascript == o.chart_javascript &&
162
171
  chart_javascript_url == o.chart_javascript_url &&
163
172
  data_warehouse_report_config_oid == o.data_warehouse_report_config_oid &&
@@ -179,7 +188,7 @@ module UltracartClient
179
188
  # Calculates hash code according to all attributes.
180
189
  # @return [Integer] Hash code
181
190
  def hash
182
- [chart_javascript, chart_javascript_url, data_warehouse_report_config_oid, dataset_security_level, group_name, merchant_id, name, parameters, queries, tooltips].hash
191
+ [business_analysis_prompt, chart_javascript, chart_javascript_url, data_warehouse_report_config_oid, dataset_security_level, group_name, merchant_id, name, parameters, queries, tooltips].hash
183
192
  end
184
193
 
185
194
  # Builds the object from hash