ultracart_api 4.0.77.rc → 4.0.78.rc

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: 639888558132173a7137fed8b1f5e1814b130db84cba9468cddedf3b283c0871
4
- data.tar.gz: f95221716e72505b7f945b72764058444f74e7d589ecf7bea98a5fa43ec83361
3
+ metadata.gz: 2a63519a00244042ec59c8b40925f38c293b1c1ad08112afbd3161ad2912b405
4
+ data.tar.gz: 563b3f35ffccc84f324a9b3d6205262bc974fd71098dda74ce5a74ee34953432
5
5
  SHA512:
6
- metadata.gz: 8a7cb390c2b99dd33a63dedc8f4905ac5e96ad8f786b673a3c8c1068fa7e0289bd97f3b426bd61cf00be282919be83a0b96348bd7a1aebbb7080df8e9b0357be
7
- data.tar.gz: 5659bb0b2c34683274a020427cd53a2d11a7e3a8519ccc4ec5be99744a7a33e2208d3405245d85643d156e1af49cf06834a5acd5f9cad0ada4dd6b1e9f6dbb69
6
+ metadata.gz: 2e2f84422be7e12670700e7950d41bffe3629682aa3f5c38b6323d5f80b596c7b6122d2af1268a5bf6d8522f563581d79035aedb7197e174e4650f338a9be5f0
7
+ data.tar.gz: 317bcf89cb9b313edcf7970c288c9987b21ba57042c49ef3dc21a60a8f88eeaf391b907d8f052ec74c28bda0ff78aec66f60a842e344055e3e6e832c33c38ba4
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.77.rc
10
+ - Package version: 4.0.78.rc
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.77.rc.gem
27
+ gem install ./ultracart_api-4.0.78.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.77.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.78.rc.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.77.rc'
36
+ gem 'ultracart_api', '~> 4.0.78.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -671,6 +671,7 @@ Class | Method | HTTP request | Description
671
671
  - [UltracartClient::CouponTieredPercentOffItems](docs/CouponTieredPercentOffItems.md)
672
672
  - [UltracartClient::CouponTieredPercentOffShipping](docs/CouponTieredPercentOffShipping.md)
673
673
  - [UltracartClient::CouponTieredPercentOffSubtotal](docs/CouponTieredPercentOffSubtotal.md)
674
+ - [UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP](docs/CouponTieredPercentOffSubtotalBasedOnMSRP.md)
674
675
  - [UltracartClient::CouponType](docs/CouponType.md)
675
676
  - [UltracartClient::CouponsRequest](docs/CouponsRequest.md)
676
677
  - [UltracartClient::CouponsResponse](docs/CouponsResponse.md)
@@ -1221,6 +1222,7 @@ Not every change is committed to every SDK.
1221
1222
 
1222
1223
  | Version | Date | Comments |
1223
1224
  | --: | :-: | --- |
1225
+ | 4.0.78-RC | 11/04/2022 | new coupon type percent based on msrp |
1224
1226
  | 4.0.77-RC | 10/31/2022 | communication bug fix on dup annonation |
1225
1227
  | 4.0.76-RC | 10/31/2022 | communications - addl statistics on EmailStepStat object |
1226
1228
  | 4.0.75-RC | 10/26/2022 | esp - methods for sms testing |
data/docs/Coupon.md CHANGED
@@ -63,6 +63,7 @@
63
63
  | **tiered_percent_off_items** | [**CouponTieredPercentOffItems**](CouponTieredPercentOffItems.md) | | [optional] |
64
64
  | **tiered_percent_off_shipping** | [**CouponTieredPercentOffShipping**](CouponTieredPercentOffShipping.md) | | [optional] |
65
65
  | **tiered_percent_off_subtotal** | [**CouponTieredPercentOffSubtotal**](CouponTieredPercentOffSubtotal.md) | | [optional] |
66
+ | **tiered_percent_off_subtotal_based_on_msrp** | [**CouponTieredPercentOffSubtotalBasedOnMSRP**](CouponTieredPercentOffSubtotalBasedOnMSRP.md) | | [optional] |
66
67
  | **usable_by** | **String** | Who may use this coupon. | [optional] |
67
68
 
68
69
  ## Example
@@ -130,6 +131,7 @@ instance = UltracartClient::Coupon.new(
130
131
  tiered_percent_off_items: null,
131
132
  tiered_percent_off_shipping: null,
132
133
  tiered_percent_off_subtotal: null,
134
+ tiered_percent_off_subtotal_based_on_msrp: null,
133
135
  usable_by: null
134
136
  )
135
137
  ```
@@ -0,0 +1,20 @@
1
+ # UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | **Array<String>** | An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount. | [optional] |
8
+ | **tiers** | [**Array<CouponTierPercent>**](CouponTierPercent.md) | A list of discount tiers. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP.new(
16
+ items: null,
17
+ tiers: null
18
+ )
19
+ ```
20
+
@@ -150,6 +150,8 @@ module UltracartClient
150
150
 
151
151
  attr_accessor :tiered_percent_off_subtotal
152
152
 
153
+ attr_accessor :tiered_percent_off_subtotal_based_on_msrp
154
+
153
155
  # Who may use this coupon.
154
156
  attr_accessor :usable_by
155
157
 
@@ -215,6 +217,7 @@ module UltracartClient
215
217
  :'tiered_percent_off_items' => :'tiered_percent_off_items',
