ultracart_api 3.8.2 → 3.8.5

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: ca6fcd6b38c2028518ee26e9fe47536e68d689cfd36fde62e82785886d897728
4
- data.tar.gz: f9091412de255d297c8d4b82b9d252f89788f386cd6b73b6826c3d84dcef1f30
3
+ metadata.gz: cf5d7299ac7cec6283cad21854c0553d612b51c3db332a89bb2e615ca849e5ca
4
+ data.tar.gz: 52af10f64882802aa7ccd617657c6cd7cee92cc0ee6a0ce32eb8802b48d45ae7
5
5
  SHA512:
6
- metadata.gz: e334f9c3ea1113fcb3f2ba2617b21612bbf616f132383f0ec9b449c035119078ab469272dbe22b7e87114aa06c2d9099ecea3bdb6c2d1eddd5a84e64bd409712
7
- data.tar.gz: 046c6501f2cc2ec2642e634c66679eb114c2ebda519fdccf35a45ad82007d70cbbefb195dbb2a969b598ef9f64371913faadf26beca54c429632bbdbefc33b16
6
+ metadata.gz: e3c0226e47f35ec46be9dcc1b70c1f844103e9b7f8ce4af57fe36e36b1776c94ad695869b7bd69e1dce9799d3913c539c1c4c86078bf281baf9ed059bf3891ad
7
+ data.tar.gz: dd0140c3ec4843a6b02b72b8831c6bafcd926dc447eea3f27c877e7a9c4684cff076dd0994e708d263dc02a3fb531c0dda48abb4139288d275869a5fc8b96a28
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.8.2
10
+ - Package version: 3.8.5
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.8.2.gem
27
+ gem install ./ultracart_api-3.8.5.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.8.2.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.8.5.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.8.2'
35
+ gem 'ultracart_api', '~> 3.8.5'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -545,6 +545,7 @@ Class | Method | HTTP request | Description
545
545
  - [UltracartClient::CouponAmountOffSubtotalWithBlockPurchase](docs/CouponAmountOffSubtotalWithBlockPurchase.md)
546
546
  - [UltracartClient::CouponAmountOffSubtotalWithItemsPurchase](docs/CouponAmountOffSubtotalWithItemsPurchase.md)
547
547
  - [UltracartClient::CouponAmountOffSubtotalWithPurchase](docs/CouponAmountOffSubtotalWithPurchase.md)
548
+ - [UltracartClient::CouponAmountShippingWithSubtotal](docs/CouponAmountShippingWithSubtotal.md)
548
549
  - [UltracartClient::CouponAutoApplyCondition](docs/CouponAutoApplyCondition.md)
549
550
  - [UltracartClient::CouponAutoApplyConditions](docs/CouponAutoApplyConditions.md)
550
551
  - [UltracartClient::CouponAutomaticallyApplyCouponCodes](docs/CouponAutomaticallyApplyCouponCodes.md)
@@ -1145,6 +1146,7 @@ Not every change is committed to every SDK.
1145
1146
 
1146
1147
  | Version | Date | Comments |
1147
1148
  | --: | :-: | --- |
1149
+ | 3.8.5 | 02/25/2022 | new coupon for fixed cost shipping method |
1148
1150
  | 3.8.2 | 02/16/2022 | create gift certificate method was missing email |
1149
1151
  | 3.8.1 | 02/16/2022 | auto order item level pause flag |
1150
1152
  | 3.8.0 | 02/16/2022 | gift certificate api (testing) |
data/docs/Coupon.md CHANGED
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **amount_off_subtotal_with_block_purchase** | [**CouponAmountOffSubtotalWithBlockPurchase**](CouponAmountOffSubtotalWithBlockPurchase.md) | | [optional]
15
15
  **amount_off_subtotal_with_items_purchase** | [**CouponAmountOffSubtotalWithItemsPurchase**](CouponAmountOffSubtotalWithItemsPurchase.md) | | [optional]
16
16
  **amount_off_subtotal_with_purchase** | [**CouponAmountOffSubtotalWithPurchase**](CouponAmountOffSubtotalWithPurchase.md) | | [optional]
17
+ **amount_shipping_with_subtotal** | [**CouponAmountShippingWithSubtotal**](CouponAmountShippingWithSubtotal.md) | | [optional]
17
18
  **automatically_apply_coupon_codes** | [**CouponAutomaticallyApplyCouponCodes**](CouponAutomaticallyApplyCouponCodes.md) | | [optional]
