ultracart_api 3.4.7 → 3.4.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/docs/PaymentsConfiguration.md +5 -3
  4. data/docs/PaymentsConfigurationAffirm.md +7 -7
  5. data/docs/PaymentsConfigurationAmazon.md +7 -7
  6. data/docs/PaymentsConfigurationCOD.md +5 -5
  7. data/docs/PaymentsConfigurationCash.md +1 -1
  8. data/docs/PaymentsConfigurationCheck.md +12 -17
  9. data/docs/PaymentsConfigurationCreditCard.md +11 -8
  10. data/docs/PaymentsConfigurationCreditCardType.md +17 -0
  11. data/docs/PaymentsConfigurationEcheck.md +11 -0
  12. data/docs/PaymentsConfigurationLoanHero.md +4 -4
  13. data/docs/PaymentsConfigurationMoneyOrder.md +11 -0
  14. data/docs/PaymentsConfigurationPayPal.md +28 -28
  15. data/docs/PaymentsConfigurationPurchaseOrder.md +3 -3
  16. data/docs/PaymentsConfigurationQuoteRequest.md +2 -2
  17. data/docs/PaymentsConfigurationRestrictions.md +14 -12
  18. data/docs/PaymentsConfigurationRestrictionsTheme.md +10 -0
  19. data/docs/PaymentsConfigurationSezzle.md +8 -7
  20. data/docs/PaymentsConfigurationTestMethod.md +18 -0
  21. data/docs/PaymentsConfigurationWePay.md +26 -26
  22. data/docs/PaymentsConfigurationWireTransfer.md +10 -10
  23. data/lib/ultracart_api.rb +5 -0
  24. data/lib/ultracart_api/models/payments_configuration.rb +50 -31
  25. data/lib/ultracart_api/models/payments_configuration_affirm.rb +81 -40
  26. data/lib/ultracart_api/models/payments_configuration_amazon.rb +51 -44
  27. data/lib/ultracart_api/models/payments_configuration_cash.rb +4 -3
  28. data/lib/ultracart_api/models/payments_configuration_check.rb +72 -103
  29. data/lib/ultracart_api/models/payments_configuration_cod.rb +39 -34
  30. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +78 -34
  31. data/lib/ultracart_api/models/payments_configuration_credit_card_type.rb +309 -0
  32. data/lib/ultracart_api/models/payments_configuration_echeck.rb +214 -0
  33. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +23 -19
  34. data/lib/ultracart_api/models/payments_configuration_money_order.rb +214 -0
  35. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +270 -172
  36. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +19 -16
  37. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +12 -10
  38. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +75 -41
  39. data/lib/ultracart_api/models/payments_configuration_restrictions_theme.rb +202 -0
  40. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +99 -46
  41. data/lib/ultracart_api/models/payments_configuration_test_method.rb +319 -0
  42. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +186 -160
  43. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +71 -61
  44. data/lib/ultracart_api/version.rb +1 -1
  45. metadata +12 -2
@@ -3,33 +3,33 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **accept_wepay** | **BOOLEAN** | | [optional]
7
- **hide_credit_cards_non_ultra_cart_payments** | **BOOLEAN** | | [optional]
8
- **hide_surcharge_content** | **BOOLEAN** | | [optional]
6
+ **accept_wepay** | **BOOLEAN** | Master flag indicating this merchant accepts UltraCart Payments WePay | [optional]
7
+ **account_update_uri** | **String** | URI for updating the WePay account | [optional]
8
+ **address1** | **String** | Address line 1 | [optional]
9
+ **address2** | **String** | Address line 2 | [optional]
10
+ **canada_accept_debit_cards** | **BOOLEAN** | For Canadian merchants, true if they wish to accept debit cards | [optional]
11
+ **city** | **String** | City | [optional]
12
+ **company** | **String** | Company | [optional]
13
+ **company_description** | **String** | Company description | [optional]
14
+ **console_hostname** | **String** | Console hostname | [optional]
15
+ **country** | **String** | Country | [optional]
16
+ **currency** | **String** | Base currency for transactions | [optional]
17
+ **expected_revenue** | **String** | Expected Revenue | [optional]
18
+ **hide_credit_card_non_ultracart_payments** | **BOOLEAN** | Internal flag to aid UI | [optional]
19
+ **hide_surcharge_amount** | **BOOLEAN** | Internal flag to aid UI | [optional]
20
+ **industry** | **String** | Industry | [optional]
21
+ **owner_email** | **String** | Owner email | [optional]
22
+ **owner_name** | **String** | Owner name | [optional]
23
+ **owner_phone** | **String** | Owner phone | [optional]
24
+ **postal_code** | **String** | Postal code | [optional]
9
25
  **remove_pay_pal_pro** | **BOOLEAN** | | [optional]
