LitleOnline 8.12.3 → 8.12.4

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