LitleOnline 8.12.0 → 8.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +28 -0
- data/Rakefile +2 -3
- data/lib/Communications.rb +14 -12
- data/lib/LitleOnline.rb +11 -2
- data/lib/LitleOnlineRequest.rb +435 -284
- data/lib/LitleXmlMapper.rb +1 -2
- data/lib/XMLFields.rb +900 -307
- data/lib/cacert.pem +3331 -0
- data/test/certification/certTest2_authenhanced.rb +7 -7
- data/test/certification/certTest5_token.rb +8 -8
- data/test/functional/test_auth.rb +106 -3
- data/test/functional/test_authReversal.rb +5 -6
- data/test/functional/test_capture.rb +12 -1
- data/test/functional/test_captureGivenAuth.rb +25 -5
- data/test/functional/test_credit.rb +1 -1
- data/test/functional/test_echeckRedeposit.rb +34 -0
- data/test/functional/test_echeckVerification.rb +33 -0
- data/test/functional/test_forceCapture.rb +35 -0
- data/test/functional/test_sale.rb +45 -13
- data/test/functional/test_xmlfields.rb +197 -10
- data/test/functional/ts_all.rb +2 -0
- data/test/unit/test_LitleOnlineRequest.rb +2 -59
- data/test/unit/test_auth.rb +2 -51
- data/test/unit/test_authReversal.rb +10 -5
- data/test/unit/test_capture.rb +5 -7
- data/test/unit/test_captureGivenAuth.rb +0 -19
- data/test/unit/test_credit.rb +1 -0
- data/test/unit/test_echeckCredit.rb +0 -2
- data/test/unit/test_echeckRedeposit.rb +0 -34
- data/test/unit/test_echeckSale.rb +0 -1
- data/test/unit/test_echeckVerification.rb +0 -33
- data/test/unit/test_forceCapture.rb +0 -35
- data/test/unit/test_sale.rb +20 -51
- data/test/unit/test_xmlfields.rb +44 -84
- data/test/unit/ts_unit.rb +1 -1
- metadata +13 -26
- data/index.html +0 -176
- data/index.html.1 +0 -176
- data/lib/Checker.rb +0 -56
- data/test/unit/test_Checker.rb +0 -58
data/lib/LitleXmlMapper.rb
CHANGED
@@ -28,10 +28,9 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
28
28
|
# Maps the request to Litle XML -> Sends XML payload to Litle via HTTP(S) -> formats XML response into a Ruby hash and returns it
|
29
29
|
#
|
30
30
|
class LitleXmlMapper
|
31
|
-
def LitleXmlMapper.request(
|
31
|
+
def LitleXmlMapper.request(request_xml, config_hash)
|
32
32
|
|
33
33
|
# create a Litle XML request from the nested hashes
|
34
|
-
request_xml = Obj2xml.to_XML(hash)
|
35
34
|
if(config_hash['printxml'])
|
36
35
|
puts request_xml
|
37
36
|
end
|
data/lib/XMLFields.rb
CHANGED
@@ -22,368 +22,961 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
22
22
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
23
23
|
OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
=end
|
25
|
-
|
26
25
|
#
|
27
26
|
# Contains all of the underlying XML fields and specifications needed to create the transaction set
|
28
27
|
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
Checker.required_missing(hash_out)
|
49
|
-
return hash_out
|
28
|
+
|
29
|
+
class OptionalChoiceNode < XML::Mapping::ChoiceNode
|
30
|
+
def obj_to_xml(obj,xml)
|
31
|
+
count = 0
|
32
|
+
@choices.each do |path,node|
|
33
|
+
if node.is_present_in? obj
|
34
|
+
count = count + 1
|
35
|
+
end
|
36
|
+
end
|
37
|
+
if(count > 1)
|
38
|
+
raise RuntimeError, "Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!"
|
39
|
+
end
|
40
|
+
@choices.each do |path,node|
|
41
|
+
if node.is_present_in? obj
|
42
|
+
node.obj_to_xml(obj,xml)
|
43
|
+
path.first(xml, :ensure_created=>true)
|
44
|
+
return true
|
45
|
+
end
|
46
|
+
end
|
50
47
|
end
|
48
|
+
end
|
49
|
+
|
50
|
+
XML::Mapping.add_node_class OptionalChoiceNode
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
52
|
+
class Authentication
|
53
|
+
include XML::Mapping
|
54
|
+
text_node :user, "user"
|
55
|
+
text_node :password, "password"
|
56
|
+
end
|
57
|
+
|
58
|
+
class Contact
|
59
|
+
include XML::Mapping
|
60
|
+
text_node :name, "name", :default_value=>nil
|
61
|
+
text_node :firstName, "firstName", :default_value=>nil
|
62
|
+
text_node :middleInitial, "middleInitial", :default_value=>nil
|
63
|
+
text_node :lastName, "lastName", :default_value=>nil
|
64
|
+
text_node :companyName, "companyName", :default_value=>nil
|
65
|
+
text_node :addressLine1, "addressLine1", :default_value=>nil
|
66
|
+
text_node :addressLine2, "addressLine2", :default_value=>nil
|
67
|
+
text_node :addressLine3, "addressLine3", :default_value=>nil
|
68
|
+
text_node :city, "city", :default_value=>nil
|
69
|
+
text_node :state, "state", :default_value=>nil
|
70
|
+
text_node :zip, "zip", :default_value=>nil
|
71
|
+
text_node :country, "country", :default_value=>nil
|
72
|
+
text_node :email, "email", :default_value=>nil
|
73
|
+
text_node :phone, "phone", :default_value=>nil
|
74
|
+
def self.from_hash(hash, name='contact')
|
75
|
+
base = hash[name]
|
76
|
+
if(base)
|
77
|
+
this = Contact.new
|
78
|
+
this.name = base['name']
|
79
|
+
this.firstName = base['firstName']
|
80
|
+
this.middleInitial = base['middleInitial']
|
81
|
+
this.lastName = base['lastName']
|
82
|
+
this.companyName = base['companyName']
|
83
|
+
this.addressLine1 = base['addressLine1']
|
84
|
+
this.addressLine2 = base['addressLine2']
|
85
|
+
this.addressLine3 = base['addressLine3']
|
86
|
+
this.city = base['city']
|
87
|
+
this.state = base['state']
|
88
|
+
this.zip = base['zip']
|
89
|
+
this.country = base['country']
|
90
|
+
this.email = base['email']
|
91
|
+
this.phone = base['phone']
|
92
|
+
this
|
93
|
+
else
|
94
|
+
nil
|
95
|
+
end
|
70
96
|
end
|
97
|
+
end
|
71
98
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
99
|
+
class CustomerInfo
|
100
|
+
include XML::Mapping
|
101
|
+
text_node :ssn, "ssn", :default_value=>nil
|
102
|
+
text_node :dob, "dob", :default_value=>nil
|
103
|
+
text_node :customerRegistrationDate, "customerRegistrationDate", :default_value=>nil
|
104
|
+
text_node :customerType, "customerType", :default_value=>nil
|
105
|
+
text_node :incomeAmount, "incomeAmount", :default_value=>nil
|
106
|
+
text_node :incomeCurrency, "incomeCurrency", :default_value=>nil
|
107
|
+
text_node :customerCheckingAccount, "customerCheckingAccount", :default_value=>nil
|
108
|
+
text_node :customerSavingAccount, "customerSavingAccount", :default_value=>nil
|
109
|
+
text_node :customerWorkTelephone, "customerWorkTelephone", :default_value=>nil
|
110
|
+
text_node :residenceStatus, "residenceStatus", :default_value=>nil
|
111
|
+
text_node :yearsAtResidence, "yearsAtResidence", :default_value=>nil
|
112
|
+
text_node :yearsAtEmployer, "yearsAtEmployer", :default_value=>nil
|
113
|
+
def self.from_hash(hash, name='customerInfo')
|
114
|
+
base = hash[name]
|
115
|
+
if(base)
|
116
|
+
this = CustomerInfo.new
|
117
|
+
this.ssn = base['ssn']
|
118
|
+
this.dob = base['dob']
|
119
|
+
this.customerRegistrationDate = base['customerRegistrationDate']
|
120
|
+
this.customerType = base['customerType']
|
121
|
+
this.incomeAmount = base['incomeAmount']
|
122
|
+
this.incomeCurrency = base['incomeCurrency']
|
123
|
+
this.customerCheckingAccount = base['customerCheckingAccount']
|
124
|
+
this.customerSavingAccount = base['customerSavingAccount']
|
125
|
+
this.customerWorkTelephone = base['customerWorkTelephone']
|
126
|
+
this.residenceStatus = base['residenceStatus']
|
127
|
+
this.yearsAtResidence = base['yearsAtResidence']
|
128
|
+
this.yearsAtEmployer = base['yearsAtEmployer']
|
129
|
+
this
|
130
|
+
else
|
131
|
+
nil
|
132
|
+
end
|
91
133
|
end
|
134
|
+
end
|
92
135
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
136
|
+
class BillMeLaterRequest
|
137
|
+
include XML::Mapping
|
138
|
+
text_node :bmlMerchantId, "bmlMerchantId", :default_value=>nil
|
139
|
+
text_node :termsAndConditions, "termsAndConditions", :default_value=>nil
|
140
|
+
text_node :preapprovalNumber, "preapprovalNumber", :default_value=>nil
|
141
|
+
text_node :merchantPromotionalCode, "merchantPromotionalCode", :default_value=>nil
|
142
|
+
text_node :customerPasswordChanged, "customerPasswordChanged", :default_value=>nil
|
143
|
+
text_node :customerEmailChanged, "customerEmailChanged", :default_value=>nil
|
144
|
+
text_node :customerPhoneChanged, "customerPhoneChanged", :default_value=>nil
|
145
|
+
text_node :secretQuestionCode, "secretQuestionCode", :default_value=>nil
|
146
|
+
text_node :secretQuestionAnswer, "secretQuestionAnswer", :default_value=>nil
|
147
|
+
text_node :virtualAuthenticationKeyPresenceIndicator, "virtualAuthenticationKeyPresenceIndicator", :default_value=>nil
|
148
|
+
text_node :virtualAuthenticationKeyData, "virtualAuthenticationKeyData", :default_value=>nil
|
149
|
+
text_node :itemCategoryCode, "itemCategoryCode", :default_value=>nil
|
150
|
+
text_node :authorizationSourcePlatform, "authorizationSourcePlatform", :default_value=>nil
|
151
|
+
def self.from_hash(hash, name='billMeLaterRequest')
|
152
|
+
base = hash[name]
|
153
|
+
if(base)
|
154
|
+
this = BillMeLaterRequest.new
|
155
|
+
this.bmlMerchantId = base['bmlMerchantId']
|
156
|
+
this.termsAndConditions = base['termsAndConditions']
|
157
|
+
this.merchantPromotionalCode = base['merchantPromotionalCode']
|
158
|
+
this.customerPasswordChanged = base['customerPasswordChanged']
|
159
|
+
this.customerEmailChanged = base['customerEmailChanged']
|
160
|
+
this.customerPhoneChanged = base['customerPhoneChanged']
|
161
|
+
this.secretQuestionCode = base['secretQuestionCode']
|
162
|
+
this.secretQuestionAnswer = base['secretQuestionAnswer']
|
163
|
+
this.virtualAuthenticationKeyPresenceIndicator = base['virtualAuthenticationKeyPresenceIndicator']
|
164
|
+
this.virtualAuthenticationKeyData = base['virtualAuthenticationKeyData']
|
165
|
+
this.itemCategoryCode = base['itemCategoryCode']
|
166
|
+
this.authorizationSourcePlatform = base['authorizationSourcePlatform']
|
167
|
+
this
|
168
|
+
else
|
169
|
+
nil
|
170
|
+
end
|
103
171
|
end
|
172
|
+
end
|
104
173
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
174
|
+
class FraudCheck
|
175
|
+
include XML::Mapping
|
176
|
+
text_node :authenticationValue, "authenticationValue", :default_value=>nil
|
177
|
+
text_node :authenticationTransactionId, "authenticationTransactionId", :default_value=>nil
|
178
|
+
text_node :customerIpAddress, "customerIpAddress", :default_value=>nil
|
179
|
+
text_node :authenticatedByMerchant, "authenticatedByMerchant", :default_value=>nil
|
180
|
+
def self.from_hash(hash, name='fraudCheck')
|
181
|
+
base = hash[name]
|
182
|
+
if(base)
|
183
|
+
this = FraudCheck.new
|
184
|
+
this.authenticationValue = base['authenticationValue']
|
185
|
+
this.authenticationTransactionId = base['authenticationTransactionId']
|
186
|
+
this.customerIpAddress = base['customerIpAddress']
|
187
|
+
this.authenticatedByMerchant = base['authenticatedByMerchant']
|
188
|
+
this
|
189
|
+
else
|
190
|
+
nil
|
191
|
+
end
|
115
192
|
end
|
193
|
+
end
|
116
194
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
195
|
+
class FraudResult
|
196
|
+
include XML::Mapping
|
197
|
+
text_node :avsResult, "avsResult", :default_value=>nil
|
198
|
+
text_node :cardValidationResult, "cardValidationResult", :default_value=>nil
|
199
|
+
text_node :authenticationResult, "authenticationResult", :default_value=>nil
|
200
|
+
text_node :advancedAVSResult, "advancedAVSResult", :default_value=>nil
|
201
|
+
def self.from_hash(hash, name='fraudResult')
|
202
|
+
base = hash[name]
|
203
|
+
if(base)
|
204
|
+
this = FraudResult.new
|
205
|
+
this.avsResult = base['avsResult']
|
206
|
+
this.cardValidationResult = base['cardValidationResult']
|
207
|
+
this.authenticationResult = base['authenticationResult']
|
208
|
+
this.advancedAVSResult = base['advancedAVSResult']
|
209
|
+
this
|
210
|
+
else
|
211
|
+
nil
|
212
|
+
end
|
127
213
|
end
|
214
|
+
end
|
128
215
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
216
|
+
class AuthInformation
|
217
|
+
include XML::Mapping
|
218
|
+
text_node :authDate, "authDate", :default_value=>nil
|
219
|
+
text_node :authCode, "authCode", :default_value=>nil
|
220
|
+
object_node :fraudResult, "fraudResult", :class=>FraudResult, :default_value=>nil
|
221
|
+
text_node :authAmount, "authAmount", :default_value=>nil
|
222
|
+
def self.from_hash(hash, name='authInformation')
|
223
|
+
base = hash[name]
|
224
|
+
if(base)
|
225
|
+
this = AuthInformation.new
|
226
|
+
this.authDate = base['authDate']
|
227
|
+
this.authCode = base['authCode']
|
228
|
+
this.fraudResult = FraudResult.from_hash(base)
|
229
|
+
this.authAmount = base['authAmount']
|
230
|
+
this
|
231
|
+
else
|
232
|
+
nil
|
233
|
+
end
|
140
234
|
end
|
235
|
+
end
|
141
236
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
237
|
+
class HealthcareAmounts
|
238
|
+
include XML::Mapping
|
239
|
+
text_node :totalHealthcareAmount, "totalHealthcareAmount", :default_value=>nil
|
240
|
+
text_node :rxAmount, "RxAmount", :default_value=>nil
|
241
|
+
text_node :visionAmount, "visionAmount", :default_value=>nil
|
242
|
+
text_node :clinicOtherAmount, "clinicOtherAmount", :default_value=>nil
|
243
|
+
text_node :dentalAmount, "dentalAmount", :default_value=>nil
|
244
|
+
def self.from_hash(hash, name='healthcareAmounts')
|
245
|
+
base = hash[name]
|
246
|
+
if(base)
|
247
|
+
this = HealthcareAmounts.new
|
248
|
+
this.totalHealthcareAmount = base['totalHealthcareAmount']
|
249
|
+
this.rxAmount = base['RxAmount']
|
250
|
+
this.visionAmount = base['visionAmount']
|
251
|
+
this.clinicOtherAmount = base['clinicOtherAmount']
|
252
|
+
this.dentalAmount = base['dentalAmount']
|
253
|
+
this
|
254
|
+
else
|
255
|
+
nil
|
256
|
+
end
|
150
257
|
end
|
258
|
+
end
|
151
259
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
260
|
+
class HealthcareIIAS
|
261
|
+
include XML::Mapping
|
262
|
+
object_node :healthcareAmounts, "healthcareAmounts", :class=>HealthcareAmounts, :default_value=>nil
|
263
|
+
text_node :iiasFlag, "IIASFlag", :default_value=>nil
|
264
|
+
def self.from_hash(hash, name='healthcareIIAS')
|
265
|
+
base = hash[name]
|
266
|
+
if(base)
|
267
|
+
this = HealthcareIIAS.new
|
268
|
+
this.healthcareAmounts = HealthcareAmounts.from_hash(base)
|
269
|
+
this.iiasFlag = base['IIASFlag']
|
270
|
+
this
|
271
|
+
else
|
272
|
+
nil
|
273
|
+
end
|
161
274
|
end
|
275
|
+
end
|
162
276
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
277
|
+
class Pos
|
278
|
+
include XML::Mapping
|
279
|
+
text_node :capability, "capability", :default_value=>nil
|
280
|
+
text_node :entryMode, "entryMode", :default_value=>nil
|
281
|
+
text_node :cardholderId, "cardholderId", :default_value=>nil
|
282
|
+
def self.from_hash(hash, name='pos')
|
283
|
+
base = hash[name]
|
284
|
+
if(base)
|
285
|
+
this = Pos.new
|
286
|
+
this.capability = base['capability']
|
287
|
+
this.entryMode = base['entryMode']
|
288
|
+
this.cardholderId = base['cardholderId']
|
289
|
+
this
|
290
|
+
else
|
291
|
+
nil
|
292
|
+
end
|
174
293
|
end
|
294
|
+
end
|
175
295
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
296
|
+
class DetailTax
|
297
|
+
include XML::Mapping
|
298
|
+
text_node :taxIncludedInTotal, "taxIncludedInTotal", :default_value=>nil
|
299
|
+
text_node :taxAmount, "taxAmount", :default_value=>nil
|
300
|
+
text_node :taxRate, "taxRate", :default_value=>nil
|
301
|
+
text_node :taxTypeIdentifier, "taxTypeIdentifier", :default_value=>nil
|
302
|
+
text_node :cardAcceptorTaxId, "cardAcceptorTaxId", :default_value=>nil
|
303
|
+
def self.from_hash(hash, index=0, name='detailTax')
|
304
|
+
base = hash[name][index]
|
305
|
+
if(base)
|
306
|
+
this = DetailTax.new
|
307
|
+
this.taxIncludedInTotal = base['taxIncludedInTotal']
|
308
|
+
this.taxAmount = base['taxAmount']
|
309
|
+
this.taxRate = base['taxRate']
|
310
|
+
this.taxTypeIdentifier = base['taxTypeIdentifier']
|
311
|
+
this.cardAcceptorTaxId = base['cardAcceptorTaxId']
|
312
|
+
this
|
313
|
+
else
|
314
|
+
nil
|
315
|
+
end
|
194
316
|
end
|
317
|
+
end
|
195
318
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
319
|
+
class LineItemData
|
320
|
+
include XML::Mapping
|
321
|
+
text_node :itemSequenceNumber, "itemSequenceNumber", :default_value=>nil
|
322
|
+
text_node :itemDescription, "itemDescription", :default_value=>nil
|
323
|
+
text_node :productCode, "productCode", :default_value=>nil
|
324
|
+
text_node :quantity, "quantity", :default_value=>nil
|
325
|
+
text_node :unitOfMeasure, "unitOfMeasure", :default_value=>nil
|
326
|
+
text_node :taxAmount, "taxAmount", :default_value=>nil
|
327
|
+
text_node :lineItemTotal, "lineItemTotal", :default_value=>nil
|
328
|
+
text_node :lineItemTotalWithTax, "lineItemTotalWithTax", :default_value=>nil
|
329
|
+
text_node :itemDiscountAmount, "itemDiscountAmount", :default_value=>nil
|
330
|
+
text_node :commodityCode, "commodityCode", :default_value=>nil
|
331
|
+
text_node :unitCost, "unitCost", :default_value=>nil
|
332
|
+
array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
|
333
|
+
def self.from_hash(hash, index=0, name='lineItemData')
|
334
|
+
base = hash[name][index]
|
335
|
+
if(base)
|
336
|
+
this = LineItemData.new
|
337
|
+
this.itemSequenceNumber = base['itemSequenceNumber']
|
338
|
+
this.itemDescription = base['itemDescription']
|
339
|
+
this.productCode = base['productCode']
|
340
|
+
this.quantity = base['quantity']
|
341
|
+
this.unitOfMeasure = base['unitOfMeasure']
|
342
|
+
this.taxAmount = base['taxAmount']
|
343
|
+
this.lineItemTotal = base['lineItemTotal']
|
344
|
+
this.lineItemTotalWithTax = base['lineItemTotalWithTax']
|
345
|
+
this.itemDiscountAmount = base['itemDiscountAmount']
|
346
|
+
this.commodityCode = base['commodityCode']
|
347
|
+
this.unitCost = base['unitCost']
|
348
|
+
if(base['detailTax'])
|
349
|
+
base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
|
350
|
+
end
|
351
|
+
this
|
352
|
+
else
|
353
|
+
nil
|
354
|
+
end
|
216
355
|
end
|
356
|
+
end
|
217
357
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
358
|
+
class EnhancedData
|
359
|
+
include XML::Mapping
|
360
|
+
text_node :customerReference, "customerReference", :default_value=>nil
|
361
|
+
text_node :salesTax, "salesTax", :default_value=>nil
|
362
|
+
text_node :deliveryType, "deliveryType", :default_value=>nil
|
363
|
+
text_node :taxExempt, "taxExempt", :default_value=>nil
|
364
|
+
text_node :discountAmount, "discountAmount", :default_value=>nil
|
365
|
+
text_node :shippingAmount, "shippingAmount", :default_value=>nil
|
366
|
+
text_node :dutyAmount, "dutyAmount", :default_value=>nil
|
367
|
+
text_node :shipFromPostalCode, "shipFromPostalCode", :default_value=>nil
|
368
|
+
text_node :destinationPostalCode, "destinationPostalCode", :default_value=>nil
|
369
|
+
text_node :destinationCountryCode, "destinationCountryCode", :default_value=>nil
|
370
|
+
text_node :invoiceReferenceNumber, "invoiceReferenceNumber", :default_value=>nil
|
371
|
+
text_node :orderDate, "orderDate", :default_value=>nil
|
372
|
+
array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
|
373
|
+
array_node :lineItemData, "", "lineItemData", :class=>LineItemData, :default_value=>[]
|
374
|
+
def self.from_hash(hash, name='enhancedData')
|
375
|
+
base = hash[name]
|
376
|
+
if(base)
|
377
|
+
this = EnhancedData.new
|
378
|
+
this.customerReference = base['customerReference']
|
379
|
+
this.salesTax = base['salesTax']
|
380
|
+
this.deliveryType = base['deliveryType']
|
381
|
+
this.taxExempt = base['taxExempt']
|
382
|
+
this.discountAmount = base['discountAmount']
|
383
|
+
this.shippingAmount = base['shippingAmount']
|
384
|
+
this.dutyAmount = base['dutyAmount']
|
385
|
+
this.shipFromPostalCode = base['shipFromPostalCode']
|
386
|
+
this.destinationPostalCode = base['destinationPostalCode']
|
387
|
+
this.destinationCountryCode = base['destinationCountryCode']
|
388
|
+
this.invoiceReferenceNumber = base['invoiceReferenceNumber']
|
389
|
+
this.orderDate = base['orderDate']
|
390
|
+
if(base['detailTax'])
|
391
|
+
base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
|
392
|
+
end
|
393
|
+
if(base['lineItemData'])
|
394
|
+
base['lineItemData'].each_index {|index| this.lineItemData << LineItemData.from_hash(base,index)}
|
395
|
+
end
|
396
|
+
this
|
397
|
+
else
|
398
|
+
nil
|
399
|
+
end
|
226
400
|
end
|
401
|
+
end
|
227
402
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
403
|
+
class AmexAggregatorData
|
404
|
+
include XML::Mapping
|
405
|
+
text_node :sellerId, "sellerId", :default_value=>nil
|
406
|
+
text_node :sellerMerchantCategoryCode, "sellerMerchantCategoryCode", :default_value=>nil
|
407
|
+
def self.from_hash(hash, name='amexAggregatorData')
|
408
|
+
base = hash[name]
|
409
|
+
if(base)
|
410
|
+
this = AmexAggregatorData.new
|
411
|
+
this.sellerId = base['sellerId']
|
412
|
+
this.sellerMerchantCategoryCode = base['sellerMerchantCategoryCode']
|
413
|
+
this
|
414
|
+
else
|
415
|
+
nil
|
416
|
+
end
|
240
417
|
end
|
418
|
+
end
|
241
419
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
420
|
+
class Card
|
421
|
+
include XML::Mapping
|
422
|
+
text_node :mop, "type", :default_value=>nil
|
423
|
+
text_node :track, "track", :default_value=>nil
|
424
|
+
text_node :number, "number", :default_value=>nil
|
425
|
+
text_node :expDate, "expDate", :default_value=>nil
|
426
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
427
|
+
|
428
|
+
def self.from_hash(hash, name='card')
|
429
|
+
base = hash[name]
|
430
|
+
if(base)
|
431
|
+
this = Card.new
|
432
|
+
this.mop = base['type']
|
433
|
+
this.track = base['track']
|
434
|
+
this.number = base['number']
|
435
|
+
this.expDate = base['expDate']
|
436
|
+
this.cardValidationNum = base['cardValidationNum']
|
437
|
+
this
|
438
|
+
else
|
439
|
+
nil
|
440
|
+
end
|
252
441
|
end
|
442
|
+
end
|
253
443
|
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
444
|
+
class CardToken
|
445
|
+
include XML::Mapping
|
446
|
+
text_node :litleToken, "litleToken", :default_value=>nil
|
447
|
+
text_node :expDate, "expDate", :default_value=>nil
|
448
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
449
|
+
text_node :mop, "type", :default_value=>nil
|
450
|
+
def self.from_hash(hash, name='cardToken')
|
451
|
+
base = hash[name]
|
452
|
+
if(base)
|
453
|
+
this = CardToken.new
|
454
|
+
this.litleToken = base['litleToken']
|
455
|
+
this.expDate = base['expDate']
|
456
|
+
this.cardValidationNum = base['cardValidationNum']
|
457
|
+
this.mop = base['type']
|
458
|
+
this
|
459
|
+
else
|
460
|
+
nil
|
461
|
+
end
|
264
462
|
end
|
463
|
+
end
|
265
464
|
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
465
|
+
class CardPaypage
|
466
|
+
include XML::Mapping
|
467
|
+
text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil
|
468
|
+
text_node :expDate, "expDate", :default_value=>nil
|
469
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
470
|
+
text_node :mop, "type", :default_value=>nil
|
471
|
+
def self.from_hash(hash, name='cardPaypage')
|
472
|
+
base = hash[name]
|
473
|
+
if(base)
|
474
|
+
this = CardPaypage.new
|
475
|
+
this.paypageRegistrationId = base['paypageRegistrationId']
|
476
|
+
this.expDate = base['expDate']
|
477
|
+
this.cardValidationNum = base['cardValidationNum']
|
478
|
+
this.mop = base['type']
|
479
|
+
this
|
480
|
+
else
|
481
|
+
nil
|
482
|
+
end
|
275
483
|
end
|
484
|
+
end
|
276
485
|
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
486
|
+
class PayPal
|
487
|
+
include XML::Mapping
|
488
|
+
text_node :payerId, "payerId", :default_value=>nil
|
489
|
+
text_node :token, "token", :default_value=>nil
|
490
|
+
text_node :transactionId, "transactionId", :default_value=>nil
|
491
|
+
def self.from_hash(hash, name='payPal')
|
492
|
+
base = hash[name]
|
493
|
+
if(base)
|
494
|
+
this = PayPal.new
|
495
|
+
this.payerId = base['payerId']
|
496
|
+
this.token = base['token']
|
497
|
+
this.transactionId = base['transactionId']
|
498
|
+
this
|
499
|
+
else
|
500
|
+
nil
|
501
|
+
end
|
287
502
|
end
|
503
|
+
end
|
288
504
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
505
|
+
class CreditPayPal
|
506
|
+
include XML::Mapping
|
507
|
+
text_node :payerId, "payerId", :default_value=>nil
|
508
|
+
text_node :payerEmail, "payerEmail", :default_value=>nil
|
509
|
+
def self.from_hash(hash, name='creditPaypal')
|
510
|
+
base = hash[name]
|
511
|
+
if(base)
|
512
|
+
this = CreditPayPal.new
|
513
|
+
this.payerId = base['payerId']
|
514
|
+
this.payerEmail = base['payerEmail']
|
515
|
+
this
|
516
|
+
else
|
517
|
+
nil
|
518
|
+
end
|
519
|
+
end
|
520
|
+
end
|
301
521
|
|
522
|
+
class CustomBilling
|
523
|
+
include XML::Mapping
|
524
|
+
optional_choice_node :if, 'phone', :then, (text_node :phone, "phone", :default_value=>nil),
|
525
|
+
:elsif, 'city', :then, (text_node :city, "city", :default_vaule=>nil),
|
526
|
+
:elsif, 'url', :then, (text_node :url, "url", :default_vaule=>nil)
|
527
|
+
text_node :descriptor, "descriptor", :default_value=>nil
|
528
|
+
def self.from_hash(hash, name='customBilling')
|
529
|
+
base = hash[name]
|
530
|
+
if(base)
|
531
|
+
this = CustomBilling.new
|
532
|
+
this.phone = base['phone']
|
533
|
+
this.city = base['city']
|
534
|
+
this.url = base['url']
|
535
|
+
this.descriptor = base['descriptor']
|
536
|
+
this
|
537
|
+
else
|
538
|
+
nil
|
539
|
+
end
|
302
540
|
end
|
541
|
+
end
|
303
542
|
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
543
|
+
class TaxBilling
|
544
|
+
include XML::Mapping
|
545
|
+
text_node :taxAuthority, "taxAuthority", :default_value=>nil
|
546
|
+
text_node :state, "state", :default_value=>nil
|
547
|
+
text_node :govtTxnType, "govtTxnType", :default_value=>nil
|
548
|
+
def self.from_hash(hash, name='taxBilling')
|
549
|
+
base = hash[name]
|
550
|
+
if(base)
|
551
|
+
this = TaxBilling.new
|
552
|
+
this.taxAuthority = base['taxAuthority']
|
553
|
+
this.state = base['state']
|
554
|
+
this.govtTxnType = base['govtTxnType']
|
555
|
+
this
|
556
|
+
else
|
557
|
+
nil
|
558
|
+
end
|
313
559
|
end
|
560
|
+
end
|
314
561
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
562
|
+
class ProcessingInstructions
|
563
|
+
include XML::Mapping
|
564
|
+
text_node :bypassVelocityCheck, "bypassVelocityCheck", :default_value=>nil
|
565
|
+
def self.from_hash(hash, name='processingInstructions')
|
566
|
+
base = hash[name]
|
567
|
+
if(base)
|
568
|
+
this = ProcessingInstructions.new
|
569
|
+
this.bypassVelocityCheck = base['bypassVelocityCheck']
|
570
|
+
this
|
571
|
+
else
|
572
|
+
nil
|
573
|
+
end
|
322
574
|
end
|
575
|
+
end
|
323
576
|
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
577
|
+
class EcheckForToken
|
578
|
+
include XML::Mapping
|
579
|
+
text_node :accNum, "accNum", :default_value=>nil
|
580
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
581
|
+
def self.from_hash(hash, name='echeckForToken')
|
582
|
+
base = hash[name]
|
583
|
+
if(base)
|
584
|
+
this = EcheckForToken.new
|
585
|
+
this.accNum = base['accNum']
|
586
|
+
this.routingNum = base['routingNum']
|
587
|
+
this
|
588
|
+
else
|
589
|
+
nil
|
590
|
+
end
|
332
591
|
end
|
592
|
+
end
|
333
593
|
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
594
|
+
class Filtering
|
595
|
+
include XML::Mapping
|
596
|
+
text_node :prepaid, "prepaid", :default_value=>nil
|
597
|
+
text_node :international, "international", :default_value=>nil
|
598
|
+
text_node :chargeback, "chargeback", :default_value=>nil
|
599
|
+
def self.from_hash(hash, name='filtering')
|
600
|
+
base = hash[name]
|
601
|
+
if(base)
|
602
|
+
this = Filtering.new
|
603
|
+
this.prepaid = base['prepaid']
|
604
|
+
this.international = base['international']
|
605
|
+
this.chargeback = base['chargeback']
|
606
|
+
this
|
607
|
+
else
|
608
|
+
nil
|
609
|
+
end
|
343
610
|
end
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
611
|
+
end
|
612
|
+
|
613
|
+
class MerchantData
|
614
|
+
include XML::Mapping
|
615
|
+
text_node :campaign, "campaign", :default_value=>nil
|
616
|
+
text_node :affiliate, "affiliate", :default_value=>nil
|
617
|
+
text_node :merchantGroupingId, "merchantGroupingId", :default_value=>nil
|
618
|
+
def self.from_hash(hash, name='merchantData')
|
619
|
+
base = hash[name]
|
620
|
+
if(base)
|
621
|
+
this = MerchantData.new
|
622
|
+
this.campaign = base['campaign']
|
623
|
+
this.affiliate = base['affiliate']
|
624
|
+
this.merchantGroupingId = base['merchantGroupingId']
|
625
|
+
this
|
626
|
+
else
|
627
|
+
nil
|
628
|
+
end
|
354
629
|
end
|
630
|
+
end
|
355
631
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
632
|
+
class Echeck
|
633
|
+
include XML::Mapping
|
634
|
+
text_node :accType, "accType", :default_value=>nil
|
635
|
+
text_node :accNum, "accNum", :default_value=>nil
|
636
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
637
|
+
text_node :checkNum, "checkNum", :default_value=>nil
|
638
|
+
def self.from_hash(hash, name='echeck')
|
639
|
+
base = hash[name]
|
640
|
+
if(base)
|
641
|
+
this = Echeck.new
|
642
|
+
this.accType = base['accType']
|
643
|
+
this.accNum = base['accNum']
|
644
|
+
this.routingNum = base['routingNum']
|
645
|
+
this.checkNum = base['checkNum']
|
646
|
+
this
|
647
|
+
else
|
648
|
+
nil
|
649
|
+
end
|
366
650
|
end
|
651
|
+
end
|
367
652
|
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
653
|
+
class EcheckToken
|
654
|
+
include XML::Mapping
|
655
|
+
text_node :litleToken, "litleToken", :default_value=>nil
|
656
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
657
|
+
text_node :accType, "accType", :default_value=>nil
|
658
|
+
text_node :checkNum, "checkNum", :default_value=>nil
|
659
|
+
def self.from_hash(hash, name='echeckToken')
|
660
|
+
base = hash[name]
|
661
|
+
if(base)
|
662
|
+
this = EcheckToken.new
|
663
|
+
this.litleToken = base['litleToken']
|
664
|
+
this.routingNum = base['routingNum']
|
665
|
+
this.accType = base['accType']
|
666
|
+
this.checkNum = base['checkNum']
|
667
|
+
this
|
668
|
+
else
|
669
|
+
nil
|
670
|
+
end
|
378
671
|
end
|
672
|
+
end
|
379
673
|
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
674
|
+
class RecyclingRequest
|
675
|
+
include XML::Mapping
|
676
|
+
text_node :recyleBy, "recyleBy", :default_value=>nil
|
677
|
+
def self.from_hash(hash, name='recyclingRequest')
|
678
|
+
base = hash[name]
|
679
|
+
if(base)
|
680
|
+
this = RecyclingRequest.new
|
681
|
+
this.recyleBy = base['recyleBy']
|
682
|
+
this
|
683
|
+
else
|
684
|
+
nil
|
685
|
+
end
|
387
686
|
end
|
388
687
|
end
|
389
688
|
|
689
|
+
class Authorization
|
690
|
+
include XML::Mapping
|
691
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
692
|
+
text_node :transactionId, "@id", :default_value=>nil
|
693
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
694
|
+
|
695
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
696
|
+
text_node :orderId, "orderId", :default_value=>nil
|
697
|
+
text_node :amount, "amount", :default_value=>nil
|
698
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
699
|
+
object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
|
700
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
701
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
702
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
703
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
704
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
705
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
706
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
707
|
+
object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil
|
708
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
709
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
710
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
711
|
+
text_node :taxType, "taxType", :default_value=>nil
|
712
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
713
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
714
|
+
text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
|
715
|
+
object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
|
716
|
+
object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
|
717
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
718
|
+
object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
|
719
|
+
end
|
720
|
+
|
721
|
+
class Sale
|
722
|
+
include XML::Mapping
|
723
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
724
|
+
text_node :transactionId, "@id", :default_value=>nil
|
725
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
726
|
+
|
727
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
728
|
+
text_node :orderId, "orderId", :default_value=>nil
|
729
|
+
text_node :amount, "amount", :default_value=>nil
|
730
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
731
|
+
object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
|
732
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
733
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
734
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
735
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
736
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
737
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
738
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
739
|
+
optional_choice_node :if, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck, :default_value=>nil),
|
740
|
+
:elsif, 'cardholderAuthentication', :then, (object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil)
|
741
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
742
|
+
text_node :taxType, "taxType", :default_value=>nil
|
743
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
744
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
745
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
746
|
+
text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
|
747
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
748
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
749
|
+
text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
|
750
|
+
object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
|
751
|
+
object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
|
752
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
753
|
+
object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
|
754
|
+
end
|
755
|
+
|
756
|
+
class Credit
|
757
|
+
include XML::Mapping
|
758
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
759
|
+
text_node :transactionId, "@id", :default_value=>nil
|
760
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
761
|
+
|
762
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
763
|
+
text_node :orderId, "orderId", :default_value=>nil
|
764
|
+
text_node :amount, "amount", :default_value=>nil
|
765
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
766
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
767
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
768
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>CreditPayPal),
|
769
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
770
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
771
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
772
|
+
text_node :taxType, "taxType", :default_value=>nil
|
773
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
774
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
775
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
776
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
777
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
778
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
779
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
780
|
+
text_node :actionReason, "actionReason", :default_value=>nil
|
781
|
+
end
|
782
|
+
|
783
|
+
class RegisterTokenRequest
|
784
|
+
include XML::Mapping
|
785
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
786
|
+
text_node :transactionId, "@id", :default_value=>nil
|
787
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
788
|
+
|
789
|
+
text_node :orderId, "orderId", :default_value=>nil
|
790
|
+
optional_choice_node :if, 'accountNumber', :then, (text_node :accountNumber, "accountNumber", :default_value=>nil),
|
791
|
+
:elsif, 'echeckForToken', :then, (object_node :echeckForToken, "echeckForToken", :class=>EcheckForToken),
|
792
|
+
:elsif, 'paypageRegistrationId', :then, (text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil)
|
793
|
+
end
|
794
|
+
|
795
|
+
class CaptureGivenAuth
|
796
|
+
include XML::Mapping
|
797
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
798
|
+
text_node :transactionId, "@id", :default_value=>nil
|
799
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
800
|
+
|
801
|
+
text_node :orderId, "orderId", :default_value=>nil
|
802
|
+
object_node :authInformation, "authInformation", :class=>AuthInformation, :default_value=>nil
|
803
|
+
text_node :amount, "amount", :default_value=>nil
|
804
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
805
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
806
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
807
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
808
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
809
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
810
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
811
|
+
text_node :taxType, "taxType", :default_value=>nil
|
812
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
813
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
814
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
815
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
816
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
817
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
818
|
+
end
|
819
|
+
|
820
|
+
class ForceCapture
|
821
|
+
include XML::Mapping
|
822
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
823
|
+
text_node :transactionId, "@id", :default_value=>nil
|
824
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
825
|
+
|
826
|
+
text_node :orderId, "orderId", :default_value=>nil
|
827
|
+
text_node :amount, "amount", :default_value=>nil
|
828
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
829
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
830
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
831
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
832
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
833
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
834
|
+
text_node :taxType, "taxType", :default_value=>nil
|
835
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
836
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
837
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
838
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
839
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
840
|
+
end
|
841
|
+
|
842
|
+
class AuthReversal
|
843
|
+
include XML::Mapping
|
844
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
845
|
+
text_node :transactionId, "@id", :default_value=>nil
|
846
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
847
|
+
text_node :partial, "@partial", :default_value=>nil
|
848
|
+
|
849
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
850
|
+
text_node :amount, "amount", :default_value=>nil
|
851
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
852
|
+
text_node :actionReason, "actionReason", :default_value=>nil
|
853
|
+
end
|
854
|
+
|
855
|
+
class Capture
|
856
|
+
include XML::Mapping
|
857
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
858
|
+
text_node :transactionId, "@id", :default_value=>nil
|
859
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
860
|
+
text_node :partial, "@partial", :default_value=>nil
|
861
|
+
|
862
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
863
|
+
text_node :amount, "amount", :default_value=>nil
|
864
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
865
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
866
|
+
text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
|
867
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
868
|
+
end
|
869
|
+
|
870
|
+
class Void
|
871
|
+
include XML::Mapping
|
872
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
873
|
+
text_node :transactionId, "@id", :default_value=>nil
|
874
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
875
|
+
|
876
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
877
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
878
|
+
end
|
879
|
+
|
880
|
+
class EcheckVoid
|
881
|
+
include XML::Mapping
|
882
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
883
|
+
text_node :transactionId, "@id", :default_value=>nil
|
884
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
885
|
+
|
886
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
887
|
+
end
|
888
|
+
|
889
|
+
class EcheckVerification
|
890
|
+
include XML::Mapping
|
891
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
892
|
+
text_node :transactionId, "@id", :default_value=>nil
|
893
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
894
|
+
|
895
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
896
|
+
text_node :orderId, "orderId", :default_value=>nil
|
897
|
+
text_node :amount, "amount", :default_value=>nil
|
898
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
899
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
900
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
901
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck),
|
902
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken)
|
903
|
+
end
|
904
|
+
|
905
|
+
class EcheckCredit
|
906
|
+
include XML::Mapping
|
907
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
908
|
+
text_node :transactionId, "@id", :default_value=>nil
|
909
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
910
|
+
|
911
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
912
|
+
text_node :orderId, "orderId", :default_value=>nil
|
913
|
+
text_node :amount, "amount", :default_value=>nil
|
914
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
915
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
916
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
917
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
918
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
919
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
920
|
+
end
|
921
|
+
|
922
|
+
class EcheckRedeposit
|
923
|
+
include XML::Mapping
|
924
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
925
|
+
text_node :transactionId, "@id", :default_value=>nil
|
926
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
927
|
+
|
928
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
929
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
930
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
931
|
+
end
|
932
|
+
|
933
|
+
class EcheckSale
|
934
|
+
include XML::Mapping
|
935
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
936
|
+
text_node :transactionId, "@id", :default_value=>nil
|
937
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
938
|
+
|
939
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
940
|
+
text_node :orderId, "orderId", :default_value=>nil
|
941
|
+
text_node :verify, "verify", :default_value=>nil
|
942
|
+
text_node :amount, "amount", :default_value=>nil
|
943
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
944
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
945
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
946
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
947
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
948
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
949
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
950
|
+
end
|
951
|
+
|
952
|
+
class OnlineRequest
|
953
|
+
include XML::Mapping
|
954
|
+
root_element_name "litleOnlineRequest"
|
955
|
+
text_node :merchantId, "@merchantId", :default_value=>nil
|
956
|
+
text_node :version, "@version", :default_value=>nil
|
957
|
+
text_node :xmlns, "@xmlns", :default_value=>nil
|
958
|
+
text_node :merchantSdk, "@merchantSdk", :default_vaule=>nil
|
959
|
+
object_node :authentication, "authentication", :class=>Authentication
|
960
|
+
optional_choice_node :if, 'authorization', :then, (object_node :authorization, "authorization", :class=>Authorization),
|
961
|
+
:elsif, 'sale', :then, (object_node :sale, "sale", :class=>Sale),
|
962
|
+
:elsif, 'captureGivenAuth', :then, (object_node :captureGivenAuth, "captureGivenAuth", :class=>CaptureGivenAuth),
|
963
|
+
:elsif, 'capture', :then, (object_node :capture, "capture", :class=>Capture),
|
964
|
+
:elsif, 'void', :then, (object_node :void, "void", :class=>Void),
|
965
|
+
:elsif, 'forceCapture', :then, (object_node :forceCapture, "forceCapture", :class=>Capture),
|
966
|
+
:elsif, 'credit', :then, (object_node :credit, "credit", :class=>Credit),
|
967
|
+
:elsif, 'authReversal', :then, (object_node :authReversal, "authReversal", :class=>AuthReversal),
|
968
|
+
:elsif, 'echeckCredit', :then, (object_node :echeckCredit, "echeckCredit", :class=>EcheckCredit),
|
969
|
+
:elsif, 'echeckRedeposit', :then, (object_node :echeckRedeposit, "echeckRedeposit", :class=>EcheckRedeposit),
|
970
|
+
:elsif, 'echeckSale', :then, (object_node :echeckSale, "echeckSale", :class=>EcheckSale),
|
971
|
+
:elsif, 'echeckVoid', :then, (object_node :echeckVoid, "echeckVoid", :class=>EcheckVoid),
|
972
|
+
:elsif, 'echeckVerification', :then, (object_node :echeckVerification, "echeckVerification", :class=>EcheckVerification),
|
973
|
+
:elsif, 'registerTokenRequest', :then, (object_node :registerTokenRequest, "registerTokenRequest", :class=>RegisterTokenRequest)
|
974
|
+
end
|
975
|
+
|
976
|
+
class LitleOnlineResponse
|
977
|
+
attr_accessor :message
|
978
|
+
end
|
979
|
+
|
980
|
+
class XMLFields
|
981
|
+
|
982
|
+
end
|