10
26
  **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
11
- **short_pay_pal_marketing_text** | **BOOLEAN** | | [optional]
12
- **show_ultra_cart_payments_disabled** | **BOOLEAN** | | [optional]
13
- **show_ultra_cart_payments_intro** | **BOOLEAN** | | [optional]
14
- **show_ultra_cart_payments_verification** | **BOOLEAN** | | [optional]
15
- **show_ultra_cart_payments_verified** | **BOOLEAN** | | [optional]
16
- **wepay_account_update_uri** | **String** | | [optional]
17
- **wepay_address1** | **String** | | [optional]
18
- **wepay_address2** | **String** | | [optional]
19
- **wepay_canada_accept_debit_cards** | **BOOLEAN** | | [optional]
20
- **wepay_city** | **String** | | [optional]
21
- **wepay_company** | **String** | | [optional]
22
- **wepay_company_description** | **String** | | [optional]
23
- **wepay_console_hostname** | **String** | | [optional]
24
- **wepay_country** | **String** | | [optional]
25
- **wepay_currency** | **String** | | [optional]
26
- **wepay_expected_revenue** | **String** | | [optional]
27
- **wepay_industry** | **String** | | [optional]
28
- **wepay_owner_email** | **String** | | [optional]
29
- **wepay_owner_name** | **String** | | [optional]
30
- **wepay_owner_phone** | **String** | | [optional]
31
- **wepay_state** | **String** | | [optional]
32
- **wepay_website_url** | **String** | | [optional]
33
- **wepay_zip** | **String** | | [optional]
27
+ **short_paypal_marketing_text** | **BOOLEAN** | Internal UI aid | [optional]
28
+ **show_ultracart_payments_disabled** | **BOOLEAN** | Internal flag to aid UI | [optional]
29
+ **show_ultracart_payments_intro** | **BOOLEAN** | Internal flag to aid UI | [optional]
30
+ **show_ultracart_payments_verification** | **BOOLEAN** | Internal flag to aid UI | [optional]
31
+ **show_ultracart_payments_verified** | **BOOLEAN** | Internal flag to aid UI | [optional]
32
+ **state** | **String** | State | [optional]
33
+ **website_url** | **String** | Website URL | [optional]
34
34
 
35
35
 
@@ -3,16 +3,16 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **accept_wire_transfer** | **BOOLEAN** | | [optional]
6
+ **accept_wire_transfer** | **BOOLEAN** | Master flag indicating this merchant accepts wire transfers | [optional]
7
+ **account_number** | **String** | account_number | [optional]
8
+ **accounting_code** | **String** | Optional Quickbooks accounting code | [optional]
9
+ **bank_address** | **String** | Bank address | [optional]
10
+ **deposit_to_account** | **String** | Optional Quickbooks deposit to account | [optional]
11
+ **intermediate_routing_number** | **String** | Intermediate routing number | [optional]
7
12
  **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
8
- **wire_transfer_accounting_code** | **String** | | [optional]
9
- **wire_transfer_account_number** | **String** | | [optional]
10
- **wire_transfer_bank_address** | **String** | | [optional]
11
- **wire_transfer_deposit_to_account** | **String** | | [optional]
12
- **wire_transfer_intermediate_routing_number** | **String** | | [optional]
13
- **wire_transfer_routing_number** | **String** | | [optional]
14
- **wire_transfer_surcharge_accounting_code** | **String** | | [optional]
15
- **wire_transfer_surcharge_fee** | **String** | | [optional]
16
- **wire_transfer_surcharge_perc** | **String** | | [optional]
13
+ **routing_number** | **String** | Routing number | [optional]
14
+ **surcharge_accounting_code** | **String** | If a surcharge is present and this merchant is integrated with Quickbooks, this is the accounting code for the surcharge amount | [optional]
15
+ **surcharge_fee** | **String** | surcharge_fee | [optional]
16
+ **surcharge_percentage** | **String** | surcharge_percentage | [optional]
17
17
 
