ultracart_api 3.4.9 → 3.4.10

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: 6b984b85de2958bc8984fd8abb19eab5a26133992c1d8eff42437c8fc3143d6f
4
- data.tar.gz: 835c54766e869b26e0970db1f0ff5b1ec53acc0760c5c8ef778019feab839820
3
+ metadata.gz: edc50e441a8a9c4ddb57f39f2b6f8970343550350ac36aa86f99ece3102c4d5e
4
+ data.tar.gz: f0c539b1461f08b33e5089149d33f6e83c119f59bf5934568a21a00c7ce3bb1f
5
5
  SHA512:
6
- metadata.gz: 537d4d43bcb8c3d649e47b2b6c932c35e4b547b6bfec3b302283a177767d9e30f93acbac29483acacd02d0c10aef07f4d2101fb7ea62488bab984a9f5cffa159
7
- data.tar.gz: d86681e50b1434142e17fce89c6507a28f422fb39348d8bd98a874d597fae3e600e2accf7e4780e1eedb5321e56581d0606cf55e968244d5c4678a07abe341ce
6
+ metadata.gz: 9dea24c39936bd03d12fc4703ddc3532d26237f6e8b5fdae4e201e83332f40f379328dece34320abeb8ddd54c5caca026a03d34b903f34ffeb03541171f4a6bc
7
+ data.tar.gz: eaed1a0ec6dacd177bea2a2bd2c8e89a78ece766f8f87dc631943c5f96199b2659481b80c7c9c5d9366c389b76af912585bfc56f886034ef2fcad26bf4fdbb74
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.4.9
10
+ - Package version: 3.4.10
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.4.9.gem
27
+ gem install ./ultracart_api-3.4.10.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.4.9.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.4.10.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.4.9'
35
+ gem 'ultracart_api', '~> 3.4.10'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -899,6 +899,7 @@ Class | Method | HTTP request | Description
899
899
  - [UltracartClient::PaymentsConfigurationCash](docs/PaymentsConfigurationCash.md)
900
900
  - [UltracartClient::PaymentsConfigurationCheck](docs/PaymentsConfigurationCheck.md)
901
901
  - [UltracartClient::PaymentsConfigurationCreditCard](docs/PaymentsConfigurationCreditCard.md)
902
+ - [UltracartClient::PaymentsConfigurationCreditCardType](docs/PaymentsConfigurationCreditCardType.md)
902
903
  - [UltracartClient::PaymentsConfigurationEcheck](docs/PaymentsConfigurationEcheck.md)
903
904
  - [UltracartClient::PaymentsConfigurationLoanHero](docs/PaymentsConfigurationLoanHero.md)
904
905
  - [UltracartClient::PaymentsConfigurationMoneyOrder](docs/PaymentsConfigurationMoneyOrder.md)
@@ -907,7 +908,9 @@ Class | Method | HTTP request | Description
907
908
  - [UltracartClient::PaymentsConfigurationQuoteRequest](docs/PaymentsConfigurationQuoteRequest.md)
908
909
  - [UltracartClient::PaymentsConfigurationResponse](docs/PaymentsConfigurationResponse.md)
909
910
  - [UltracartClient::PaymentsConfigurationRestrictions](docs/PaymentsConfigurationRestrictions.md)
911
+ - [UltracartClient::PaymentsConfigurationRestrictionsTheme](docs/PaymentsConfigurationRestrictionsTheme.md)
910
912
  - [UltracartClient::PaymentsConfigurationSezzle](docs/PaymentsConfigurationSezzle.md)
913
+ - [UltracartClient::PaymentsConfigurationTestMethod](docs/PaymentsConfigurationTestMethod.md)
911
914
  - [UltracartClient::PaymentsConfigurationWePay](docs/PaymentsConfigurationWePay.md)
912
915
  - [UltracartClient::PaymentsConfigurationWireTransfer](docs/PaymentsConfigurationWireTransfer.md)
913
916
  - [UltracartClient::PaymentsThemeTransactionType](docs/PaymentsThemeTransactionType.md)
@@ -15,6 +15,6 @@ Name | Type | Description | Notes
15
15
  **mail_to_postal_code** | **String** | MailTo postal code | [optional]
16
16
  **mail_to_store** | **String** | MailTo store | [optional]
17
17
  **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
18
- **test_methods** | **Object** | Test methods for this payment method | [optional]
18
+ **test_methods** | [**Array<PaymentsConfigurationTestMethod>**](PaymentsConfigurationTestMethod.md) | Test methods for this payment method | [optional]
19
19
 
20
20
 
@@ -10,9 +10,9 @@ 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** | **String** | 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** | **Object** | Restrictions for this payment method | [optional]
13
+ **restrictions** | [**Array<PaymentsConfigurationRestrictions>**](PaymentsConfigurationRestrictions.md) | Restrictions for this payment method | [optional]
14
14
  **send_customer_billing_update_on_decline** | **BOOLEAN** | UltraCart will send customers emails to update their credit card if the card is declined | [optional]
15
- **supported_cards** | **Object** | A list of credit cards the merchant wishes to accept. | [optional]
16
- **test_methods** | **Object** | 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]
15
+ **supported_cards** | [**Array<PaymentsConfigurationCreditCardType>**](PaymentsConfigurationCreditCardType.md) | A list of credit cards the merchant wishes to accept. | [optional]
16
+ **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]
17
17
 
18
18
 
