ultracart_api 3.10.144 → 3.10.145

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39c91f3ec6d30a93f663f0997ee62f848084921310f2d5eb0b09148ab9354734
4
- data.tar.gz: e81d1627f998da6ca6ab68a3487a2af4669863cf70fb1fc501223a62128bf6b2
3
+ metadata.gz: 3b06cffbb7b72a2dc4ab064fc4172d2b9685ec14ffa732712ce24afeb52a8bea
4
+ data.tar.gz: ad3bf1082daa3968c3f664d06211fe5be02ed28a640ff038d84a84f866e869ed
5
5
  SHA512:
6
- metadata.gz: fbac4795105adf91ef40b69f671e38dc3416d8766171ca72ac5ad9030849ed11089ba566b6339250dc56388ce051317fc3e088ceb5acb97031c41dad15c1adfa
7
- data.tar.gz: 35b34271cc9b26e8ef39eafd176d121bc49787d7084d49ffe5ebeaaa792b571e9dd6f35958a28bb19a8be5330a6ae63eea68c2a7b9d7a37326ba0881a40462b4
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.144
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.144.gem
27
+ gem install ./ultracart_api-3.10.145.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.144.gem` to install the development dependencies)
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.144'
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 with validation
685
- # @param [Object] usable_by Value to be assigned
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
- if !usable_by.nil? && usable_by.to_s.length > 50
688
- fail ArgumentError, 'invalid value for "usable_by", the character length must be smaller than or equal to 50.'
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
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.144'
14
+ VERSION = '3.10.145'
15
15
  end
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.144
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-15 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus