ultracart_api 3.9.5 → 3.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/docs/AdjustInternalCertificateRequest.md +13 -0
- data/docs/AdjustInternalCertificateResponse.md +13 -0
- data/docs/AutoOrder.md +1 -0
- data/docs/CustomerApi.md +54 -0
- data/docs/CustomerLoyalty.md +2 -1
- data/docs/EmailCommseqEmail.md +1 -0
- data/docs/EmailPerformance.md +1 -0
- data/docs/IntegrationLogApi.md +57 -0
- data/docs/OrderApi.md +55 -0
- data/docs/OrderAutoOrder.md +1 -0
- data/lib/ultracart_api/api/customer_api.rb +61 -0
- data/lib/ultracart_api/api/integration_log_api.rb +67 -0
- data/lib/ultracart_api/api/order_api.rb +58 -0
- data/lib/ultracart_api/models/adjust_internal_certificate_request.rb +235 -0
- data/lib/ultracart_api/models/adjust_internal_certificate_response.rb +232 -0
- data/lib/ultracart_api/models/auto_order.rb +11 -1
- data/lib/ultracart_api/models/customer_loyalty.rb +11 -2
- data/lib/ultracart_api/models/email_commseq_email.rb +11 -1
- data/lib/ultracart_api/models/email_performance.rb +45 -1
- data/lib/ultracart_api/models/order_auto_order.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
@@ -0,0 +1,235 @@
|
|
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 AdjustInternalCertificateRequest
|
17
|
+
# The adjustment amount
|
18
|
+
attr_accessor :adjustment_amount
|
19
|
+
|
20
|
+
# Description of this adjustment, 50 characters max
|
21
|
+
attr_accessor :description
|
22
|
+
|
23
|
+
# Optional timestamp for the adjustment, defaults to current time
|
24
|
+
attr_accessor :entry_dts
|
25
|
+
|
26
|
+
# Optional expiration days from the entry_dts when these adjustment becomes worthless
|
27
|
+
attr_accessor :expiration_days
|
28
|
+
|
29
|
+
# Optional order id if this adjustment is related to a particular order
|
30
|
+
attr_accessor :order_id
|
31
|
+
|
32
|
+
# Optional days required for this adjustment to vest
|
33
|
+
attr_accessor :vesting_days
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'adjustment_amount' => :'adjustment_amount',
|
39
|
+
:'description' => :'description',
|
40
|
+
:'entry_dts' => :'entry_dts',
|
41
|
+
:'expiration_days' => :'expiration_days',
|
42
|
+
:'order_id' => :'order_id',
|
43
|
+
:'vesting_days' => :'vesting_days'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'adjustment_amount' => :'Float',
|
51
|
+
:'description' => :'String',
|
52
|
+
:'entry_dts' => :'String',
|
53
|
+
:'expiration_days' => :'Integer',
|
54
|
+
:'order_id' => :'String',
|
55
|
+
:'vesting_days' => :'Integer'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
return unless attributes.is_a?(Hash)
|
63
|
+
|
64
|
+
# convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
66
|
+
|
67
|
+
if attributes.has_key?(:'adjustment_amount')
|
68
|
+
self.adjustment_amount = attributes[:'adjustment_amount']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'description')
|
72
|
+
self.description = attributes[:'description']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'entry_dts')
|
76
|
+
self.entry_dts = attributes[:'entry_dts']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'expiration_days')
|
80
|
+
self.expiration_days = attributes[:'expiration_days']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'order_id')
|
84
|
+
self.order_id = attributes[:'order_id']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'vesting_days')
|
88
|
+
self.vesting_days = attributes[:'vesting_days']
|
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
|
+
adjustment_amount == o.adjustment_amount &&
|
111
|
+
description == o.description &&
|
112
|
+
entry_dts == o.entry_dts &&
|
113
|
+
expiration_days == o.expiration_days &&
|
114
|
+
order_id == o.order_id &&
|
115
|
+
vesting_days == o.vesting_days
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Fixnum] Hash code
|
126
|
+
def hash
|
127
|
+
[adjustment_amount, description, entry_dts, expiration_days, order_id, vesting_days].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
self.class.swagger_types.each_pair do |key, type|
|
136
|
+
if type =~ /\AArray<(.*)>/i
|
137
|
+
# check to ensure the input is an array given that the attribute
|
138
|
+
# is documented as an array but the input is not
|
139
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
140
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
141
|
+
end
|
142
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
143
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
144
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
145
|
+
end
|
146
|
+
|
147
|
+
self
|
148
|
+
end
|
149
|
+
|
150
|
+
# Deserializes the data based on type
|
151
|
+
# @param string type Data type
|
152
|
+
# @param string value Value to be deserialized
|
153
|
+
# @return [Object] Deserialized data
|
154
|
+
def _deserialize(type, value)
|
155
|
+
case type.to_sym
|
156
|
+
when :DateTime
|
157
|
+
DateTime.parse(value)
|
158
|
+
when :Date
|
159
|
+
Date.parse(value)
|
160
|
+
when :String
|
161
|
+
value.to_s
|
162
|
+
when :Integer
|
163
|
+
value.to_i
|
164
|
+
when :Float
|
165
|
+
value.to_f
|
166
|
+
when :BOOLEAN
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
|
+
true
|
169
|
+
else
|
170
|
+
false
|
171
|
+
end
|
172
|
+
when :Object
|
173
|
+
# generic object (usually a Hash), return directly
|
174
|
+
value
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each do |k, v|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
else # model
|
187
|
+
temp_model = UltracartClient.const_get(type).new
|
188
|
+
temp_model.build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
next if value.nil?
|
211
|
+
hash[param] = _to_hash(value)
|
212
|
+
end
|
213
|
+
hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Outputs non-array value in the form of hash
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
218
|
+
# @param [Object] value Any valid value
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
220
|
+
def _to_hash(value)
|
221
|
+
if value.is_a?(Array)
|
222
|
+
value.compact.map { |v| _to_hash(v) }
|
223
|
+
elsif value.is_a?(Hash)
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
226
|
+
end
|
227
|
+
elsif value.respond_to? :to_hash
|
228
|
+
value.to_hash
|
229
|
+
else
|
230
|
+
value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
end
|
@@ -0,0 +1,232 @@
|
|
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 AdjustInternalCertificateResponse
|
17
|
+
# The adjustment amount
|
18
|
+
attr_accessor :adjustment_amount
|
19
|
+
|
20
|
+
# The balance amount after the adjustment was made
|
21
|
+
attr_accessor :balance_amount
|
22
|
+
|
23
|
+
attr_accessor :error
|
24
|
+
|
25
|
+
attr_accessor :metadata
|
26
|
+
|
27
|
+
# Indicates if API call was successful
|
28
|
+
attr_accessor :success
|
29
|
+
|
30
|
+
attr_accessor :warning
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'adjustment_amount' => :'adjustment_amount',
|
36
|
+
:'balance_amount' => :'balance_amount',
|
37
|
+
:'error' => :'error',
|
38
|
+
:'metadata' => :'metadata',
|
39
|
+
:'success' => :'success',
|
40
|
+
:'warning' => :'warning'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.swagger_types
|
46
|
+
{
|
47
|
+
:'adjustment_amount' => :'Float',
|
48
|
+
:'balance_amount' => :'Float',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'BOOLEAN',
|
52
|
+
:'warning' => :'Warning'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
+
|
64
|
+
if attributes.has_key?(:'adjustment_amount')
|
65
|
+
self.adjustment_amount = attributes[:'adjustment_amount']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'balance_amount')
|
69
|
+
self.balance_amount = attributes[:'balance_amount']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'error')
|
73
|
+
self.error = attributes[:'error']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'metadata')
|
77
|
+
self.metadata = attributes[:'metadata']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'success')
|
81
|
+
self.success = attributes[:'success']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'warning')
|
85
|
+
self.warning = attributes[:'warning']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
adjustment_amount == o.adjustment_amount &&
|
108
|
+
balance_amount == o.balance_amount &&
|
109
|
+
error == o.error &&
|
110
|
+
metadata == o.metadata &&
|
111
|
+
success == o.success &&
|
112
|
+
warning == o.warning
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Fixnum] Hash code
|
123
|
+
def hash
|
124
|
+
[adjustment_amount, balance_amount, error, metadata, success, warning].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
self.class.swagger_types.each_pair do |key, type|
|
133
|
+
if type =~ /\AArray<(.*)>/i
|
134
|
+
# check to ensure the input is an array given that the attribute
|
135
|
+
# is documented as an array but the input is not
|
136
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
137
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
138
|
+
end
|
139
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
140
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
141
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
+
end
|
143
|
+
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def _deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :DateTime
|
154
|
+
DateTime.parse(value)
|
155
|
+
when :Date
|
156
|
+
Date.parse(value)
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :BOOLEAN
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else # model
|
184
|
+
temp_model = UltracartClient.const_get(type).new
|
185
|
+
temp_model.build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
next if value.nil?
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
end
|
@@ -26,6 +26,9 @@ module UltracartClient
|
|
26
26
|
# True if the auto order was canceled because the customer purchased a downgrade item
|
27
27
|
attr_accessor :cancel_downgrade
|
28
28
|
|
29
|
+
# The reason this auto order was canceled by either merchant or customer
|
30
|
+
attr_accessor :cancel_reason
|
31
|
+
|
29
32
|
# True if the auto order was canceled because the customer purchased an upgrade item
|
30
33
|
attr_accessor :cancel_upgrade
|
31
34
|
|
@@ -105,6 +108,7 @@ module UltracartClient
|
|
105
108
|
:'auto_order_oid' => :'auto_order_oid',
|
106
109
|
:'cancel_after_next_x_orders' => :'cancel_after_next_x_orders',
|
107
110
|
:'cancel_downgrade' => :'cancel_downgrade',
|
111
|
+
:'cancel_reason' => :'cancel_reason',
|
108
112
|
:'cancel_upgrade' => :'cancel_upgrade',
|
109
113
|
:'canceled_by_user' => :'canceled_by_user',
|
110
114
|
:'canceled_dts' => :'canceled_dts',
|
@@ -132,6 +136,7 @@ module UltracartClient
|
|
132
136
|
:'auto_order_oid' => :'Integer',
|
133
137
|
:'cancel_after_next_x_orders' => :'Integer',
|
134
138
|
:'cancel_downgrade' => :'BOOLEAN',
|
139
|
+
:'cancel_reason' => :'String',
|
135
140
|
:'cancel_upgrade' => :'BOOLEAN',
|
136
141
|
:'canceled_by_user' => :'String',
|
137
142
|
:'canceled_dts' => :'String',
|
@@ -176,6 +181,10 @@ module UltracartClient
|
|
176
181
|
self.cancel_downgrade = attributes[:'cancel_downgrade']
|
177
182
|
end
|
178
183
|
|
184
|
+
if attributes.has_key?(:'cancel_reason')
|
185
|
+
self.cancel_reason = attributes[:'cancel_reason']
|
186
|
+
end
|
187
|
+
|
179
188
|
if attributes.has_key?(:'cancel_upgrade')
|
180
189
|
self.cancel_upgrade = attributes[:'cancel_upgrade']
|
181
190
|
end
|
@@ -285,6 +294,7 @@ module UltracartClient
|
|
285
294
|
auto_order_oid == o.auto_order_oid &&
|
286
295
|
cancel_after_next_x_orders == o.cancel_after_next_x_orders &&
|
287
296
|
cancel_downgrade == o.cancel_downgrade &&
|
297
|
+
cancel_reason == o.cancel_reason &&
|
288
298
|
cancel_upgrade == o.cancel_upgrade &&
|
289
299
|
canceled_by_user == o.canceled_by_user &&
|
290
300
|
canceled_dts == o.canceled_dts &&
|
@@ -313,7 +323,7 @@ module UltracartClient
|
|
313
323
|
# Calculates hash code according to all attributes.
|
314
324
|
# @return [Fixnum] Hash code
|
315
325
|
def hash
|
316
|
-
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
326
|
+
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
317
327
|
end
|
318
328
|
|
319
329
|
# Builds the object from hash
|
@@ -14,9 +14,11 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class CustomerLoyalty
|
17
|
-
# Current
|
17
|
+
# Current points
|
18
18
|
attr_accessor :current_points
|
19
19
|
|
20
|
+
attr_accessor :internal_gift_certificate
|
21
|
+
|
20
22
|
# Loyalty Cashback / Store credit balance (internal gift certificate balance)
|
21
23
|
attr_accessor :internal_gift_certificate_balance
|
22
24
|
|
@@ -36,6 +38,7 @@ module UltracartClient
|
|
36
38
|
def self.attribute_map
|
37
39
|
{
|
38
40
|
:'current_points' => :'current_points',
|
41
|
+
:'internal_gift_certificate' => :'internal_gift_certificate',
|
39
42
|
:'internal_gift_certificate_balance' => :'internal_gift_certificate_balance',
|
40
43
|
:'internal_gift_certificate_oid' => :'internal_gift_certificate_oid',
|
41
44
|
:'ledger_entries' => :'ledger_entries',
|
@@ -48,6 +51,7 @@ module UltracartClient
|
|
48
51
|
def self.swagger_types
|
49
52
|
{
|
50
53
|
:'current_points' => :'Integer',
|
54
|
+
:'internal_gift_certificate' => :'GiftCertificate',
|
51
55
|
:'internal_gift_certificate_balance' => :'String',
|
52
56
|
:'internal_gift_certificate_oid' => :'Integer',
|
53
57
|
:'ledger_entries' => :'Array<CustomerLoyaltyLedger>',
|
@@ -68,6 +72,10 @@ module UltracartClient
|
|
68
72
|
self.current_points = attributes[:'current_points']
|
69
73
|
end
|
70
74
|
|
75
|
+
if attributes.has_key?(:'internal_gift_certificate')
|
76
|
+
self.internal_gift_certificate = attributes[:'internal_gift_certificate']
|
77
|
+
end
|
78
|
+
|
71
79
|
if attributes.has_key?(:'internal_gift_certificate_balance')
|
72
80
|
self.internal_gift_certificate_balance = attributes[:'internal_gift_certificate_balance']
|
73
81
|
end
|
@@ -112,6 +120,7 @@ module UltracartClient
|
|
112
120
|
return true if self.equal?(o)
|
113
121
|
self.class == o.class &&
|
114
122
|
current_points == o.current_points &&
|
123
|
+
internal_gift_certificate == o.internal_gift_certificate &&
|
115
124
|
internal_gift_certificate_balance == o.internal_gift_certificate_balance &&
|
116
125
|
internal_gift_certificate_oid == o.internal_gift_certificate_oid &&
|
117
126
|
ledger_entries == o.ledger_entries &&
|
@@ -128,7 +137,7 @@ module UltracartClient
|
|
128
137
|
# Calculates hash code according to all attributes.
|
129
138
|
# @return [Fixnum] Hash code
|
130
139
|
def hash
|
131
|
-
[current_points, internal_gift_certificate_balance, internal_gift_certificate_oid, ledger_entries, pending_points, redemptions].hash
|
140
|
+
[current_points, internal_gift_certificate, internal_gift_certificate_balance, internal_gift_certificate_oid, ledger_entries, pending_points, redemptions].hash
|
132
141
|
end
|
133
142
|
|
134
143
|
# Builds the object from hash
|
@@ -44,6 +44,9 @@ module UltracartClient
|
|
44
44
|
# If this item was ever added to the Code Library, this is the oid for that library item, or 0 if never added before. This value is used to determine if a library item should be inserted or updated.
|
45
45
|
attr_accessor :library_item_oid
|
46
46
|
|
47
|
+
# True if email links should contain magic link tokens to log the customer in automatically
|
48
|
+
attr_accessor :magic_link
|
49
|
+
|
47
50
|
# Merchant ID
|
48
51
|
attr_accessor :merchant_id
|
49
52
|
|
@@ -102,6 +105,7 @@ module UltracartClient
|
|
102
105
|
:'filter_profile_equation_json' => :'filter_profile_equation_json',
|
103
106
|
:'individually_render' => :'individually_render',
|
104
107
|
:'library_item_oid' => :'library_item_oid',
|
108
|
+
:'magic_link' => :'magic_link',
|
105
109
|
:'merchant_id' => :'merchant_id',
|
106
110
|
:'pending_review' => :'pending_review',
|
107
111
|
:'preview_text' => :'preview_text',
|
@@ -133,6 +137,7 @@ module UltracartClient
|
|
133
137
|
:'filter_profile_equation_json' => :'String',
|
134
138
|
:'individually_render' => :'BOOLEAN',
|
135
139
|
:'library_item_oid' => :'Integer',
|
140
|
+
:'magic_link' => :'BOOLEAN',
|
136
141
|
:'merchant_id' => :'String',
|
137
142
|
:'pending_review' => :'BOOLEAN',
|
138
143
|
:'preview_text' => :'String',
|
@@ -199,6 +204,10 @@ module UltracartClient
|
|
199
204
|
self.library_item_oid = attributes[:'library_item_oid']
|
200
205
|
end
|
201
206
|
|
207
|
+
if attributes.has_key?(:'magic_link')
|
208
|
+
self.magic_link = attributes[:'magic_link']
|
209
|
+
end
|
210
|
+
|
202
211
|
if attributes.has_key?(:'merchant_id')
|
203
212
|
self.merchant_id = attributes[:'merchant_id']
|
204
213
|
end
|
@@ -288,6 +297,7 @@ module UltracartClient
|
|
288
297
|
filter_profile_equation_json == o.filter_profile_equation_json &&
|
289
298
|
individually_render == o.individually_render &&
|
290
299
|
library_item_oid == o.library_item_oid &&
|
300
|
+
magic_link == o.magic_link &&
|
291
301
|
merchant_id == o.merchant_id &&
|
292
302
|
pending_review == o.pending_review &&
|
293
303
|
preview_text == o.preview_text &&
|
@@ -314,7 +324,7 @@ module UltracartClient
|
|
314
324
|
# Calculates hash code according to all attributes.
|
315
325
|
# @return [Fixnum] Hash code
|
316
326
|
def hash
|
317
|
-
[deleted, edited_by_user, email_communication_sequence_email_uuid, email_communication_sequence_uuid, email_container_cjson, email_container_cjson_last_modified_dts, email_template_vm_path, filter_profile_equation_json, individually_render, library_item_oid, merchant_id, pending_review, preview_text, rejected, requires_review, screenshot_large_full_url, screenshot_large_viewport_url, screenshot_small_full_url, screenshot_small_viewport_url, smart_sending, storefront_oid, subject, suspended_for_spam, transactional_email, version].hash
|
327
|
+
[deleted, edited_by_user, email_communication_sequence_email_uuid, email_communication_sequence_uuid, email_container_cjson, email_container_cjson_last_modified_dts, email_template_vm_path, filter_profile_equation_json, individually_render, library_item_oid, magic_link, merchant_id, pending_review, preview_text, rejected, requires_review, screenshot_large_full_url, screenshot_large_viewport_url, screenshot_small_full_url, screenshot_small_viewport_url, smart_sending, storefront_oid, subject, suspended_for_spam, transactional_email, version].hash
|
318
328
|
end
|
319
329
|
|
320
330
|
# Builds the object from hash
|