@@ -0,0 +1,17 @@
1
+ # UltracartClient::PaymentsConfigurationCreditCardType
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **accounting_code** | **String** | Optional field used for Quickbooks integrations to match this credit card with the corresponding payment type in Quickbooks | [optional]
7
+ **card_type_icon** | **String** | Internally used icon information for this card type | [optional]
8
+ **credit_card** | **String** | Credit card type | [optional]
9
+ **deposit_to_account** | **String** | The name of the account to deposit funds | [optional]
10
+ **enabled** | **BOOLEAN** | If true, this card type will be accepted during checkout | [optional]
11
+ **processing_fee** | **String** | Optional additional fee applied to order for this card | [optional]
12
+ **processing_percentage** | **String** | Optional additional fee applied to order for this card | [optional]
13
+ **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
+ **transaction_fee** | **String** | An optional additional fee to charge the customer for using this card. | [optional]
15
+ **transaction_percentage** | **String** | An optional transaction percentage to charge the customer for using this card | [optional]
16
+
17
+
@@ -3,6 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **descriptions** | **Array<String>** | | [optional]
6
7
  **maximum_subtotal** | **String** | Maximum subtotal | [optional]
7
8
  **minimum_subtotal** | **String** | Minimum subtotal | [optional]
8
9
  **payment_method** | **String** | Payment method | [optional]
@@ -15,5 +16,6 @@ Name | Type | Description | Notes
15
16
  **restriction_po_box** | **String** | PO Box restriction | [optional]
16
17
  **restriction_puerto_rico** | **String** | Puerto Rico restriction | [optional]
17
18
  **restriction_us_territories** | **String** | US Territories restriction | [optional]
19
+ **themes** | [**Array<PaymentsConfigurationRestrictionsTheme>**](PaymentsConfigurationRestrictionsTheme.md) | | [optional]
18
20
 
19
21
 
@@ -0,0 +1,10 @@
1
+ # UltracartClient::PaymentsConfigurationRestrictionsTheme
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | | [optional]
7
+ **restriction** | **String** | | [optional]
8
+ **store_front_host_name** | **String** | | [optional]
9
+
10
+
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
8
8
  **business_id** | **String** | Business ID | [optional]
9
9
  **deposit_to_account** | **String** | Optional Quickbooks Deposit to Account value | [optional]
10
10
  **environment** | **String** | Sezzle environment | [optional]
11
- **environments** | **Object** | List of environments possible | [optional]
11
+ **environments** | **Array<String>** | List of environments possible | [optional]
12
12
  **private_api_key** | **String** | Private API key | [optional]
13
13
  **public_api_key** | **String** | Public API key | [optional]
14
14
  **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
@@ -0,0 +1,18 @@
1
+ # UltracartClient::PaymentsConfigurationTestMethod
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **bank_account_number** | **String** | Bank account number | [optional]
7
+ **bank_routing_number** | **String** | Bank routing number | [optional]
8
+ **credit_card_number** | **String** | Credit card number | [optional]
9
+ **credit_card_number_existing** | **String** | The existing credit card number | [optional]
10
+ **description** | **String** | Description | [optional]
11
+ **payment_action** | **String** | Payment action | [optional]
12
+ **payment_method** | **String** | Payment method | [optional]
13
+ **payment_method_test_oid** | **Integer** | Payment method test oid | [optional]
14
+ **skip_affiliate_transaction** | **BOOLEAN** | Skip affiliate transaction | [optional]
15
+ **skip_conversion_pixels** | **BOOLEAN** | If true, skips recording any conversion pixels to avoid sending test orders to your analysis sites | [optional]
16
+ **skip_fraud_filter** | **BOOLEAN** | Skip fraud filter | [optional]
17
+
18
+
data/lib/ultracart_api.rb CHANGED
@@ -498,6 +498,7 @@ require 'ultracart_api/models/payments_configuration_cod'
498
498
  require 'ultracart_api/models/payments_configuration_cash'
499
499
  require 'ultracart_api/models/payments_configuration_check'
500
500
  require 'ultracart_api/models/payments_configuration_credit_card'
501
+ require 'ultracart_api/models/payments_configuration_credit_card_type'
501
502
  require 'ultracart_api/models/payments_configuration_echeck'
502
503
  require 'ultracart_api/models/payments_configuration_loan_hero'
503
504
  require 'ultracart_api/models/payments_configuration_money_order'
@@ -506,7 +507,9 @@ require 'ultracart_api/models/payments_configuration_purchase_order'
506
507
  require 'ultracart_api/models/payments_configuration_quote_request'
507
508
  require 'ultracart_api/models/payments_configuration_response'
508
509
  require 'ultracart_api/models/payments_configuration_restrictions'
510
+ require 'ultracart_api/models/payments_configuration_restrictions_theme'
509
511
  require 'ultracart_api/models/payments_configuration_sezzle'
512
+ require 'ultracart_api/models/payments_configuration_test_method'
510
513
  require 'ultracart_api/models/payments_configuration_we_pay'
511
514
  require 'ultracart_api/models/payments_configuration_wire_transfer'
512
515
  require 'ultracart_api/models/payments_theme_transaction_type'
@@ -86,7 +86,7 @@ module UltracartClient
86
86
  :'mail_to_postal_code' => :'String',
87
87
  :'mail_to_store' => :'String',
88
88
  :'restrictions' => :'PaymentsConfigurationRestrictions',
89
- :'test_methods' => :'Object'
89
+ :'test_methods' => :'Array<PaymentsConfigurationTestMethod>'
90
90
  }
91
91
  end
92
92
 
@@ -147,7 +147,9 @@ module UltracartClient
147
147
  end
148
148
 