18
19
  **buy_one_get_one** | [**CouponBuyOneGetOneLimit**](CouponBuyOneGetOneLimit.md) | | [optional]
19
20
  **calculated_description** | **String** | Calculated description displayed to the customer if no description is specified. | [optional]
@@ -0,0 +1,11 @@
1
+ # UltracartClient::CouponAmountShippingWithSubtotal
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **currency_code** | **String** | The ISO-4217 three letter currency code the customer is viewing prices in | [optional]
7
+ **purchase_amount** | **Float** | The purchase amount to qualify for subtotal discount and free shipping | [optional]
8
+ **shipping_amount** | **Float** | The amount of the shipping cost (this is not a discount, this is the actual cost of shipping) | [optional]
9
+ **shipping_methods** | **Array<String>** | One or more shipping methods that may be used with this coupon | [optional]
10
+
11
+
@@ -38,6 +38,8 @@ module UltracartClient
38
38
 
39
39
  attr_accessor :amount_off_subtotal_with_purchase
40
40
 
41
+ attr_accessor :amount_shipping_with_subtotal
42
+
41
43
  attr_accessor :automatically_apply_coupon_codes
42
44
 
43
45
  attr_accessor :buy_one_get_one
@@ -164,6 +166,7 @@ module UltracartClient
164
166
  :'amount_off_subtotal_with_block_purchase' => :'amount_off_subtotal_with_block_purchase',
165
167
  :'amount_off_subtotal_with_items_purchase' => :'amount_off_subtotal_with_items_purchase',
166
168
  :'amount_off_subtotal_with_purchase' => :'amount_off_subtotal_with_purchase',
169
+ :'amount_shipping_with_subtotal' => :'amount_shipping_with_subtotal',
167
170
  :'automatically_apply_coupon_codes' => :'automatically_apply_coupon_codes',
168
171
  :'buy_one_get_one' => :'buy_one_get_one',
169
172
  :'calculated_description' => :'calculated_description',
@@ -229,6 +232,7 @@ module UltracartClient
229
232
  :'amount_off_subtotal_with_block_purchase' => :'CouponAmountOffSubtotalWithBlockPurchase',
230
233
  :'amount_off_subtotal_with_items_purchase' => :'CouponAmountOffSubtotalWithItemsPurchase',
231
234
  :'amount_off_subtotal_with_purchase' => :'CouponAmountOffSubtotalWithPurchase',
235
+ :'amount_shipping_with_subtotal' => :'CouponAmountShippingWithSubtotal',
232
236
  :'automatically_apply_coupon_codes' => :'CouponAutomaticallyApplyCouponCodes',
233
237
  :'buy_one_get_one' => :'CouponBuyOneGetOneLimit',
234
238
  :'calculated_description' => :'String',
@@ -332,6 +336,10 @@ module UltracartClient
332
336
  self.amount_off_subtotal_with_purchase = attributes[:'amount_off_subtotal_with_purchase']
333
337
  end
334
338
 
339
+ if attributes.has_key?(:'amount_shipping_with_subtotal')
340
+ self.amount_shipping_with_subtotal = attributes[:'amount_shipping_with_subtotal']
341
+ end
342
+
335
343
  if attributes.has_key?(:'automatically_apply_coupon_codes')
336
344
  self.automatically_apply_coupon_codes = attributes[:'automatically_apply_coupon_codes']
337
345
  end
@@ -650,6 +658,7 @@ module UltracartClient
650
658
  amount_off_subtotal_with_block_purchase == o.amount_off_subtotal_with_block_purchase &&
651
659
  amount_off_subtotal_with_items_purchase == o.amount_off_subtotal_with_items_purchase &&
652
660
  amount_off_subtotal_with_purchase == o.amount_off_subtotal_with_purchase &&
661
+ amount_shipping_with_subtotal == o.amount_shipping_with_subtotal &&
653
662
  automatically_apply_coupon_codes == o.automatically_apply_coupon_codes &&
654
663
  buy_one_get_one == o.buy_one_get_one &&
655
664
  calculated_description == o.calculated_description &&
@@ -709,7 +718,7 @@ module UltracartClient
709
718
  # Calculates hash code according to all attributes.
710
719
  # @return [Fixnum] Hash code
711
720
  def hash
