ultracart_api 3.4.5 → 3.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -4
- data/docs/EmailList.md +1 -0
- data/docs/EmailListSegmentFolder.md +12 -0
- data/docs/EmailListSegmentFolderResponse.md +12 -0
- data/docs/EmailListSegmentFoldersResponse.md +12 -0
- data/docs/EmailSegment.md +1 -0
- data/docs/PaymentsConfiguration.md +5 -3
- data/docs/PaymentsConfigurationAffirm.md +7 -7
- data/docs/PaymentsConfigurationAmazon.md +7 -7
- data/docs/PaymentsConfigurationCOD.md +5 -5
- data/docs/PaymentsConfigurationCash.md +1 -1
- data/docs/PaymentsConfigurationCheck.md +12 -17
- data/docs/PaymentsConfigurationCreditCard.md +11 -9
- data/docs/PaymentsConfigurationEcheck.md +11 -0
- data/docs/PaymentsConfigurationLoanHero.md +4 -4
- data/docs/PaymentsConfigurationMoneyOrder.md +11 -0
- data/docs/PaymentsConfigurationPayPal.md +28 -28
- data/docs/PaymentsConfigurationPurchaseOrder.md +3 -3
- data/docs/PaymentsConfigurationQuoteRequest.md +2 -2
- data/docs/PaymentsConfigurationRestrictions.md +12 -12
- data/docs/PaymentsConfigurationSezzle.md +8 -7
- data/docs/PaymentsConfigurationWePay.md +26 -26
- data/docs/PaymentsConfigurationWireTransfer.md +10 -10
- data/docs/RotatingTransactionGateway.md +4 -3
- data/docs/StorefrontApi.md +260 -0
- data/lib/ultracart_api.rb +5 -0
- data/lib/ultracart_api/api/storefront_api.rb +295 -0
- data/lib/ultracart_api/models/email_list.rb +11 -1
- data/lib/ultracart_api/models/email_list_segment_folder.rb +240 -0
- data/lib/ultracart_api/models/email_list_segment_folder_response.rb +221 -0
- data/lib/ultracart_api/models/email_list_segment_folders_response.rb +223 -0
- data/lib/ultracart_api/models/email_segment.rb +11 -1
- data/lib/ultracart_api/models/payments_configuration.rb +50 -31
- data/lib/ultracart_api/models/payments_configuration_affirm.rb +81 -40
- data/lib/ultracart_api/models/payments_configuration_amazon.rb +51 -44
- data/lib/ultracart_api/models/payments_configuration_cash.rb +4 -3
- data/lib/ultracart_api/models/payments_configuration_check.rb +70 -103
- data/lib/ultracart_api/models/payments_configuration_cod.rb +39 -34
- data/lib/ultracart_api/models/payments_configuration_credit_card.rb +68 -39
- data/lib/ultracart_api/models/payments_configuration_echeck.rb +214 -0
- data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +23 -19
- data/lib/ultracart_api/models/payments_configuration_money_order.rb +214 -0
- data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +270 -172
- data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +19 -16
- data/lib/ultracart_api/models/payments_configuration_quote_request.rb +12 -10
- data/lib/ultracart_api/models/payments_configuration_restrictions.rb +48 -36
- data/lib/ultracart_api/models/payments_configuration_sezzle.rb +97 -46
- data/lib/ultracart_api/models/payments_configuration_we_pay.rb +186 -160
- data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +71 -61
- data/lib/ultracart_api/models/rotating_transaction_gateway.rb +13 -3
- data/lib/ultracart_api/version.rb +1 -1
- metadata +12 -2
@@ -14,131 +14,181 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class PaymentsConfigurationPayPal
|
17
|
-
|
17
|
+
# Master flag that determine if PayPal is an active payment for this account
|
18
|
+
attr_accessor :accept_paypal
|
18
19
|
|
19
|
-
|
20
|
+
# Optional accounting code that is set to Quickbooks when an order uses this payment method.
|
21
|
+
attr_accessor :accounting_code
|
20
22
|
|
21
|
-
|
23
|
+
# PayPal API password
|
24
|
+
attr_accessor :api_password
|
22
25
|
|
23
|
-
|
26
|
+
# PayPal API username
|
27
|
+
attr_accessor :api_username
|
24
28
|
|
25
|
-
|
29
|
+
# (Legacy) true if there is a PayPal certificate already on file. Used to manage the internal UI
|
30
|
+
attr_accessor :certificate_on_file
|
26
31
|
|
27
|
-
|
32
|
+
# The account to deposit funds
|
33
|
+
attr_accessor :deposit_to_account
|
28
34
|
|
29
|
-
|
35
|
+
# The main PayPal email address
|
36
|
+
attr_accessor :email
|
30
37
|
|
31
|
-
|
38
|
+
# PayPal configuration, live or sandbox
|
39
|
+
attr_accessor :environment
|
32
40
|
|
33
|
-
|
41
|
+
# The URL for the PayPal header
|
42
|
+
attr_accessor :header_image_url
|
34
43
|
|
35
|
-
|
44
|
+
# True if the Bill Me Later button should be hidden during checkout
|
45
|
+
attr_accessor :hide_bill_me_later
|
36
46
|
|
37
|
-
|
47
|
+
# True if the PayPal express checkout button should be hidden on the view cart page. This will force the customer to enter address information before being able to checkout with PayPal
|
48
|
+
attr_accessor :hide_express_checkout_on_view_cart
|
38
49
|
|
39
|
-
|
50
|
+
# True if PayPal should be hidden for orders with no shippable product, such as digital orders
|
51
|
+
attr_accessor :hide_for_unshipped_orders
|
40
52
|
|
41
|
-
|
53
|
+
# If true, PayPal orders are held in Accounts Receivable for review
|
54
|
+
attr_accessor :hold_in_ar
|
42
55
|
|
43
|
-
|
56
|
+
# PayPal landing page
|
57
|
+
attr_accessor :landing_page
|
44
58
|
|
45
|
-
|
59
|
+
# The PayPal mode
|
60
|
+
attr_accessor :mode
|
46
61
|
|
47
|
-
|
62
|
+
# PayPal API private key password
|
63
|
+
attr_accessor :private_key_password
|
48
64
|
|
49
|
-
|
65
|
+
# Optional additional fee to charge if PayPal is used. It is rare for this to be used.
|
66
|
+
attr_accessor :processing_fee
|
50
67
|
|
51
|
-
|
68
|
+
# The processing percentage charged by PayPal
|
69
|
+
attr_accessor :processing_percentage
|
52
70
|
|
53
|
-
|
71
|
+
# True if the internal UI should recommend opening a PayPal account
|
72
|
+
attr_accessor :push_paypal
|
54
73
|
|
55
|
-
attr_accessor :
|
74
|
+
attr_accessor :restrictions
|
56
75
|
|
57
|
-
|
76
|
+
# True if UltraCart should send recurring orders to PayPal. There are restrictions to what PayPal will accept for recurring orders. Be careful.
|
77
|
+
attr_accessor :send_recurring
|
58
78
|
|
59
|
-
|
79
|
+
# Short marketing text
|
80
|
+
attr_accessor :short_paypal_marketing_text
|
60
81
|
|
61
|
-
|
82
|
+
# internal ui flag
|
83
|
+
attr_accessor :show_card_logos_not_directly_supported
|
62
84
|
|
63
|
-
|
85
|
+
# Internal flag used to manage UI
|
86
|
+
attr_accessor :show_signature
|
64
87
|
|
65
|
-
|
88
|
+
# PayPal signature
|
89
|
+
attr_accessor :signature
|
66
90
|
|
67
|
-
|
91
|
+
# PayPal solution type
|
92
|
+
attr_accessor :solution_type
|
68
93
|
|
69
|
-
|
94
|
+
# The email where PayPal summaries should be sent
|
95
|
+
attr_accessor :summary_email
|
70
96
|
|
71
|
-
|
97
|
+
# Description of what mode PayPal is operating
|
98
|
+
attr_accessor :summary_mode
|
99
|
+
|
100
|
+
# Send free items to PayPal as one cent items and subtract this penny from shipping. PayPal does not allow the sale of free items.
|
101
|
+
attr_accessor :zero_dollar_penny
|
102
|
+
|
103
|
+
class EnumAttributeValidator
|
104
|
+
attr_reader :datatype
|
105
|
+
attr_reader :allowable_values
|
72
106
|
|
73
|
-
|
107
|
+
def initialize(datatype, allowable_values)
|
108
|
+
@allowable_values = allowable_values.map do |value|
|
109
|
+
case datatype.to_s
|
110
|
+
when /Integer/i
|
111
|
+
value.to_i
|
112
|
+
when /Float/i
|
113
|
+
value.to_f
|
114
|
+
else
|
115
|
+
value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def valid?(value)
|
121
|
+
!value || allowable_values.include?(value)
|
122
|
+
end
|
123
|
+
end
|
74
124
|
|
75
125
|
# Attribute mapping from ruby-style variable name to JSON key.
|
76
126
|
def self.attribute_map
|
77
127
|
{
|
78
|
-
:'
|
79
|
-
:'
|
80
|
-
:'
|
81
|
-
:'
|
82
|
-
:'
|
83
|
-
:'
|
84
|
-
:'
|
85
|
-
:'
|
86
|
-
:'
|
87
|
-
:'
|
88
|
-
:'
|
89
|
-
:'
|
90
|
-
:'
|
91
|
-
:'
|
92
|
-
:'
|
93
|
-
:'
|
94
|
-
:'
|
95
|
-
:'
|
96
|
-
:'
|
97
|
-
:'paypal_show_card_logos_not_directly_supported' => :'paypalShowCardLogosNotDirectlySupported',
|
98
|
-
:'paypal_show_signature' => :'paypalShowSignature',
|
99
|
-
:'paypal_signature' => :'paypalSignature',
|
100
|
-
:'paypal_solution_type' => :'paypalSolutionType',
|
101
|
-
:'paypal_summary_email' => :'paypalSummaryEmail',
|
102
|
-
:'paypal_summary_mode' => :'paypalSummaryMode',
|
103
|
-
:'paypal_zero_dollar_penny' => :'paypalZeroDollarPenny',
|
104
|
-
:'push_pay_pal' => :'pushPayPal',
|
128
|
+
:'accept_paypal' => :'accept_paypal',
|
129
|
+
:'accounting_code' => :'accounting_code',
|
130
|
+
:'api_password' => :'api_password',
|
131
|
+
:'api_username' => :'api_username',
|
132
|
+
:'certificate_on_file' => :'certificate_on_file',
|
133
|
+
:'deposit_to_account' => :'deposit_to_account',
|
134
|
+
:'email' => :'email',
|
135
|
+
:'environment' => :'environment',
|
136
|
+
:'header_image_url' => :'header_image_url',
|
137
|
+
:'hide_bill_me_later' => :'hide_bill_me_later',
|
138
|
+
:'hide_express_checkout_on_view_cart' => :'hide_express_checkout_on_view_cart',
|
139
|
+
:'hide_for_unshipped_orders' => :'hide_for_unshipped_orders',
|
140
|
+
:'hold_in_ar' => :'hold_in_ar',
|
141
|
+
:'landing_page' => :'landing_page',
|
142
|
+
:'mode' => :'mode',
|
143
|
+
:'private_key_password' => :'private_key_password',
|
144
|
+
:'processing_fee' => :'processing_fee',
|
145
|
+
:'processing_percentage' => :'processing_percentage',
|
146
|
+
:'push_paypal' => :'push_paypal',
|
105
147
|
:'restrictions' => :'restrictions',
|
106
|
-
:'
|
148
|
+
:'send_recurring' => :'send_recurring',
|
149
|
+
:'short_paypal_marketing_text' => :'short_paypal_marketing_text',
|
150
|
+
:'show_card_logos_not_directly_supported' => :'show_card_logos_not_directly_supported',
|
151
|
+
:'show_signature' => :'show_signature',
|
152
|
+
:'signature' => :'signature',
|
153
|
+
:'solution_type' => :'solution_type',
|
154
|
+
:'summary_email' => :'summary_email',
|
155
|
+
:'summary_mode' => :'summary_mode',
|
156
|
+
:'zero_dollar_penny' => :'zero_dollar_penny'
|
107
157
|
}
|
108
158
|
end
|
109
159
|
|
110
160
|
# Attribute type mapping.
|
111
161
|
def self.swagger_types
|
112
162
|
{
|
113
|
-
:'
|
114
|
-
:'
|
115
|
-
:'
|
116
|
-
:'
|
117
|
-
:'
|
118
|
-
:'
|
119
|
-
:'
|
120
|
-
:'
|
121
|
-
:'
|
122
|
-
:'
|
123
|
-
:'
|
124
|
-
:'
|
125
|
-
:'
|
126
|
-
:'
|
127
|
-
:'
|
128
|
-
:'
|
129
|
-
:'
|
130
|
-
:'
|
131
|
-
:'
|
132
|
-
:'paypal_show_card_logos_not_directly_supported' => :'BOOLEAN',
|
133
|
-
:'paypal_show_signature' => :'BOOLEAN',
|
134
|
-
:'paypal_signature' => :'String',
|
135
|
-
:'paypal_solution_type' => :'String',
|
136
|
-
:'paypal_summary_email' => :'String',
|
137
|
-
:'paypal_summary_mode' => :'String',
|
138
|
-
:'paypal_zero_dollar_penny' => :'BOOLEAN',
|
139
|
-
:'push_pay_pal' => :'BOOLEAN',
|
163
|
+
:'accept_paypal' => :'BOOLEAN',
|
164
|
+
:'accounting_code' => :'String',
|
165
|
+
:'api_password' => :'String',
|
166
|
+
:'api_username' => :'String',
|
167
|
+
:'certificate_on_file' => :'BOOLEAN',
|
168
|
+
:'deposit_to_account' => :'String',
|
169
|
+
:'email' => :'String',
|
170
|
+
:'environment' => :'String',
|
171
|
+
:'header_image_url' => :'String',
|
172
|
+
:'hide_bill_me_later' => :'BOOLEAN',
|
173
|
+
:'hide_express_checkout_on_view_cart' => :'BOOLEAN',
|
174
|
+
:'hide_for_unshipped_orders' => :'BOOLEAN',
|
175
|
+
:'hold_in_ar' => :'BOOLEAN',
|
176
|
+
:'landing_page' => :'String',
|
177
|
+
:'mode' => :'String',
|
178
|
+
:'private_key_password' => :'String',
|
179
|
+
:'processing_fee' => :'String',
|
180
|
+
:'processing_percentage' => :'String',
|
181
|
+
:'push_paypal' => :'BOOLEAN',
|
140
182
|
:'restrictions' => :'PaymentsConfigurationRestrictions',
|
141
|
-
:'
|
183
|
+
:'send_recurring' => :'BOOLEAN',
|
184
|
+
:'short_paypal_marketing_text' => :'BOOLEAN',
|
185
|
+
:'show_card_logos_not_directly_supported' => :'BOOLEAN',
|
186
|
+
:'show_signature' => :'BOOLEAN',
|
187
|
+
:'signature' => :'String',
|
188
|
+
:'solution_type' => :'String',
|
189
|
+
:'summary_email' => :'String',
|
190
|
+
:'summary_mode' => :'String',
|
191
|
+
:'zero_dollar_penny' => :'BOOLEAN'
|
142
192
|
}
|
143
193
|
end
|
144
194
|
|
@@ -150,120 +200,120 @@ module UltracartClient
|
|
150
200
|
# convert string to symbol for hash key
|
151
201
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
152
202
|
|
153
|
-
if attributes.has_key?(:'
|
154
|
-
self.
|
203
|
+
if attributes.has_key?(:'accept_paypal')
|
204
|
+
self.accept_paypal = attributes[:'accept_paypal']
|
155
205
|
end
|
156
206
|
|
157
|
-
if attributes.has_key?(:'
|
158
|
-
self.
|
207
|
+
if attributes.has_key?(:'accounting_code')
|
208
|
+
self.accounting_code = attributes[:'accounting_code']
|
159
209
|
end
|
160
210
|
|
161
|
-
if attributes.has_key?(:'
|
162
|
-
self.
|
211
|
+
if attributes.has_key?(:'api_password')
|
212
|
+
self.api_password = attributes[:'api_password']
|
163
213
|
end
|
164
214
|
|
165
|
-
if attributes.has_key?(:'
|
166
|
-
self.
|
215
|
+
if attributes.has_key?(:'api_username')
|
216
|
+
self.api_username = attributes[:'api_username']
|
167
217
|
end
|
168
218
|
|
169
|
-
if attributes.has_key?(:'
|
170
|
-
self.
|
219
|
+
if attributes.has_key?(:'certificate_on_file')
|
220
|
+
self.certificate_on_file = attributes[:'certificate_on_file']
|
171
221
|
end
|
172
222
|
|
173
|
-
if attributes.has_key?(:'
|
174
|
-
self.
|
223
|
+
if attributes.has_key?(:'deposit_to_account')
|
224
|
+
self.deposit_to_account = attributes[:'deposit_to_account']
|
175
225
|
end
|
176
226
|
|
177
|
-
if attributes.has_key?(:'
|
178
|
-
self.
|
227
|
+
if attributes.has_key?(:'email')
|
228
|
+
self.email = attributes[:'email']
|
179
229
|
end
|
180
230
|
|
181
|
-
if attributes.has_key?(:'
|
182
|
-
self.
|
231
|
+
if attributes.has_key?(:'environment')
|
232
|
+
self.environment = attributes[:'environment']
|
183
233
|
end
|
184
234
|
|
185
|
-
if attributes.has_key?(:'
|
186
|
-
self.
|
235
|
+
if attributes.has_key?(:'header_image_url')
|
236
|
+
self.header_image_url = attributes[:'header_image_url']
|
187
237
|
end
|
188
238
|
|
189
|
-
if attributes.has_key?(:'
|
190
|
-
self.
|
239
|
+
if attributes.has_key?(:'hide_bill_me_later')
|
240
|
+
self.hide_bill_me_later = attributes[:'hide_bill_me_later']
|
191
241
|
end
|
192
242
|
|
193
|
-
if attributes.has_key?(:'
|
194
|
-
self.
|
243
|
+
if attributes.has_key?(:'hide_express_checkout_on_view_cart')
|
244
|
+
self.hide_express_checkout_on_view_cart = attributes[:'hide_express_checkout_on_view_cart']
|
195
245
|
end
|
196
246
|
|
197
|
-
if attributes.has_key?(:'
|
198
|
-
self.
|
247
|
+
if attributes.has_key?(:'hide_for_unshipped_orders')
|
248
|
+
self.hide_for_unshipped_orders = attributes[:'hide_for_unshipped_orders']
|
199
249
|
end
|
200
250
|
|
201
|
-
if attributes.has_key?(:'
|
202
|
-
self.
|
251
|
+
if attributes.has_key?(:'hold_in_ar')
|
252
|
+
self.hold_in_ar = attributes[:'hold_in_ar']
|
203
253
|
end
|
204
254
|
|
205
|
-
if attributes.has_key?(:'
|
206
|
-
self.
|
255
|
+
if attributes.has_key?(:'landing_page')
|
256
|
+
self.landing_page = attributes[:'landing_page']
|
207
257
|
end
|
208
258
|
|
209
|
-
if attributes.has_key?(:'
|
210
|
-
self.
|
259
|
+
if attributes.has_key?(:'mode')
|
260
|
+
self.mode = attributes[:'mode']
|
211
261
|
end
|
212
262
|
|
213
|
-
if attributes.has_key?(:'
|
214
|
-
self.
|
263
|
+
if attributes.has_key?(:'private_key_password')
|
264
|
+
self.private_key_password = attributes[:'private_key_password']
|
215
265
|
end
|
216
266
|
|
217
|
-
if attributes.has_key?(:'
|
218
|
-
self.
|
267
|
+
if attributes.has_key?(:'processing_fee')
|
268
|
+
self.processing_fee = attributes[:'processing_fee']
|
219
269
|
end
|
220
270
|
|
221
|
-
if attributes.has_key?(:'
|
222
|
-
self.
|
271
|
+
if attributes.has_key?(:'processing_percentage')
|
272
|
+
self.processing_percentage = attributes[:'processing_percentage']
|
223
273
|
end
|
224
274
|
|
225
|
-
if attributes.has_key?(:'
|
226
|
-
self.
|
275
|
+
if attributes.has_key?(:'push_paypal')
|
276
|
+
self.push_paypal = attributes[:'push_paypal']
|
227
277
|
end
|
228
278
|
|
229
|
-
if attributes.has_key?(:'
|
230
|
-
self.
|
279
|
+
if attributes.has_key?(:'restrictions')
|
280
|
+
self.restrictions = attributes[:'restrictions']
|
231
281
|
end
|
232
282
|
|
233
|
-
if attributes.has_key?(:'
|
234
|
-
self.
|
283
|
+
if attributes.has_key?(:'send_recurring')
|
284
|
+
self.send_recurring = attributes[:'send_recurring']
|
235
285
|
end
|
236
286
|
|
237
|
-
if attributes.has_key?(:'
|
238
|
-
self.
|
287
|
+
if attributes.has_key?(:'short_paypal_marketing_text')
|
288
|
+
self.short_paypal_marketing_text = attributes[:'short_paypal_marketing_text']
|
239
289
|
end
|
240
290
|
|
241
|
-
if attributes.has_key?(:'
|
242
|
-
self.
|
291
|
+
if attributes.has_key?(:'show_card_logos_not_directly_supported')
|
292
|
+
self.show_card_logos_not_directly_supported = attributes[:'show_card_logos_not_directly_supported']
|
243
293
|
end
|
244
294
|
|
245
|
-
if attributes.has_key?(:'
|
246
|
-
self.
|
295
|
+
if attributes.has_key?(:'show_signature')
|
296
|
+
self.show_signature = attributes[:'show_signature']
|
247
297
|
end
|
248
298
|
|
249
|
-
if attributes.has_key?(:'
|
250
|
-
self.
|
299
|
+
if attributes.has_key?(:'signature')
|
300
|
+
self.signature = attributes[:'signature']
|
251
301
|
end
|
252
302
|
|
253
|
-
if attributes.has_key?(:'
|
254
|
-
self.
|
303
|
+
if attributes.has_key?(:'solution_type')
|
304
|
+
self.solution_type = attributes[:'solution_type']
|
255
305
|
end
|
256
306
|
|
257
|
-
if attributes.has_key?(:'
|
258
|
-
self.
|
307
|
+
if attributes.has_key?(:'summary_email')
|
308
|
+
self.summary_email = attributes[:'summary_email']
|
259
309
|
end
|
260
310
|
|
261
|
-
if attributes.has_key?(:'
|
262
|
-
self.
|
311
|
+
if attributes.has_key?(:'summary_mode')
|
312
|
+
self.summary_mode = attributes[:'summary_mode']
|
263
313
|
end
|
264
314
|
|
265
|
-
if attributes.has_key?(:'
|
266
|
-
self.
|
315
|
+
if attributes.has_key?(:'zero_dollar_penny')
|
316
|
+
self.zero_dollar_penny = attributes[:'zero_dollar_penny']
|
267
317
|
end
|
268
318
|
end
|
269
319
|
|
@@ -277,43 +327,91 @@ module UltracartClient
|
|
277
327
|
# Check to see if the all the properties in the model are valid
|
278
328
|
# @return true if the model is valid
|
279
329
|
def valid?
|
330
|
+
environment_validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
|
331
|
+
return false unless environment_validator.valid?(@environment)
|
332
|
+
landing_page_validator = EnumAttributeValidator.new('String', ['Billing', 'Login'])
|
333
|
+
return false unless landing_page_validator.valid?(@landing_page)
|
334
|
+
mode_validator = EnumAttributeValidator.new('String', ['WPPECO', 'WPPECDP'])
|
335
|
+
return false unless mode_validator.valid?(@mode)
|
336
|
+
solution_type_validator = EnumAttributeValidator.new('String', ['Sole', 'Mark'])
|
337
|
+
return false unless solution_type_validator.valid?(@solution_type)
|
280
338
|
true
|
281
339
|
end
|
282
340
|
|
341
|
+
# Custom attribute writer method checking allowed values (enum).
|
342
|
+
# @param [Object] environment Object to be assigned
|
343
|
+
def environment=(environment)
|
344
|
+
validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
|
345
|
+
unless validator.valid?(environment)
|
346
|
+
fail ArgumentError, 'invalid value for "environment", must be one of #{validator.allowable_values}.'
|
347
|
+
end
|
348
|
+
@environment = environment
|
349
|
+
end
|
350
|
+
|
351
|
+
# Custom attribute writer method checking allowed values (enum).
|
352
|
+
# @param [Object] landing_page Object to be assigned
|
353
|
+
def landing_page=(landing_page)
|
354
|
+
validator = EnumAttributeValidator.new('String', ['Billing', 'Login'])
|
355
|
+
unless validator.valid?(landing_page)
|
356
|
+
fail ArgumentError, 'invalid value for "landing_page", must be one of #{validator.allowable_values}.'
|
357
|
+
end
|
358
|
+
@landing_page = landing_page
|
359
|
+
end
|
360
|
+
|
361
|
+
# Custom attribute writer method checking allowed values (enum).
|
362
|
+
# @param [Object] mode Object to be assigned
|
363
|
+
def mode=(mode)
|
364
|
+
validator = EnumAttributeValidator.new('String', ['WPPECO', 'WPPECDP'])
|
365
|
+
unless validator.valid?(mode)
|
366
|
+
fail ArgumentError, 'invalid value for "mode", must be one of #{validator.allowable_values}.'
|
367
|
+
end
|
368
|
+
@mode = mode
|
369
|
+
end
|
370
|
+
|
371
|
+
# Custom attribute writer method checking allowed values (enum).
|
372
|
+
# @param [Object] solution_type Object to be assigned
|
373
|
+
def solution_type=(solution_type)
|
374
|
+
validator = EnumAttributeValidator.new('String', ['Sole', 'Mark'])
|
375
|
+
unless validator.valid?(solution_type)
|
376
|
+
fail ArgumentError, 'invalid value for "solution_type", must be one of #{validator.allowable_values}.'
|
377
|
+
end
|
378
|
+
@solution_type = solution_type
|
379
|
+
end
|
380
|
+
|
283
381
|
# Checks equality by comparing each attribute.
|
284
382
|
# @param [Object] Object to be compared
|
285
383
|
def ==(o)
|
286
384
|
return true if self.equal?(o)
|
287
385
|
self.class == o.class &&
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
paypal_show_card_logos_not_directly_supported == o.paypal_show_card_logos_not_directly_supported &&
|
308
|
-
paypal_show_signature == o.paypal_show_signature &&
|
309
|
-
paypal_signature == o.paypal_signature &&
|
310
|
-
paypal_solution_type == o.paypal_solution_type &&
|
311
|
-
paypal_summary_email == o.paypal_summary_email &&
|
312
|
-
paypal_summary_mode == o.paypal_summary_mode &&
|
313
|
-
paypal_zero_dollar_penny == o.paypal_zero_dollar_penny &&
|
314
|
-
push_pay_pal == o.push_pay_pal &&
|
386
|
+
accept_paypal == o.accept_paypal &&
|
387
|
+
accounting_code == o.accounting_code &&
|
388
|
+
api_password == o.api_password &&
|
389
|
+
api_username == o.api_username &&
|
390
|
+
certificate_on_file == o.certificate_on_file &&
|
391
|
+
deposit_to_account == o.deposit_to_account &&
|
392
|
+
email == o.email &&
|
393
|
+
environment == o.environment &&
|
394
|
+
header_image_url == o.header_image_url &&
|
395
|
+
hide_bill_me_later == o.hide_bill_me_later &&
|
396
|
+
hide_express_checkout_on_view_cart == o.hide_express_checkout_on_view_cart &&
|
397
|
+
hide_for_unshipped_orders == o.hide_for_unshipped_orders &&
|
398
|
+
hold_in_ar == o.hold_in_ar &&
|
399
|
+
landing_page == o.landing_page &&
|
400
|
+
mode == o.mode &&
|
401
|
+
private_key_password == o.private_key_password &&
|
402
|
+
processing_fee == o.processing_fee &&
|
403
|
+
processing_percentage == o.processing_percentage &&
|
404
|
+
push_paypal == o.push_paypal &&
|
315
405
|
restrictions == o.restrictions &&
|
316
|
-
|
406
|
+
send_recurring == o.send_recurring &&
|
407
|
+
short_paypal_marketing_text == o.short_paypal_marketing_text &&
|
408
|
+
show_card_logos_not_directly_supported == o.show_card_logos_not_directly_supported &&
|
409
|
+
show_signature == o.show_signature &&
|
410
|
+
signature == o.signature &&
|
411
|
+
solution_type == o.solution_type &&
|
412
|
+
summary_email == o.summary_email &&
|
413
|
+
summary_mode == o.summary_mode &&
|
414
|
+
zero_dollar_penny == o.zero_dollar_penny
|
317
415
|
end
|
318
416
|
|
319
417
|
# @see the `==` method
|
@@ -325,7 +423,7 @@ module UltracartClient
|
|
325
423
|
# Calculates hash code according to all attributes.
|
326
424
|
# @return [Fixnum] Hash code
|
327
425
|
def hash
|
328
|
-
[
|
426
|
+
[accept_paypal, accounting_code, api_password, api_username, certificate_on_file, deposit_to_account, email, environment, header_image_url, hide_bill_me_later, hide_express_checkout_on_view_cart, hide_for_unshipped_orders, hold_in_ar, landing_page, mode, private_key_password, processing_fee, processing_percentage, push_paypal, restrictions, send_recurring, short_paypal_marketing_text, show_card_logos_not_directly_supported, show_signature, signature, solution_type, summary_email, summary_mode, zero_dollar_penny].hash
|
329
427
|
end
|
330
428
|
|
331
429
|
# Builds the object from hash
|