ultracart_api 3.11.19 → 3.11.20

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.
@@ -86,6 +86,66 @@ module UltracartClient
86
86
  end
87
87
  return data, status_code, headers
88
88
  end
89
+ # Delete a custom dashboard schedule
90
+ # delete a custom dashboard schedule on the UltraCart account.
91
+ # @param custom_dashboard_schedule_oid The dashboard schedule oid to delete.
92
+ # @param custom_dashboard_oid The dashboard oid that owns the schedule.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def delete_custom_dashboard_schedule(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
96
+ delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts)
97
+ nil
98
+ end
99
+
100
+ # Delete a custom dashboard schedule
101
+ # delete a custom dashboard schedule on the UltraCart account.
102
+ # @param custom_dashboard_schedule_oid The dashboard schedule oid to delete.
103
+ # @param custom_dashboard_oid The dashboard oid that owns the schedule.
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
106
+ def delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.delete_custom_dashboard_schedule ...'
109
+ end
110
+ # verify the required parameter 'custom_dashboard_schedule_oid' is set
111
+ if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
112
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
113
+ end
114
+ # verify the required parameter 'custom_dashboard_oid' is set
115
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
116
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
117
+ end
118
+ # resource path
119
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', custom_dashboard_schedule_oid.to_s).sub('{' + 'custom_dashboard_oid' + '}', custom_dashboard_oid.to_s)
120
+
121
+ # query parameters
122
+ query_params = {}
123
+
124
+ # header parameters
125
+ header_params = {}
126
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
129
+ # HTTP header 'Content-Type'
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = nil
137
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
138
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names)
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: DatawarehouseApi#delete_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
89
149
  # Delete a custom report
90
150
  # Delete a custom report on the UltraCart account.
91
151
  # @param custom_report_oid The report oid to delete.
@@ -476,6 +536,61 @@ module UltracartClient
476
536
  end
477
537
  # Get custom dashboards
478
538
  # Retrieve a custom dashboards
539
+ # @param custom_dashboard_oid
540
+ # @param [Hash] opts the optional parameters
541
+ # @return [CustomDashboardSchedulesResponse]
542
+ def get_custom_dashboard_schedules(custom_dashboard_oid, opts = {})
543
+ data, _status_code, _headers = get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts)
544
+ data
545
+ end
546
+
547
+ # Get custom dashboards
548
+ # Retrieve a custom dashboards
549
+ # @param custom_dashboard_oid
550
+ # @param [Hash] opts the optional parameters
551
+ # @return [Array<(CustomDashboardSchedulesResponse, Fixnum, Hash)>] CustomDashboardSchedulesResponse data, response status code and response headers
552
+ def get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts = {})
553
+ if @api_client.config.debugging
554
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_dashboard_schedules ...'
555
+ end
556
+ # verify the required parameter 'custom_dashboard_oid' is set
557
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
558
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.get_custom_dashboard_schedules"
559
+ end
560
+ # resource path
561
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', custom_dashboard_oid.to_s)
562
+
563
+ # query parameters
564
+ query_params = {}
565
+
566
+ # header parameters
567
+ header_params = {}
568
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
569
+ # HTTP header 'Accept' (if needed)
570
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
571
+ # HTTP header 'Content-Type'
572
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
573
+
574
+ # form parameters
575
+ form_params = {}
576
+
577
+ # http body (model)
578
+ post_body = nil
579
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
580
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
581
+ :header_params => header_params,
582
+ :query_params => query_params,
583
+ :form_params => form_params,
584
+ :body => post_body,
585
+ :auth_names => auth_names,
586
+ :return_type => 'CustomDashboardSchedulesResponse')
587
+ if @api_client.config.debugging
588
+ @api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_dashboard_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
589
+ end
590
+ return data, status_code, headers
591
+ end
592
+ # Get custom dashboards
593
+ # Retrieve a custom dashboards
479
594
  # @param [Hash] opts the optional parameters
480
595
  # @return [CustomDashboardsResponse]
481
596
  def get_custom_dashboards(opts = {})
@@ -1000,6 +1115,67 @@ module UltracartClient
1000
1115
  end
1001
1116
  return data, status_code, headers
1002
1117
  end
1118
+ # Create a custom dashboard schedule
1119
+ # Create a new custom dashboard schedule on the UltraCart account.
1120
+ # @param custom_dashboard_oid
1121
+ # @param dashboard_schedule Dashboard schedule to create
1122
+ # @param [Hash] opts the optional parameters
1123
+ # @return [CustomDashboardScheduleResponse]
1124
+ def insert_custom_dashboard_schedule(custom_dashboard_oid, dashboard_schedule, opts = {})
1125
+ data, _status_code, _headers = insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts)
1126
+ data
1127
+ end
1128
+
1129
+ # Create a custom dashboard schedule
1130
+ # Create a new custom dashboard schedule on the UltraCart account.
1131
+ # @param custom_dashboard_oid
1132
+ # @param dashboard_schedule Dashboard schedule to create
1133
+ # @param [Hash] opts the optional parameters
1134
+ # @return [Array<(CustomDashboardScheduleResponse, Fixnum, Hash)>] CustomDashboardScheduleResponse data, response status code and response headers
1135
+ def insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts = {})
1136
+ if @api_client.config.debugging
1137
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_custom_dashboard_schedule ...'
1138
+ end
1139
+ # verify the required parameter 'custom_dashboard_oid' is set
1140
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
1141
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
1142
+ end
1143
+ # verify the required parameter 'dashboard_schedule' is set
1144
+ if @api_client.config.client_side_validation && dashboard_schedule.nil?
1145
+ fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
1146
+ end
1147
+ # resource path
1148
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', custom_dashboard_oid.to_s)
1149
+
1150
+ # query parameters
1151
+ query_params = {}
1152
+
1153
+ # header parameters
1154
+ header_params = {}
1155
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1156
+ # HTTP header 'Accept' (if needed)
1157
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1158
+ # HTTP header 'Content-Type'
1159
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1160
+
1161
+ # form parameters
1162
+ form_params = {}
1163
+
1164
+ # http body (model)
1165
+ post_body = @api_client.object_to_http_body(dashboard_schedule)
1166
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1167
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1168
+ :header_params => header_params,
1169
+ :query_params => query_params,
1170
+ :form_params => form_params,
1171
+ :body => post_body,
1172
+ :auth_names => auth_names,
1173
+ :return_type => 'CustomDashboardScheduleResponse')
1174
+ if @api_client.config.debugging
1175
+ @api_client.config.logger.debug "API called: DatawarehouseApi#insert_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1176
+ end
1177
+ return data, status_code, headers
1178
+ end
1003
1179
  # Create a custom report
1004
1180
  # Create a new custom report on the UltraCart account.
1005
1181
  # @param report Report to create
@@ -1171,6 +1347,73 @@ module UltracartClient
1171
1347
  end
1172
1348
  return data, status_code, headers
1173
1349
  end
