ultracart_api 4.1.110 → 4.1.112

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,289 @@
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 EmailDispatchLogsResponse
18
+ # Dispatch log rows on this page
19
+ attr_accessor :dispatch_logs
20
+
21
+ attr_accessor :error
22
+
23
+ attr_accessor :metadata
24
+
25
+ # True when another page exists after this one
26
+ attr_accessor :more
27
+
28
+ # Page number (one based)
29
+ attr_accessor :page_number
30
+
31
+ # Number of records per page
32
+ attr_accessor :page_size
33
+
34
+ # Indicates if API call was successful
35
+ attr_accessor :success
36
+
37
+ attr_accessor :warning
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'dispatch_logs' => :'dispatch_logs',
43
+ :'error' => :'error',
44
+ :'metadata' => :'metadata',
45
+ :'more' => :'more',
46
+ :'page_number' => :'page_number',
47
+ :'page_size' => :'page_size',
48
+ :'success' => :'success',
49
+ :'warning' => :'warning'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'dispatch_logs' => :'Array<EmailDispatchLog>',
62
+ :'error' => :'Error',
63
+ :'metadata' => :'ResponseMetadata',
64
+ :'more' => :'Boolean',
65
+ :'page_number' => :'Integer',
66
+ :'page_size' => :'Integer',
67
+ :'success' => :'Boolean',
68
+ :'warning' => :'Warning'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailDispatchLogsResponse` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailDispatchLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'dispatch_logs')
94
+ if (value = attributes[:'dispatch_logs']).is_a?(Array)
95
+ self.dispatch_logs = value
96
+ end
97
+ end
98
+
99
+ if attributes.key?(:'error')
100
+ self.error = attributes[:'error']
101
+ end
102
+
103
+ if attributes.key?(:'metadata')
104
+ self.metadata = attributes[:'metadata']
105
+ end
106
+
107
+ if attributes.key?(:'more')
108
+ self.more = attributes[:'more']
109
+ end
110
+
111
+ if attributes.key?(:'page_number')
112
+ self.page_number = attributes[:'page_number']
113
+ end
114
+
115
+ if attributes.key?(:'page_size')
116
+ self.page_size = attributes[:'page_size']
117
+ end
118
+
119
+ if attributes.key?(:'success')
120
+ self.success = attributes[:'success']
121
+ end
122
+
123
+ if attributes.key?(:'warning')
124
+ self.warning = attributes[:'warning']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ dispatch_logs == o.dispatch_logs &&
147
+ error == o.error &&
148
+ metadata == o.metadata &&
149
+ more == o.more &&
150
+ page_number == o.page_number &&
151
+ page_size == o.page_size &&
152
+ success == o.success &&
153
+ warning == o.warning
154
+ end
155
+
156
+ # @see the `==` method
157
+ # @param [Object] Object to be compared
158
+ def eql?(o)
159
+ self == o
160
+ end
161
+
162
+ # Calculates hash code according to all attributes.
163
+ # @return [Integer] Hash code
164
+ def hash
165
+ [dispatch_logs, error, metadata, more, page_number, page_size, success, warning].hash
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def self.build_from_hash(attributes)
172
+ new.build_from_hash(attributes)
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def build_from_hash(attributes)
179
+ return nil unless attributes.is_a?(Hash)
180
+ attributes = attributes.transform_keys(&:to_sym)
181
+ self.class.openapi_types.each_pair do |key, type|
182
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
183
+ self.send("#{key}=", nil)
184
+ elsif type =~ /\AArray<(.*)>/i
185
+ # check to ensure the input is an array given that the attribute
186
+ # is documented as an array but the input is not
187
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
188
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
189
+ end
190
+ elsif !attributes[self.class.attribute_map[key]].nil?
191
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
192
+ end
193
+ end
194
+
195
+ self
196
+ end
197
+
198
+ # Deserializes the data based on type
199
+ # @param string type Data type
200
+ # @param string value Value to be deserialized
201
+ # @return [Object] Deserialized data
202
+ def _deserialize(type, value)
203
+ case type.to_sym
204
+ when :Time
205
+ Time.parse(value)
206
+ when :Date
207
+ Date.parse(value)
208
+ when :String
209
+ value.to_s
210
+ when :Integer
211
+ value.to_i
212
+ when :Float
213
+ value.to_f
214
+ when :Boolean
215
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
+ true
217
+ else
218
+ false
219
+ end
220
+ when :Object
221
+ # generic object (usually a Hash), return directly
222
+ value
223
+ when /\AArray<(?<inner_type>.+)>\z/
224
+ inner_type = Regexp.last_match[:inner_type]
225
+ value.map { |v| _deserialize(inner_type, v) }
226
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
+ k_type = Regexp.last_match[:k_type]
228
+ v_type = Regexp.last_match[:v_type]
229
+ {}.tap do |hash|
230
+ value.each do |k, v|
231
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
+ end
233
+ end
234
+ else # model
235
+ # models (e.g. Pet) or oneOf
236
+ klass = UltracartClient.const_get(type)
237
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
238
+ end
239
+ end
240
+
241
+ # Returns the string representation of the object
242
+ # @return [String] String presentation of the object
243
+ def to_s
244
+ to_hash.to_s
245
+ end
246
+
247
+ # to_body is an alias to to_hash (backward compatibility)
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_body
250
+ to_hash
251
+ end
252
+
253
+ # Returns the object in the form of hash
254
+ # @return [Hash] Returns the object in the form of hash
255
+ def to_hash
256
+ hash = {}
257
+ self.class.attribute_map.each_pair do |attr, param|
258
+ value = self.send(attr)
259
+ if value.nil?
260
+ is_nullable = self.class.openapi_nullable.include?(attr)
261
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
262
+ end
263
+
264
+ hash[param] = _to_hash(value)
265
+ end
266
+ hash
267
+ end
268
+
269
+ # Outputs non-array value in the form of hash
270
+ # For object, use to_hash. Otherwise, just return the value
271
+ # @param [Object] value Any valid value
272
+ # @return [Hash] Returns the value in the form of hash
273
+ def _to_hash(value)
274
+ if value.is_a?(Array)
275
+ value.compact.map { |v| _to_hash(v) }
276
+ elsif value.is_a?(Hash)
277
+ {}.tap do |hash|
278
+ value.each { |k, v| hash[k] = _to_hash(v) }
279
+ end
280
+ elsif value.respond_to? :to_hash
281
+ value.to_hash
282
+ else
283
+ value
284
+ end
285
+ end
286
+
287
+ end
288
+
289
+ end
@@ -0,0 +1,249 @@
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 TaxProviderAnrok
18
+ attr_accessor :configuration
19
+
20
+ # Description
21
+ attr_accessor :description
22
+
23
+ # Selected
24
+ attr_accessor :selected
25
+
26
+ # Title
27
+ attr_accessor :title
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'configuration' => :'configuration',
33
+ :'description' => :'description',
34
+ :'selected' => :'selected',
35
+ :'title' => :'title'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'configuration' => :'AnrokConfig',
48
+ :'description' => :'String',
49
+ :'selected' => :'Boolean',
50
+ :'title' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::TaxProviderAnrok` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::TaxProviderAnrok`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'configuration')
76
+ self.configuration = attributes[:'configuration']
77
+ end
78
+
79
+ if attributes.key?(:'description')
80
+ self.description = attributes[:'description']
81
+ end
82
+
83
+ if attributes.key?(:'selected')
84
+ self.selected = attributes[:'selected']
85
+ end
86
+
87
+ if attributes.key?(:'title')
88
+ self.title = attributes[:'title']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ configuration == o.configuration &&
111
+ description == o.description &&
112
+ selected == o.selected &&
113
+ title == o.title
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [configuration, description, selected, title].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ self.class.openapi_types.each_pair do |key, type|
142
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
143
+ self.send("#{key}=", nil)
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = UltracartClient.const_get(type)
197
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class TaxProvidersResponse
18
+ attr_accessor :anrok
19
+
18
20
  attr_accessor :avalara
19
21
 
20
22
  attr_accessor :error
@@ -37,6 +39,7 @@ module UltracartClient
37
39
  # Attribute mapping from ruby-style variable name to JSON key.
38
40
  def self.attribute_map
39
41
  {
42
+ :'anrok' => :'anrok',
40
43
  :'avalara' => :'avalara',
41
44
  :'error' => :'error',
42
45
  :'metadata' => :'metadata',
@@ -57,6 +60,7 @@ module UltracartClient
57
60
  # Attribute type mapping.
58
61
  def self.openapi_types
59
62
  {
63
+ :'anrok' => :'TaxProviderAnrok',
60
64
  :'avalara' => :'TaxProviderAvalara',
61
65
  :'error' => :'Error',
62
66
  :'metadata' => :'ResponseMetadata',
@@ -90,6 +94,10 @@ module UltracartClient
90
94
  h[k.to_sym] = v
91
95
  }
92
96
 
97
+ if attributes.key?(:'anrok')
98
+ self.anrok = attributes[:'anrok']
99
+ end
100
+
93
101
  if attributes.key?(:'avalara')
94
102
  self.avalara = attributes[:'avalara']
95
103
  end
@@ -145,6 +153,7 @@ module UltracartClient
145
153
  def ==(o)
146
154
  return true if self.equal?(o)
147
155
  self.class == o.class &&
156
+ anrok == o.anrok &&
148
157
  avalara == o.avalara &&
149
158
  error == o.error &&
150
159
  metadata == o.metadata &&
@@ -165,7 +174,7 @@ module UltracartClient
165
174
  # Calculates hash code according to all attributes.
166
175
  # @return [Integer] Hash code
167
176
  def hash
168
- [avalara, error, metadata, _self, sovos, success, taxjar, ultracart, warning].hash
177
+ [anrok, avalara, error, metadata, _self, sovos, success, taxjar, ultracart, warning].hash
169
178
  end
170
179
 
171
180
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.110'
14
+ VERSION = '4.1.112'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -44,6 +44,7 @@ require 'ultracart_api/models/affiliate_response'
44
44
  require 'ultracart_api/models/affiliate_tier_relationship'
45
45
  require 'ultracart_api/models/affiliates_response'
46
46
  require 'ultracart_api/models/agent_summary'
47
+ require 'ultracart_api/models/anrok_config'
47
48
  require 'ultracart_api/models/api_user_application_profile'
48
49
  require 'ultracart_api/models/apply_library_item_request'
49
50
  require 'ultracart_api/models/apply_library_item_response'
@@ -520,10 +521,15 @@ require 'ultracart_api/models/email_commseq_webhook_send_test_response'
520
521
  require 'ultracart_api/models/email_commseqs_response'
521
522
  require 'ultracart_api/models/email_customer'
522
523
  require 'ultracart_api/models/email_customer_editor_url_response'
524
+ require 'ultracart_api/models/email_customer_lookup_response'
523
525
  require 'ultracart_api/models/email_customers_response'
524
526
  require 'ultracart_api/models/email_dashboard_activity'
525
527
  require 'ultracart_api/models/email_dashboard_activity_response'
526
528
  require 'ultracart_api/models/email_dashboard_stats_response'
529
+ require 'ultracart_api/models/email_dispatch_log'
530
+ require 'ultracart_api/models/email_dispatch_log_detail'
531
+ require 'ultracart_api/models/email_dispatch_log_detail_response'
532
+ require 'ultracart_api/models/email_dispatch_logs_response'
527
533
  require 'ultracart_api/models/email_domain'
528
534
  require 'ultracart_api/models/email_editor_token_response'
529
535
  require 'ultracart_api/models/email_editor_values_response'
@@ -969,6 +975,7 @@ require 'ultracart_api/models/tax_county'
969
975
  require 'ultracart_api/models/tax_jar_config'
970
976
  require 'ultracart_api/models/tax_postal_code'
971
977
  require 'ultracart_api/models/tax_provider_activate_result'
978
+ require 'ultracart_api/models/tax_provider_anrok'
972
979
  require 'ultracart_api/models/tax_provider_avalara'
973
980
  require 'ultracart_api/models/tax_provider_avalara_companies_result'
974
981
  require 'ultracart_api/models/tax_provider_avalara_company'