ultracart_api 3.10.144 → 3.10.145
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: 3b06cffbb7b72a2dc4ab064fc4172d2b9685ec14ffa732712ce24afeb52a8bea
|
|
4
|
+
data.tar.gz: ad3bf1082daa3968c3f664d06211fe5be02ed28a640ff038d84a84f866e869ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37d7bfe526da0a428bca7f179e4694fc2a5d4f7fac97a6b8971de21ee489f3f281a782ac9debc591f8457f5146c4551f17be99a8b19e537bc4598bda2cda5521
|
|
7
|
+
data.tar.gz: 04bab7d92531600ca1225fa45ebf3e01518acd6c62a9718147c74ad802d81617611968c989b7d77485f8295a8798b101915f88485b6a25d7accacae62844856e
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 3.10.
|
|
10
|
+
- Package version: 3.10.145
|
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
|
13
13
|
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./ultracart_api-3.10.
|
|
27
|
+
gem install ./ultracart_api-3.10.145.gem
|
|
28
28
|
```
|
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.145.gem` to install the development dependencies)
|
|
30
30
|
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
32
32
|
|
|
33
33
|
Finally add this to the Gemfile:
|
|
34
34
|
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
|
35
|
+
gem 'ultracart_api', '~> 3.10.145'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -1356,6 +1356,7 @@ Not every change is committed to every SDK.
|
|
|
1356
1356
|
|
|
1357
1357
|
| Version | Date | Comments |
|
|
1358
1358
|
| --: | :-: | --- |
|
|
1359
|
+
| 3.10.145 | 06/20/2023 | coupon add allowed values for usable_by and new OncePerNewCustomerForItem flag |
|
|
1359
1360
|
| 3.10.144 | 06/15/2023 | add pickup_dts to order.shipping object |
|
|
1360
1361
|
| 3.10.143 | 06/14/2023 | dw bi: add request_dts on the execute queries request and report data set objects |
|
|
1361
1362
|
| 3.10.142 | 06/09/2023 | distribution center pickup times |
|
|
@@ -165,6 +165,28 @@ module UltracartClient
|
|
|
165
165
|
# Who may use this coupon.
|
|
166
166
|
attr_accessor :usable_by
|
|
167
167
|
|
|
168
|
+
class EnumAttributeValidator
|
|
169
|
+
attr_reader :datatype
|
|
170
|
+
attr_reader :allowable_values
|
|
171
|
+
|
|
172
|
+
def initialize(datatype, allowable_values)
|
|
173
|
+
@allowable_values = allowable_values.map do |value|
|
|
174
|
+
case datatype.to_s
|
|
175
|
+
when /Integer/i
|
|
176
|
+
value.to_i
|
|
177
|
+
when /Float/i
|
|
178
|
+
value.to_f
|
|
179
|
+
else
|
|
180
|
+
value
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def valid?(value)
|
|
186
|
+
!value || allowable_values.include?(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
168
190
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
169
191
|
def self.attribute_map
|
|
170
192
|
{
|
|
@@ -627,6 +649,8 @@ module UltracartClient
|
|
|
627
649
|
return false if !@merchant_code.nil? && @merchant_code.to_s.length > 20
|
|
628
650
|
return false if !@merchant_notes.nil? && @merchant_notes.to_s.length > 250
|
|
629
651
|
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
|
652
|
+
usable_by_validator = EnumAttributeValidator.new('String', ['Anyone', 'UniqueCode', 'OncePerCustomer', 'OncePerNewCustomer', 'OncePerNewCustomerForItem'])
|
|
653
|
+
return false unless usable_by_validator.valid?(@usable_by)
|
|
630
654
|
return false if !@usable_by.nil? && @usable_by.to_s.length > 50
|
|
631
655
|
true
|
|
632
656
|
end
|
|
@@ -681,13 +705,13 @@ module UltracartClient
|
|
|
681
705
|
@quickbooks_code = quickbooks_code
|
|
682
706
|
end
|
|
683
707
|
|
|
684
|
-
# Custom attribute writer method
|
|
685
|
-
# @param [Object] usable_by
|
|
708
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
709
|
+
# @param [Object] usable_by Object to be assigned
|
|
686
710
|
def usable_by=(usable_by)
|
|
687
|
-
|
|
688
|
-
|
|
711
|
+
validator = EnumAttributeValidator.new('String', ['Anyone', 'UniqueCode', 'OncePerCustomer', 'OncePerNewCustomer', 'OncePerNewCustomerForItem'])
|
|
712
|
+
unless validator.valid?(usable_by)
|
|
713
|
+
fail ArgumentError, 'invalid value for "usable_by", must be one of #{validator.allowable_values}.'
|
|
689
714
|
end
|
|
690
|
-
|
|
691
715
|
@usable_by = usable_by
|
|
692
716
|
end
|
|
693
717
|
|
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.10.
|
|
4
|
+
version: 3.10.145
|
|
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
|