712
- [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, 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
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
713
722
  end
714
723
 
715
724
  # Builds the object from hash
@@ -0,0 +1,232 @@
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 CouponAmountShippingWithSubtotal
17
+ # The ISO-4217 three letter currency code the customer is viewing prices in
18
+ attr_accessor :currency_code
19
+
20
+ # The purchase amount to qualify for subtotal discount and free shipping
21
+ attr_accessor :purchase_amount
22
+
23
+ # The amount of the shipping cost (this is not a discount, this is the actual cost of shipping)
24
+ attr_accessor :shipping_amount
25
+
26
+ # One or more shipping methods that may be used with this coupon
27
+ attr_accessor :shipping_methods
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'currency_code' => :'currency_code',
33
+ :'purchase_amount' => :'purchase_amount',
34
+ :'shipping_amount' => :'shipping_amount',
35
+ :'shipping_methods' => :'shipping_methods'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'currency_code' => :'String',
43
+ :'purchase_amount' => :'Float',
44
+ :'shipping_amount' => :'Float',
45
+ :'shipping_methods' => :'Array<String>'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'currency_code')
58
+ self.currency_code = attributes[:'currency_code']
59
+ end
60
+
61
+ if attributes.has_key?(:'purchase_amount')
62
+ self.purchase_amount = attributes[:'purchase_amount']
63
+ end
64
+
65
+ if attributes.has_key?(:'shipping_amount')
66
+ self.shipping_amount = attributes[:'shipping_amount']
67
+ end
68
+
69
+ if attributes.has_key?(:'shipping_methods')
70
+ if (value = attributes[:'shipping_methods']).is_a?(Array)
71
+ self.shipping_methods = value
72
+ end
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ if !@currency_code.nil? && @currency_code.to_s.length > 3
81
+ invalid_properties.push('invalid value for "currency_code", the character length must be smaller than or equal to 3.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ return false if !@currency_code.nil? && @currency_code.to_s.length > 3
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] currency_code Value to be assigned
96
+ def currency_code=(currency_code)
97
+ if !currency_code.nil? && currency_code.to_s.length > 3
98
+ fail ArgumentError, 'invalid value for "currency_code", the character length must be smaller than or equal to 3.'
99
+ end
100
+
101
+ @currency_code = currency_code
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ currency_code == o.currency_code &&
110
+ purchase_amount == o.purchase_amount &&
111
+ shipping_amount == o.shipping_amount &&
112
+ shipping_methods == o.shipping_methods
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Fixnum] Hash code
123
+ def hash
124
+ [currency_code, purchase_amount, shipping_amount, shipping_methods].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ temp_model = UltracartClient.const_get(type).new
185
+ temp_model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.8.2'
14
+ VERSION = '3.8.5'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -129,6 +129,7 @@ require 'ultracart_api/models/coupon_amount_off_subtotal_free_shipping_with_purc
129
129
  require 'ultracart_api/models/coupon_amount_off_subtotal_with_block_purchase'
130
130
  require 'ultracart_api/models/coupon_amount_off_subtotal_with_items_purchase'
131
131
  require 'ultracart_api/models/coupon_amount_off_subtotal_with_purchase'
132
+ require 'ultracart_api/models/coupon_amount_shipping_with_subtotal'
132
133
  require 'ultracart_api/models/coupon_auto_apply_condition'
133
134
  require 'ultracart_api/models/coupon_auto_apply_conditions'
134
135
  require 'ultracart_api/models/coupon_automatically_apply_coupon_codes'
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.8.2
4
+ version: 3.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -318,6 +318,7 @@ files:
318
318
  - docs/CouponAmountOffSubtotalWithBlockPurchase.md
319
319
  - docs/CouponAmountOffSubtotalWithItemsPurchase.md
320
320
  - docs/CouponAmountOffSubtotalWithPurchase.md
321
+ - docs/CouponAmountShippingWithSubtotal.md
321
322
  - docs/CouponApi.md
322
323
  - docs/CouponAutoApplyCondition.md
323
324
  - docs/CouponAutoApplyConditions.md
@@ -1000,6 +1001,7 @@ files:
1000
1001
  - lib/ultracart_api/models/coupon_amount_off_subtotal_with_block_purchase.rb
1001
1002
  - lib/ultracart_api/models/coupon_amount_off_subtotal_with_items_purchase.rb
1002
1003
  - lib/ultracart_api/models/coupon_amount_off_subtotal_with_purchase.rb
1004
+ - lib/ultracart_api/models/coupon_amount_shipping_with_subtotal.rb
1003
1005
  - lib/ultracart_api/models/coupon_auto_apply_condition.rb
1004
1006
  - lib/ultracart_api/models/coupon_auto_apply_conditions.rb
1005
1007
  - lib/ultracart_api/models/coupon_automatically_apply_coupon_codes.rb