ultracart_api 3.9.0 → 3.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -6
- data/docs/Browser.md +10 -0
- data/docs/BrowserDevice.md +8 -0
- data/docs/BrowserOS.md +12 -0
- data/docs/BrowserUserAgent.md +11 -0
- data/docs/Cart.md +1 -0
- data/docs/DistributionCenter.md +1 -0
- data/docs/EmailCommseqPostcard.md +2 -0
- data/docs/EmailCommseqWebhookSendTestResponse.md +14 -0
- data/docs/GiftCertificate.md +2 -0
- data/docs/ItemTax.md +1 -0
- data/docs/OrderCheckout.md +2 -0
- data/docs/OrderItem.md +1 -0
- data/docs/StorefrontApi.md +2 -2
- data/docs/TaxProviderUltraCartState.md +3 -0
- data/docs/TaxState.md +3 -0
- data/lib/ultracart_api/api/storefront_api.rb +3 -3
- data/lib/ultracart_api/models/browser.rb +202 -0
- data/lib/ultracart_api/models/browser_device.rb +184 -0
- data/lib/ultracart_api/models/browser_os.rb +220 -0
- data/lib/ultracart_api/models/browser_user_agent.rb +211 -0
- data/lib/ultracart_api/models/cart.rb +11 -1
- data/lib/ultracart_api/models/customer_tag.rb +5 -5
- data/lib/ultracart_api/models/distribution_center.rb +11 -1
- data/lib/ultracart_api/models/email_commseq_postcard.rb +21 -1
- data/lib/ultracart_api/models/email_commseq_webhook_send_test_response.rb +242 -0
- data/lib/ultracart_api/models/gift_certificate.rb +36 -1
- data/lib/ultracart_api/models/item_tax.rb +45 -1
- data/lib/ultracart_api/models/order_checkout.rb +20 -1
- data/lib/ultracart_api/models/order_item.rb +45 -1
- data/lib/ultracart_api/models/tax_provider_ultra_cart_state.rb +31 -1
- data/lib/ultracart_api/models/tax_state.rb +31 -1
- data/lib/ultracart_api/models/user.rb +15 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
@@ -112,6 +112,9 @@ module UltracartClient
|
|
112
112
|
# State of the distribution center
|
113
113
|
attr_accessor :state
|
114
114
|
|
115
|
+
# True if monetary amounts should be zeroed before transmission
|
116
|
+
attr_accessor :transmit_blank_costs
|
117
|
+
|
115
118
|
# Transport mechanism for this distribution center
|
116
119
|
attr_accessor :transport
|
117
120
|
|
@@ -151,6 +154,7 @@ module UltracartClient
|
|
151
154
|
:'shipment_cutoff_time_tuesday' => :'shipment_cutoff_time_tuesday',
|
152
155
|
:'shipment_cutoff_time_wednesday' => :'shipment_cutoff_time_wednesday',
|
153
156
|
:'state' => :'state',
|
157
|
+
:'transmit_blank_costs' => :'transmit_blank_costs',
|
154
158
|
:'transport' => :'transport'
|
155
159
|
}
|
156
160
|
end
|
@@ -191,6 +195,7 @@ module UltracartClient
|
|
191
195
|
:'shipment_cutoff_time_tuesday' => :'String',
|
192
196
|
:'shipment_cutoff_time_wednesday' => :'String',
|
193
197
|
:'state' => :'String',
|
198
|
+
:'transmit_blank_costs' => :'BOOLEAN',
|
194
199
|
:'transport' => :'String'
|
195
200
|
}
|
196
201
|
end
|
@@ -335,6 +340,10 @@ module UltracartClient
|
|
335
340
|
self.state = attributes[:'state']
|
336
341
|
end
|
337
342
|
|
343
|
+
if attributes.has_key?(:'transmit_blank_costs')
|
344
|
+
self.transmit_blank_costs = attributes[:'transmit_blank_costs']
|
345
|
+
end
|
346
|
+
|
338
347
|
if attributes.has_key?(:'transport')
|
339
348
|
self.transport = attributes[:'transport']
|
340
349
|
end
|
@@ -391,6 +400,7 @@ module UltracartClient
|
|
391
400
|
shipment_cutoff_time_tuesday == o.shipment_cutoff_time_tuesday &&
|
392
401
|
shipment_cutoff_time_wednesday == o.shipment_cutoff_time_wednesday &&
|
393
402
|
state == o.state &&
|
403
|
+
transmit_blank_costs == o.transmit_blank_costs &&
|
394
404
|
transport == o.transport
|
395
405
|
end
|
396
406
|
|
@@ -403,7 +413,7 @@ module UltracartClient
|
|
403
413
|
# Calculates hash code according to all attributes.
|
404
414
|
# @return [Fixnum] Hash code
|
405
415
|
def hash
|
406
|
-
[address1, address2, city, code, country_code, default_center, default_handles_all_items, distribution_center_oid, duns, estimate_from_distribution_center_oid, ftp_password, hold_before_shipment_minutes, hold_before_transmission, hold_auto_order_before_shipment_minutes, latitude, longitude, name, no_customer_direct_shipments, no_split_shipment, postal_code, process_days, process_inventory_start_time, process_inventory_stop_time, require_asn, send_kit_instead_of_components, shipment_cutoff_time_friday, shipment_cutoff_time_monday, shipment_cutoff_time_saturday, shipment_cutoff_time_sunday, shipment_cutoff_time_thursday, shipment_cutoff_time_tuesday, shipment_cutoff_time_wednesday, state, transport].hash
|
416
|
+
[address1, address2, city, code, country_code, default_center, default_handles_all_items, distribution_center_oid, duns, estimate_from_distribution_center_oid, ftp_password, hold_before_shipment_minutes, hold_before_transmission, hold_auto_order_before_shipment_minutes, latitude, longitude, name, no_customer_direct_shipments, no_split_shipment, postal_code, process_days, process_inventory_start_time, process_inventory_stop_time, require_asn, send_kit_instead_of_components, shipment_cutoff_time_friday, shipment_cutoff_time_monday, shipment_cutoff_time_saturday, shipment_cutoff_time_sunday, shipment_cutoff_time_thursday, shipment_cutoff_time_tuesday, shipment_cutoff_time_wednesday, state, transmit_blank_costs, transport].hash
|
407
417
|
end
|
408
418
|
|
409
419
|
# Builds the object from hash
|
@@ -44,6 +44,12 @@ module UltracartClient
|
|
44
44
|
# Postcard front container uuid
|
45
45
|
attr_accessor :postcard_front_container_uuid
|
46
46
|
|
47
|
+
# URL for front screenshot
|
48
|
+
attr_accessor :screenshot_front_url
|
49
|
+
|
50
|
+
# URL for back screenshot
|
51
|
+
attr_accessor :screenshot_small_full_url
|
52
|
+
|
47
53
|
# Storefront oid
|
48
54
|
attr_accessor :storefront_oid
|
49
55
|
|
@@ -60,6 +66,8 @@ module UltracartClient
|
|
60
66
|
:'postcard_container_cjson_last_modified_dts' => :'postcard_container_cjson_last_modified_dts',
|
61
67
|
:'postcard_front_container_cjson' => :'postcard_front_container_cjson',
|
62
68
|
:'postcard_front_container_uuid' => :'postcard_front_container_uuid',
|
69
|
+
:'screenshot_front_url' => :'screenshot_front_url',
|
70
|
+
:'screenshot_small_full_url' => :'screenshot_small_full_url',
|
63
71
|
:'storefront_oid' => :'storefront_oid'
|
64
72
|
}
|
65
73
|
end
|
@@ -77,6 +85,8 @@ module UltracartClient
|
|
77
85
|
:'postcard_container_cjson_last_modified_dts' => :'String',
|
78
86
|
:'postcard_front_container_cjson' => :'String',
|
79
87
|
:'postcard_front_container_uuid' => :'String',
|
88
|
+
:'screenshot_front_url' => :'String',
|
89
|
+
:'screenshot_small_full_url' => :'String',
|
80
90
|
:'storefront_oid' => :'Integer'
|
81
91
|
}
|
82
92
|
end
|
@@ -129,6 +139,14 @@ module UltracartClient
|
|
129
139
|
self.postcard_front_container_uuid = attributes[:'postcard_front_container_uuid']
|
130
140
|
end
|
131
141
|
|
142
|
+
if attributes.has_key?(:'screenshot_front_url')
|
143
|
+
self.screenshot_front_url = attributes[:'screenshot_front_url']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'screenshot_small_full_url')
|
147
|
+
self.screenshot_small_full_url = attributes[:'screenshot_small_full_url']
|
148
|
+
end
|
149
|
+
|
132
150
|
if attributes.has_key?(:'storefront_oid')
|
133
151
|
self.storefront_oid = attributes[:'storefront_oid']
|
134
152
|
end
|
@@ -162,6 +180,8 @@ module UltracartClient
|
|
162
180
|
postcard_container_cjson_last_modified_dts == o.postcard_container_cjson_last_modified_dts &&
|
163
181
|
postcard_front_container_cjson == o.postcard_front_container_cjson &&
|
164
182
|
postcard_front_container_uuid == o.postcard_front_container_uuid &&
|
183
|
+
screenshot_front_url == o.screenshot_front_url &&
|
184
|
+
screenshot_small_full_url == o.screenshot_small_full_url &&
|
165
185
|
storefront_oid == o.storefront_oid
|
166
186
|
end
|
167
187
|
|
@@ -174,7 +194,7 @@ module UltracartClient
|
|
174
194
|
# Calculates hash code according to all attributes.
|
175
195
|
# @return [Fixnum] Hash code
|
176
196
|
def hash
|
177
|
-
[deleted, edited_by_user, email_communication_sequence_postcard_uuid, filter_profile_equation_json, merchant_id, postcard_back_container_cjson, postcard_back_container_uuid, postcard_container_cjson_last_modified_dts, postcard_front_container_cjson, postcard_front_container_uuid, storefront_oid].hash
|
197
|
+
[deleted, edited_by_user, email_communication_sequence_postcard_uuid, filter_profile_equation_json, merchant_id, postcard_back_container_cjson, postcard_back_container_uuid, postcard_container_cjson_last_modified_dts, postcard_front_container_cjson, postcard_front_container_uuid, screenshot_front_url, screenshot_small_full_url, storefront_oid].hash
|
178
198
|
end
|
179
199
|
|
180
200
|
# Builds the object from hash
|
@@ -0,0 +1,242 @@
|
|
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 EmailCommseqWebhookSendTestResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# HTTP Request
|
22
|
+
attr_accessor :request
|
23
|
+
|
24
|
+
# HTTP Response
|
25
|
+
attr_accessor :response
|
26
|
+
|
27
|
+
# HTTP Status Code
|
28
|
+
attr_accessor :status_code
|
29
|
+
|
30
|
+
# Indicates if API call was successful
|
31
|
+
attr_accessor :success
|
32
|
+
|
33
|
+
attr_accessor :warning
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'error' => :'error',
|
39
|
+
:'metadata' => :'metadata',
|
40
|
+
:'request' => :'request',
|
41
|
+
:'response' => :'response',
|
42
|
+
:'status_code' => :'status_code',
|
43
|
+
:'success' => :'success',
|
44
|
+
:'warning' => :'warning'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'error' => :'Error',
|
52
|
+
:'metadata' => :'ResponseMetadata',
|
53
|
+
:'request' => :'String',
|
54
|
+
:'response' => :'String',
|
55
|
+
:'status_code' => :'Integer',
|
56
|
+
:'success' => :'BOOLEAN',
|
57
|
+
:'warning' => :'Warning'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
|
+
|
69
|
+
if attributes.has_key?(:'error')
|
70
|
+
self.error = attributes[:'error']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'metadata')
|
74
|
+
self.metadata = attributes[:'metadata']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'request')
|
78
|
+
self.request = attributes[:'request']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'response')
|
82
|
+
self.response = attributes[:'response']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'status_code')
|
86
|
+
self.status_code = attributes[:'status_code']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_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
|
+
error == o.error &&
|
117
|
+
metadata == o.metadata &&
|
118
|
+
request == o.request &&
|
119
|
+
response == o.response &&
|
120
|
+
status_code == o.status_code &&
|
121
|
+
success == o.success &&
|
122
|
+
warning == o.warning
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Fixnum] Hash code
|
133
|
+
def hash
|
134
|
+
[error, metadata, request, response, status_code, success, warning].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.swagger_types.each_pair do |key, type|
|
143
|
+
if type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
152
|
+
end
|
153
|
+
|
154
|
+
self
|
155
|
+
end
|
156
|
+
|
157
|
+
# Deserializes the data based on type
|
158
|
+
# @param string type Data type
|
159
|
+
# @param string value Value to be deserialized
|
160
|
+
# @return [Object] Deserialized data
|
161
|
+
def _deserialize(type, value)
|
162
|
+
case type.to_sym
|
163
|
+
when :DateTime
|
164
|
+
DateTime.parse(value)
|
165
|
+
when :Date
|
166
|
+
Date.parse(value)
|
167
|
+
when :String
|
168
|
+
value.to_s
|
169
|
+
when :Integer
|
170
|
+
value.to_i
|
171
|
+
when :Float
|
172
|
+
value.to_f
|
173
|
+
when :BOOLEAN
|
174
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
+
true
|
176
|
+
else
|
177
|
+
false
|
178
|
+
end
|
179
|
+
when :Object
|
180
|
+
# generic object (usually a Hash), return directly
|
181
|
+
value
|
182
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
+
inner_type = Regexp.last_match[:inner_type]
|
184
|
+
value.map { |v| _deserialize(inner_type, v) }
|
185
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
+
k_type = Regexp.last_match[:k_type]
|
187
|
+
v_type = Regexp.last_match[:v_type]
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each do |k, v|
|
190
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
else # model
|
194
|
+
temp_model = UltracartClient.const_get(type).new
|
195
|
+
temp_model.build_from_hash(value)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the string representation of the object
|
200
|
+
# @return [String] String presentation of the object
|
201
|
+
def to_s
|
202
|
+
to_hash.to_s
|
203
|
+
end
|
204
|
+
|
205
|
+
# to_body is an alias to to_hash (backward compatibility)
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_body
|
208
|
+
to_hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the object in the form of hash
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_hash
|
214
|
+
hash = {}
|
215
|
+
self.class.attribute_map.each_pair do |attr, param|
|
216
|
+
value = self.send(attr)
|
217
|
+
next if value.nil?
|
218
|
+
hash[param] = _to_hash(value)
|
219
|
+
end
|
220
|
+
hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Outputs non-array value in the form of hash
|
224
|
+
# For object, use to_hash. Otherwise, just return the value
|
225
|
+
# @param [Object] value Any valid value
|
226
|
+
# @return [Hash] Returns the value in the form of hash
|
227
|
+
def _to_hash(value)
|
228
|
+
if value.is_a?(Array)
|
229
|
+
value.compact.map { |v| _to_hash(v) }
|
230
|
+
elsif value.is_a?(Hash)
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
233
|
+
end
|
234
|
+
elsif value.respond_to? :to_hash
|
235
|
+
value.to_hash
|
236
|
+
else
|
237
|
+
value
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
242
|
+
end
|
@@ -20,6 +20,9 @@ module UltracartClient
|
|
20
20
|
# The code used by the customer to purchase against this gift certificate.
|
21
21
|
attr_accessor :code
|
22
22
|
|
23
|
+
# This is the customer profile oid associated with this internally managed gift certificate.
|
24
|
+
attr_accessor :customer_profile_oid
|
25
|
+
|
23
26
|
# True if this gift certificate was deleted.
|
24
27
|
attr_accessor :deleted
|
25
28
|
|
@@ -32,6 +35,9 @@ module UltracartClient
|
|
32
35
|
# Gift certificate oid.
|
33
36
|
attr_accessor :gift_certificate_oid
|
34
37
|
|
38
|
+
# This is an internally managed gift certificate associated with the loyalty cash rewards program.
|
39
|
+
attr_accessor :internal
|
40
|
+
|
35
41
|
# A list of all ledger activity for this gift certificate.
|
36
42
|
attr_accessor :ledger_entries
|
37
43
|
|
@@ -55,10 +61,12 @@ module UltracartClient
|
|
55
61
|
{
|
56
62
|
:'activated' => :'activated',
|
57
63
|
:'code' => :'code',
|
64
|
+
:'customer_profile_oid' => :'customer_profile_oid',
|
58
65
|
:'deleted' => :'deleted',
|
59
66
|
:'email' => :'email',
|
60
67
|
:'expiration_dts' => :'expiration_dts',
|
61
68
|
:'gift_certificate_oid' => :'gift_certificate_oid',
|
69
|
+
:'internal' => :'internal',
|
62
70
|
:'ledger_entries' => :'ledger_entries',
|
63
71
|
:'merchant_id' => :'merchant_id',
|
64
72
|
:'merchant_note' => :'merchant_note',
|
@@ -73,10 +81,12 @@ module UltracartClient
|
|
73
81
|
{
|
74
82
|
:'activated' => :'BOOLEAN',
|
75
83
|
:'code' => :'String',
|
84
|
+
:'customer_profile_oid' => :'Integer',
|
76
85
|
:'deleted' => :'BOOLEAN',
|
77
86
|
:'email' => :'String',
|
78
87
|
:'expiration_dts' => :'String',
|
79
88
|
:'gift_certificate_oid' => :'Integer',
|
89
|
+
:'internal' => :'BOOLEAN',
|
80
90
|
:'ledger_entries' => :'Array<GiftCertificateLedgerEntry>',
|
81
91
|
:'merchant_id' => :'String',
|
82
92
|
:'merchant_note' => :'String',
|
@@ -102,6 +112,10 @@ module UltracartClient
|
|
102
112
|
self.code = attributes[:'code']
|
103
113
|
end
|
104
114
|
|
115
|
+
if attributes.has_key?(:'customer_profile_oid')
|
116
|
+
self.customer_profile_oid = attributes[:'customer_profile_oid']
|
117
|
+
end
|
118
|
+
|
105
119
|
if attributes.has_key?(:'deleted')
|
106
120
|
self.deleted = attributes[:'deleted']
|
107
121
|
end
|
@@ -118,6 +132,10 @@ module UltracartClient
|
|
118
132
|
self.gift_certificate_oid = attributes[:'gift_certificate_oid']
|
119
133
|
end
|
120
134
|
|
135
|
+
if attributes.has_key?(:'internal')
|
136
|
+
self.internal = attributes[:'internal']
|
137
|
+
end
|
138
|
+
|
121
139
|
if attributes.has_key?(:'ledger_entries')
|
122
140
|
if (value = attributes[:'ledger_entries']).is_a?(Array)
|
123
141
|
self.ledger_entries = value
|
@@ -149,15 +167,30 @@ module UltracartClient
|
|
149
167
|
# @return Array for valid properties with the reasons
|
150
168
|
def list_invalid_properties
|
151
169
|
invalid_properties = Array.new
|
170
|
+
if !@email.nil? && @email.to_s.length > 100
|
171
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 100.')
|
172
|
+
end
|
173
|
+
|
152
174
|
invalid_properties
|
153
175
|
end
|
154
176
|
|
155
177
|
# Check to see if the all the properties in the model are valid
|
156
178
|
# @return true if the model is valid
|
157
179
|
def valid?
|
180
|
+
return false if !@email.nil? && @email.to_s.length > 100
|
158
181
|
true
|
159
182
|
end
|
160
183
|
|
184
|
+
# Custom attribute writer method with validation
|
185
|
+
# @param [Object] email Value to be assigned
|
186
|
+
def email=(email)
|
187
|
+
if !email.nil? && email.to_s.length > 100
|
188
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 100.'
|
189
|
+
end
|
190
|
+
|
191
|
+
@email = email
|
192
|
+
end
|
193
|
+
|
161
194
|
# Checks equality by comparing each attribute.
|
162
195
|
# @param [Object] Object to be compared
|
163
196
|
def ==(o)
|
@@ -165,10 +198,12 @@ module UltracartClient
|
|
165
198
|
self.class == o.class &&
|
166
199
|
activated == o.activated &&
|
167
200
|
code == o.code &&
|
201
|
+
customer_profile_oid == o.customer_profile_oid &&
|
168
202
|
deleted == o.deleted &&
|
169
203
|
email == o.email &&
|
170
204
|
expiration_dts == o.expiration_dts &&
|
171
205
|
gift_certificate_oid == o.gift_certificate_oid &&
|
206
|
+
internal == o.internal &&
|
172
207
|
ledger_entries == o.ledger_entries &&
|
173
208
|
merchant_id == o.merchant_id &&
|
174
209
|
merchant_note == o.merchant_note &&
|
@@ -186,7 +221,7 @@ module UltracartClient
|
|
186
221
|
# Calculates hash code according to all attributes.
|
187
222
|
# @return [Fixnum] Hash code
|
188
223
|
def hash
|
189
|
-
[activated, code, deleted, email, expiration_dts, gift_certificate_oid, ledger_entries, merchant_id, merchant_note, original_balance, reference_order_id, remaining_balance].hash
|
224
|
+
[activated, code, customer_profile_oid, deleted, email, expiration_dts, gift_certificate_oid, internal, ledger_entries, merchant_id, merchant_note, original_balance, reference_order_id, remaining_balance].hash
|
190
225
|
end
|
191
226
|
|
192
227
|
# Builds the object from hash
|
@@ -20,14 +20,40 @@ module UltracartClient
|
|
20
20
|
# True if tax free
|
21
21
|
attr_accessor :tax_free
|
22
22
|
|
23
|
+
# Tax product type
|
24
|
+
attr_accessor :tax_product_type
|
25
|
+
|
23
26
|
# Taxable cost if different than regular cost
|
24
27
|
attr_accessor :taxable_cost
|
25
28
|
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
26
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
52
|
def self.attribute_map
|
28
53
|
{
|
29
54
|
:'exemptions' => :'exemptions',
|
30
55
|
:'tax_free' => :'tax_free',
|
56
|
+
:'tax_product_type' => :'tax_product_type',
|
31
57
|
:'taxable_cost' => :'taxable_cost'
|
32
58
|
}
|
33
59
|
end
|
@@ -37,6 +63,7 @@ module UltracartClient
|
|
37
63
|
{
|
38
64
|
:'exemptions' => :'Array<ItemTaxExemption>',
|
39
65
|
:'tax_free' => :'BOOLEAN',
|
66
|
+
:'tax_product_type' => :'String',
|
40
67
|
:'taxable_cost' => :'Float'
|
41
68
|
}
|
42
69
|
end
|
@@ -59,6 +86,10 @@ module UltracartClient
|
|
59
86
|
self.tax_free = attributes[:'tax_free']
|
60
87
|
end
|
61
88
|
|
89
|
+
if attributes.has_key?(:'tax_product_type')
|
90
|
+
self.tax_product_type = attributes[:'tax_product_type']
|
91
|
+
end
|
92
|
+
|
62
93
|
if attributes.has_key?(:'taxable_cost')
|
63
94
|
self.taxable_cost = attributes[:'taxable_cost']
|
64
95
|
end
|
@@ -74,9 +105,21 @@ module UltracartClient
|
|
74
105
|
# Check to see if the all the properties in the model are valid
|
75
106
|
# @return true if the model is valid
|
76
107
|
def valid?
|
108
|
+
tax_product_type_validator = EnumAttributeValidator.new('String', ['', 'digital', 'physical', 'service'])
|
109
|
+
return false unless tax_product_type_validator.valid?(@tax_product_type)
|
77
110
|
true
|
78
111
|
end
|
79
112
|
|
113
|
+
# Custom attribute writer method checking allowed values (enum).
|
114
|
+
# @param [Object] tax_product_type Object to be assigned
|
115
|
+
def tax_product_type=(tax_product_type)
|
116
|
+
validator = EnumAttributeValidator.new('String', ['', 'digital', 'physical', 'service'])
|
117
|
+
unless validator.valid?(tax_product_type)
|
118
|
+
fail ArgumentError, 'invalid value for "tax_product_type", must be one of #{validator.allowable_values}.'
|
119
|
+
end
|
120
|
+
@tax_product_type = tax_product_type
|
121
|
+
end
|
122
|
+
|
80
123
|
# Checks equality by comparing each attribute.
|
81
124
|
# @param [Object] Object to be compared
|
82
125
|
def ==(o)
|
@@ -84,6 +127,7 @@ module UltracartClient
|
|
84
127
|
self.class == o.class &&
|
85
128
|
exemptions == o.exemptions &&
|
86
129
|
tax_free == o.tax_free &&
|
130
|
+
tax_product_type == o.tax_product_type &&
|
87
131
|
taxable_cost == o.taxable_cost
|
88
132
|
end
|
89
133
|
|
@@ -96,7 +140,7 @@ module UltracartClient
|
|
96
140
|
# Calculates hash code according to all attributes.
|
97
141
|
# @return [Fixnum] Hash code
|
98
142
|
def hash
|
99
|
-
[exemptions, tax_free, taxable_cost].hash
|
143
|
+
[exemptions, tax_free, tax_product_type, taxable_cost].hash
|
100
144
|
end
|
101
145
|
|
102
146
|
# Builds the object from hash
|
@@ -14,6 +14,8 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class OrderCheckout
|
17
|
+
attr_accessor :browser
|
18
|
+
|
17
19
|
# Comments from the customer. Rarely used on the single page checkout.
|
18
20
|
attr_accessor :comments
|
19
21
|
|
@@ -44,6 +46,9 @@ module UltracartClient
|
|
44
46
|
# Screen branding theme code associated with the order (legacy checkout)
|
45
47
|
attr_accessor :screen_branding_theme_code
|
46
48
|
|
49
|
+
# Screen size small, medium or large
|
50
|
+
attr_accessor :screen_size
|
51
|
+
|
47
52
|
# StoreFront host name associated with the order
|
48
53
|
attr_accessor :storefront_host_name
|
49
54
|
|
@@ -53,6 +58,7 @@ module UltracartClient
|
|
53
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
59
|
def self.attribute_map
|
55
60
|
{
|
61
|
+
:'browser' => :'browser',
|
56
62
|
:'comments' => :'comments',
|
57
63
|
:'custom_field1' => :'custom_field1',
|
58
64
|
:'custom_field2' => :'custom_field2',
|
@@ -63,6 +69,7 @@ module UltracartClient
|
|
63
69
|
:'custom_field7' => :'custom_field7',
|
64
70
|
:'customer_ip_address' => :'customer_ip_address',
|
65
71
|
:'screen_branding_theme_code' => :'screen_branding_theme_code',
|
72
|
+
:'screen_size' => :'screen_size',
|
66
73
|
:'storefront_host_name' => :'storefront_host_name',
|
67
74
|
:'upsell_path_code' => :'upsell_path_code'
|
68
75
|
}
|
@@ -71,6 +78,7 @@ module UltracartClient
|
|
71
78
|
# Attribute type mapping.
|
72
79
|
def self.swagger_types
|
73
80
|
{
|
81
|
+
:'browser' => :'Browser',
|
74
82
|
:'comments' => :'String',
|
75
83
|
:'custom_field1' => :'String',
|
76
84
|
:'custom_field2' => :'String',
|
@@ -81,6 +89,7 @@ module UltracartClient
|
|
81
89
|
:'custom_field7' => :'String',
|
82
90
|
:'customer_ip_address' => :'String',
|
83
91
|
:'screen_branding_theme_code' => :'String',
|
92
|
+
:'screen_size' => :'String',
|
84
93
|
:'storefront_host_name' => :'String',
|
85
94
|
:'upsell_path_code' => :'String'
|
86
95
|
}
|
@@ -94,6 +103,10 @@ module UltracartClient
|
|
94
103
|
# convert string to symbol for hash key
|
95
104
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
96
105
|
|
106
|
+
if attributes.has_key?(:'browser')
|
107
|
+
self.browser = attributes[:'browser']
|
108
|
+
end
|
109
|
+
|
97
110
|
if attributes.has_key?(:'comments')
|
98
111
|
self.comments = attributes[:'comments']
|
99
112
|
end
|
@@ -134,6 +147,10 @@ module UltracartClient
|
|
134
147
|
self.screen_branding_theme_code = attributes[:'screen_branding_theme_code']
|
135
148
|
end
|
136
149
|
|
150
|
+
if attributes.has_key?(:'screen_size')
|
151
|
+
self.screen_size = attributes[:'screen_size']
|
152
|
+
end
|
153
|
+
|
137
154
|
if attributes.has_key?(:'storefront_host_name')
|
138
155
|
self.storefront_host_name = attributes[:'storefront_host_name']
|
139
156
|
end
|
@@ -281,6 +298,7 @@ module UltracartClient
|
|
281
298
|
def ==(o)
|
282
299
|
return true if self.equal?(o)
|
283
300
|
self.class == o.class &&
|
301
|
+
browser == o.browser &&
|
284
302
|
comments == o.comments &&
|
285
303
|
custom_field1 == o.custom_field1 &&
|
286
304
|
custom_field2 == o.custom_field2 &&
|
@@ -291,6 +309,7 @@ module UltracartClient
|
|
291
309
|
custom_field7 == o.custom_field7 &&
|
292
310
|
customer_ip_address == o.customer_ip_address &&
|
293
311
|
screen_branding_theme_code == o.screen_branding_theme_code &&
|
312
|
+
screen_size == o.screen_size &&
|
294
313
|
storefront_host_name == o.storefront_host_name &&
|
295
314
|
upsell_path_code == o.upsell_path_code
|
296
315
|
end
|
@@ -304,7 +323,7 @@ module UltracartClient
|
|
304
323
|
# Calculates hash code according to all attributes.
|
305
324
|
# @return [Fixnum] Hash code
|
306
325
|
def hash
|
307
|
-
[comments, custom_field1, custom_field2, custom_field3, custom_field4, custom_field5, custom_field6, custom_field7, customer_ip_address, screen_branding_theme_code, storefront_host_name, upsell_path_code].hash
|
326
|
+
[browser, comments, custom_field1, custom_field2, custom_field3, custom_field4, custom_field5, custom_field6, custom_field7, customer_ip_address, screen_branding_theme_code, screen_size, storefront_host_name, upsell_path_code].hash
|
308
327
|
end
|
309
328
|
|
310
329
|
# Builds the object from hash
|