ultracart_api 3.5.1 → 3.5.2

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: f6262d882ea4fe642d39f1e6e1f5a8b1429b0153d7eccd18bb3cfb36a2eb8c81
4
- data.tar.gz: 6b8f0ef3ae1dccde014b2e3c95f9a73338762546def0aa120cd9c6e8f94a36e4
3
+ metadata.gz: a244f30a45d82996bf3cdedda60c37aa05608acb2e2c373b9d198a914adff55f
4
+ data.tar.gz: e9677070c832354ca98e9c8043559473ff4a0d303e6add1d34a2cd893e449408
5
5
  SHA512:
6
- metadata.gz: 382574e46088303307cf2b9848583a3abe57051b4145d78d876eecfcbdfb456fac79132a345aba40715d2a72630348ca564575c506a80427706da9217ba03dcd
7
- data.tar.gz: 9a8ba86ad0f93ade42fe090d8c5621556dd3c7811e7db4a5cf7078f59e39a1d2b9413e36985e33a809f4237a69e41cf2f74625450a37c891e9896072c267c4af
6
+ metadata.gz: 2c0c1ad66bfb6e2593216208341aab5ca045431bc9aa004483ff5288503e1013e5e9e1a211bd04a3141cf8ebd10a36c799904cef4a3686db8e6f920bf1e7d4f8
7
+ data.tar.gz: db33323db36da46150dea5535637a82a1331ac0f00106de25583e8406a8a3e537d0325440803cbfc63d1ace5355a3c91001fda14d9b6aabcd8b5319fc41c73e3
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.5.1
10
+ - Package version: 3.5.2
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.5.1.gem
27
+ gem install ./ultracart_api-3.5.2.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.5.1.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.5.2.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.5.1'
35
+ gem 'ultracart_api', '~> 3.5.2'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **channel_partner_code** | **String** | The code of the channel partner | [optional]
8
8
  **channel_partner_data** | **String** | Additional data provided by the channel partner, read-only | [optional]
9
9
  **channel_partner_oid** | **Integer** | Channel partner object identifier, read-only and available on existing channel orders only. | [optional]
10
- **channel_partner_order_id** | **String** | The order ID assigned by the channel partner for this order | [optional]
10
+ **channel_partner_order_id** | **String** | The order ID assigned by the channel partner for this order. | [optional]
11
11
  **ignore_invalid_shipping_method** | **BOOLEAN** | Set to true to ignore invalid shipping method being specified. Only applicable on inserting orders. | [optional]
12
12
  **no_realtime_payment_processing** | **BOOLEAN** | Indicates this order should be placed in Account Receivable for later payment processing | [optional]
13
13
  **skip_payment_processing** | **BOOLEAN** | Indicates this order was already paid for via a channel purchase and no payment collection should be attempted | [optional]
@@ -10,7 +10,6 @@ Name | Type | Description | Notes
10
10
  **configured_gateway_details** | **String** | Human readable description of the credit card gateway currently configured | [optional]
11
11
  **failed_attempts** | **Integer** | The number of failed attempts before the order is placed into Accounts Receivable for manual intervention | [optional]
12
12
  **hide_connect_single_gateway** | **BOOLEAN** | This internal flag aids the UI in determining which buttons to show. | [optional]
13
- **restrictions** | [**Array<PaymentsConfigurationRestrictions>**](PaymentsConfigurationRestrictions.md) | Restrictions for this payment method | [optional]
14
13
  **send_customer_billing_update_on_decline** | **BOOLEAN** | UltraCart will send customers emails to update their credit card if the card is declined | [optional]
15
14
  **supported_cards** | [**Array<PaymentsConfigurationCreditCardType>**](PaymentsConfigurationCreditCardType.md) | A list of credit cards the merchant wishes to accept. | [optional]
16
15
  **test_methods** | [**Array<PaymentsConfigurationTestMethod>**](PaymentsConfigurationTestMethod.md) | An array of test methods for placing test orders. The cards defined here may be real or fake, but any order placed with them will be marked as Test orders | [optional]
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
10
10
  **enabled** | **BOOLEAN** | If true, this card type will be accepted during checkout | [optional]
11
11
  **processing_fee** | **Float** | Optional additional fee applied to order for this card | [optional]
12
12
  **processing_percentage** | **Float** | Optional additional fee applied to order for this card | [optional]
13
+ **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
13
14
  **surcharge_accounting_code** | **String** | Optional field. If integrated with Quickbooks, this code will be used when informing Quickbooks about any surcharges applied to orders | [optional]
14
15
  **transaction_fee** | **Float** | An optional additional fee to charge the customer for using this card. | [optional]
15
16
  **transaction_percentage** | **Float** | An optional transaction percentage to charge the customer for using this card | [optional]
@@ -26,7 +26,7 @@ module UltracartClient
26
26
  # Channel partner object identifier, read-only and available on existing channel orders only.
