ultracart_api 4.0.161 → 4.0.162
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 +5 -4
- data/lib/ultracart_api/models/coupon.rb +29 -5
- data/lib/ultracart_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4edfbbc263a0b6f8b853a70d46ca9cacf88f4952b6b23263f93c438a84e39e48
|
4
|
+
data.tar.gz: 4633d63b98a6b6b36049d822a0a359e7b249c6a26fe3406e102ae0ffe84c8a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1c69e1d5766cb7a9fd7957eb2b29a366fabcd4ff2146f36877b0948c76b5bcc9e9162b0281d234555374982b32a8f5e0f95c0925205cddfbedd27e209102491
|
7
|
+
data.tar.gz: 89f74cdf55ffcb5cba3be20f5a3848d8a95e0c8337e5e1f4ef55a100498e401d237e7f1018f891d5fb5f032cbbbfb1e4e9a019045b10d437bcd28785eb08b14c
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.0.
|
10
|
+
- Package version: 4.0.162
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.162.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.162.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.162'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -1364,6 +1364,7 @@ Not every change is committed to every SDK.
|
|
1364
1364
|
|
1365
1365
|
| Version | Date | Comments |
|
1366
1366
|
| --: | :-: | --- |
|
1367
|
+
| 4.0.162 | 06/20/2023 | coupon add allowed values for usable_by and new OncePerNewCustomerForItem flag |
|
1367
1368
|
| 4.0.161 | 06/15/2023 | add pickup_dts to order.shipping object |
|
1368
1369
|
| 4.0.160 | 06/14/2023 | dw bi: add request_dts on the execute queries request and report data set objects |
|
1369
1370
|
| 4.0.159 | 06/09/2023 | distribution center pickup times |
|
@@ -166,6 +166,28 @@ module UltracartClient
|
|
166
166
|
# Who may use this coupon.
|
167
167
|
attr_accessor :usable_by
|
168
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
|
+
|
169
191
|
# Attribute mapping from ruby-style variable name to JSON key.
|
170
192
|
def self.attribute_map
|
171
193
|
{
|
@@ -646,6 +668,8 @@ module UltracartClient
|
|
646
668
|
return false if !@merchant_code.nil? && @merchant_code.to_s.length > 20
|
647
669
|
return false if !@merchant_notes.nil? && @merchant_notes.to_s.length > 250
|
648
670
|
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
671
|
+
usable_by_validator = EnumAttributeValidator.new('String', ["Anyone", "UniqueCode", "OncePerCustomer", "OncePerNewCustomer", "OncePerNewCustomerForItem"])
|
672
|
+
return false unless usable_by_validator.valid?(@usable_by)
|
649
673
|
return false if !@usable_by.nil? && @usable_by.to_s.length > 50
|
650
674
|
true
|
651
675
|
end
|
@@ -700,13 +724,13 @@ module UltracartClient
|
|
700
724
|
@quickbooks_code = quickbooks_code
|
701
725
|
end
|
702
726
|
|
703
|
-
# Custom attribute writer method
|
704
|
-
# @param [Object] usable_by
|
727
|
+
# Custom attribute writer method checking allowed values (enum).
|
728
|
+
# @param [Object] usable_by Object to be assigned
|
705
729
|
def usable_by=(usable_by)
|
706
|
-
|
707
|
-
|
730
|
+
validator = EnumAttributeValidator.new('String', ["Anyone", "UniqueCode", "OncePerCustomer", "OncePerNewCustomer", "OncePerNewCustomerForItem"])
|
731
|
+
unless validator.valid?(usable_by)
|
732
|
+
fail ArgumentError, "invalid value for \"usable_by\", must be one of #{validator.allowable_values}."
|
708
733
|
end
|
709
|
-
|
710
734
|
@usable_by = usable_by
|
711
735
|
end
|
712
736
|
|
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: 4.0.
|
4
|
+
version: 4.0.162
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|