18
18
 
data/lib/ultracart_api.rb CHANGED
@@ -498,13 +498,18 @@ 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'
502
+ require 'ultracart_api/models/payments_configuration_echeck'
501
503
  require 'ultracart_api/models/payments_configuration_loan_hero'
504
+ require 'ultracart_api/models/payments_configuration_money_order'
502
505
  require 'ultracart_api/models/payments_configuration_pay_pal'
503
506
  require 'ultracart_api/models/payments_configuration_purchase_order'
504
507
  require 'ultracart_api/models/payments_configuration_quote_request'
505
508
  require 'ultracart_api/models/payments_configuration_response'
506
509
  require 'ultracart_api/models/payments_configuration_restrictions'
510
+ require 'ultracart_api/models/payments_configuration_restrictions_theme'
507
511
  require 'ultracart_api/models/payments_configuration_sezzle'
512
+ require 'ultracart_api/models/payments_configuration_test_method'
508
513
  require 'ultracart_api/models/payments_configuration_we_pay'
509
514
  require 'ultracart_api/models/payments_configuration_wire_transfer'
510
515
  require 'ultracart_api/models/payments_theme_transaction_type'
@@ -26,9 +26,13 @@ module UltracartClient
26
26
 
27
27
  attr_accessor :credit_card
28
28
 
29
+ attr_accessor :echeck
30
+
29
31
  attr_accessor :loan_hero
30
32
 
31
- attr_accessor :pay_pal
33
+ attr_accessor :money_order
34
+
35
+ attr_accessor :paypal
32
36
 
33
37
  attr_accessor :purchase_order
34
38
 
@@ -36,13 +40,14 @@ module UltracartClient
36
40
 
37
41
  attr_accessor :sezzle
38
42
 
43
+ # Internal flag used to determine if accounting codes should be shown on the screen or not. This flag is true if the merchant has a Quickbooks integration configured.
39
44
  attr_accessor :show_accounting_code
40
45
 
41
46
  attr_accessor :switch_to_sub_tab
42
47
 
43
48
  attr_accessor :switch_to_tab
44
49
 
45
- attr_accessor :we_pay
50
+ attr_accessor :ultracart_payments_wepay
46
51
 
47
52
  attr_accessor :wire_transfer
48
53
 
@@ -54,17 +59,19 @@ module UltracartClient
54
59
  :'cash' => :'cash',
55
60
  :'check' => :'check',
56
61
  :'cod' => :'cod',
57
- :'credit_card' => :'creditCard',
58
- :'loan_hero' => :'loanHero',
59
- :'pay_pal' => :'payPal',
60
- :'purchase_order' => :'purchaseOrder',
61
- :'quote_request' => :'quoteRequest',
62
+ :'credit_card' => :'credit_card',
63
+ :'echeck' => :'echeck',
64
+ :'loan_hero' => :'loan_hero',
65
+ :'money_order' => :'money_order',
66
+ :'paypal' => :'paypal',
67
+ :'purchase_order' => :'purchase_order',
68
+ :'quote_request' => :'quote_request',
62
69
  :'sezzle' => :'sezzle',
63
- :'show_accounting_code' => :'showAccountingCode',
70
+ :'show_accounting_code' => :'show_accounting_code',
64
71
  :'switch_to_sub_tab' => :'switchToSubTab',
65
72
  :'switch_to_tab' => :'switchToTab',
66
- :'we_pay' => :'wePay',
67
- :'wire_transfer' => :'wireTransfer'
73
+ :'ultracart_payments_wepay' => :'ultracart_payments_wepay',
74
+ :'wire_transfer' => :'wire_transfer'
68
75
  }
69
76
  end
70
77
 
@@ -77,15 +84,17 @@ module UltracartClient
77
84
  :'check' => :'PaymentsConfigurationCheck',
78
85
  :'cod' => :'PaymentsConfigurationCOD',
79
86
  :'credit_card' => :'PaymentsConfigurationCreditCard',
87
+ :'echeck' => :'PaymentsConfigurationEcheck',
80
88
  :'loan_hero' => :'PaymentsConfigurationLoanHero',
81
- :'pay_pal' => :'PaymentsConfigurationPayPal',
89
+ :'money_order' => :'PaymentsConfigurationMoneyOrder',
90
+ :'paypal' => :'PaymentsConfigurationPayPal',
82
91
  :'purchase_order' => :'PaymentsConfigurationPurchaseOrder',