27
27
  attr_accessor :channel_partner_oid
28
28
 
29
- # The order ID assigned by the channel partner for this order
29
+ # The order ID assigned by the channel partner for this order.
30
30
  attr_accessor :channel_partner_order_id
31
31
 
32
32
  # Set to true to ignore invalid shipping method being specified. Only applicable on inserting orders.
@@ -138,15 +138,30 @@ module UltracartClient
138
138
  # @return Array for valid properties with the reasons
139
139
  def list_invalid_properties
140
140
  invalid_properties = Array.new
141
+ if !@channel_partner_order_id.nil? && @channel_partner_order_id.to_s.length > 50
142
+ invalid_properties.push('invalid value for "channel_partner_order_id", the character length must be smaller than or equal to 50.')
143
+ end
144
+
141
145
  invalid_properties
142
146
  end
143
147
 
144
148
  # Check to see if the all the properties in the model are valid
145
149
  # @return true if the model is valid
146
150
  def valid?
151
+ return false if !@channel_partner_order_id.nil? && @channel_partner_order_id.to_s.length > 50
147
152
  true
148
153
  end
149
154
 
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] channel_partner_order_id Value to be assigned
157
+ def channel_partner_order_id=(channel_partner_order_id)
158
+ if !channel_partner_order_id.nil? && channel_partner_order_id.to_s.length > 50
159
+ fail ArgumentError, 'invalid value for "channel_partner_order_id", the character length must be smaller than or equal to 50.'
160
+ end
161
+
162
+ @channel_partner_order_id = channel_partner_order_id
163
+ end
164
+
150
165
  # Checks equality by comparing each attribute.
151
166
  # @param [Object] Object to be compared
152
167
  def ==(o)
@@ -35,9 +35,6 @@ module UltracartClient
35
35
  # This internal flag aids the UI in determining which buttons to show.
36
36
  attr_accessor :hide_connect_single_gateway
37
37
 
38
- # Restrictions for this payment method
39
- attr_accessor :restrictions
40
-
41
38
  # UltraCart will send customers emails to update their credit card if the card is declined
42
39
  attr_accessor :send_customer_billing_update_on_decline
43
40
 
@@ -57,7 +54,6 @@ module UltracartClient
57
54
  :'configured_gateway_details' => :'configured_gateway_details',
58
55
  :'failed_attempts' => :'failed_attempts',
59
56
  :'hide_connect_single_gateway' => :'hide_connect_single_gateway',
60
- :'restrictions' => :'restrictions',
61
57
  :'send_customer_billing_update_on_decline' => :'send_customer_billing_update_on_decline',
62
58
  :'supported_cards' => :'supported_cards',
63
59
  :'test_methods' => :'test_methods'
@@ -74,7 +70,6 @@ module UltracartClient
74
70
  :'configured_gateway_details' => :'String',
75
71
  :'failed_attempts' => :'Integer',
76
72
  :'hide_connect_single_gateway' => :'BOOLEAN',
77
- :'restrictions' => :'Array<PaymentsConfigurationRestrictions>',
78
73
  :'send_customer_billing_update_on_decline' => :'BOOLEAN',
79
74
  :'supported_cards' => :'Array<PaymentsConfigurationCreditCardType>',
80
75
  :'test_methods' => :'Array<PaymentsConfigurationTestMethod>'
@@ -117,12 +112,6 @@ module UltracartClient
117
112
  self.hide_connect_single_gateway = attributes[:'hide_connect_single_gateway']
118
113
  end
119
114
 
120
- if attributes.has_key?(:'restrictions')
121
- if (value = attributes[:'restrictions']).is_a?(Array)
122
- self.restrictions = value
123
- end
124
- end
125
-
126
115
  if attributes.has_key?(:'send_customer_billing_update_on_decline')
127
116
  self.send_customer_billing_update_on_decline = attributes[:'send_customer_billing_update_on_decline']
128
117
  end
@@ -165,7 +154,6 @@ module UltracartClient
165
154
  configured_gateway_details == o.configured_gateway_details &&
166
155
  failed_attempts == o.failed_attempts &&
167
156
  hide_connect_single_gateway == o.hide_connect_single_gateway &&
168
- restrictions == o.restrictions &&
169
157
  send_customer_billing_update_on_decline == o.send_customer_billing_update_on_decline &&
170
158
  supported_cards == o.supported_cards &&
171
159
  test_methods == o.test_methods
@@ -180,7 +168,7 @@ module UltracartClient
180
168
  # Calculates hash code according to all attributes.
181
169
  # @return [Fixnum] Hash code
182
170
  def hash