149
149
  if attributes.has_key?(:'test_methods')
150
- self.test_methods = attributes[:'test_methods']
150
+ if (value = attributes[:'test_methods']).is_a?(Array)
151
+ self.test_methods = value
152
+ end
151
153
  end
152
154
  end
153
155
 
@@ -74,10 +74,10 @@ module UltracartClient
74
74
  :'configured_gateway_details' => :'String',
75
75
  :'failed_attempts' => :'String',
76
76
  :'hide_connect_single_gateway' => :'BOOLEAN',
77
- :'restrictions' => :'Object',
77
+ :'restrictions' => :'Array<PaymentsConfigurationRestrictions>',
78
78
  :'send_customer_billing_update_on_decline' => :'BOOLEAN',
79
- :'supported_cards' => :'Object',
80
- :'test_methods' => :'Object'
79
+ :'supported_cards' => :'Array<PaymentsConfigurationCreditCardType>',
80
+ :'test_methods' => :'Array<PaymentsConfigurationTestMethod>'
81
81
  }
82
82
  end
83
83
 
@@ -118,7 +118,9 @@ module UltracartClient
118
118
  end
119
119
 
120
120
  if attributes.has_key?(:'restrictions')
121
- self.restrictions = attributes[:'restrictions']
121
+ if (value = attributes[:'restrictions']).is_a?(Array)
122
+ self.restrictions = value
123
+ end
122
124
  end
123
125
 
124
126
  if attributes.has_key?(:'send_customer_billing_update_on_decline')
@@ -126,11 +128,15 @@ module UltracartClient
126
128
  end
127
129
 
128
130
  if attributes.has_key?(:'supported_cards')
129
- self.supported_cards = attributes[:'supported_cards']
131
+ if (value = attributes[:'supported_cards']).is_a?(Array)
132
+ self.supported_cards = value
133
+ end
130
134
  end
131
135
 
132
136
  if attributes.has_key?(:'test_methods')
133
- self.test_methods = attributes[:'test_methods']
137
+ if (value = attributes[:'test_methods']).is_a?(Array)
138
+ self.test_methods = value
139
+ end
134
140
  end
135
141
  end
136
142
 