83
92
  :'quote_request' => :'PaymentsConfigurationQuoteRequest',
84
93
  :'sezzle' => :'PaymentsConfigurationSezzle',
85
94
  :'show_accounting_code' => :'BOOLEAN',
86
95
  :'switch_to_sub_tab' => :'String',
87
96
  :'switch_to_tab' => :'String',
88
- :'we_pay' => :'PaymentsConfigurationWePay',
97
+ :'ultracart_payments_wepay' => :'PaymentsConfigurationWePay',
89
98
  :'wire_transfer' => :'PaymentsConfigurationWireTransfer'
90
99
  }
91
100
  end
@@ -118,32 +127,40 @@ module UltracartClient
118
127
  self.cod = attributes[:'cod']
119
128
  end
120
129
 
121
- if attributes.has_key?(:'creditCard')
122
- self.credit_card = attributes[:'creditCard']
130
+ if attributes.has_key?(:'credit_card')
131
+ self.credit_card = attributes[:'credit_card']
132
+ end
133
+
134
+ if attributes.has_key?(:'echeck')
135
+ self.echeck = attributes[:'echeck']
136
+ end
137
+
138
+ if attributes.has_key?(:'loan_hero')
139
+ self.loan_hero = attributes[:'loan_hero']
123
140
  end
124
141
 
125
- if attributes.has_key?(:'loanHero')
126
- self.loan_hero = attributes[:'loanHero']
142
+ if attributes.has_key?(:'money_order')
143
+ self.money_order = attributes[:'money_order']
127
144
  end
128
145
 
129
- if attributes.has_key?(:'payPal')
130
- self.pay_pal = attributes[:'payPal']
146
+ if attributes.has_key?(:'paypal')
147
+ self.paypal = attributes[:'paypal']
131
148
  end
132
149
 
133
- if attributes.has_key?(:'purchaseOrder')
134
- self.purchase_order = attributes[:'purchaseOrder']
150
+ if attributes.has_key?(:'purchase_order')
151
+ self.purchase_order = attributes[:'purchase_order']
135
152
  end
136
153
 
137
- if attributes.has_key?(:'quoteRequest')
138
- self.quote_request = attributes[:'quoteRequest']
154
+ if attributes.has_key?(:'quote_request')
155
+ self.quote_request = attributes[:'quote_request']
139
156
  end
140
157
 
141
158
  if attributes.has_key?(:'sezzle')
142
159
  self.sezzle = attributes[:'sezzle']
143
160
  end
144
161
 
145
- if attributes.has_key?(:'showAccountingCode')
146
- self.show_accounting_code = attributes[:'showAccountingCode']
162
+ if attributes.has_key?(:'show_accounting_code')
163
+ self.show_accounting_code = attributes[:'show_accounting_code']
147
164
  end
148
165
 
149
166
  if attributes.has_key?(:'switchToSubTab')
@@ -154,12 +171,12 @@ module UltracartClient
154
171
  self.switch_to_tab = attributes[:'switchToTab']
155
172
  end
156
173
 
157
- if attributes.has_key?(:'wePay')
158
- self.we_pay = attributes[:'wePay']
174
+ if attributes.has_key?(:'ultracart_payments_wepay')
175
+ self.ultracart_payments_wepay = attributes[:'ultracart_payments_wepay']
159
176
  end
160
177
 
161
- if attributes.has_key?(:'wireTransfer')
162
- self.wire_transfer = attributes[:'wireTransfer']
178
+ if attributes.has_key?(:'wire_transfer')
179
+ self.wire_transfer = attributes[:'wire_transfer']
163
180
  end
164
181
  end
165
182
 
@@ -187,15 +204,17 @@ module UltracartClient
187
204
  check == o.check &&
188
205
  cod == o.cod &&
189
206
  credit_card == o.credit_card &&
207
+ echeck == o.echeck &&
190
208
  loan_hero == o.loan_hero &&
191
- pay_pal == o.pay_pal &&
209
+ money_order == o.money_order &&
210
+ paypal == o.paypal &&
192
211
  purchase_order == o.purchase_order &&
193
212
  quote_request == o.quote_request &&
194
213
  sezzle == o.sezzle &&
195
214
  show_accounting_code == o.show_accounting_code &&
196
215
  switch_to_sub_tab == o.switch_to_sub_tab &&