183
- [accept_credit_card, billed_by, charge_during_checkout, collect_cvv2, configured_gateway_details, failed_attempts, hide_connect_single_gateway, restrictions, send_customer_billing_update_on_decline, supported_cards, test_methods].hash
171
+ [accept_credit_card, billed_by, charge_during_checkout, collect_cvv2, configured_gateway_details, failed_attempts, hide_connect_single_gateway, send_customer_billing_update_on_decline, supported_cards, test_methods].hash
184
172
  end
185
173
 
186
174
  # Builds the object from hash
@@ -35,6 +35,8 @@ module UltracartClient
35
35
  # Optional additional fee applied to order for this card
36
36
  attr_accessor :processing_percentage
37
37
 
38
+ attr_accessor :restrictions
39
+
38
40
  # Optional field. If integrated with Quickbooks, this code will be used when informing Quickbooks about any surcharges applied to orders
39
41
  attr_accessor :surcharge_accounting_code
40
42
 
@@ -76,6 +78,7 @@ module UltracartClient
76
78
  :'enabled' => :'enabled',
77
79
  :'processing_fee' => :'processing_fee',
78
80
  :'processing_percentage' => :'processing_percentage',
81
+ :'restrictions' => :'restrictions',
79
82
  :'surcharge_accounting_code' => :'surcharge_accounting_code',
80
83
  :'transaction_fee' => :'transaction_fee',
81
84
  :'transaction_percentage' => :'transaction_percentage'
@@ -92,6 +95,7 @@ module UltracartClient
92
95
  :'enabled' => :'BOOLEAN',
93
96
  :'processing_fee' => :'Float',
94
97
  :'processing_percentage' => :'Float',
98
+ :'restrictions' => :'PaymentsConfigurationRestrictions',
95
99
  :'surcharge_accounting_code' => :'String',
96
100
  :'transaction_fee' => :'Float',
97
101
  :'transaction_percentage' => :'Float'
@@ -134,6 +138,10 @@ module UltracartClient
134
138
  self.processing_percentage = attributes[:'processing_percentage']
135
139
  end
136
140
 
141
+ if attributes.has_key?(:'restrictions')
142
+ self.restrictions = attributes[:'restrictions']
143
+ end
144
+
137
145
  if attributes.has_key?(:'surcharge_accounting_code')
138
146
  self.surcharge_accounting_code = attributes[:'surcharge_accounting_code']
139
147
  end
@@ -184,6 +192,7 @@ module UltracartClient
184
192
  enabled == o.enabled &&
185
193
  processing_fee == o.processing_fee &&
186
194
  processing_percentage == o.processing_percentage &&
195
+ restrictions == o.restrictions &&
187
196
  surcharge_accounting_code == o.surcharge_accounting_code &&
188
197
  transaction_fee == o.transaction_fee &&
189
198
  transaction_percentage == o.transaction_percentage
@@ -198,7 +207,7 @@ module UltracartClient
198
207
  # Calculates hash code according to all attributes.
199
208
  # @return [Fixnum] Hash code
200
209
  def hash
201
- [accounting_code, card_type_icon, credit_card, deposit_to_account, enabled, processing_fee, processing_percentage, surcharge_accounting_code, transaction_fee, transaction_percentage].hash
210
+ [accounting_code, card_type_icon, credit_card, deposit_to_account, enabled, processing_fee, processing_percentage, restrictions, surcharge_accounting_code, transaction_fee, transaction_percentage].hash
202
211
  end
203
212
 
204
213
  # Builds the object from hash
@@ -54,6 +54,28 @@ module UltracartClient
54
54
 
55
55
  attr_accessor :themes
56
56
 
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
57
79
  # Attribute mapping from ruby-style variable name to JSON key.
58
80
  def self.attribute_map