@@ -0,0 +1,309 @@
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 PaymentsConfigurationCreditCardType
17
+ # Optional field used for Quickbooks integrations to match this credit card with the corresponding payment type in Quickbooks
18
+ attr_accessor :accounting_code
19
+
20
+ # Internally used icon information for this card type
21
+ attr_accessor :card_type_icon
22
+
23
+ # Credit card type
24
+ attr_accessor :credit_card
25
+
26
+ # The name of the account to deposit funds
27
+ attr_accessor :deposit_to_account
28
+
29
+ # If true, this card type will be accepted during checkout
30
+ attr_accessor :enabled
31
+
32
+ # Optional additional fee applied to order for this card
33
+ attr_accessor :processing_fee
34
+
35
+ # Optional additional fee applied to order for this card
36
+ attr_accessor :processing_percentage
37
+
38
+ # Optional field. If integrated with Quickbooks, this code will be used when informing Quickbooks about any surcharges applied to orders
39
+ attr_accessor :surcharge_accounting_code
40
+
41
+ # An optional additional fee to charge the customer for using this card.
42
+ attr_accessor :transaction_fee
43
+
44
+ # An optional transaction percentage to charge the customer for using this card
45
+ attr_accessor :transaction_percentage
46
+
47
+ class EnumAttributeValidator
48
+ attr_reader :datatype
49
+ attr_reader :allowable_values
50
+
51
+ def initialize(datatype, allowable_values)
52
+ @allowable_values = allowable_values.map do |value|
53
+ case datatype.to_s
54
+ when /Integer/i
55
+ value.to_i
56
+ when /Float/i
57
+ value.to_f
58
+ else
59
+ value
60
+ end
61
+ end
62
+ end
63
+
64
+ def valid?(value)
65
+ !value || allowable_values.include?(value)
66
+ end
67
+ end
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ :'accounting_code' => :'accounting_code',
73
+ :'card_type_icon' => :'card_type_icon',
74
+ :'credit_card' => :'credit_card',
75
+ :'deposit_to_account' => :'deposit_to_account',
76
+ :'enabled' => :'enabled',
77
+ :'processing_fee' => :'processing_fee',
78
+ :'processing_percentage' => :'processing_percentage',
79
+ :'surcharge_accounting_code' => :'surcharge_accounting_code',
80
+ :'transaction_fee' => :'transaction_fee',
81
+ :'transaction_percentage' => :'transaction_percentage'
82
+ }
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.swagger_types
87
+ {
88
+ :'accounting_code' => :'String',
89
+ :'card_type_icon' => :'String',
90
+ :'credit_card' => :'String',
91
+ :'deposit_to_account' => :'String',
92
+ :'enabled' => :'BOOLEAN',
93
+ :'processing_fee' => :'String',
94
+ :'processing_percentage' => :'String',
95
+ :'surcharge_accounting_code' => :'String',
96
+ :'transaction_fee' => :'String',
97
+ :'transaction_percentage' => :'String'
98
+ }
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ return unless attributes.is_a?(Hash)
105
+
106
+ # convert string to symbol for hash key
107
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
108
+
109
+ if attributes.has_key?(:'accounting_code')
110
+ self.accounting_code = attributes[:'accounting_code']
111
+ end
112
+
113
+ if attributes.has_key?(:'card_type_icon')
114
+ self.card_type_icon = attributes[:'card_type_icon']
115
+ end
116
+
117
+ if attributes.has_key?(:'credit_card')
118
+ self.credit_card = attributes[:'credit_card']
119
+ end
120
+
121
+ if attributes.has_key?(:'deposit_to_account')
122
+ self.deposit_to_account = attributes[:'deposit_to_account']
123
+ end
124
+
125
+ if attributes.has_key?(:'enabled')
126
+ self.enabled = attributes[:'enabled']
127
+ end
128
+
129
+ if attributes.has_key?(:'processing_fee')
130
+ self.processing_fee = attributes[:'processing_fee']
131
+ end
132
+
133
+ if attributes.has_key?(:'processing_percentage')
134
+ self.processing_percentage = attributes[:'processing_percentage']
135
+ end
136
+
137
+ if attributes.has_key?(:'surcharge_accounting_code')
138
+ self.surcharge_accounting_code = attributes[:'surcharge_accounting_code']
139
+ end
140
+
141
+ if attributes.has_key?(:'transaction_fee')
142
+ self.transaction_fee = attributes[:'transaction_fee']
143
+ end
144
+
145
+ if attributes.has_key?(:'transaction_percentage')
146
+ self.transaction_percentage = attributes[:'transaction_percentage']
147
+ end
148
+ end
149
+
150
+ # Show invalid properties with the reasons. Usually used together with valid?
151
+ # @return Array for valid properties with the reasons
152
+ def list_invalid_properties
153
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ credit_card_validator = EnumAttributeValidator.new('String', ['AMEX', 'Visa', 'Diners Club', 'Discover', 'JCB', 'MasterCard'])
161
+ return false unless credit_card_validator.valid?(@credit_card)
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] credit_card Object to be assigned
167
+ def credit_card=(credit_card)
168
+ validator = EnumAttributeValidator.new('String', ['AMEX', 'Visa', 'Diners Club', 'Discover', 'JCB', 'MasterCard'])
169
+ unless validator.valid?(credit_card)
170
+ fail ArgumentError, 'invalid value for "credit_card", must be one of #{validator.allowable_values}.'
171
+ end
172
+ @credit_card = credit_card
173
+ end
174
+
175
+ # Checks equality by comparing each attribute.
176
+ # @param [Object] Object to be compared
177
+ def ==(o)
178
+ return true if self.equal?(o)
179
+ self.class == o.class &&
180
+ accounting_code == o.accounting_code &&
181
+ card_type_icon == o.card_type_icon &&
182
+ credit_card == o.credit_card &&
183
+ deposit_to_account == o.deposit_to_account &&
184
+ enabled == o.enabled &&
185
+ processing_fee == o.processing_fee &&
186
+ processing_percentage == o.processing_percentage &&
187
+ surcharge_accounting_code == o.surcharge_accounting_code &&
188
+ transaction_fee == o.transaction_fee &&
189
+ transaction_percentage == o.transaction_percentage
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Fixnum] Hash code
200
+ 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
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ self.class.swagger_types.each_pair do |key, type|
210
+ if type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
214
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
215
+ end
216
+ elsif !attributes[self.class.attribute_map[key]].nil?
217
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
219
+ end
220
+
221
+ self
222
+ end
223
+
224
+ # Deserializes the data based on type
225
+ # @param string type Data type
226
+ # @param string value Value to be deserialized
227
+ # @return [Object] Deserialized data
228
+ def _deserialize(type, value)
229
+ case type.to_sym
230
+ when :DateTime
231
+ DateTime.parse(value)
232
+ when :Date
233
+ Date.parse(value)
234
+ when :String
235
+ value.to_s
236
+ when :Integer
237
+ value.to_i
238
+ when :Float
239
+ value.to_f
240
+ when :BOOLEAN
241
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
242
+ true
243
+ else
244
+ false
245
+ end
246
+ when :Object
247
+ # generic object (usually a Hash), return directly
248
+ value
249
+ when /\AArray<(?<inner_type>.+)>\z/
250
+ inner_type = Regexp.last_match[:inner_type]
251
+ value.map { |v| _deserialize(inner_type, v) }
252
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
253
+ k_type = Regexp.last_match[:k_type]
254
+ v_type = Regexp.last_match[:v_type]
255
+ {}.tap do |hash|
256
+ value.each do |k, v|
257
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
258
+ end
259
+ end
260
+ else # model
261
+ temp_model = UltracartClient.const_get(type).new
262
+ temp_model.build_from_hash(value)
263
+ end
264
+ end
265
+
266
+ # Returns the string representation of the object
267
+ # @return [String] String presentation of the object
268
+ def to_s
269
+ to_hash.to_s
270
+ end
271
+
272
+ # to_body is an alias to to_hash (backward compatibility)
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_body
275
+ to_hash
276
+ end
277
+
278
+ # Returns the object in the form of hash
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_hash
281
+ hash = {}
282
+ self.class.attribute_map.each_pair do |attr, param|
283
+ value = self.send(attr)
284
+ next if value.nil?
285
+ hash[param] = _to_hash(value)
286
+ end
287
+ hash
288
+ end
289
+
290
+ # Outputs non-array value in the form of hash
291
+ # For object, use to_hash. Otherwise, just return the value
292
+ # @param [Object] value Any valid value
293
+ # @return [Hash] Returns the value in the form of hash
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map { |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+
308
+ end
309
+ end
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationRestrictions
17
+ attr_accessor :descriptions
18
+
17
19
  # Maximum subtotal
18
20
  attr_accessor :maximum_subtotal
19
21
 
@@ -50,9 +52,12 @@ module UltracartClient
50
52
  # US Territories restriction
51
53
  attr_accessor :restriction_us_territories
52
54
 
55
+ attr_accessor :themes
56
+
53
57
  # Attribute mapping from ruby-style variable name to JSON key.
54
58
  def self.attribute_map
55
59
  {
60
+ :'descriptions' => :'descriptions',
56
61
  :'maximum_subtotal' => :'maximum_subtotal',
57
62
  :'minimum_subtotal' => :'minimum_subtotal',
58
63
  :'payment_method' => :'payment_method',
@@ -64,13 +69,15 @@ module UltracartClient
64
69
  :'restriction_international_only' => :'restriction_international_only',
65
70
  :'restriction_po_box' => :'restriction_po_box',
66
71
  :'restriction_puerto_rico' => :'restriction_puerto_rico',
67
- :'restriction_us_territories' => :'restriction_us_territories'
72
+ :'restriction_us_territories' => :'restriction_us_territories',
73
+ :'themes' => :'themes'
68
74
  }
69
75
  end
70
76
 
71
77
  # Attribute type mapping.
72
78
  def self.swagger_types
73
79
  {
80
+ :'descriptions' => :'Array<String>',
74
81
  :'maximum_subtotal' => :'String',
75
82
  :'minimum_subtotal' => :'String',
76
83
  :'payment_method' => :'String',
@@ -82,7 +89,8 @@ module UltracartClient
82
89
  :'restriction_international_only' => :'String',
83
90
  :'restriction_po_box' => :'String',
84
91
  :'restriction_puerto_rico' => :'String',
85
- :'restriction_us_territories' => :'String'
92
+ :'restriction_us_territories' => :'String',
93
+ :'themes' => :'Array<PaymentsConfigurationRestrictionsTheme>'
86
94
  }
87
95
  end
88
96
 
@@ -94,6 +102,12 @@ module UltracartClient
94
102
  # convert string to symbol for hash key
95
103
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
96
104
 
105
+ if attributes.has_key?(:'descriptions')
106
+ if (value = attributes[:'descriptions']).is_a?(Array)
107
+ self.descriptions = value
108
+ end
109
+ end
110
+
97
111
  if attributes.has_key?(:'maximum_subtotal')
98
112
  self.maximum_subtotal = attributes[:'maximum_subtotal']
99
113
  end
@@ -141,6 +155,12 @@ module UltracartClient
141
155
  if attributes.has_key?(:'restriction_us_territories')
142
156
  self.restriction_us_territories = attributes[:'restriction_us_territories']
143
157
  end
158
+
159
+ if attributes.has_key?(:'themes')
160
+ if (value = attributes[:'themes']).is_a?(Array)
161
+ self.themes = value
162
+ end
163
+ end
144
164
  end
145
165
 
146
166
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -161,6 +181,7 @@ module UltracartClient
161
181
  def ==(o)
162
182
  return true if self.equal?(o)
163
183
  self.class == o.class &&
184
+ descriptions == o.descriptions &&
164
185
  maximum_subtotal == o.maximum_subtotal &&
165
186
  minimum_subtotal == o.minimum_subtotal &&
166
187
  payment_method == o.payment_method &&
@@ -172,7 +193,8 @@ module UltracartClient
172
193
  restriction_international_only == o.restriction_international_only &&
173
194
  restriction_po_box == o.restriction_po_box &&
174
195
  restriction_puerto_rico == o.restriction_puerto_rico &&
175
- restriction_us_territories == o.restriction_us_territories
196
+ restriction_us_territories == o.restriction_us_territories &&
197
+ themes == o.themes
176
198
  end
177
199
 
178
200
  # @see the `==` method
@@ -184,7 +206,7 @@ module UltracartClient
184
206
  # Calculates hash code according to all attributes.
185
207
  # @return [Fixnum] Hash code
186
208
  def hash
187
- [maximum_subtotal, minimum_subtotal, payment_method, restriction_alaska_hawaii, restriction_apo_fpo, restriction_canada, restriction_continental_us, restriction_domestic_only, restriction_international_only, restriction_po_box, restriction_puerto_rico, restriction_us_territories].hash
209
+ [descriptions, maximum_subtotal, minimum_subtotal, payment_method, restriction_alaska_hawaii, restriction_apo_fpo, restriction_canada, restriction_continental_us, restriction_domestic_only, restriction_international_only, restriction_po_box, restriction_puerto_rico, restriction_us_territories, themes].hash
188
210
  end
189
211
 
190
212
  # Builds the object from hash
@@ -0,0 +1,202 @@
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 PaymentsConfigurationRestrictionsTheme
17
+ attr_accessor :code
18
+
19
+ attr_accessor :restriction
20
+
21
+ attr_accessor :store_front_host_name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'code' => :'code',
27
+ :'restriction' => :'restriction',
28
+ :'store_front_host_name' => :'storeFrontHostName'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'code' => :'String',
36
+ :'restriction' => :'String',
37
+ :'store_front_host_name' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'code')
50
+ self.code = attributes[:'code']
51
+ end
52
+
53
+ if attributes.has_key?(:'restriction')
54
+ self.restriction = attributes[:'restriction']
55
+ end
56
+
57
+ if attributes.has_key?(:'storeFrontHostName')
58
+ self.store_front_host_name = attributes[:'storeFrontHostName']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ code == o.code &&
81
+ restriction == o.restriction &&
82
+ store_front_host_name == o.store_front_host_name
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [code, restriction, store_front_host_name].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+ self.class.swagger_types.each_pair do |key, type|
103
+ if type =~ /\AArray<(.*)>/i
104
+ # check to ensure the input is an array given that the attribute
105
+ # is documented as an array but the input is not
106
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
107
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
+ end
109
+ elsif !attributes[self.class.attribute_map[key]].nil?
110
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
112
+ end
113
+
114
+ self
115
+ end
116
+
117
+ # Deserializes the data based on type
118
+ # @param string type Data type
119
+ # @param string value Value to be deserialized
120
+ # @return [Object] Deserialized data
121
+ def _deserialize(type, value)
122
+ case type.to_sym
123
+ when :DateTime
124
+ DateTime.parse(value)
125
+ when :Date
126
+ Date.parse(value)
127
+ when :String
128
+ value.to_s
129
+ when :Integer
130
+ value.to_i
131
+ when :Float
132
+ value.to_f
133
+ when :BOOLEAN
134
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
135
+ true
136
+ else
137
+ false
138
+ end
139
+ when :Object
140
+ # generic object (usually a Hash), return directly
141
+ value
142
+ when /\AArray<(?<inner_type>.+)>\z/
143
+ inner_type = Regexp.last_match[:inner_type]
144
+ value.map { |v| _deserialize(inner_type, v) }
145
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
146
+ k_type = Regexp.last_match[:k_type]
147
+ v_type = Regexp.last_match[:v_type]
148
+ {}.tap do |hash|
149
+ value.each do |k, v|
150
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
151
+ end
152
+ end
153
+ else # model
154
+ temp_model = UltracartClient.const_get(type).new
155
+ temp_model.build_from_hash(value)
156
+ end
157
+ end
158
+
159
+ # Returns the string representation of the object
160
+ # @return [String] String presentation of the object
161
+ def to_s
162
+ to_hash.to_s
163
+ end
164
+
165
+ # to_body is an alias to to_hash (backward compatibility)
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_body
168
+ to_hash
169
+ end
170
+
171
+ # Returns the object in the form of hash
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ next if value.nil?
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ # Outputs non-array value in the form of hash
184
+ # For object, use to_hash. Otherwise, just return the value
185
+ # @param [Object] value Any valid value
186
+ # @return [Hash] Returns the value in the form of hash
187
+ def _to_hash(value)
188
+ if value.is_a?(Array)
189
+ value.compact.map { |v| _to_hash(v) }
190
+ elsif value.is_a?(Hash)
191
+ {}.tap do |hash|
192
+ value.each { |k, v| hash[k] = _to_hash(v) }
193
+ end
194
+ elsif value.respond_to? :to_hash
195
+ value.to_hash
196
+ else
197
+ value
198
+ end
199
+ end
200
+
201
+ end
202
+ end
@@ -85,7 +85,7 @@ module UltracartClient
85
85
  :'business_id' => :'String',
