ultracart_api 3.10.60 → 3.10.61

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: 8ae39ba428e276a0e0b5fca7bf34a24f910b1f9475409615a6b72aa1b7de0c69
4
- data.tar.gz: 54b7663a30fe6d0e2a268b090579ac34cef3bf780ee1daf2f97fbe6fee5eddd1
3
+ metadata.gz: 73fd2025ea0492fa3978063c6dfe8e66023df7396e04c9c7f6a34cbbae41d50c
4
+ data.tar.gz: 26f8eaab1cef52da49672902b3a62e61cca79751c3dac871e082227b1a46eaaa
5
5
  SHA512:
6
- metadata.gz: 1e5cb568a899738c4e0fb60dc8cef31fc59ddf51c2813917a1b75978f346fcc95fbdd6bc031960ae3d073565d9ba7dcd6d456eee7d8e0169c49193ad5f8186a1
7
- data.tar.gz: d5170a0d52c150efc3501725b303105de10c6d0070f44637533290c8c723576cdc79f9f83a5d4092f1e28098e2930a2ad74b3a37d98c044bfd4ac97d91e5b6b1
6
+ metadata.gz: 132df3cbd73c9c1187f541834591018eae776816aa4bbc9b7790a647f352de6f8fa2ef7223fb66112370e3b605bf6fa958242591a085a50925c4ae173449f963
7
+ data.tar.gz: 75ad7ce06143f03c9a1a934a4af4be06359070f510f62c996bff65323c1b7d33ee960684fe9066592803a2b82ca2590baf679c9b19ae4dfd90f4f26486741eac
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.60
10
+ - Package version: 3.10.61
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.60.gem
27
+ gem install ./ultracart_api-3.10.61.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.60.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.61.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.60'
35
+ gem 'ultracart_api', '~> 3.10.61'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -665,6 +665,7 @@ Class | Method | HTTP request | Description
665
665
  - [UltracartClient::CouponTieredPercentOffItems](docs/CouponTieredPercentOffItems.md)
666
666
  - [UltracartClient::CouponTieredPercentOffShipping](docs/CouponTieredPercentOffShipping.md)
667
667
  - [UltracartClient::CouponTieredPercentOffSubtotal](docs/CouponTieredPercentOffSubtotal.md)
668
+ - [UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP](docs/CouponTieredPercentOffSubtotalBasedOnMSRP.md)
668
669
  - [UltracartClient::CouponType](docs/CouponType.md)
669
670
  - [UltracartClient::CouponsRequest](docs/CouponsRequest.md)
670
671
  - [UltracartClient::CouponsResponse](docs/CouponsResponse.md)
@@ -1212,6 +1213,7 @@ Not every change is committed to every SDK.
1212
1213
 
1213
1214
  | Version | Date | Comments |
1214
1215
  | --: | :-: | --- |
1216
+ | 3.10.61 | 11/04/2022 | new coupon type percent based on msrp |
1215
1217
  | 3.10.60 | 10/31/2022 | communication bug fix on dup annonation |
1216
1218
  | 3.10.59 | 10/31/2022 | communications - addl statistics on EmailStepStat object |
1217
1219
  | 3.10.58 | 10/26/2022 | esp - methods for sms testing |
data/docs/Coupon.md CHANGED
@@ -62,6 +62,7 @@ Name | Type | Description | Notes
62
62
  **tiered_percent_off_items** | [**CouponTieredPercentOffItems**](CouponTieredPercentOffItems.md) | | [optional]
63
63
  **tiered_percent_off_shipping** | [**CouponTieredPercentOffShipping**](CouponTieredPercentOffShipping.md) | | [optional]
64
64
  **tiered_percent_off_subtotal** | [**CouponTieredPercentOffSubtotal**](CouponTieredPercentOffSubtotal.md) | | [optional]
65
+ **tiered_percent_off_subtotal_based_on_msrp** | [**CouponTieredPercentOffSubtotalBasedOnMSRP**](CouponTieredPercentOffSubtotalBasedOnMSRP.md) | | [optional]
65
66
  **usable_by** | **String** | Who may use this coupon. | [optional]