59
81
  {
@@ -173,9 +195,117 @@ module UltracartClient
173
195
  # Check to see if the all the properties in the model are valid
174
196
  # @return true if the model is valid
175
197
  def valid?
198
+ restriction_alaska_hawaii_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
199
+ return false unless restriction_alaska_hawaii_validator.valid?(@restriction_alaska_hawaii)
200
+ restriction_apo_fpo_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
201
+ return false unless restriction_apo_fpo_validator.valid?(@restriction_apo_fpo)
202
+ restriction_canada_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
203
+ return false unless restriction_canada_validator.valid?(@restriction_canada)
204
+ restriction_continental_us_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
205
+ return false unless restriction_continental_us_validator.valid?(@restriction_continental_us)
206
+ restriction_domestic_only_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
207
+ return false unless restriction_domestic_only_validator.valid?(@restriction_domestic_only)
208
+ restriction_international_only_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
209
+ return false unless restriction_international_only_validator.valid?(@restriction_international_only)
210
+ restriction_po_box_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
211
+ return false unless restriction_po_box_validator.valid?(@restriction_po_box)
212
+ restriction_puerto_rico_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
213
+ return false unless restriction_puerto_rico_validator.valid?(@restriction_puerto_rico)
214
+ restriction_us_territories_validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
215
+ return false unless restriction_us_territories_validator.valid?(@restriction_us_territories)
176
216
  true
177
217
  end
178
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] restriction_alaska_hawaii Object to be assigned
221
+ def restriction_alaska_hawaii=(restriction_alaska_hawaii)
222
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
223
+ unless validator.valid?(restriction_alaska_hawaii)
224
+ fail ArgumentError, 'invalid value for "restriction_alaska_hawaii", must be one of #{validator.allowable_values}.'
225
+ end
226
+ @restriction_alaska_hawaii = restriction_alaska_hawaii
227
+ end
228
+
229
+ # Custom attribute writer method checking allowed values (enum).
230
+ # @param [Object] restriction_apo_fpo Object to be assigned
231
+ def restriction_apo_fpo=(restriction_apo_fpo)
232
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
233
+ unless validator.valid?(restriction_apo_fpo)
234
+ fail ArgumentError, 'invalid value for "restriction_apo_fpo", must be one of #{validator.allowable_values}.'
235
+ end
236
+ @restriction_apo_fpo = restriction_apo_fpo
237
+ end
238
+
239
+ # Custom attribute writer method checking allowed values (enum).
240
+ # @param [Object] restriction_canada Object to be assigned
241
+ def restriction_canada=(restriction_canada)
242
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
243
+ unless validator.valid?(restriction_canada)
244
+ fail ArgumentError, 'invalid value for "restriction_canada", must be one of #{validator.allowable_values}.'
245
+ end
246
+ @restriction_canada = restriction_canada
247
+ end
248
+
249
+ # Custom attribute writer method checking allowed values (enum).
250
+ # @param [Object] restriction_continental_us Object to be assigned
251
+ def restriction_continental_us=(restriction_continental_us)
252
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
253
+ unless validator.valid?(restriction_continental_us)
254
+ fail ArgumentError, 'invalid value for "restriction_continental_us", must be one of #{validator.allowable_values}.'
255
+ end
256
+ @restriction_continental_us = restriction_continental_us
257
+ end
258
+
259
+ # Custom attribute writer method checking allowed values (enum).
260
+ # @param [Object] restriction_domestic_only Object to be assigned
261
+ def restriction_domestic_only=(restriction_domestic_only)
262
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
263
+ unless validator.valid?(restriction_domestic_only)
264
+ fail ArgumentError, 'invalid value for "restriction_domestic_only", must be one of #{validator.allowable_values}.'
265
+ end
266
+ @restriction_domestic_only = restriction_domestic_only
267
+ end
268
+
269
+ # Custom attribute writer method checking allowed values (enum).
270
+ # @param [Object] restriction_international_only Object to be assigned
271
+ def restriction_international_only=(restriction_international_only)
272
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
273
+ unless validator.valid?(restriction_international_only)
274
+ fail ArgumentError, 'invalid value for "restriction_international_only", must be one of #{validator.allowable_values}.'
275
+ end
276
+ @restriction_international_only = restriction_international_only
277
+ end
278
+
279
+ # Custom attribute writer method checking allowed values (enum).
280
+ # @param [Object] restriction_po_box Object to be assigned
281
+ def restriction_po_box=(restriction_po_box)
282
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
283
+ unless validator.valid?(restriction_po_box)
284
+ fail ArgumentError, 'invalid value for "restriction_po_box", must be one of #{validator.allowable_values}.'
285
+ end
286
+ @restriction_po_box = restriction_po_box
287
+ end
288
+
289
+ # Custom attribute writer method checking allowed values (enum).
290
+ # @param [Object] restriction_puerto_rico Object to be assigned
291
+ def restriction_puerto_rico=(restriction_puerto_rico)
292
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
293
+ unless validator.valid?(restriction_puerto_rico)
294
+ fail ArgumentError, 'invalid value for "restriction_puerto_rico", must be one of #{validator.allowable_values}.'
295
+ end
296
+ @restriction_puerto_rico = restriction_puerto_rico
297
+ end
298
+
299
+ # Custom attribute writer method checking allowed values (enum).
300
+ # @param [Object] restriction_us_territories Object to be assigned
301
+ def restriction_us_territories=(restriction_us_territories)
302
+ validator = EnumAttributeValidator.new('String', ['invalid', 'invalidOnly', 'valid'])
303
+ unless validator.valid?(restriction_us_territories)
304
+ fail ArgumentError, 'invalid value for "restriction_us_territories", must be one of #{validator.allowable_values}.'
305
+ end
306
+ @restriction_us_territories = restriction_us_territories
307
+ end
308
+
179
309
  # Checks equality by comparing each attribute.
180
310
  # @param [Object] Object to be compared
181
311
  def ==(o)
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.5.1'
14
+ VERSION = '3.5.2'
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.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus