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
@@ -145,6 +145,9 @@ module UltracartClient
|
|
145
145
|
# True if the item is tax free
|
146
146
|
attr_accessor :tax_free
|
147
147
|
|
148
|
+
# Type of product for tax purposes (self or UltraCart Managed taxes)
|
149
|
+
attr_accessor :tax_product_type
|
150
|
+
|
148
151
|
attr_accessor :taxable_cost
|
149
152
|
|
150
153
|
attr_accessor :total_cost_with_discount
|
@@ -163,6 +166,28 @@ module UltracartClient
|
|
163
166
|
|
164
167
|
attr_accessor :width
|
165
168
|
|
169
|
+
class EnumAttributeValidator
|
170
|
+
attr_reader :datatype
|
171
|
+
attr_reader :allowable_values
|
172
|
+
|
173
|
+
def initialize(datatype, allowable_values)
|
174
|
+
@allowable_values = allowable_values.map do |value|
|
175
|
+
case datatype.to_s
|
176
|
+
when /Integer/i
|
177
|
+
value.to_i
|
178
|
+
when /Float/i
|
179
|
+
value.to_f
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
def valid?(value)
|
187
|
+
!value || allowable_values.include?(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
166
191
|
# Attribute mapping from ruby-style variable name to JSON key.
|
167
192
|
def self.attribute_map
|
168
193
|
{
|
@@ -212,6 +237,7 @@ module UltracartClient
|
|
212
237
|
:'special_product_type' => :'special_product_type',
|
213
238
|
:'tags' => :'tags',
|
214
239
|
:'tax_free' => :'tax_free',
|
240
|
+
:'tax_product_type' => :'tax_product_type',
|
215
241
|
:'taxable_cost' => :'taxable_cost',
|
216
242
|
:'total_cost_with_discount' => :'total_cost_with_discount',
|
217
243
|
:'total_refunded' => :'total_refunded',
|
@@ -272,6 +298,7 @@ module UltracartClient
|
|
272
298
|
:'special_product_type' => :'String',
|
273
299
|
:'tags' => :'Array<OrderItemTag>',
|
274
300
|
:'tax_free' => :'BOOLEAN',
|
301
|
+
:'tax_product_type' => :'String',
|
275
302
|
:'taxable_cost' => :'Currency',
|
276
303
|
:'total_cost_with_discount' => :'Currency',
|
277
304
|
:'total_refunded' => :'Currency',
|
@@ -483,6 +510,10 @@ module UltracartClient
|
|
483
510
|
self.tax_free = attributes[:'tax_free']
|
484
511
|
end
|
485
512
|
|
513
|
+
if attributes.has_key?(:'tax_product_type')
|
514
|
+
self.tax_product_type = attributes[:'tax_product_type']
|
515
|
+
end
|
516
|
+
|
486
517
|
if attributes.has_key?(:'taxable_cost')
|
487
518
|
self.taxable_cost = attributes[:'taxable_cost']
|
488
519
|
end
|
@@ -556,6 +587,8 @@ module UltracartClient
|
|
556
587
|
return false if !@merchant_item_id.nil? && @merchant_item_id.to_s.length > 20
|
557
588
|
return false if !@perishable_class.nil? && @perishable_class.to_s.length > 50
|
558
589
|
return false if !@quickbooks_class.nil? && @quickbooks_class.to_s.length > 31
|
590
|
+
tax_product_type_validator = EnumAttributeValidator.new('String', ['', 'digital', 'physical', 'service'])
|
591
|
+
return false unless tax_product_type_validator.valid?(@tax_product_type)
|
559
592
|
true
|
560
593
|
end
|
561
594
|
|
@@ -619,6 +652,16 @@ module UltracartClient
|
|
619
652
|
@quickbooks_class = quickbooks_class
|
620
653
|
end
|
621
654
|
|
655
|
+
# Custom attribute writer method checking allowed values (enum).
|
656
|
+
# @param [Object] tax_product_type Object to be assigned
|
657
|
+
def tax_product_type=(tax_product_type)
|
658
|
+
validator = EnumAttributeValidator.new('String', ['', 'digital', 'physical', 'service'])
|
659
|
+
unless validator.valid?(tax_product_type)
|
660
|
+
fail ArgumentError, 'invalid value for "tax_product_type", must be one of #{validator.allowable_values}.'
|
661
|
+
end
|
662
|
+
@tax_product_type = tax_product_type
|
663
|
+
end
|
664
|
+
|
622
665
|
# Checks equality by comparing each attribute.
|
623
666
|
# @param [Object] Object to be compared
|
624
667
|
def ==(o)
|
@@ -670,6 +713,7 @@ module UltracartClient
|
|
670
713
|
special_product_type == o.special_product_type &&
|
671
714
|
tags == o.tags &&
|
672
715
|
tax_free == o.tax_free &&
|
716
|
+
tax_product_type == o.tax_product_type &&
|
673
717
|
taxable_cost == o.taxable_cost &&
|
674
718
|
total_cost_with_discount == o.total_cost_with_discount &&
|
675
719
|
total_refunded == o.total_refunded &&
|
@@ -689,7 +733,7 @@ module UltracartClient
|
|
689
733
|
# Calculates hash code according to all attributes.
|
690
734
|
# @return [Fixnum] Hash code
|
691
735
|
def hash
|
692
|
-
[accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, ship_separately, shipped_by_user, shipped_dts, special_product_type, tags, tax_free, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
|
736
|
+
[accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, ship_separately, shipped_by_user, shipped_dts, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
|
693
737
|
end
|
694
738
|
|
695
739
|
# Builds the object from hash
|
@@ -17,6 +17,15 @@ module UltracartClient
|
|
17
17
|
# True if this state taxes are managed by UltraCart
|
18
18
|
attr_accessor :enabled
|
19
19
|
|
20
|
+
# True if digital items are exempt from sales tax in this state.
|
21
|
+
attr_accessor :exempt_digital_items
|
22
|
+
|
23
|
+
# True if physical items are exempt from sales tax in this state.
|
24
|
+
attr_accessor :exempt_physical_items
|
25
|
+
|
26
|
+
# True if service items are exempt from sales tax in this state.
|
27
|
+
attr_accessor :exempt_service_items
|
28
|
+
|
20
29
|
# State Code (2 digits)
|
21
30
|
attr_accessor :state_code
|
22
31
|
|
@@ -39,6 +48,9 @@ module UltracartClient
|
|
39
48
|
def self.attribute_map
|
40
49
|
{
|
41
50
|
:'enabled' => :'enabled',
|
51
|
+
:'exempt_digital_items' => :'exempt_digital_items',
|
52
|
+
:'exempt_physical_items' => :'exempt_physical_items',
|
53
|
+
:'exempt_service_items' => :'exempt_service_items',
|
42
54
|
:'state_code' => :'state_code',
|
43
55
|
:'state_name' => :'state_name',
|
44
56
|
:'tax_gift_charge' => :'tax_gift_charge',
|
@@ -52,6 +64,9 @@ module UltracartClient
|
|
52
64
|
def self.swagger_types
|
53
65
|
{
|
54
66
|
:'enabled' => :'BOOLEAN',
|
67
|
+
:'exempt_digital_items' => :'BOOLEAN',
|
68
|
+
:'exempt_physical_items' => :'BOOLEAN',
|
69
|
+
:'exempt_service_items' => :'BOOLEAN',
|
55
70
|
:'state_code' => :'String',
|
56
71
|
:'state_name' => :'String',
|
57
72
|
:'tax_gift_charge' => :'BOOLEAN',
|
@@ -73,6 +88,18 @@ module UltracartClient
|
|
73
88
|
self.enabled = attributes[:'enabled']
|
74
89
|
end
|
75
90
|
|
91
|
+
if attributes.has_key?(:'exempt_digital_items')
|
92
|
+
self.exempt_digital_items = attributes[:'exempt_digital_items']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'exempt_physical_items')
|
96
|
+
self.exempt_physical_items = attributes[:'exempt_physical_items']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'exempt_service_items')
|
100
|
+
self.exempt_service_items = attributes[:'exempt_service_items']
|
101
|
+
end
|
102
|
+
|
76
103
|
if attributes.has_key?(:'state_code')
|
77
104
|
self.state_code = attributes[:'state_code']
|
78
105
|
end
|
@@ -117,6 +144,9 @@ module UltracartClient
|
|
117
144
|
return true if self.equal?(o)
|
118
145
|
self.class == o.class &&
|
119
146
|
enabled == o.enabled &&
|
147
|
+
exempt_digital_items == o.exempt_digital_items &&
|
148
|
+
exempt_physical_items == o.exempt_physical_items &&
|
149
|
+
exempt_service_items == o.exempt_service_items &&
|
120
150
|
state_code == o.state_code &&
|
121
151
|
state_name == o.state_name &&
|
122
152
|
tax_gift_charge == o.tax_gift_charge &&
|
@@ -134,7 +164,7 @@ module UltracartClient
|
|
134
164
|
# Calculates hash code according to all attributes.
|
135
165
|
# @return [Fixnum] Hash code
|
136
166
|
def hash
|
137
|
-
[enabled, state_code, state_name, tax_gift_charge, tax_gift_wrap, tax_rate_formatted, tax_shipping].hash
|
167
|
+
[enabled, exempt_digital_items, exempt_physical_items, exempt_service_items, state_code, state_name, tax_gift_charge, tax_gift_wrap, tax_rate_formatted, tax_shipping].hash
|
138
168
|
end
|
139
169
|
|
140
170
|
# Builds the object from hash
|
@@ -35,6 +35,15 @@ module UltracartClient
|
|
35
35
|
# Flag instructing engine to not collect state tax for this state
|
36
36
|
attr_accessor :dont_collect_state
|
37
37
|
|
38
|
+
# True if digital items are exempt from sales tax in this state.
|
39
|
+
attr_accessor :exempt_digital_items
|
40
|
+
|
41
|
+
# True if physical items are exempt from sales tax in this state.
|
42
|
+
attr_accessor :exempt_physical_items
|
43
|
+
|
44
|
+
# True if service items are exempt from sales tax in this state.
|
45
|
+
attr_accessor :exempt_service_items
|
46
|
+
|
38
47
|
# State code
|
39
48
|
attr_accessor :state_code
|
40
49
|
|
@@ -69,6 +78,9 @@ module UltracartClient
|
|
69
78
|
:'dont_collect_county' => :'dont_collect_county',
|
70
79
|
:'dont_collect_postal_code' => :'dont_collect_postal_code',
|
71
80
|
:'dont_collect_state' => :'dont_collect_state',
|
81
|
+
:'exempt_digital_items' => :'exempt_digital_items',
|
82
|
+
:'exempt_physical_items' => :'exempt_physical_items',
|
83
|
+
:'exempt_service_items' => :'exempt_service_items',
|
72
84
|
:'state_code' => :'state_code',
|
73
85
|
:'state_oid' => :'state_oid',
|
74
86
|
:'tax_gift_charge' => :'tax_gift_charge',
|
@@ -90,6 +102,9 @@ module UltracartClient
|
|
90
102
|
:'dont_collect_county' => :'BOOLEAN',
|
91
103
|
:'dont_collect_postal_code' => :'BOOLEAN',
|
92
104
|
:'dont_collect_state' => :'BOOLEAN',
|
105
|
+
:'exempt_digital_items' => :'BOOLEAN',
|
106
|
+
:'exempt_physical_items' => :'BOOLEAN',
|
107
|
+
:'exempt_service_items' => :'BOOLEAN',
|
93
108
|
:'state_code' => :'String',
|
94
109
|
:'state_oid' => :'Integer',
|
95
110
|
:'tax_gift_charge' => :'BOOLEAN',
|
@@ -139,6 +154,18 @@ module UltracartClient
|
|
139
154
|
self.dont_collect_state = attributes[:'dont_collect_state']
|
140
155
|
end
|
141
156
|
|
157
|
+
if attributes.has_key?(:'exempt_digital_items')
|
158
|
+
self.exempt_digital_items = attributes[:'exempt_digital_items']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'exempt_physical_items')
|
162
|
+
self.exempt_physical_items = attributes[:'exempt_physical_items']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'exempt_service_items')
|
166
|
+
self.exempt_service_items = attributes[:'exempt_service_items']
|
167
|
+
end
|
168
|
+
|
142
169
|
if attributes.has_key?(:'state_code')
|
143
170
|
self.state_code = attributes[:'state_code']
|
144
171
|
end
|
@@ -197,6 +224,9 @@ module UltracartClient
|
|
197
224
|
dont_collect_county == o.dont_collect_county &&
|
198
225
|
dont_collect_postal_code == o.dont_collect_postal_code &&
|
199
226
|
dont_collect_state == o.dont_collect_state &&
|
227
|
+
exempt_digital_items == o.exempt_digital_items &&
|
228
|
+
exempt_physical_items == o.exempt_physical_items &&
|
229
|
+
exempt_service_items == o.exempt_service_items &&
|
200
230
|
state_code == o.state_code &&
|
201
231
|
state_oid == o.state_oid &&
|
202
232
|
tax_gift_charge == o.tax_gift_charge &&
|
@@ -216,7 +246,7 @@ module UltracartClient
|
|
216
246
|
# Calculates hash code according to all attributes.
|
217
247
|
# @return [Fixnum] Hash code
|
218
248
|
def hash
|
219
|
-
[accounting_code, counties, country_oid, dont_collect_city, dont_collect_county, dont_collect_postal_code, dont_collect_state, state_code, state_oid, tax_gift_charge, tax_gift_wrap, tax_rate, tax_rate_formatted, tax_shipping, use_ultracart_managed_rates].hash
|
249
|
+
[accounting_code, counties, country_oid, dont_collect_city, dont_collect_county, dont_collect_postal_code, dont_collect_state, exempt_digital_items, exempt_physical_items, exempt_service_items, state_code, state_oid, tax_gift_charge, tax_gift_wrap, tax_rate, tax_rate_formatted, tax_shipping, use_ultracart_managed_rates].hash
|
220
250
|
end
|
221
251
|
|
222
252
|
# Builds the object from hash
|
@@ -177,15 +177,30 @@ module UltracartClient
|
|
177
177
|
# @return Array for valid properties with the reasons
|
178
178
|
def list_invalid_properties
|
179
179
|
invalid_properties = Array.new
|
180
|
+
if !@email.nil? && @email.to_s.length > 150
|
181
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 150.')
|
182
|
+
end
|
183
|
+
|
180
184
|
invalid_properties
|
181
185
|
end
|
182
186
|
|
183
187
|
# Check to see if the all the properties in the model are valid
|
184
188
|
# @return true if the model is valid
|
185
189
|
def valid?
|
190
|
+
return false if !@email.nil? && @email.to_s.length > 150
|
186
191
|
true
|
187
192
|
end
|
188
193
|
|
194
|
+
# Custom attribute writer method with validation
|
195
|
+
# @param [Object] email Value to be assigned
|
196
|
+
def email=(email)
|
197
|
+
if !email.nil? && email.to_s.length > 150
|
198
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 150.'
|
199
|
+
end
|
200
|
+
|
201
|
+
@email = email
|
202
|
+
end
|
203
|
+
|
189
204
|
# Checks equality by comparing each attribute.
|
190
205
|
# @param [Object] Object to be compared
|
191
206
|
def ==(o)
|
data/lib/ultracart_api.rb
CHANGED
@@ -49,6 +49,10 @@ require 'ultracart_api/models/auto_orders_request'
|
|
49
49
|
require 'ultracart_api/models/auto_orders_response'
|
50
50
|
require 'ultracart_api/models/avalara_config'
|
51
51
|
require 'ultracart_api/models/base_response'
|
52
|
+
require 'ultracart_api/models/browser'
|
53
|
+
require 'ultracart_api/models/browser_device'
|
54
|
+
require 'ultracart_api/models/browser_os'
|
55
|
+
require 'ultracart_api/models/browser_user_agent'
|
52
56
|
require 'ultracart_api/models/cart'
|
53
57
|
require 'ultracart_api/models/cart_affiliate'
|
54
58
|
require 'ultracart_api/models/cart_affirm_checkout_response'
|
@@ -241,6 +245,7 @@ require 'ultracart_api/models/email_commseq_step'
|
|
241
245
|
require 'ultracart_api/models/email_commseq_step_log'
|
242
246
|
require 'ultracart_api/models/email_commseq_step_logs_response'
|
243
247
|
require 'ultracart_api/models/email_commseq_webhook_send_test_request'
|
248
|
+
require 'ultracart_api/models/email_commseq_webhook_send_test_response'
|
244
249
|
require 'ultracart_api/models/email_commseqs_response'
|
245
250
|
require 'ultracart_api/models/email_customer'
|
246
251
|
require 'ultracart_api/models/email_customer_editor_url_response'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.
|
4
|
+
version: 3.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -255,6 +255,10 @@ files:
|
|
255
255
|
- docs/AutoOrdersResponse.md
|
256
256
|
- docs/AvalaraConfig.md
|
257
257
|
- docs/BaseResponse.md
|
258
|
+
- docs/Browser.md
|
259
|
+
- docs/BrowserDevice.md
|
260
|
+
- docs/BrowserOS.md
|
261
|
+
- docs/BrowserUserAgent.md
|
258
262
|
- docs/Cart.md
|
259
263
|
- docs/CartAffiliate.md
|
260
264
|
- docs/CartAffirmCheckoutResponse.md
|
@@ -452,6 +456,7 @@ files:
|
|
452
456
|
- docs/EmailCommseqStepLog.md
|
453
457
|
- docs/EmailCommseqStepLogsResponse.md
|
454
458
|
- docs/EmailCommseqWebhookSendTestRequest.md
|
459
|
+
- docs/EmailCommseqWebhookSendTestResponse.md
|
455
460
|
- docs/EmailCommseqsResponse.md
|
456
461
|
- docs/EmailCustomer.md
|
457
462
|
- docs/EmailCustomerEditorUrlResponse.md
|
@@ -941,6 +946,10 @@ files:
|
|
941
946
|
- lib/ultracart_api/models/auto_orders_response.rb
|
942
947
|
- lib/ultracart_api/models/avalara_config.rb
|
943
948
|
- lib/ultracart_api/models/base_response.rb
|
949
|
+
- lib/ultracart_api/models/browser.rb
|
950
|
+
- lib/ultracart_api/models/browser_device.rb
|
951
|
+
- lib/ultracart_api/models/browser_os.rb
|
952
|
+
- lib/ultracart_api/models/browser_user_agent.rb
|
944
953
|
- lib/ultracart_api/models/cart.rb
|
945
954
|
- lib/ultracart_api/models/cart_affiliate.rb
|
946
955
|
- lib/ultracart_api/models/cart_affirm_checkout_response.rb
|
@@ -1133,6 +1142,7 @@ files:
|
|
1133
1142
|
- lib/ultracart_api/models/email_commseq_step_log.rb
|
1134
1143
|
- lib/ultracart_api/models/email_commseq_step_logs_response.rb
|
1135
1144
|
- lib/ultracart_api/models/email_commseq_webhook_send_test_request.rb
|
1145
|
+
- lib/ultracart_api/models/email_commseq_webhook_send_test_response.rb
|
1136
1146
|
- lib/ultracart_api/models/email_commseqs_response.rb
|
1137
1147
|
- lib/ultracart_api/models/email_customer.rb
|
1138
1148
|
- lib/ultracart_api/models/email_customer_editor_url_response.rb
|