66
67
 
67
68
 
@@ -0,0 +1,9 @@
1
+ # UltracartClient::CouponTieredPercentOffSubtotalBasedOnMSRP
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **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]
7
+ **tiers** | [**Array<CouponTierPercent>**](CouponTierPercent.md) | A list of discount tiers. | [optional]
8
+
9
+
@@ -149,6 +149,8 @@ module UltracartClient
149
149
 
150
150
  attr_accessor :tiered_percent_off_subtotal
151
151
 
152
+ attr_accessor :tiered_percent_off_subtotal_based_on_msrp
153
+
152
154
  # Who may use this coupon.
153
155
  attr_accessor :usable_by
154
156
 
@@ -214,6 +216,7 @@ module UltracartClient
214
216
  :'tiered_percent_off_items' => :'tiered_percent_off_items',
215
217
  :'tiered_percent_off_shipping' => :'tiered_percent_off_shipping',
216
218
  :'tiered_percent_off_subtotal' => :'tiered_percent_off_subtotal',
219
+ :'tiered_percent_off_subtotal_based_on_msrp' => :'tiered_percent_off_subtotal_based_on_msrp',
217
220
  :'usable_by' => :'usable_by'
218
221
  }
219
222
  end
@@ -280,6 +283,7 @@ module UltracartClient
280
283
  :'tiered_percent_off_items' => :'CouponTieredPercentOffItems',
281
284
  :'tiered_percent_off_shipping' => :'CouponTieredPercentOffShipping',
282
285
  :'tiered_percent_off_subtotal' => :'CouponTieredPercentOffSubtotal',
286
+ :'tiered_percent_off_subtotal_based_on_msrp' => :'CouponTieredPercentOffSubtotalBasedOnMSRP',
283
287
  :'usable_by' => :'String'
284
288
  }
285
289
  end
@@ -534,6 +538,10 @@ module UltracartClient
534
538
  self.tiered_percent_off_subtotal = attributes[:'tiered_percent_off_subtotal']
535
539
  end
536
540
 
541
+ if attributes.has_key?(:'tiered_percent_off_subtotal_based_on_msrp')
542
+ self.tiered_percent_off_subtotal_based_on_msrp = attributes[:'tiered_percent_off_subtotal_based_on_msrp']
543
+ end
544
+
537
545
  if attributes.has_key?(:'usable_by')
538
546
  self.usable_by = attributes[:'usable_by']
539
547
  end
@@ -706,6 +714,7 @@ module UltracartClient
706
714
  tiered_percent_off_items == o.tiered_percent_off_items &&
707
715
  tiered_percent_off_shipping == o.tiered_percent_off_shipping &&
708
716
  tiered_percent_off_subtotal == o.tiered_percent_off_subtotal &&
717
+ tiered_percent_off_subtotal_based_on_msrp == o.tiered_percent_off_subtotal_based_on_msrp &&
709
718
  usable_by == o.usable_by
710
719
  end
711
720
 
@@ -718,7 +727,7 @@ module UltracartClient
718
727
  # Calculates hash code according to all attributes.
719
728
  # @return [Fixnum] Hash code
720
729
  def hash