1350
+ # Update a custom dashboard schedule
1351
+ # Update a custom dashboard schedule on the UltraCart account.
1352
+ # @param dashboard_schedule Dashboard schedule to update
1353
+ # @param custom_dashboard_schedule_oid The dashboard schedule oid to update.
1354
+ # @param custom_dashboard_oid The dashboard oid to update.
1355
+ # @param [Hash] opts the optional parameters
1356
+ # @return [CustomDashboardResponse]
1357
+ def update_custom_dashboard_schedule(dashboard_schedule, custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
1358
+ data, _status_code, _headers = update_custom_dashboard_schedule_with_http_info(dashboard_schedule, custom_dashboard_schedule_oid, custom_dashboard_oid, opts)
1359
+ data
1360
+ end
1361
+
1362
+ # Update a custom dashboard schedule
1363
+ # Update a custom dashboard schedule on the UltraCart account.
1364
+ # @param dashboard_schedule Dashboard schedule to update
1365
+ # @param custom_dashboard_schedule_oid The dashboard schedule oid to update.
1366
+ # @param custom_dashboard_oid The dashboard oid to update.
1367
+ # @param [Hash] opts the optional parameters
1368
+ # @return [Array<(CustomDashboardResponse, Fixnum, Hash)>] CustomDashboardResponse data, response status code and response headers
1369
+ def update_custom_dashboard_schedule_with_http_info(dashboard_schedule, custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
1370
+ if @api_client.config.debugging
1371
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_custom_dashboard_schedule ...'
1372
+ end
1373
+ # verify the required parameter 'dashboard_schedule' is set
1374
+ if @api_client.config.client_side_validation && dashboard_schedule.nil?
1375
+ fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1376
+ end
1377
+ # verify the required parameter 'custom_dashboard_schedule_oid' is set
1378
+ if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
1379
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1380
+ end
1381
+ # verify the required parameter 'custom_dashboard_oid' is set
1382
+ if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
1383
+ fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
1384
+ end
1385
+ # resource path
1386
+ local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', custom_dashboard_schedule_oid.to_s).sub('{' + 'custom_dashboard_oid' + '}', custom_dashboard_oid.to_s)
1387
+
1388
+ # query parameters
1389
+ query_params = {}
1390
+
1391
+ # header parameters
1392
+ header_params = {}
1393
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1394
+ # HTTP header 'Accept' (if needed)
1395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1396
+ # HTTP header 'Content-Type'
1397
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1398
+
1399
+ # form parameters
1400
+ form_params = {}
1401
+
1402
+ # http body (model)
1403
+ post_body = @api_client.object_to_http_body(dashboard_schedule)
1404
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1405
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1406
+ :header_params => header_params,
1407
+ :query_params => query_params,
1408
+ :form_params => form_params,
1409
+ :body => post_body,
1410
+ :auth_names => auth_names,
1411
+ :return_type => 'CustomDashboardResponse')
1412
+ if @api_client.config.debugging
1413
+ @api_client.config.logger.debug "API called: DatawarehouseApi#update_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1414
+ end
1415
+ return data, status_code, headers
1416
+ end
1174
1417
  # Update a custom report
1175
1418
  # Update a custom report on the UltraCart account.
1176
1419
  # @param report Report to custom update
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class CustomDashboardSchedule
17
+ attr_accessor :cron_trigger_expression
18
+
19
+ attr_accessor :data_warehouse_custom_dashboard_oid
20
+
21
+ attr_accessor :data_warehouse_custom_dashboard_schedule_oid
22
+
23
+ attr_accessor :emails
24
+
25
+ # Date/time that the next send will occur.
26
+ attr_accessor :next_send_dts
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'cron_trigger_expression' => :'cron_trigger_expression',
32
+ :'data_warehouse_custom_dashboard_oid' => :'data_warehouse_custom_dashboard_oid',
33
+ :'data_warehouse_custom_dashboard_schedule_oid' => :'data_warehouse_custom_dashboard_schedule_oid',
34
+ :'emails' => :'emails',
35
+ :'next_send_dts' => :'next_send_dts'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'cron_trigger_expression' => :'String',
43
+ :'data_warehouse_custom_dashboard_oid' => :'Integer',
44
+ :'data_warehouse_custom_dashboard_schedule_oid' => :'Integer',
45
+ :'emails' => :'Array<String>',
46
+ :'next_send_dts' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'cron_trigger_expression')
59
+ self.cron_trigger_expression = attributes[:'cron_trigger_expression']
60
+ end
61
+
62
+ if attributes.has_key?(:'data_warehouse_custom_dashboard_oid')
63
+ self.data_warehouse_custom_dashboard_oid = attributes[:'data_warehouse_custom_dashboard_oid']
64
+ end
65
+
66
+ if attributes.has_key?(:'data_warehouse_custom_dashboard_schedule_oid')
67
+ self.data_warehouse_custom_dashboard_schedule_oid = attributes[:'data_warehouse_custom_dashboard_schedule_oid']
68
+ end
69
+
70
+ if attributes.has_key?(:'emails')
71
+ if (value = attributes[:'emails']).is_a?(Array)
72
+ self.emails = value
73
+ end
74
+ end
75
+
76
+ if attributes.has_key?(:'next_send_dts')
77
+ self.next_send_dts = attributes[:'next_send_dts']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ cron_trigger_expression == o.cron_trigger_expression &&
100
+ data_warehouse_custom_dashboard_oid == o.data_warehouse_custom_dashboard_oid &&
101
+ data_warehouse_custom_dashboard_schedule_oid == o.data_warehouse_custom_dashboard_schedule_oid &&
102
+ emails == o.emails &&
103
+ next_send_dts == o.next_send_dts
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [cron_trigger_expression, data_warehouse_custom_dashboard_oid, data_warehouse_custom_dashboard_schedule_oid, emails, next_send_dts].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :BOOLEAN
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ temp_model = UltracartClient.const_get(type).new
176
+ temp_model.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ next if value.nil?
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+ end
@@ -13,13 +13,13 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
13
13
  require 'date'
14
14
 
15
15
  module UltracartClient
16
- class ChargebackDisputeResponse
17
- attr_accessor :chargeback
18
-
16
+ class CustomDashboardScheduleResponse
19
17
  attr_accessor :error
20
18
 
21
19
  attr_accessor :metadata
22
20
 
21
+ attr_accessor :schedule
22
+
23
23
  # Indicates if API call was successful
24
24
  attr_accessor :success
25
25
 
@@ -28,9 +28,9 @@ module UltracartClient
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
29
29
  def self.attribute_map
30
30
  {
31
- :'chargeback' => :'chargeback',
32
31
  :'error' => :'error',
33
32
  :'metadata' => :'metadata',
33
+ :'schedule' => :'schedule',
34
34
  :'success' => :'success',
35
35
  :'warning' => :'warning'
36
36
  }
@@ -39,9 +39,9 @@ module UltracartClient
39
39
  # Attribute type mapping.
40
40
  def self.swagger_types
41
41
  {
42
- :'chargeback' => :'ChargebackDispute',
43
42
  :'error' => :'Error',
44
43
  :'metadata' => :'ResponseMetadata',
44
+ :'schedule' => :'CustomDashboardSchedule',
45
45
  :'success' => :'BOOLEAN',
46
46
  :'warning' => :'Warning'
47
47
  }
@@ -55,10 +55,6 @@ module UltracartClient
55
55
  # convert string to symbol for hash key
56
56
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
57
 
58
- if attributes.has_key?(:'chargeback')
59
- self.chargeback = attributes[:'chargeback']
60
- end
61
-
62
58
  if attributes.has_key?(:'error')
63
59
  self.error = attributes[:'error']
64
60
  end
@@ -67,6 +63,10 @@ module UltracartClient
67
63
  self.metadata = attributes[:'metadata']
68
64
  end
69
65
 
66
+ if attributes.has_key?(:'schedule')
67
+ self.schedule = attributes[:'schedule']
68
+ end
69
+
70
70
  if attributes.has_key?(:'success')
71
71
  self.success = attributes[:'success']
72
72
  end
@@ -94,9 +94,9 @@ module UltracartClient
94
94
  def ==(o)
95
95
  return true if self.equal?(o)
96
96
  self.class == o.class &&
97
- chargeback == o.chargeback &&
98
97
  error == o.error &&
99
98
  metadata == o.metadata &&
99
+ schedule == o.schedule &&
100
100
  success == o.success &&
101
101
  warning == o.warning
102
102
  end
@@ -110,7 +110,7 @@ module UltracartClient
110
110
  # Calculates hash code according to all attributes.
111
111
  # @return [Fixnum] Hash code
112
112
  def hash
113
- [chargeback, error, metadata, success, warning].hash
113
+ [error, metadata, schedule, success, warning].hash
114
114
  end
115
115
 
116
116
  # Builds the object from hash
@@ -13,13 +13,14 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
13
13
  require 'date'
14
14
 
15
15
  module UltracartClient
16
- class ChargebackDisputesResponse
17
- attr_accessor :chargebacks
18
-
16
+ class CustomDashboardSchedulesResponse
19
17
  attr_accessor :error
20
18
 
21
19
  attr_accessor :metadata
22
20
 
21
+ # schedules
22
+ attr_accessor :schedules
23
+
23
24
  # Indicates if API call was successful
24
25
  attr_accessor :success
25
26
 
@@ -28,9 +29,9 @@ module UltracartClient
28
29
  # Attribute mapping from ruby-style variable name to JSON key.
29
30
  def self.attribute_map
30
31
  {
31
- :'chargebacks' => :'chargebacks',
32
32
  :'error' => :'error',
33
33
  :'metadata' => :'metadata',
34
+ :'schedules' => :'schedules',
34
35
  :'success' => :'success',
35
36
  :'warning' => :'warning'
36
37
  }
@@ -39,9 +40,9 @@ module UltracartClient
39
40
  # Attribute type mapping.
40
41
  def self.swagger_types
41
42
  {
42
- :'chargebacks' => :'Array<ChargebackDispute>',
43
43
  :'error' => :'Error',
44
44
  :'metadata' => :'ResponseMetadata',
45
+ :'schedules' => :'Array<CustomDashboardSchedule>',
45
46
  :'success' => :'BOOLEAN',
46
47
  :'warning' => :'Warning'
47
48
  }
@@ -55,12 +56,6 @@ module UltracartClient
55
56
  # convert string to symbol for hash key
56
57
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
58
 
58
- if attributes.has_key?(:'chargebacks')
59
- if (value = attributes[:'chargebacks']).is_a?(Array)
60
- self.chargebacks = value
61
- end
62
- end
63
-
64
59
  if attributes.has_key?(:'error')
65
60
  self.error = attributes[:'error']
66
61
  end
@@ -69,6 +64,12 @@ module UltracartClient
69
64
  self.metadata = attributes[:'metadata']
70
65
  end
71
66
 
67
+ if attributes.has_key?(:'schedules')
68
+ if (value = attributes[:'schedules']).is_a?(Array)
69
+ self.schedules = value
70
+ end
71
+ end
72
+
72
73
  if attributes.has_key?(:'success')
73
74
  self.success = attributes[:'success']
74
75
  end
@@ -96,9 +97,9 @@ module UltracartClient
96
97
  def ==(o)
97
98
  return true if self.equal?(o)
98
99
  self.class == o.class &&
99
- chargebacks == o.chargebacks &&
100
100
  error == o.error &&
101
101
  metadata == o.metadata &&
102
+ schedules == o.schedules &&
102
103
  success == o.success &&
103
104
  warning == o.warning
104
105
  end
@@ -112,7 +113,7 @@ module UltracartClient
112
113
  # Calculates hash code according to all attributes.
113
114
  # @return [Fixnum] Hash code
114
115
  def hash
115
- [chargebacks, error, metadata, success, warning].hash
116
+ [error, metadata, schedules, success, warning].hash
116
117
  end
117
118
 
118
119
  # Builds the object from hash