ultracart_api 4.1.121 → 4.1.124
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.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/docs/AutoOrderApi.md +111 -0
- data/docs/AutoOrderPaymentUpdateRequest.md +28 -0
- data/docs/AutoOrderRebillResponse.md +34 -0
- data/docs/CustomerApi.md +55 -0
- data/docs/CustomerEmailSuppressionRequest.md +26 -0
- data/docs/CustomerEmailSuppressionResponse.md +26 -0
- data/docs/CustomerEmailSuppressionResult.md +40 -0
- data/docs/EmailSettings.md +2 -0
- data/docs/EmailSuppressionSurfaces.md +22 -0
- data/docs/TaxCountry.md +5 -1
- data/docs/TaxState.md +5 -1
- data/lib/ultracart_api/api/auto_order_api.rb +145 -0
- data/lib/ultracart_api/api/customer_api.rb +75 -0
- data/lib/ultracart_api/models/auto_order_payment_update_request.rb +304 -0
- data/lib/ultracart_api/models/auto_order_rebill_response.rb +296 -0
- data/lib/ultracart_api/models/customer_email_suppression_request.rb +294 -0
- data/lib/ultracart_api/models/customer_email_suppression_response.rb +256 -0
- data/lib/ultracart_api/models/customer_email_suppression_result.rb +329 -0
- data/lib/ultracart_api/models/email_settings.rb +11 -1
- data/lib/ultracart_api/models/email_suppression_surfaces.rb +240 -0
- data/lib/ultracart_api/models/tax_country.rb +24 -4
- data/lib/ultracart_api/models/tax_state.rb +24 -4
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +6 -0
- metadata +14 -2
|
@@ -0,0 +1,256 @@
|
|
|
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 CustomerEmailSuppressionResponse
|
|
18
|
+
attr_accessor :email_suppression
|
|
19
|
+
|
|
20
|
+
attr_accessor :error
|
|
21
|
+
|
|
22
|
+
attr_accessor :metadata
|
|
23
|
+
|
|
24
|
+
# Indicates if API call was successful
|
|
25
|
+
attr_accessor :success
|
|
26
|
+
|
|
27
|
+
attr_accessor :warning
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'email_suppression' => :'email_suppression',
|
|
33
|
+
:'error' => :'error',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'success' => :'success',
|
|
36
|
+
:'warning' => :'warning'
|
|
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
|
+
:'email_suppression' => :'CustomerEmailSuppressionResult',
|
|
49
|
+
:'error' => :'Error',
|
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
|
51
|
+
:'success' => :'Boolean',
|
|
52
|
+
:'warning' => :'Warning'
|
|
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::CustomerEmailSuppressionResponse` 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::CustomerEmailSuppressionResponse`. 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?(:'email_suppression')
|
|
78
|
+
self.email_suppression = attributes[:'email_suppression']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'error')
|
|
82
|
+
self.error = attributes[:'error']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'metadata')
|
|
86
|
+
self.metadata = attributes[:'metadata']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'success')
|
|
90
|
+
self.success = attributes[:'success']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'warning')
|
|
94
|
+
self.warning = attributes[:'warning']
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
email_suppression == o.email_suppression &&
|
|
117
|
+
error == o.error &&
|
|
118
|
+
metadata == o.metadata &&
|
|
119
|
+
success == o.success &&
|
|
120
|
+
warning == o.warning
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[email_suppression, error, metadata, success, warning].hash
|
|
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 self.build_from_hash(attributes)
|
|
139
|
+
new.build_from_hash(attributes)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Builds the object from hash
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
# @return [Object] Returns the model itself
|
|
145
|
+
def build_from_hash(attributes)
|
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
150
|
+
self.send("#{key}=", nil)
|
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
152
|
+
# check to ensure the input is an array given that the attribute
|
|
153
|
+
# is documented as an array but the input is not
|
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
156
|
+
end
|
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
self
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Deserializes the data based on type
|
|
166
|
+
# @param string type Data type
|
|
167
|
+
# @param string value Value to be deserialized
|
|
168
|
+
# @return [Object] Deserialized data
|
|
169
|
+
def _deserialize(type, value)
|
|
170
|
+
case type.to_sym
|
|
171
|
+
when :Time
|
|
172
|
+
Time.parse(value)
|
|
173
|
+
when :Date
|
|
174
|
+
Date.parse(value)
|
|
175
|
+
when :String
|
|
176
|
+
value.to_s
|
|
177
|
+
when :Integer
|
|
178
|
+
value.to_i
|
|
179
|
+
when :Float
|
|
180
|
+
value.to_f
|
|
181
|
+
when :Boolean
|
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
183
|
+
true
|
|
184
|
+
else
|
|
185
|
+
false
|
|
186
|
+
end
|
|
187
|
+
when :Object
|
|
188
|
+
# generic object (usually a Hash), return directly
|
|
189
|
+
value
|
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
|
196
|
+
{}.tap do |hash|
|
|
197
|
+
value.each do |k, v|
|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
else # model
|
|
202
|
+
# models (e.g. Pet) or oneOf
|
|
203
|
+
klass = UltracartClient.const_get(type)
|
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the string representation of the object
|
|
209
|
+
# @return [String] String presentation of the object
|
|
210
|
+
def to_s
|
|
211
|
+
to_hash.to_s
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
|
216
|
+
def to_body
|
|
217
|
+
to_hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
225
|
+
value = self.send(attr)
|
|
226
|
+
if value.nil?
|
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
hash[param] = _to_hash(value)
|
|
232
|
+
end
|
|
233
|
+
hash
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Outputs non-array value in the form of hash
|
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
238
|
+
# @param [Object] value Any valid value
|
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
|
240
|
+
def _to_hash(value)
|
|
241
|
+
if value.is_a?(Array)
|
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
|
243
|
+
elsif value.is_a?(Hash)
|
|
244
|
+
{}.tap do |hash|
|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
246
|
+
end
|
|
247
|
+
elsif value.respond_to? :to_hash
|
|
248
|
+
value.to_hash
|
|
249
|
+
else
|
|
250
|
+
value
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
@@ -0,0 +1,329 @@
|
|
|
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 CustomerEmailSuppressionResult
|
|
18
|
+
# True only if this call actually removed bounce suppression. Bounce has no per-customer flag, so there is no corresponding state field.
|
|
19
|
+
attr_accessor :bounce_cleared
|
|
20
|
+
|
|
21
|
+
# The customer profile oid that was operated on
|
|
22
|
+
attr_accessor :customer_profile_oid
|
|
23
|
+
|
|
24
|
+
# The email address that was operated on
|
|
25
|
+
attr_accessor :email
|
|
26
|
+
|
|
27
|
+
# True only if every requested suppression surface was successfully cleared. When false, see esp_warning -- the profile was still modified.
|
|
28
|
+
attr_accessor :esp_suppression_removed
|
|
29
|
+
|
|
30
|
+
# Human readable explanation when esp_suppression_removed is false. Suitable for display to a support agent.
|
|
31
|
+
attr_accessor :esp_warning
|
|
32
|
+
|
|
33
|
+
# True only if this call actually changed the global unsubscribe flag. False if it was already clear.
|
|
34
|
+
attr_accessor :global_unsubscribe_cleared
|
|
35
|
+
|
|
36
|
+
# Global unsubscribe state AFTER this call
|
|
37
|
+
attr_accessor :global_unsubscribed
|
|
38
|
+
|
|
39
|
+
# Global unsubscribe timestamp after this call. Nulled when cleared; the prior value is retained on the audit record.
|
|
40
|
+
attr_accessor :global_unsubscribed_dts
|
|
41
|
+
|
|
42
|
+
# Spam complaint state AFTER this call
|
|
43
|
+
attr_accessor :spam_complaint
|
|
44
|
+
|
|
45
|
+
# True only if this call actually changed the spam complaint flag. False if it was already clear.
|
|
46
|
+
attr_accessor :spam_complaint_cleared
|
|
47
|
+
|
|
48
|
+
# Spam complaint timestamp after this call. Nulled when cleared; the prior value is retained on the audit record.
|
|
49
|
+
attr_accessor :spam_complaint_dts
|
|
50
|
+
|
|
51
|
+
attr_accessor :suppression_surfaces
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'bounce_cleared' => :'bounce_cleared',
|
|
57
|
+
:'customer_profile_oid' => :'customer_profile_oid',
|
|
58
|
+
:'email' => :'email',
|
|
59
|
+
:'esp_suppression_removed' => :'esp_suppression_removed',
|
|
60
|
+
:'esp_warning' => :'esp_warning',
|
|
61
|
+
:'global_unsubscribe_cleared' => :'global_unsubscribe_cleared',
|
|
62
|
+
:'global_unsubscribed' => :'global_unsubscribed',
|
|
63
|
+
:'global_unsubscribed_dts' => :'global_unsubscribed_dts',
|
|
64
|
+
:'spam_complaint' => :'spam_complaint',
|
|
65
|
+
:'spam_complaint_cleared' => :'spam_complaint_cleared',
|
|
66
|
+
:'spam_complaint_dts' => :'spam_complaint_dts',
|
|
67
|
+
:'suppression_surfaces' => :'suppression_surfaces'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns all the JSON keys this model knows about
|
|
72
|
+
def self.acceptable_attributes
|
|
73
|
+
attribute_map.values
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Attribute type mapping.
|
|
77
|
+
def self.openapi_types
|
|
78
|
+
{
|
|
79
|
+
:'bounce_cleared' => :'Boolean',
|
|
80
|
+
:'customer_profile_oid' => :'Integer',
|
|
81
|
+
:'email' => :'String',
|
|
82
|
+
:'esp_suppression_removed' => :'Boolean',
|
|
83
|
+
:'esp_warning' => :'String',
|
|
84
|
+
:'global_unsubscribe_cleared' => :'Boolean',
|
|
85
|
+
:'global_unsubscribed' => :'Boolean',
|
|
86
|
+
:'global_unsubscribed_dts' => :'String',
|
|
87
|
+
:'spam_complaint' => :'Boolean',
|
|
88
|
+
:'spam_complaint_cleared' => :'Boolean',
|
|
89
|
+
:'spam_complaint_dts' => :'String',
|
|
90
|
+
:'suppression_surfaces' => :'EmailSuppressionSurfaces'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# List of attributes with nullable: true
|
|
95
|
+
def self.openapi_nullable
|
|
96
|
+
Set.new([
|
|
97
|
+
])
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Initializes the object
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
def initialize(attributes = {})
|
|
103
|
+
if (!attributes.is_a?(Hash))
|
|
104
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomerEmailSuppressionResult` initialize method"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomerEmailSuppressionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
111
|
+
end
|
|
112
|
+
h[k.to_sym] = v
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'bounce_cleared')
|
|
116
|
+
self.bounce_cleared = attributes[:'bounce_cleared']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'customer_profile_oid')
|
|
120
|
+
self.customer_profile_oid = attributes[:'customer_profile_oid']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'email')
|
|
124
|
+
self.email = attributes[:'email']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'esp_suppression_removed')
|
|
128
|
+
self.esp_suppression_removed = attributes[:'esp_suppression_removed']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'esp_warning')
|
|
132
|
+
self.esp_warning = attributes[:'esp_warning']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'global_unsubscribe_cleared')
|
|
136
|
+
self.global_unsubscribe_cleared = attributes[:'global_unsubscribe_cleared']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'global_unsubscribed')
|
|
140
|
+
self.global_unsubscribed = attributes[:'global_unsubscribed']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'global_unsubscribed_dts')
|
|
144
|
+
self.global_unsubscribed_dts = attributes[:'global_unsubscribed_dts']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'spam_complaint')
|
|
148
|
+
self.spam_complaint = attributes[:'spam_complaint']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'spam_complaint_cleared')
|
|
152
|
+
self.spam_complaint_cleared = attributes[:'spam_complaint_cleared']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'spam_complaint_dts')
|
|
156
|
+
self.spam_complaint_dts = attributes[:'spam_complaint_dts']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'suppression_surfaces')
|
|
160
|
+
self.suppression_surfaces = attributes[:'suppression_surfaces']
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
165
|
+
# @return Array for valid properties with the reasons
|
|
166
|
+
def list_invalid_properties
|
|
167
|
+
invalid_properties = Array.new
|
|
168
|
+
invalid_properties
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Check to see if the all the properties in the model are valid
|
|
172
|
+
# @return true if the model is valid
|
|
173
|
+
def valid?
|
|
174
|
+
true
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
bounce_cleared == o.bounce_cleared &&
|
|
183
|
+
customer_profile_oid == o.customer_profile_oid &&
|
|
184
|
+
email == o.email &&
|
|
185
|
+
esp_suppression_removed == o.esp_suppression_removed &&
|
|
186
|
+
esp_warning == o.esp_warning &&
|
|
187
|
+
global_unsubscribe_cleared == o.global_unsubscribe_cleared &&
|
|
188
|
+
global_unsubscribed == o.global_unsubscribed &&
|
|
189
|
+
global_unsubscribed_dts == o.global_unsubscribed_dts &&
|
|
190
|
+
spam_complaint == o.spam_complaint &&
|
|
191
|
+
spam_complaint_cleared == o.spam_complaint_cleared &&
|
|
192
|
+
spam_complaint_dts == o.spam_complaint_dts &&
|
|
193
|
+
suppression_surfaces == o.suppression_surfaces
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @see the `==` method
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def eql?(o)
|
|
199
|
+
self == o
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Calculates hash code according to all attributes.
|
|
203
|
+
# @return [Integer] Hash code
|
|
204
|
+
def hash
|
|
205
|
+
[bounce_cleared, customer_profile_oid, email, esp_suppression_removed, esp_warning, global_unsubscribe_cleared, global_unsubscribed, global_unsubscribed_dts, spam_complaint, spam_complaint_cleared, spam_complaint_dts, suppression_surfaces].hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Builds the object from hash
|
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
210
|
+
# @return [Object] Returns the model itself
|
|
211
|
+
def self.build_from_hash(attributes)
|
|
212
|
+
new.build_from_hash(attributes)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Builds the object from hash
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
# @return [Object] Returns the model itself
|
|
218
|
+
def build_from_hash(attributes)
|
|
219
|
+
return nil unless attributes.is_a?(Hash)
|
|
220
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
221
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
222
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
223
|
+
self.send("#{key}=", nil)
|
|
224
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
225
|
+
# check to ensure the input is an array given that the attribute
|
|
226
|
+
# is documented as an array but the input is not
|
|
227
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
228
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
229
|
+
end
|
|
230
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
231
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
self
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Deserializes the data based on type
|
|
239
|
+
# @param string type Data type
|
|
240
|
+
# @param string value Value to be deserialized
|
|
241
|
+
# @return [Object] Deserialized data
|
|
242
|
+
def _deserialize(type, value)
|
|
243
|
+
case type.to_sym
|
|
244
|
+
when :Time
|
|
245
|
+
Time.parse(value)
|
|
246
|
+
when :Date
|
|
247
|
+
Date.parse(value)
|
|
248
|
+
when :String
|
|
249
|
+
value.to_s
|
|
250
|
+
when :Integer
|
|
251
|
+
value.to_i
|
|
252
|
+
when :Float
|
|
253
|
+
value.to_f
|
|
254
|
+
when :Boolean
|
|
255
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
256
|
+
true
|
|
257
|
+
else
|
|
258
|
+
false
|
|
259
|
+
end
|
|
260
|
+
when :Object
|
|
261
|
+
# generic object (usually a Hash), return directly
|
|
262
|
+
value
|
|
263
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
264
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
265
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
266
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
267
|
+
k_type = Regexp.last_match[:k_type]
|
|
268
|
+
v_type = Regexp.last_match[:v_type]
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each do |k, v|
|
|
271
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
else # model
|
|
275
|
+
# models (e.g. Pet) or oneOf
|
|
276
|
+
klass = UltracartClient.const_get(type)
|
|
277
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Returns the string representation of the object
|
|
282
|
+
# @return [String] String presentation of the object
|
|
283
|
+
def to_s
|
|
284
|
+
to_hash.to_s
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
|
289
|
+
def to_body
|
|
290
|
+
to_hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Returns the object in the form of hash
|
|
294
|
+
# @return [Hash] Returns the object in the form of hash
|
|
295
|
+
def to_hash
|
|
296
|
+
hash = {}
|
|
297
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
298
|
+
value = self.send(attr)
|
|
299
|
+
if value.nil?
|
|
300
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
301
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
hash[param] = _to_hash(value)
|
|
305
|
+
end
|
|
306
|
+
hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Outputs non-array value in the form of hash
|
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
311
|
+
# @param [Object] value Any valid value
|
|
312
|
+
# @return [Hash] Returns the value in the form of hash
|
|
313
|
+
def _to_hash(value)
|
|
314
|
+
if value.is_a?(Array)
|
|
315
|
+
value.compact.map { |v| _to_hash(v) }
|
|
316
|
+
elsif value.is_a?(Hash)
|
|
317
|
+
{}.tap do |hash|
|
|
318
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
319
|
+
end
|
|
320
|
+
elsif value.respond_to? :to_hash
|
|
321
|
+
value.to_hash
|
|
322
|
+
else
|
|
323
|
+
value
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
end
|
|
@@ -24,6 +24,9 @@ module UltracartClient
|
|
|
24
24
|
# Emails per month allowed
|
|
25
25
|
attr_accessor :emails_per_month
|
|
26
26
|
|
|
27
|
+
# If machine open should be ignored
|
|
28
|
+
attr_accessor :machine_open_ignore
|
|
29
|
+
|
|
27
30
|
attr_accessor :marketing_esp_domain_user
|
|
28
31
|
|
|
29
32
|
attr_accessor :marketing_esp_domain_uuid
|
|
@@ -64,6 +67,7 @@ module UltracartClient
|
|
|
64
67
|
:'emails_per_day' => :'emails_per_day',
|
|
65
68
|
:'emails_per_hour' => :'emails_per_hour',
|
|
66
69
|
:'emails_per_month' => :'emails_per_month',
|
|
70
|
+
:'machine_open_ignore' => :'machine_open_ignore',
|
|
67
71
|
:'marketing_esp_domain_user' => :'marketing_esp_domain_user',
|
|
68
72
|
:'marketing_esp_domain_uuid' => :'marketing_esp_domain_uuid',
|
|
69
73
|
:'marketing_esp_friendly_name' => :'marketing_esp_friendly_name',
|
|
@@ -94,6 +98,7 @@ module UltracartClient
|
|
|
94
98
|
:'emails_per_day' => :'Integer',
|
|
95
99
|
:'emails_per_hour' => :'Integer',
|
|
96
100
|
:'emails_per_month' => :'Integer',
|
|
101
|
+
:'machine_open_ignore' => :'Boolean',
|
|
97
102
|
:'marketing_esp_domain_user' => :'String',
|
|
98
103
|
:'marketing_esp_domain_uuid' => :'String',
|
|
99
104
|
:'marketing_esp_friendly_name' => :'String',
|
|
@@ -146,6 +151,10 @@ module UltracartClient
|
|
|
146
151
|
self.emails_per_month = attributes[:'emails_per_month']
|
|
147
152
|
end
|
|
148
153
|
|
|
154
|
+
if attributes.key?(:'machine_open_ignore')
|
|
155
|
+
self.machine_open_ignore = attributes[:'machine_open_ignore']
|
|
156
|
+
end
|
|
157
|
+
|
|
149
158
|
if attributes.key?(:'marketing_esp_domain_user')
|
|
150
159
|
self.marketing_esp_domain_user = attributes[:'marketing_esp_domain_user']
|
|
151
160
|
end
|
|
@@ -232,6 +241,7 @@ module UltracartClient
|
|
|
232
241
|
emails_per_day == o.emails_per_day &&
|
|
233
242
|
emails_per_hour == o.emails_per_hour &&
|
|
234
243
|
emails_per_month == o.emails_per_month &&
|
|
244
|
+
machine_open_ignore == o.machine_open_ignore &&
|
|
235
245
|
marketing_esp_domain_user == o.marketing_esp_domain_user &&
|
|
236
246
|
marketing_esp_domain_uuid == o.marketing_esp_domain_uuid &&
|
|
237
247
|
marketing_esp_friendly_name == o.marketing_esp_friendly_name &&
|
|
@@ -259,7 +269,7 @@ module UltracartClient
|
|
|
259
269
|
# Calculates hash code according to all attributes.
|
|
260
270
|
# @return [Integer] Hash code
|
|
261
271
|
def hash
|
|
262
|
-
[emails_per_day, emails_per_hour, emails_per_month, marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, require_order_within_last, reviews_io_configured, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
|
|
272
|
+
[emails_per_day, emails_per_hour, emails_per_month, machine_open_ignore, marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, require_order_within_last, reviews_io_configured, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
|
|
263
273
|
end
|
|
264
274
|
|
|
265
275
|
# Builds the object from hash
|