197
216
  switch_to_tab == o.switch_to_tab &&
198
- we_pay == o.we_pay &&
217
+ ultracart_payments_wepay == o.ultracart_payments_wepay &&
199
218
  wire_transfer == o.wire_transfer
200
219
  end
201
220
 
@@ -208,7 +227,7 @@ module UltracartClient
208
227
  # Calculates hash code according to all attributes.
209
228
  # @return [Fixnum] Hash code
210
229
  def hash
211
- [affirm, amazon, cash, check, cod, credit_card, loan_hero, pay_pal, purchase_order, quote_request, sezzle, show_accounting_code, switch_to_sub_tab, switch_to_tab, we_pay, wire_transfer].hash
230
+ [affirm, amazon, cash, check, cod, credit_card, echeck, loan_hero, money_order, paypal, purchase_order, quote_request, sezzle, show_accounting_code, switch_to_sub_tab, switch_to_tab, ultracart_payments_wepay, wire_transfer].hash
212
231
  end
213
232
 
214
233
  # Builds the object from hash
@@ -14,32 +14,61 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationAffirm
17
+ # Master flag indicating this merchant accepts Affirm payments
17
18
  attr_accessor :accept_affirm
18
19
 
19
- attr_accessor :affirm_accounting_code
20
+ # Optional Quickbooks code for this payment method
21
+ attr_accessor :accounting_code
20
22
 
21
- attr_accessor :affirm_deposit_to_account
23
+ # Optional Quickbooks Deposit to Account value
24
+ attr_accessor :deposit_to_account
22
25
 
23
- attr_accessor :affirm_environment
26
+ # Environment
27
+ attr_accessor :environment
24
28
 
25
- attr_accessor :affirm_financial_product_key
29
+ # Financial product key
30
+ attr_accessor :financial_product_key
26
31
 
27
- attr_accessor :affirm_private_api_key
32
+ # Private API key
33
+ attr_accessor :private_api_key
28
34
 
29
- attr_accessor :affirm_public_api_key
35
+ # Public API key
36
+ attr_accessor :public_api_key
30
37
 
31
38
  attr_accessor :restrictions
32
39
 
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
33
62
  # Attribute mapping from ruby-style variable name to JSON key.
34
63
  def self.attribute_map
35
64
  {
36
- :'accept_affirm' => :'acceptAffirm',
37
- :'affirm_accounting_code' => :'affirmAccountingCode',
38
- :'affirm_deposit_to_account' => :'affirmDepositToAccount',
39
- :'affirm_environment' => :'affirmEnvironment',
40
- :'affirm_financial_product_key' => :'affirmFinancialProductKey',
41
- :'affirm_private_api_key' => :'affirmPrivateApiKey',
42
- :'affirm_public_api_key' => :'affirmPublicApiKey',
65
+ :'accept_affirm' => :'accept_affirm',
66
+ :'accounting_code' => :'accounting_code',
67
+ :'deposit_to_account' => :'deposit_to_account',
68
+ :'environment' => :'environment',
69
+ :'financial_product_key' => :'financial_product_key',
70
+ :'private_api_key' => :'private_api_key',
71
+ :'public_api_key' => :'public_api_key',
43
72
  :'restrictions' => :'restrictions'
44
73
  }
45
74
  end
@@ -48,12 +77,12 @@ module UltracartClient
48
77
  def self.swagger_types
49
78
  {
50
79
  :'accept_affirm' => :'BOOLEAN',
51
- :'affirm_accounting_code' => :'String',
52
- :'affirm_deposit_to_account' => :'String',
53
- :'affirm_environment' => :'String',
54
- :'affirm_financial_product_key' => :'String',
55
- :'affirm_private_api_key' => :'String',
56
- :'affirm_public_api_key' => :'String',
80
+ :'accounting_code' => :'String',
81
+ :'deposit_to_account' => :'String',
82
+ :'environment' => :'String',
83
+ :'financial_product_key' => :'String',
84
+ :'private_api_key' => :'String',
85
+ :'public_api_key' => :'String',
57
86
  :'restrictions' => :'PaymentsConfigurationRestrictions'
58
87
  }
59
88
  end
@@ -66,32 +95,32 @@ module UltracartClient
66
95
  # convert string to symbol for hash key
67
96
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
97
 