86
86
  :'deposit_to_account' => :'String',
87
87
  :'environment' => :'String',
88
- :'environments' => :'Object',
88
+ :'environments' => :'Array<String>',
89
89
  :'private_api_key' => :'String',
90
90
  :'public_api_key' => :'String',
91
91
  :'restrictions' => :'PaymentsConfigurationRestrictions'
@@ -121,7 +121,9 @@ module UltracartClient
121
121
  end
122
122
 
123
123
  if attributes.has_key?(:'environments')
124
- self.environments = attributes[:'environments']
124
+ if (value = attributes[:'environments']).is_a?(Array)
125
+ self.environments = value
126
+ end
125
127
  end
126
128
 
127
129
  if attributes.has_key?(:'private_api_key')
@@ -0,0 +1,319 @@
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 PaymentsConfigurationTestMethod
17
+ # Bank account number
18
+ attr_accessor :bank_account_number
19
+
20
+ # Bank routing number
21
+ attr_accessor :bank_routing_number
22
+
23
+ # Credit card number
24
+ attr_accessor :credit_card_number
25
+
26
+ # The existing credit card number
27
+ attr_accessor :credit_card_number_existing
28
+
29
+ # Description
30
+ attr_accessor :description
31
+
32
+ # Payment action
33
+ attr_accessor :payment_action
34
+
35
+ # Payment method
36
+ attr_accessor :payment_method
37
+
38
+ # Payment method test oid
39
+ attr_accessor :payment_method_test_oid
40
+
41
+ # Skip affiliate transaction
42
+ attr_accessor :skip_affiliate_transaction
43
+
44
+ # If true, skips recording any conversion pixels to avoid sending test orders to your analysis sites
45
+ attr_accessor :skip_conversion_pixels
46
+
47
+ # Skip fraud filter
48
+ attr_accessor :skip_fraud_filter
49
+
50
+ class EnumAttributeValidator
51
+ attr_reader :datatype
52
+ attr_reader :allowable_values
53
+
54
+ def initialize(datatype, allowable_values)
55
+ @allowable_values = allowable_values.map do |value|
56
+ case datatype.to_s
57
+ when /Integer/i
58
+ value.to_i
59
+ when /Float/i
60
+ value.to_f
61
+ else
62
+ value
63
+ end
64
+ end
65
+ end
66
+
67
+ def valid?(value)
68
+ !value || allowable_values.include?(value)
69
+ end
70
+ end
71
+
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'bank_account_number' => :'bank_account_number',
76
+ :'bank_routing_number' => :'bank_routing_number',
77
+ :'credit_card_number' => :'credit_card_number',
78
+ :'credit_card_number_existing' => :'credit_card_number_existing',
79
+ :'description' => :'description',
80
+ :'payment_action' => :'payment_action',
81
+ :'payment_method' => :'payment_method',
82
+ :'payment_method_test_oid' => :'payment_method_test_oid',
83
+ :'skip_affiliate_transaction' => :'skip_affiliate_transaction',
84
+ :'skip_conversion_pixels' => :'skip_conversion_pixels',
85
+ :'skip_fraud_filter' => :'skip_fraud_filter'
86
+ }
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.swagger_types
91
+ {
92
+ :'bank_account_number' => :'String',
93
+ :'bank_routing_number' => :'String',
94
+ :'credit_card_number' => :'String',
95
+ :'credit_card_number_existing' => :'String',
96
+ :'description' => :'String',
97
+ :'payment_action' => :'String',
98
+ :'payment_method' => :'String',
99
+ :'payment_method_test_oid' => :'Integer',
100
+ :'skip_affiliate_transaction' => :'BOOLEAN',
101
+ :'skip_conversion_pixels' => :'BOOLEAN',
102
+ :'skip_fraud_filter' => :'BOOLEAN'
103
+ }
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ return unless attributes.is_a?(Hash)
110
+
111
+ # convert string to symbol for hash key
112
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
113
+
114
+ if attributes.has_key?(:'bank_account_number')
115
+ self.bank_account_number = attributes[:'bank_account_number']
116
+ end
117
+
118
+ if attributes.has_key?(:'bank_routing_number')
119
+ self.bank_routing_number = attributes[:'bank_routing_number']
120
+ end
121
+
122
+ if attributes.has_key?(:'credit_card_number')
123
+ self.credit_card_number = attributes[:'credit_card_number']
124
+ end
125
+
126
+ if attributes.has_key?(:'credit_card_number_existing')
127
+ self.credit_card_number_existing = attributes[:'credit_card_number_existing']
128
+ end
129
+
130
+ if attributes.has_key?(:'description')
131
+ self.description = attributes[:'description']
132
+ end
133
+
134
+ if attributes.has_key?(:'payment_action')
135
+ self.payment_action = attributes[:'payment_action']
136
+ end
137
+
138
+ if attributes.has_key?(:'payment_method')
139
+ self.payment_method = attributes[:'payment_method']
140
+ end
141
+
142
+ if attributes.has_key?(:'payment_method_test_oid')
143
+ self.payment_method_test_oid = attributes[:'payment_method_test_oid']
144
+ end
145
+
146
+ if attributes.has_key?(:'skip_affiliate_transaction')
147
+ self.skip_affiliate_transaction = attributes[:'skip_affiliate_transaction']
148
+ end
149
+
150
+ if attributes.has_key?(:'skip_conversion_pixels')
151
+ self.skip_conversion_pixels = attributes[:'skip_conversion_pixels']
152
+ end
153
+
154
+ if attributes.has_key?(:'skip_fraud_filter')
155
+ self.skip_fraud_filter = attributes[:'skip_fraud_filter']
156
+ end
157
+ end
158
+
159
+ # Show invalid properties with the reasons. Usually used together with valid?
160
+ # @return Array for valid properties with the reasons
161
+ def list_invalid_properties
162
+ invalid_properties = Array.new
163
+ invalid_properties
164
+ end
165
+
166
+ # Check to see if the all the properties in the model are valid
167
+ # @return true if the model is valid
168
+ def valid?
169
+ payment_action_validator = EnumAttributeValidator.new('String', ['skip payment', 'skip pmt rej', 'skip pmt co', 'hold in ar'])
170
+ return false unless payment_action_validator.valid?(@payment_action)
171
+ true
172
+ end
173
+
174
+ # Custom attribute writer method checking allowed values (enum).
175
+ # @param [Object] payment_action Object to be assigned
176
+ def payment_action=(payment_action)
177
+ validator = EnumAttributeValidator.new('String', ['skip payment', 'skip pmt rej', 'skip pmt co', 'hold in ar'])
178
+ unless validator.valid?(payment_action)
179
+ fail ArgumentError, 'invalid value for "payment_action", must be one of #{validator.allowable_values}.'
180
+ end
181
+ @payment_action = payment_action
182
+ end
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ bank_account_number == o.bank_account_number &&
190
+ bank_routing_number == o.bank_routing_number &&
191
+ credit_card_number == o.credit_card_number &&
192
+ credit_card_number_existing == o.credit_card_number_existing &&
193
+ description == o.description &&
194
+ payment_action == o.payment_action &&
195
+ payment_method == o.payment_method &&
196
+ payment_method_test_oid == o.payment_method_test_oid &&
197
+ skip_affiliate_transaction == o.skip_affiliate_transaction &&
198
+ skip_conversion_pixels == o.skip_conversion_pixels &&
199
+ skip_fraud_filter == o.skip_fraud_filter
200
+ end
201
+
202
+ # @see the `==` method
203
+ # @param [Object] Object to be compared
204
+ def eql?(o)
205
+ self == o
206
+ end
207
+
208
+ # Calculates hash code according to all attributes.
209
+ # @return [Fixnum] Hash code
210
+ def hash
211
+ [bank_account_number, bank_routing_number, credit_card_number, credit_card_number_existing, description, payment_action, payment_method, payment_method_test_oid, skip_affiliate_transaction, skip_conversion_pixels, skip_fraud_filter].hash
212
+ end
213
+
214
+ # Builds the object from hash
215
+ # @param [Hash] attributes Model attributes in the form of hash
216
+ # @return [Object] Returns the model itself
217
+ def build_from_hash(attributes)
218
+ return nil unless attributes.is_a?(Hash)
219
+ self.class.swagger_types.each_pair do |key, type|
220
+ if type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
224
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
225
+ end
226
+ elsif !attributes[self.class.attribute_map[key]].nil?
227
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
228
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
229
+ end
230
+
231
+ self
232
+ end
233
+
234
+ # Deserializes the data based on type
235
+ # @param string type Data type
236
+ # @param string value Value to be deserialized
237
+ # @return [Object] Deserialized data
238
+ def _deserialize(type, value)
239
+ case type.to_sym
240
+ when :DateTime
241
+ DateTime.parse(value)
242
+ when :Date
243
+ Date.parse(value)
244
+ when :String
245
+ value.to_s
246
+ when :Integer
247
+ value.to_i
248
+ when :Float
249
+ value.to_f
250
+ when :BOOLEAN
251
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
252
+ true
253
+ else
254
+ false
255
+ end
256
+ when :Object
257
+ # generic object (usually a Hash), return directly
258
+ value
259
+ when /\AArray<(?<inner_type>.+)>\z/
260
+ inner_type = Regexp.last_match[:inner_type]
261
+ value.map { |v| _deserialize(inner_type, v) }
262
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
263
+ k_type = Regexp.last_match[:k_type]
264
+ v_type = Regexp.last_match[:v_type]
265
+ {}.tap do |hash|
266
+ value.each do |k, v|
267
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
268
+ end
269
+ end
270
+ else # model
271
+ temp_model = UltracartClient.const_get(type).new
272
+ temp_model.build_from_hash(value)
273
+ end
274
+ end
275
+
276
+ # Returns the string representation of the object
277
+ # @return [String] String presentation of the object
278
+ def to_s
279
+ to_hash.to_s
280
+ end
281
+
282
+ # to_body is an alias to to_hash (backward compatibility)
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_body
285
+ to_hash
286
+ end
287
+
288
+ # Returns the object in the form of hash
289
+ # @return [Hash] Returns the object in the form of hash
290
+ def to_hash
291
+ hash = {}
292
+ self.class.attribute_map.each_pair do |attr, param|
293
+ value = self.send(attr)
294
+ next if value.nil?
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ # Outputs non-array value in the form of hash
301
+ # For object, use to_hash. Otherwise, just return the value
302
+ # @param [Object] value Any valid value
303
+ # @return [Hash] Returns the value in the form of hash
304
+ def _to_hash(value)
305
+ if value.is_a?(Array)
306
+ value.compact.map { |v| _to_hash(v) }
307
+ elsif value.is_a?(Hash)
308
+ {}.tap do |hash|
309
+ value.each { |k, v| hash[k] = _to_hash(v) }
310
+ end
311
+ elsif value.respond_to? :to_hash
312
+ value.to_hash
313
+ else
314
+ value
315
+ end
316
+ end
317
+
318
+ end
319
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.4.9'
14
+ VERSION = '3.4.10'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.9
4
+ version: 3.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -694,6 +694,7 @@ files:
694
694
  - docs/PaymentsConfigurationCash.md