721
- [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
730
+ [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
722
731
  end
723
732
 
724
733
  # Builds the object from hash
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class CouponTieredPercentOffSubtotalBasedOnMSRP
17
+ # 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.
18
+ attr_accessor :items
19
+
20
+ # A list of discount tiers.
21
+ attr_accessor :tiers
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'items' => :'items',
27
+ :'tiers' => :'tiers'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'items' => :'Array<String>',
35
+ :'tiers' => :'Array<CouponTierPercent>'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'items')
48
+ if (value = attributes[:'items']).is_a?(Array)
49
+ self.items = value
50
+ end
51
+ end
52
+
53
+ if attributes.has_key?(:'tiers')
54
+ if (value = attributes[:'tiers']).is_a?(Array)
55
+ self.tiers = value
56
+ end
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ invalid_properties
65
+ end
66
+
67
+ # Check to see if the all the properties in the model are valid
68
+ # @return true if the model is valid
69
+ def valid?
70
+ true
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ items == o.items &&
79
+ tiers == o.tiers
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Fixnum] Hash code
90
+ def hash
91
+ [items, tiers].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def build_from_hash(attributes)
98
+ return nil unless attributes.is_a?(Hash)
99
+ self.class.swagger_types.each_pair do |key, type|
100
+ if type =~ /\AArray<(.*)>/i
101
+ # check to ensure the input is an array given that the attribute
102
+ # is documented as an array but the input is not
103
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
104
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
105
+ end
106
+ elsif !attributes[self.class.attribute_map[key]].nil?
107
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
109
+ end
110
+
111
+ self
112
+ end
113
+
114
+ # Deserializes the data based on type
115
+ # @param string type Data type
116
+ # @param string value Value to be deserialized
117
+ # @return [Object] Deserialized data
118
+ def _deserialize(type, value)
119
+ case type.to_sym
120
+ when :DateTime
121
+ DateTime.parse(value)
122
+ when :Date
123
+ Date.parse(value)
124
+ when :String
125
+ value.to_s
126
+ when :Integer
127
+ value.to_i
128
+ when :Float
129
+ value.to_f
130
+ when :BOOLEAN
131
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
132
+ true
133
+ else
134
+ false
135
+ end
136
+ when :Object
137
+ # generic object (usually a Hash), return directly
138
+ value
139
+ when /\AArray<(?<inner_type>.+)>\z/
140
+ inner_type = Regexp.last_match[:inner_type]
141
+ value.map { |v| _deserialize(inner_type, v) }
142
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
143
+ k_type = Regexp.last_match[:k_type]
144
+ v_type = Regexp.last_match[:v_type]
145
+ {}.tap do |hash|
146
+ value.each do |k, v|
147
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
148
+ end
149
+ end
150
+ else # model
151
+ temp_model = UltracartClient.const_get(type).new
152
+ temp_model.build_from_hash(value)
153
+ end
154
+ end
155
+
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
158
+ def to_s
159
+ to_hash.to_s
160
+ end
161
+
162
+ # to_body is an alias to to_hash (backward compatibility)
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_body
165
+ to_hash
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ next if value.nil?
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ # Outputs non-array value in the form of hash
181
+ # For object, use to_hash. Otherwise, just return the value
182
+ # @param [Object] value Any valid value
183
+ # @return [Hash] Returns the value in the form of hash
184
+ def _to_hash(value)
185
+ if value.is_a?(Array)
186
+ value.compact.map { |v| _to_hash(v) }
187
+ elsif value.is_a?(Hash)
188
+ {}.tap do |hash|
189
+ value.each { |k, v| hash[k] = _to_hash(v) }
190
+ end
191
+ elsif value.respond_to? :to_hash
192
+ value.to_hash
193
+ else
194
+ value
195
+ end
196
+ end
197
+
198
+ end
199
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.60'
14
+ VERSION = '3.10.61'
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: 3.10.60
4
+ version: 3.10.61
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
@@ -432,6 +432,7 @@ files:
432
432
  - docs/CouponTieredPercentOffItems.md
433
433
  - docs/CouponTieredPercentOffShipping.md
434
434
  - docs/CouponTieredPercentOffSubtotal.md
435
+ - docs/CouponTieredPercentOffSubtotalBasedOnMSRP.md
435
436
  - docs/CouponType.md
436
437
  - docs/CouponsRequest.md
437
438
  - docs/CouponsResponse.md
@@ -1149,6 +1150,7 @@ files:
1149
1150
  - lib/ultracart_api/models/coupon_tiered_percent_off_items.rb
1150
1151
  - lib/ultracart_api/models/coupon_tiered_percent_off_shipping.rb
1151
1152
  - lib/ultracart_api/models/coupon_tiered_percent_off_subtotal.rb
1153
+ - lib/ultracart_api/models/coupon_tiered_percent_off_subtotal_based_on_msrp.rb
1152
1154
  - lib/ultracart_api/models/coupon_type.rb
1153
1155
  - lib/ultracart_api/models/coupons_request.rb
1154
1156
  - lib/ultracart_api/models/coupons_response.rb