216
218
  :'tiered_percent_off_shipping' => :'tiered_percent_off_shipping',
217
219
  :'tiered_percent_off_subtotal' => :'tiered_percent_off_subtotal',
220
+ :'tiered_percent_off_subtotal_based_on_msrp' => :'tiered_percent_off_subtotal_based_on_msrp',
218
221
  :'usable_by' => :'usable_by'
219
222
  }
220
223
  end
@@ -286,6 +289,7 @@ module UltracartClient
286
289
  :'tiered_percent_off_items' => :'CouponTieredPercentOffItems',
287
290
  :'tiered_percent_off_shipping' => :'CouponTieredPercentOffShipping',
288
291
  :'tiered_percent_off_subtotal' => :'CouponTieredPercentOffSubtotal',
292
+ :'tiered_percent_off_subtotal_based_on_msrp' => :'CouponTieredPercentOffSubtotalBasedOnMSRP',
289
293
  :'usable_by' => :'String'
290
294
  }
291
295
  end
@@ -553,6 +557,10 @@ module UltracartClient
553
557
  self.tiered_percent_off_subtotal = attributes[:'tiered_percent_off_subtotal']
554
558
  end
555
559
 
560
+ if attributes.key?(:'tiered_percent_off_subtotal_based_on_msrp')
561
+ self.tiered_percent_off_subtotal_based_on_msrp = attributes[:'tiered_percent_off_subtotal_based_on_msrp']
562
+ end
563
+
556
564
  if attributes.key?(:'usable_by')
557
565
  self.usable_by = attributes[:'usable_by']
558
566
  end
@@ -725,6 +733,7 @@ module UltracartClient
725
733
  tiered_percent_off_items == o.tiered_percent_off_items &&
726
734
  tiered_percent_off_shipping == o.tiered_percent_off_shipping &&
727
735
  tiered_percent_off_subtotal == o.tiered_percent_off_subtotal &&
736
+ tiered_percent_off_subtotal_based_on_msrp == o.tiered_percent_off_subtotal_based_on_msrp &&
728
737
  usable_by == o.usable_by
729
738
  end
730
739
 
@@ -737,7 +746,7 @@ module UltracartClient
737
746
  # Calculates hash code according to all attributes.
738
747
  # @return [Integer] Hash code
739
748
  def hash
740
- [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, usable_by].hash
749
+ [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
741
750
  end
742
751
 
743
752
  # Builds the object from hash
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CouponTieredPercentOffSubtotalBasedOnMSRP
18
+ # An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.
19
+ attr_accessor :items
20
+
21
+ # A list of discount tiers.
22
+ attr_accessor :tiers
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'items' => :'items',
28
+ :'tiers' => :'tiers'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'items' => :'Array<String>',
41
+ :'tiers' => :'Array<CouponTierPercent>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'items')
67
+ if (value = attributes[:'items']).is_a?(Array)
68
+ self.items = value
69
+ end
70
+ end
71
+
72
+ if attributes.key?(:'tiers')
73
+ if (value = attributes[:'tiers']).is_a?(Array)
74
+ self.tiers = value
75
+ end
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ items == o.items &&
98
+ tiers == o.tiers
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ def hash
110
+ [items, tiers].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def self.build_from_hash(attributes)
117
+ new.build_from_hash(attributes)
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ self.class.openapi_types.each_pair do |key, type|
127
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
128
+ self.send("#{key}=", nil)
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = UltracartClient.const_get(type)
182
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.77.rc'
14
+ VERSION = '4.0.78.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -221,6 +221,7 @@ require 'ultracart_api/models/coupon_tiered_amount_off_subtotal'
221
221
  require 'ultracart_api/models/coupon_tiered_percent_off_items'
222
222
  require 'ultracart_api/models/coupon_tiered_percent_off_shipping'
223
223
  require 'ultracart_api/models/coupon_tiered_percent_off_subtotal'
224
+ require 'ultracart_api/models/coupon_tiered_percent_off_subtotal_based_on_msrp'
224
225
  require 'ultracart_api/models/coupon_type'
225
226
  require 'ultracart_api/models/coupons_request'
226
227
  require 'ultracart_api/models/coupons_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: 4.0.77.rc
4
+ version: 4.0.78.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-31 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -272,6 +272,7 @@ files:
272
272
  - docs/CouponTieredPercentOffItems.md
273
273
  - docs/CouponTieredPercentOffShipping.md
274
274
  - docs/CouponTieredPercentOffSubtotal.md
275
+ - docs/CouponTieredPercentOffSubtotalBasedOnMSRP.md
275
276
  - docs/CouponType.md
276
277
  - docs/CouponsRequest.md
277
278
  - docs/CouponsResponse.md
@@ -989,6 +990,7 @@ files:
989
990
  - lib/ultracart_api/models/coupon_tiered_percent_off_items.rb
990
991
  - lib/ultracart_api/models/coupon_tiered_percent_off_shipping.rb
991
992
  - lib/ultracart_api/models/coupon_tiered_percent_off_subtotal.rb
993
+ - lib/ultracart_api/models/coupon_tiered_percent_off_subtotal_based_on_msrp.rb
992
994
  - lib/ultracart_api/models/coupon_type.rb
993
995
  - lib/ultracart_api/models/coupons_request.rb
994
996
  - lib/ultracart_api/models/coupons_response.rb