ultracart_api 3.11.16 → 3.11.17

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.
@@ -0,0 +1,197 @@
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 CustomReportsExecutionRequest
17
+ attr_accessor :data_warehouse_report_config_oids
18
+
19
+ attr_accessor :parameters
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'data_warehouse_report_config_oids' => :'data_warehouse_report_config_oids',
25
+ :'parameters' => :'parameters'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'data_warehouse_report_config_oids' => :'Array<Integer>',
33
+ :'parameters' => :'Array<CustomReportExecutionParameter>'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'data_warehouse_report_config_oids')
46
+ if (value = attributes[:'data_warehouse_report_config_oids']).is_a?(Array)
47
+ self.data_warehouse_report_config_oids = value
48
+ end
49
+ end
50
+
51
+ if attributes.has_key?(:'parameters')
52
+ if (value = attributes[:'parameters']).is_a?(Array)
53
+ self.parameters = value
54
+ end
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ data_warehouse_report_config_oids == o.data_warehouse_report_config_oids &&
77
+ parameters == o.parameters
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Fixnum] Hash code
88
+ def hash
89
+ [data_warehouse_report_config_oids, parameters].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def build_from_hash(attributes)
96
+ return nil unless attributes.is_a?(Hash)
97
+ self.class.swagger_types.each_pair do |key, type|
98
+ if type =~ /\AArray<(.*)>/i
99
+ # check to ensure the input is an array given that the attribute
100
+ # is documented as an array but the input is not
101
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
102
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
103
+ end
104
+ elsif !attributes[self.class.attribute_map[key]].nil?
105
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
106
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+
112
+ # Deserializes the data based on type
113
+ # @param string type Data type
114
+ # @param string value Value to be deserialized
115
+ # @return [Object] Deserialized data
116
+ def _deserialize(type, value)
117
+ case type.to_sym
118
+ when :DateTime
119
+ DateTime.parse(value)
120
+ when :Date
121
+ Date.parse(value)
122
+ when :String
123
+ value.to_s
124
+ when :Integer
125
+ value.to_i
126
+ when :Float
127
+ value.to_f
128
+ when :BOOLEAN
129
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
130
+ true
131
+ else
132
+ false
133
+ end
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ else # model
149
+ temp_model = UltracartClient.const_get(type).new
150
+ temp_model.build_from_hash(value)
151
+ end
152
+ end
153
+
154
+ # Returns the string representation of the object
155
+ # @return [String] String presentation of the object
156
+ def to_s
157
+ to_hash.to_s
158
+ end
159
+
160
+ # to_body is an alias to to_hash (backward compatibility)
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_body
163
+ to_hash
164
+ end
165
+
166
+ # Returns the object in the form of hash
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_hash
169
+ hash = {}
170
+ self.class.attribute_map.each_pair do |attr, param|
171
+ value = self.send(attr)
172
+ next if value.nil?
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ # Outputs non-array value in the form of hash
179
+ # For object, use to_hash. Otherwise, just return the value
180
+ # @param [Object] value Any valid value
181
+ # @return [Hash] Returns the value in the form of hash
182
+ def _to_hash(value)
183
+ if value.is_a?(Array)
184
+ value.compact.map { |v| _to_hash(v) }
185
+ elsif value.is_a?(Hash)
186
+ {}.tap do |hash|
187
+ value.each { |k, v| hash[k] = _to_hash(v) }
188
+ end
189
+ elsif value.respond_to? :to_hash
190
+ value.to_hash
191
+ else
192
+ value
193
+ end
194
+ end
195
+
196
+ end
197
+ end
@@ -0,0 +1,234 @@
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 CustomReportsExecutionResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :metadata
20
+
21
+ attr_accessor :parameters
22
+
23
+ attr_accessor :reports
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
+ :'parameters' => :'parameters',
36
+ :'reports' => :'reports',
37
+ :'success' => :'success',
38
+ :'warning' => :'warning'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'error' => :'Error',
46
+ :'metadata' => :'ResponseMetadata',
47
+ :'parameters' => :'Array<CustomReportExecutionParameter>',
48
+ :'reports' => :'Array<CustomReportsExecutionReportData>',
49
+ :'success' => :'BOOLEAN',
50
+ :'warning' => :'Warning'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'error')
63
+ self.error = attributes[:'error']
64
+ end
65
+
66
+ if attributes.has_key?(:'metadata')
67
+ self.metadata = attributes[:'metadata']
68
+ end
69
+
70
+ if attributes.has_key?(:'parameters')
71
+ if (value = attributes[:'parameters']).is_a?(Array)
72
+ self.parameters = value
73
+ end
74
+ end
75
+
76
+ if attributes.has_key?(:'reports')
77
+ if (value = attributes[:'reports']).is_a?(Array)
78
+ self.reports = value
79
+ end
80
+ end
81
+
82
+ if attributes.has_key?(:'success')
83
+ self.success = attributes[:'success']
84
+ end
85
+
86
+ if attributes.has_key?(:'warning')
87
+ self.warning = attributes[:'warning']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ error == o.error &&
110
+ metadata == o.metadata &&
111
+ parameters == o.parameters &&
112
+ reports == o.reports &&
113
+ success == o.success &&
114
+ warning == o.warning
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Fixnum] Hash code
125
+ def hash
126
+ [error, metadata, parameters, reports, success, warning].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.swagger_types.each_pair do |key, type|
135
+ if type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ temp_model = UltracartClient.const_get(type).new
187
+ temp_model.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ next if value.nil?
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+ end
@@ -20,6 +20,8 @@ module UltracartClient
20
20
 