695
695
  - docs/PaymentsConfigurationCheck.md
696
696
  - docs/PaymentsConfigurationCreditCard.md
697
+ - docs/PaymentsConfigurationCreditCardType.md
697
698
  - docs/PaymentsConfigurationEcheck.md
698
699
  - docs/PaymentsConfigurationLoanHero.md
699
700
  - docs/PaymentsConfigurationMoneyOrder.md
@@ -702,7 +703,9 @@ files:
702
703
  - docs/PaymentsConfigurationQuoteRequest.md
703
704
  - docs/PaymentsConfigurationResponse.md
704
705
  - docs/PaymentsConfigurationRestrictions.md
706
+ - docs/PaymentsConfigurationRestrictionsTheme.md
705
707
  - docs/PaymentsConfigurationSezzle.md
708
+ - docs/PaymentsConfigurationTestMethod.md
706
709
  - docs/PaymentsConfigurationWePay.md
707
710
  - docs/PaymentsConfigurationWireTransfer.md
708
711
  - docs/PaymentsThemeTransactionType.md
@@ -1348,6 +1351,7 @@ files:
1348
1351
  - lib/ultracart_api/models/payments_configuration_check.rb
1349
1352
  - lib/ultracart_api/models/payments_configuration_cod.rb
1350
1353
  - lib/ultracart_api/models/payments_configuration_credit_card.rb
1354
+ - lib/ultracart_api/models/payments_configuration_credit_card_type.rb
1351
1355
  - lib/ultracart_api/models/payments_configuration_echeck.rb
1352
1356
  - lib/ultracart_api/models/payments_configuration_loan_hero.rb
1353
1357
  - lib/ultracart_api/models/payments_configuration_money_order.rb
@@ -1356,7 +1360,9 @@ files:
1356
1360
  - lib/ultracart_api/models/payments_configuration_quote_request.rb
1357
1361
  - lib/ultracart_api/models/payments_configuration_response.rb
1358
1362
  - lib/ultracart_api/models/payments_configuration_restrictions.rb
1363
+ - lib/ultracart_api/models/payments_configuration_restrictions_theme.rb
1359
1364
  - lib/ultracart_api/models/payments_configuration_sezzle.rb
1365
+ - lib/ultracart_api/models/payments_configuration_test_method.rb
1360
1366
  - lib/ultracart_api/models/payments_configuration_we_pay.rb
1361
1367
  - lib/ultracart_api/models/payments_configuration_wire_transfer.rb
1362
1368
  - lib/ultracart_api/models/payments_theme_transaction_type.rb