69
- if attributes.has_key?(:'acceptAffirm')
70
- self.accept_affirm = attributes[:'acceptAffirm']
98
+ if attributes.has_key?(:'accept_affirm')
99
+ self.accept_affirm = attributes[:'accept_affirm']
71
100
  end
72
101
 
73
- if attributes.has_key?(:'affirmAccountingCode')
74
- self.affirm_accounting_code = attributes[:'affirmAccountingCode']
102
+ if attributes.has_key?(:'accounting_code')
103
+ self.accounting_code = attributes[:'accounting_code']
75
104
  end
76
105
 
77
- if attributes.has_key?(:'affirmDepositToAccount')
78
- self.affirm_deposit_to_account = attributes[:'affirmDepositToAccount']
106
+ if attributes.has_key?(:'deposit_to_account')
107
+ self.deposit_to_account = attributes[:'deposit_to_account']
79
108
  end
80
109
 
81
- if attributes.has_key?(:'affirmEnvironment')
82
- self.affirm_environment = attributes[:'affirmEnvironment']
110
+ if attributes.has_key?(:'environment')
111
+ self.environment = attributes[:'environment']
83
112
  end
84
113
 
85
- if attributes.has_key?(:'affirmFinancialProductKey')
86
- self.affirm_financial_product_key = attributes[:'affirmFinancialProductKey']
114
+ if attributes.has_key?(:'financial_product_key')
115
+ self.financial_product_key = attributes[:'financial_product_key']
87
116
  end
88
117
 
89
- if attributes.has_key?(:'affirmPrivateApiKey')
90
- self.affirm_private_api_key = attributes[:'affirmPrivateApiKey']
118
+ if attributes.has_key?(:'private_api_key')
119
+ self.private_api_key = attributes[:'private_api_key']
91
120
  end
92
121
 
93
- if attributes.has_key?(:'affirmPublicApiKey')
94
- self.affirm_public_api_key = attributes[:'affirmPublicApiKey']
122
+ if attributes.has_key?(:'public_api_key')
123
+ self.public_api_key = attributes[:'public_api_key']
95
124
  end
96
125
 
97
126
  if attributes.has_key?(:'restrictions')
@@ -109,21 +138,33 @@ module UltracartClient
109
138
  # Check to see if the all the properties in the model are valid
110
139
  # @return true if the model is valid
111
140
  def valid?
141
+ environment_validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
142
+ return false unless environment_validator.valid?(@environment)
112
143
  true
113
144
  end
114
145
 
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] environment Object to be assigned
148
+ def environment=(environment)
149
+ validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
150
+ unless validator.valid?(environment)
151
+ fail ArgumentError, 'invalid value for "environment", must be one of #{validator.allowable_values}.'
152
+ end
153
+ @environment = environment
154
+ end
155
+
115
156
  # Checks equality by comparing each attribute.
116
157
  # @param [Object] Object to be compared
117
158
  def ==(o)
118
159
  return true if self.equal?(o)
119
160
  self.class == o.class &&
120
161
  accept_affirm == o.accept_affirm &&
121
- affirm_accounting_code == o.affirm_accounting_code &&
122
- affirm_deposit_to_account == o.affirm_deposit_to_account &&
123
- affirm_environment == o.affirm_environment &&
124
- affirm_financial_product_key == o.affirm_financial_product_key &&
125
- affirm_private_api_key == o.affirm_private_api_key &&
126
- affirm_public_api_key == o.affirm_public_api_key &&
162
+ accounting_code == o.accounting_code &&
163
+ deposit_to_account == o.deposit_to_account &&
164
+ environment == o.environment &&
165
+ financial_product_key == o.financial_product_key &&
166
+ private_api_key == o.private_api_key &&
167
+ public_api_key == o.public_api_key &&
127
168
  restrictions == o.restrictions
128
169
  end
129
170
 
@@ -136,7 +177,7 @@ module UltracartClient
136
177
  # Calculates hash code according to all attributes.
137
178
  # @return [Fixnum] Hash code
138
179
  def hash
139
- [accept_affirm, affirm_accounting_code, affirm_deposit_to_account, affirm_environment, affirm_financial_product_key, affirm_private_api_key, affirm_public_api_key, restrictions].hash
180
+ [accept_affirm, accounting_code, deposit_to_account, environment, financial_product_key, private_api_key, public_api_key, restrictions].hash
140
181
  end
141
182
 
142
183
  # Builds the object from hash