21
21
  attr_accessor :error
22
22
 
23
+ attr_accessor :loyalty_tiers
24
+
23
25
  attr_accessor :metadata
24
26
 
25
27
  attr_accessor :rest_object_type
@@ -35,6 +37,7 @@ module UltracartClient
35
37
  :'available_expansions' => :'available_expansions',
36
38
  :'available_tokens' => :'available_tokens',
37
39
  :'error' => :'error',
40
+ :'loyalty_tiers' => :'loyalty_tiers',
38
41
  :'metadata' => :'metadata',
39
42
  :'rest_object_type' => :'rest_object_type',
40
43
  :'success' => :'success',
@@ -48,6 +51,7 @@ module UltracartClient
48
51
  :'available_expansions' => :'Array<String>',
49
52
  :'available_tokens' => :'Array<String>',
50
53
  :'error' => :'Error',
54
+ :'loyalty_tiers' => :'Array<String>',
51
55
  :'metadata' => :'ResponseMetadata',
52
56
  :'rest_object_type' => :'String',
53
57
  :'success' => :'BOOLEAN',
@@ -79,6 +83,12 @@ module UltracartClient
79
83
  self.error = attributes[:'error']
80
84
  end
81
85
 
86
+ if attributes.has_key?(:'loyalty_tiers')
87
+ if (value = attributes[:'loyalty_tiers']).is_a?(Array)
88
+ self.loyalty_tiers = value
89
+ end
90
+ end
91
+
82
92
  if attributes.has_key?(:'metadata')
83
93
  self.metadata = attributes[:'metadata']
84
94
  end
@@ -117,6 +127,7 @@ module UltracartClient
117
127
  available_expansions == o.available_expansions &&
118
128
  available_tokens == o.available_tokens &&
119
129
  error == o.error &&
130
+ loyalty_tiers == o.loyalty_tiers &&
120
131
  metadata == o.metadata &&
121
132
  rest_object_type == o.rest_object_type &&
122
133
  success == o.success &&
@@ -132,7 +143,7 @@ module UltracartClient
132
143
  # Calculates hash code according to all attributes.
133
144
  # @return [Fixnum] Hash code
134
145
  def hash
135
- [available_expansions, available_tokens, error, metadata, rest_object_type, success, warning].hash
146
+ [available_expansions, available_tokens, error, loyalty_tiers, metadata, rest_object_type, success, warning].hash
136
147
  end
137
148
 
138
149
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.11.16'
14
+ VERSION = '3.11.17'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -322,16 +322,25 @@ require 'ultracart_api/models/coupon_type'
322
322
  require 'ultracart_api/models/coupons_request'
323
323
  require 'ultracart_api/models/coupons_response'
324
324
  require 'ultracart_api/models/currency'
325
+ require 'ultracart_api/models/custom_dashboard'
326
+ require 'ultracart_api/models/custom_dashboard_page'
327
+ require 'ultracart_api/models/custom_dashboard_page_report'
328
+ require 'ultracart_api/models/custom_dashboard_response'
329
+ require 'ultracart_api/models/custom_dashboards_response'
325
330
  require 'ultracart_api/models/custom_report'
326
331
  require 'ultracart_api/models/custom_report_account_config'
327
332
  require 'ultracart_api/models/custom_report_account_config_response'
328
333
  require 'ultracart_api/models/custom_report_execution_parameter'
329
334
  require 'ultracart_api/models/custom_report_execution_request'
335
+ require 'ultracart_api/models/custom_report_execution_response'
330
336
  require 'ultracart_api/models/custom_report_parameter'
331
337
  require 'ultracart_api/models/custom_report_parameter_option'
332
338
  require 'ultracart_api/models/custom_report_query'
333
339
  require 'ultracart_api/models/custom_report_response'
334
340
  require 'ultracart_api/models/custom_report_tooltip'
341
+ require 'ultracart_api/models/custom_reports_execution_report_data'
342
+ require 'ultracart_api/models/custom_reports_execution_request'
343
+ require 'ultracart_api/models/custom_reports_execution_response'
335
344
  require 'ultracart_api/models/custom_reports_response'
336
345
  require 'ultracart_api/models/customer'
337
346
  require 'ultracart_api/models/customer_activity'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.16
4
+ version: 3.11.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-28 00:00:00.000000000 Z
11
+ date: 2025-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -533,16 +533,25 @@ files:
533
533
  - docs/CouponsRequest.md
534
534
  - docs/CouponsResponse.md
535
535
  - docs/Currency.md
536
+ - docs/CustomDashboard.md
537
+ - docs/CustomDashboardPage.md
538
+ - docs/CustomDashboardPageReport.md
539
+ - docs/CustomDashboardResponse.md
540
+ - docs/CustomDashboardsResponse.md
536
541
  - docs/CustomReport.md
537
542
  - docs/CustomReportAccountConfig.md
538
543
  - docs/CustomReportAccountConfigResponse.md
539
544
  - docs/CustomReportExecutionParameter.md
540
545
  - docs/CustomReportExecutionRequest.md
546
+ - docs/CustomReportExecutionResponse.md
541
547
  - docs/CustomReportParameter.md
542
548
  - docs/CustomReportParameterOption.md
543
549
  - docs/CustomReportQuery.md
544
550
  - docs/CustomReportResponse.md
545
551
  - docs/CustomReportTooltip.md
552
+ - docs/CustomReportsExecutionReportData.md
553
+ - docs/CustomReportsExecutionRequest.md
554
+ - docs/CustomReportsExecutionResponse.md
546
555
  - docs/CustomReportsResponse.md
547
556
  - docs/Customer.md
548
557
  - docs/CustomerActivity.md
@@ -1448,16 +1457,25 @@ files:
1448
1457
  - lib/ultracart_api/models/coupons_request.rb
1449
1458
  - lib/ultracart_api/models/coupons_response.rb
1450
1459
  - lib/ultracart_api/models/currency.rb
1460
+ - lib/ultracart_api/models/custom_dashboard.rb
1461
+ - lib/ultracart_api/models/custom_dashboard_page.rb
1462
+ - lib/ultracart_api/models/custom_dashboard_page_report.rb
1463
+ - lib/ultracart_api/models/custom_dashboard_response.rb
1464
+ - lib/ultracart_api/models/custom_dashboards_response.rb
1451
1465
  - lib/ultracart_api/models/custom_report.rb
1452
1466
  - lib/ultracart_api/models/custom_report_account_config.rb
1453
1467
  - lib/ultracart_api/models/custom_report_account_config_response.rb
1454
1468
  - lib/ultracart_api/models/custom_report_execution_parameter.rb
1455
1469
  - lib/ultracart_api/models/custom_report_execution_request.rb
1470
+ - lib/ultracart_api/models/custom_report_execution_response.rb
1456
1471
  - lib/ultracart_api/models/custom_report_parameter.rb
1457
1472
  - lib/ultracart_api/models/custom_report_parameter_option.rb
1458
1473
  - lib/ultracart_api/models/custom_report_query.rb
1459
1474
  - lib/ultracart_api/models/custom_report_response.rb
1460
1475
  - lib/ultracart_api/models/custom_report_tooltip.rb
1476
+ - lib/ultracart_api/models/custom_reports_execution_report_data.rb
1477
+ - lib/ultracart_api/models/custom_reports_execution_request.rb
1478
+ - lib/ultracart_api/models/custom_reports_execution_response.rb
1461
1479
  - lib/ultracart_api/models/custom_reports_response.rb
1462
1480
  - lib/ultracart_api/models/customer.rb
1463
1481
  - lib/ultracart_api/models/customer_activity.rb