LitleOnline 8.18.0 → 8.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,6 +35,8 @@ module LitleOnline
35
35
  def authorization(options)
36
36
  transaction = Authorization.new
37
37
  transaction.surchargeAmount = options['surchargeAmount']
38
+ transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
39
+ transaction.debtRepayment = options['debtRepayment']
38
40
  add_transaction_info(transaction, options)
39
41
 
40
42
  return transaction
@@ -50,7 +52,7 @@ module LitleOnline
50
52
  transaction.payPalNotes = options['payPalNotes']
51
53
  transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
52
54
  transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(options,'litleInternalRecurringRequest')
53
-
55
+ transaction.debtRepayment = options['debtRepayment']
54
56
  return transaction
55
57
  end
56
58
 
@@ -125,7 +127,7 @@ module LitleOnline
125
127
  transaction = ForceCapture.new
126
128
  transaction.surchargeAmount = options['surchargeAmount']
127
129
  transaction.customBilling = CustomBilling.from_hash(options)
128
-
130
+ transaction.debtRepayment = options['debtRepayment']
129
131
  add_order_info(transaction, options)
130
132
 
131
133
  return transaction
@@ -156,7 +158,7 @@ module LitleOnline
156
158
  transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
157
159
  transaction.customBilling = CustomBilling.from_hash(options)
158
160
  transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
159
-
161
+ transaction.debtRepayment = options['debtRepayment']
160
162
  return transaction
161
163
  end
162
164
 
@@ -294,4 +296,4 @@ module LitleOnline
294
296
  options['reportGroup']
295
297
  end
296
298
  end
297
- end
299
+ end
@@ -0,0 +1,297 @@
1
+ =begin
2
+ Copyright (c) 2011 Litle & Co.
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ =end
25
+ require_relative 'Configuration'
26
+
27
+ #
28
+ # This class does all the heavy lifting of mapping the Ruby hash into Litle XML format
29
+ # It also handles validation looking for missing or incorrect fields
30
+ # contains the methods to properly create each transaction type
31
+ #
32
+ module LitleOnline
33
+
34
+ class LitleTransaction
35
+ def authorization(options)
36
+ transaction = Authorization.new
37
+ transaction.surchargeAmount = options['surchargeAmount']
38
+ add_transaction_info(transaction, options)
39
+
40
+ return transaction
41
+ end
42
+
43
+ def sale(options)
44
+ transaction = Sale.new
45
+ add_transaction_info(transaction, options)
46
+
47
+ transaction.surchargeAmount = options['surchargeAmount']
48
+ transaction.fraudCheck = FraudCheck.from_hash(options,'fraudCheck')
49
+ transaction.payPalOrderComplete = options['payPalOrderComplete']
50
+ transaction.payPalNotes = options['payPalNotes']
51
+ transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
52
+ transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(options,'litleInternalRecurringRequest')
53
+
54
+ return transaction
55
+ end
56
+
57
+ def credit(options)
58
+ transaction = Credit.new
59
+ transaction.litleTxnId = options['litleTxnId']
60
+ if(transaction.litleTxnId.nil?)
61
+ transaction.orderId = options['orderId']
62
+ transaction.orderSource = options['orderSource']
63
+ transaction.taxType = options['taxType']
64
+ transaction.billToAddress = Contact.from_hash(options,'billToAddress')
65
+ transaction.amexAggregatorData = AmexAggregatorData.from_hash(options)
66
+ transaction.card = Card.from_hash(options)
67
+ transaction.token = CardToken.from_hash(options,'token')
68
+ transaction.paypage = CardPaypage.from_hash(options,'paypage')
69
+ end
70
+ transaction.amount = options['amount']
71
+ transaction.surchargeAmount = options['surchargeAmount']
72
+ transaction.customBilling = CustomBilling.from_hash(options)
73
+ transaction.enhancedData = EnhancedData.from_hash(options)
74
+ transaction.processingInstructions = ProcessingInstructions.from_hash(options)
75
+ transaction.pos = Pos.from_hash(options)
76
+ transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
77
+ transaction.payPalNotes = options['payPalNotes']
78
+ transaction.actionReason = options['actionReason']
79
+ transaction.paypal = CreditPayPal.from_hash(options,'paypal')
80
+
81
+ add_account_info(transaction, options)
82
+ return transaction
83
+ end
84
+
85
+ def auth_reversal(options)
86
+ transaction = AuthReversal.new
87
+
88
+ transaction.litleTxnId = options['litleTxnId']
89
+ transaction.amount = options['amount']
90
+ transaction.surchargeAmount = options['surchargeAmount']
91
+ transaction.payPalNotes = options['payPalNotes']
92
+ transaction.actionReason = options['actionReason']
93
+
94
+ add_account_info(transaction, options)
95
+ return transaction
96
+ end
97
+
98
+ def register_token_request(options)
99
+ transaction = RegisterTokenRequest.new
100
+
101
+ transaction.orderId = options['orderId']
102
+ transaction.accountNumber = options['accountNumber']
103
+ transaction.echeckForToken = EcheckForToken.from_hash(options)
104
+ transaction.paypageRegistrationId = options['paypageRegistrationId']
105
+
106
+ add_account_info(transaction, options)
107
+ return transaction
108
+ end
109
+
110
+ def update_card_validation_num_on_token(options)
111
+ transaction = UpdateCardValidationNumOnToken.new
112
+
113
+ transaction.orderId = options['orderId']
114
+ transaction.litleToken = options['litleToken']
115
+ transaction.cardValidationNum = options['cardValidationNum']
116
+
117
+ SchemaValidation.validate_length(transaction.litleToken, true, 13, 25, "updateCardValidationNumOnToken", "litleToken")
118
+ SchemaValidation.validate_length(transaction.cardValidationNum, true, 1, 4, "updateCardValidationNumOnToken", "cardValidationNum")
119
+
120
+ add_account_info(transaction, options)
121
+ return transaction
122
+ end
123
+
124
+ def force_capture(options)
125
+ transaction = ForceCapture.new
126
+ transaction.surchargeAmount = options['surchargeAmount']
127
+ transaction.customBilling = CustomBilling.from_hash(options)
128
+
129
+ add_order_info(transaction, options)
130
+
131
+ return transaction
132
+ end
133
+
134
+ def capture(options)
135
+ transaction = Capture.new
136
+
137
+ transaction.partial = options['partial']
138
+ transaction.litleTxnId = options['litleTxnId']
139
+ transaction.amount = options['amount']
140
+ transaction.surchargeAmount = options['surchargeAmount']
141
+ transaction.enhancedData = EnhancedData.from_hash(options)
142
+ transaction.processingInstructions = ProcessingInstructions.from_hash(options)
143
+ transaction.payPalOrderComplete = options['payPalOrderComplete']
144
+ transaction.payPalNotes = options['payPalNotes']
145
+
146
+ add_account_info(transaction, options)
147
+ return transaction
148
+ end
149
+
150
+ def capture_given_auth(options)
151
+ transaction = CaptureGivenAuth.new
152
+ add_order_info(transaction, options)
153
+
154
+ transaction.surchargeAmount = options['surchargeAmount']
155
+ transaction.authInformation = AuthInformation.from_hash(options)
156
+ transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
157
+ transaction.customBilling = CustomBilling.from_hash(options)
158
+ transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
159
+
160
+ return transaction
161
+ end
162
+
163
+ def void(options)
164
+ transaction = Void.new
165
+
166
+ transaction.litleTxnId = options['litleTxnId']
167
+ transaction.processingInstructions = ProcessingInstructions.from_hash(options)
168
+
169
+ add_account_info(transaction, options)
170
+ return transaction
171
+ end
172
+
173
+ def echeck_redeposit(options)
174
+ transaction = EcheckRedeposit.new
175
+ add_echeck(transaction, options)
176
+
177
+ transaction.litleTxnId = options['litleTxnId']
178
+ transaction.merchantData = MerchantData.from_hash(options)
179
+
180
+ return transaction
181
+ end
182
+
183
+ def echeck_sale(options)
184
+ transaction = EcheckSale.new
185
+ add_echeck(transaction, options)
186
+ add_echeck_order_info(transaction, options)
187
+
188
+ transaction.verify = options['verify']
189
+ transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
190
+ transaction.customBilling = CustomBilling.from_hash(options)
191
+
192
+ return transaction
193
+ end
194
+
195
+ def echeck_credit(options)
196
+ transaction = EcheckCredit.new
197
+ transaction.customBilling = CustomBilling.from_hash(options)
198
+
199
+ add_echeck_order_info(transaction, options)
200
+ add_echeck(transaction, options)
201
+
202
+ return transaction
203
+ end
204
+
205
+ def echeck_verification(options)
206
+ transaction = EcheckVerification.new
207
+
208
+ add_echeck_order_info(transaction, options)
209
+ add_echeck(transaction, options)
210
+ transaction.merchantData = MerchantData.from_hash(options)
211
+
212
+ return transaction
213
+ end
214
+
215
+ def echeck_void(options)
216
+ transaction = EcheckVoid.new
217
+ transaction.litleTxnId = options['litleTxnId']
218
+
219
+ add_account_info(transaction, options)
220
+ return transaction
221
+ end
222
+
223
+ def account_update(options)
224
+ transaction = AccountUpdate.new
225
+ transaction.card = Card.from_hash(options)
226
+ transaction.token = CardToken.from_hash(options,'token')
227
+ transaction.orderId = options['orderId']
228
+
229
+ add_account_info(transaction, options)
230
+
231
+ return transaction
232
+ end
233
+
234
+ private
235
+
236
+ def add_account_info(transaction, options)
237
+ transaction.reportGroup = get_report_group(options)
238
+ transaction.transactionId = options['id']
239
+ transaction.customerId = options['customerId']
240
+ end
241
+
242
+ def add_transaction_info(transaction, options)
243
+ transaction.litleTxnId = options['litleTxnId']
244
+ transaction.customerInfo = CustomerInfo.from_hash(options)
245
+ transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
246
+ transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
247
+ transaction.cardholderAuthentication = FraudCheck.from_hash(options)
248
+ transaction.allowPartialAuth = options['allowPartialAuth']
249
+ transaction.healthcareIIAS = HealthcareIIAS.from_hash(options)
250
+ transaction.filtering = Filtering.from_hash(options)
251
+ transaction.merchantData = MerchantData.from_hash(options)
252
+ transaction.recyclingRequest = RecyclingRequest.from_hash(options)
253
+ transaction.fraudFilterOverride = options['fraudFilterOverride']
254
+ transaction.customBilling = CustomBilling.from_hash(options)
255
+ transaction.paypal = PayPal.from_hash(options,'paypal')
256
+
257
+ add_order_info(transaction, options)
258
+ end
259
+
260
+ def add_order_info(transaction, options)
261
+ transaction.amount = options['amount']
262
+ transaction.orderId = options['orderId']
263
+ transaction.orderSource = options['orderSource']
264
+ transaction.taxType = options['taxType']
265
+ transaction.billToAddress = Contact.from_hash(options,'billToAddress')
266
+ transaction.enhancedData = EnhancedData.from_hash(options)
267
+ transaction.processingInstructions = ProcessingInstructions.from_hash(options)
268
+ transaction.pos = Pos.from_hash(options)
269
+ transaction.amexAggregatorData = AmexAggregatorData.from_hash(options)
270
+ transaction.card = Card.from_hash(options)
271
+ transaction.token = CardToken.from_hash(options,'token')
272
+ transaction.paypage = CardPaypage.from_hash(options,'paypage')
273
+
274
+ add_account_info(transaction, options)
275
+ end
276
+
277
+ def add_echeck_order_info(transaction, options)
278
+ transaction.litleTxnId = options['litleTxnId']
279
+ transaction.orderId = options['orderId']
280
+ transaction.amount = options['amount']
281
+ transaction.orderSource = options['orderSource']
282
+ transaction.billToAddress = Contact.from_hash(options,'billToAddress')
283
+ end
284
+
285
+ def add_echeck(transaction, options)
286
+ transaction.echeck = Echeck.from_hash(options)
287
+ transaction.echeckToken = EcheckToken.from_hash(options)
288
+
289
+ add_account_info(transaction, options)
290
+ end
291
+
292
+ def get_report_group(options)
293
+ #options['reportGroup'] || @config_hash['default_report_group']
294
+ options['reportGroup']
295
+ end
296
+ end
297
+ end
data/lib/XMLFields.rb CHANGED
@@ -892,15 +892,22 @@ module LitleOnline
892
892
  class Subscription
893
893
  include XML::Mapping
894
894
  text_node :planCode, "planCode", :default_value=>nil
895
- text_node :numberOfPaymentsRemaining, "numberOfPaymentsRemaining", :default_value=>nil
895
+ text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
896
+ text_node :startDate,"startDate",:default_value=>nil
897
+ text_node :amount,"amount",:default_value=>nil
898
+
896
899
  def self.from_hash(hash, name="subscription")
897
900
  base = hash[name]
898
901
  if(base)
899
902
  this = Subscription.new
900
903
  this.planCode = base['planCode']
901
- this.numberOfPaymentsRemaining = base['numberOfPaymentsRemaining']
904
+ this.numberOfPayments = base['numberOfPayments']
905
+ this.startDate = base['startDate']
906
+ this.amount = base['amount']
902
907
  SchemaValidation.validate_length(this.planCode, true, 1, 25, name, 'planCode')
903
- SchemaValidation.validate_size(this.numberOfPaymentsRemaining, true, 1, 99, name, 'numberOfPaymentsRemaining')
908
+ SchemaValidation.validate_size(this.numberOfPayments, false, 1, 99, name, 'numberOfPayments')
909
+ SchemaValidation.validate_date(this.startDate,false,name,'startDate')
910
+ SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
904
911
  this
905
912
  end
906
913
  end
@@ -969,6 +976,8 @@ module LitleOnline
969
976
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
970
977
  object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
971
978
  text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
979
+ object_node :recurringRequest,"recurringRequest", :class=>RecurringRequest, :default_value=>nil
980
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
972
981
  end
973
982
 
974
983
  class Sale
@@ -1009,6 +1018,7 @@ module LitleOnline
1009
1018
  text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
1010
1019
  object_node :recurringRequest, "recurringRequest", :class=>RecurringRequest, :default_value=>nil
1011
1020
  object_node :litleInternalRecurringRequest, "litleInternalRecurringRequest", :class=>LitleInternalRecurringRequest, :default_value=>nil
1021
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1012
1022
  end
1013
1023
 
1014
1024
  class Credit
@@ -1078,6 +1088,7 @@ module LitleOnline
1078
1088
  object_node :pos, "pos", :class=>Pos, :default_value=>nil
1079
1089
  object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1080
1090
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1091
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1081
1092
  end
1082
1093
 
1083
1094
  class ForceCapture
@@ -1102,6 +1113,7 @@ module LitleOnline
1102
1113
  object_node :pos, "pos", :class=>Pos, :default_value=>nil
1103
1114
  object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1104
1115
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1116
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1105
1117
  end
1106
1118
 
1107
1119
  class AuthReversal
data/lib/XMLFields.rb~ ADDED
@@ -0,0 +1,1380 @@
1
+ =begin
2
+ Copyright (c) 2011 Litle & Co.
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ =end
25
+ #
26
+ # Contains all of the underlying XML fields and specifications needed to create the transaction set
27
+ #
28
+
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
37
+ end
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
47
+ end
48
+ end
49
+ end
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 SchemaValidation
60
+
61
+ def self.validate_required(value, required, class_name, field_name)
62
+ if(required)
63
+ if(value.nil?)
64
+ raise "If #{class_name} is specified, it must have a #{field_name}"
65
+ end
66
+ end
67
+ end
68
+
69
+ def self.validate_length(value, required, min, max, class_name, field_name)
70
+ validate_required(value, required, class_name, field_name)
71
+ if(value.nil?)
72
+ return
73
+ end
74
+ if(value.length < min || value.length > max)
75
+ raise "If " + class_name + " " + field_name + " is specified, it must be between " + min.to_s + " and " + max.to_s + " characters long"
76
+ end
77
+ end
78
+
79
+ def self.validate_size(value, required, min, max, class_name, field_name)
80
+ validate_required(value, required, class_name, field_name)
81
+ if(value.nil?)
82
+ return
83
+ end
84
+ if(value.to_i < min || value.to_i > max || !(/\A\-?\d+\Z/ =~ value))
85
+ raise "If " + class_name + " " + field_name + " is specified, it must be between " + min.to_s + " and " + max.to_s
86
+ end
87
+ end
88
+
89
+ def self.validate_country(value, class_name, field_name)
90
+ if(value.nil?)
91
+ return
92
+ end
93
+ list = ["USA","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","TL","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","KN","LC","MF","VC","WS","SM","ST","SA","SN","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","ES","LK","SH","PM","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VA","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","RS","ME"]
94
+ if(!list.include? value)
95
+ raise "If " + class_name + " " + field_name + " is specified, it must be valid. You specified " + value
96
+ end
97
+ end
98
+
99
+ def self.validate_regex(value, required, regex, class_name, field_name)
100
+ validate_required(value, required, class_name, field_name)
101
+ if(value.nil?)
102
+ return
103
+ end
104
+ if(!(regex =~ value))
105
+ raise "If #{class_name} #{field_name} is specified, it must match the regular expression #{regex.inspect}"
106
+ end
107
+ end
108
+
109
+ def self.validate_enum(value, required, list, class_name, field_name)
110
+ validate_required(value, required, class_name, field_name)
111
+ if(value.nil?)
112
+ return
113
+ end
114
+ if(!list.include?(value))
115
+ str = '["'+ list.join('", "') + '"]'
116
+ raise "If #{class_name} #{field_name} is specified, it must be in #{str}"
117
+ end
118
+ end
119
+
120
+ def self.validate_long(value, required, class_name, field_name)
121
+ validate_size(value, required, -9223372036854775808, 9223372036854775807, class_name, field_name)
122
+ end
123
+
124
+ def self.validate_currency(value, required, class_name, field_name)
125
+ validate_enum(value, required, ['AUD','CAD','CHF','DKK','EUR','GBP','HKD','JPY','NOK','NZD','SEK','SGD','USD'], class_name, field_name)
126
+ end
127
+
128
+ def self.validate_boolean(value, required, class_name, field_name)
129
+ validate_enum(value, required, ['true','false','1','0'], class_name, field_name)
130
+ end
131
+
132
+ def self.validate_date(value, required, class_name, field_name)
133
+ validate_regex(value, required, /\A\d{4}-\d{2}-\d{2}\Z/, class_name, field_name)
134
+ end
135
+
136
+ end
137
+
138
+ class Contact
139
+ include XML::Mapping
140
+ text_node :name, "name", :default_value=>nil
141
+ text_node :firstName, "firstName", :default_value=>nil
142
+ text_node :middleInitial, "middleInitial", :default_value=>nil
143
+ text_node :lastName, "lastName", :default_value=>nil
144
+ text_node :companyName, "companyName", :default_value=>nil
145
+ text_node :addressLine1, "addressLine1", :default_value=>nil
146
+ text_node :addressLine2, "addressLine2", :default_value=>nil
147
+ text_node :addressLine3, "addressLine3", :default_value=>nil
148
+ text_node :city, "city", :default_value=>nil
149
+ text_node :state, "state", :default_value=>nil
150
+ text_node :zip, "zip", :default_value=>nil
151
+ text_node :country, "country", :default_value=>nil
152
+ text_node :email, "email", :default_value=>nil
153
+ text_node :phone, "phone", :default_value=>nil
154
+ def self.from_hash(hash, name='contact')
155
+ base = hash[name]
156
+ if(base)
157
+ this = Contact.new
158
+ this.name = base['name']
159
+ this.firstName = base['firstName']
160
+ this.middleInitial = base['middleInitial']
161
+ this.lastName = base['lastName']
162
+ this.companyName = base['companyName']
163
+ this.addressLine1 = base['addressLine1']
164
+ this.addressLine2 = base['addressLine2']
165
+ this.addressLine3 = base['addressLine3']
166
+ this.city = base['city']
167
+ this.state = base['state']
168
+ this.zip = base['zip']
169
+ this.country = base['country']
170
+ this.email = base['email']
171
+ this.phone = base['phone']
172
+ SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
173
+ SchemaValidation.validate_length(this.firstName, false, 1, 25, name, "firstName")
174
+ SchemaValidation.validate_length(this.middleInitial, false, 1, 1, name, "middleInitial")
175
+ SchemaValidation.validate_length(this.lastName, false, 1, 25, name, "lastName")
176
+ SchemaValidation.validate_length(this.companyName, false, 1, 40, name, "companyName")
177
+ SchemaValidation.validate_length(this.addressLine1, false, 1, 35, name, "addressLine1")
178
+ SchemaValidation.validate_length(this.addressLine2, false, 1, 35, name, "addressLine2")
179
+ SchemaValidation.validate_length(this.addressLine3, false, 1, 35, name, "addressLine3")
180
+ SchemaValidation.validate_length(this.city, false, 1, 35, name, "city")
181
+ SchemaValidation.validate_length(this.state, false, 1, 30, name, "state")
182
+ SchemaValidation.validate_length(this.zip, false, 1, 20, name, "zip")
183
+ SchemaValidation.validate_length(this.country, false, 1, 3, name, "country")
184
+ SchemaValidation.validate_country(this.country, name, "country")
185
+ SchemaValidation.validate_length(this.email, false, 1, 100, name, "email")
186
+ SchemaValidation.validate_length(this.phone, false, 1, 20, name, "phone")
187
+ this
188
+ else
189
+ nil
190
+ end
191
+ end
192
+ end
193
+
194
+ class CustomerInfo
195
+ include XML::Mapping
196
+ text_node :ssn, "ssn", :default_value=>nil
197
+ text_node :dob, "dob", :default_value=>nil
198
+ text_node :customerRegistrationDate, "customerRegistrationDate", :default_value=>nil
199
+ text_node :customerType, "customerType", :default_value=>nil
200
+ text_node :incomeAmount, "incomeAmount", :default_value=>nil
201
+ text_node :incomeCurrency, "incomeCurrency", :default_value=>nil
202
+ text_node :customerCheckingAccount, "customerCheckingAccount", :default_value=>nil
203
+ text_node :customerSavingAccount, "customerSavingAccount", :default_value=>nil
204
+ text_node :employerName, "employerName", :default_value=>nil
205
+ text_node :customerWorkTelephone, "customerWorkTelephone", :default_value=>nil
206
+ text_node :residenceStatus, "residenceStatus", :default_value=>nil
207
+ text_node :yearsAtResidence, "yearsAtResidence", :default_value=>nil
208
+ text_node :yearsAtEmployer, "yearsAtEmployer", :default_value=>nil
209
+ def self.from_hash(hash, name='customerInfo')
210
+ base = hash[name]
211
+ if(base)
212
+ this = CustomerInfo.new
213
+ this.ssn = base['ssn']
214
+ this.dob = base['dob']
215
+ this.customerRegistrationDate = base['customerRegistrationDate']
216
+ this.customerType = base['customerType']
217
+ this.incomeAmount = base['incomeAmount']
218
+ this.incomeCurrency = base['incomeCurrency']
219
+ this.customerCheckingAccount = base['customerCheckingAccount']
220
+ this.customerSavingAccount = base['customerSavingAccount']
221
+ this.employerName = base['employerName']
222
+ this.customerWorkTelephone = base['customerWorkTelephone']
223
+ this.residenceStatus = base['residenceStatus']
224
+ this.yearsAtResidence = base['yearsAtResidence']
225
+ this.yearsAtEmployer = base['yearsAtEmployer']
226
+ SchemaValidation.validate_regex(this.ssn, false, /\A\d{9}\Z/, name, 'ssn')
227
+ SchemaValidation.validate_date(this.dob, false, name, 'dob')
228
+ SchemaValidation.validate_regex(this.customerRegistrationDate, false, /\A\d{4}-\d{2}-\d{2}/, name, 'customerRegistrationDate')
229
+ SchemaValidation.validate_enum(this.customerType, false, ['New','Existing'], name, 'customerType')
230
+ SchemaValidation.validate_long(this.incomeAmount, false, name, 'incomeAmount')
231
+ SchemaValidation.validate_currency(this.incomeCurrency, false, name, 'incomeCurrency')
232
+ SchemaValidation.validate_boolean(this.customerCheckingAccount, false, name, 'customerCheckingAccount')
233
+ SchemaValidation.validate_boolean(this.customerSavingAccount, false, name, 'customerSavingAccount')
234
+ SchemaValidation.validate_length(this.employerName, false, 1, 20, name, "employerName")
235
+ SchemaValidation.validate_length(this.customerWorkTelephone, false, 1, 20, name, "customerWorkTelephone")
236
+ SchemaValidation.validate_enum(this.residenceStatus, false, ['Own','Rent','Other'], name, 'residenceStatus')
237
+ SchemaValidation.validate_size(this.yearsAtResidence, false, 0, 99, name, 'yearsAtResidence')
238
+ SchemaValidation.validate_size(this.yearsAtEmployer, false, 0, 99, name, 'yearsAtEmployer')
239
+ this
240
+ else
241
+ nil
242
+ end
243
+ end
244
+ end
245
+
246
+ class BillMeLaterRequest
247
+ include XML::Mapping
248
+ text_node :bmlMerchantId, "bmlMerchantId", :default_value=>nil
249
+ text_node :bmlProductType, "bmlProductType", :default_value=>nil
250
+ text_node :termsAndConditions, "termsAndConditions", :default_value=>nil
251
+ text_node :preapprovalNumber, "preapprovalNumber", :default_value=>nil
252
+ text_node :merchantPromotionalCode, "merchantPromotionalCode", :default_value=>nil
253
+ text_node :customerPasswordChanged, "customerPasswordChanged", :default_value=>nil
254
+ text_node :customerBillingAddressChanged, "customerBillingAddressChanged", :default_value=>nil
255
+ text_node :customerEmailChanged, "customerEmailChanged", :default_value=>nil
256
+ text_node :customerPhoneChanged, "customerPhoneChanged", :default_value=>nil
257
+ text_node :secretQuestionCode, "secretQuestionCode", :default_value=>nil
258
+ text_node :secretQuestionAnswer, "secretQuestionAnswer", :default_value=>nil
259
+ text_node :virtualAuthenticationKeyPresenceIndicator, "virtualAuthenticationKeyPresenceIndicator", :default_value=>nil
260
+ text_node :virtualAuthenticationKeyData, "virtualAuthenticationKeyData", :default_value=>nil
261
+ text_node :itemCategoryCode, "itemCategoryCode", :default_value=>nil
262
+ text_node :authorizationSourcePlatform, "authorizationSourcePlatform", :default_value=>nil
263
+ def self.from_hash(hash, name='billMeLaterRequest')
264
+ base = hash[name]
265
+ if(base)
266
+ this = BillMeLaterRequest.new
267
+ this.bmlMerchantId = base['bmlMerchantId']
268
+ this.bmlProductType = base['bmlProductType']
269
+ this.termsAndConditions = base['termsAndConditions']
270
+ this.preapprovalNumber = base['preapprovalNumber']
271
+ this.merchantPromotionalCode = base['merchantPromotionalCode']
272
+ this.customerPasswordChanged = base['customerPasswordChanged']
273
+ this.customerBillingAddressChanged = base['customerBillingAddressChanged']
274
+ this.customerEmailChanged = base['customerEmailChanged']
275
+ this.customerPhoneChanged = base['customerPhoneChanged']
276
+ this.secretQuestionCode = base['secretQuestionCode']
277
+ this.secretQuestionAnswer = base['secretQuestionAnswer']
278
+ this.virtualAuthenticationKeyPresenceIndicator = base['virtualAuthenticationKeyPresenceIndicator']
279
+ this.virtualAuthenticationKeyData = base['virtualAuthenticationKeyData']
280
+ this.itemCategoryCode = base['itemCategoryCode']
281
+ this.authorizationSourcePlatform = base['authorizationSourcePlatform']
282
+ SchemaValidation.validate_long(this.bmlMerchantId, false, name, 'bmlMerchantId')
283
+ SchemaValidation.validate_length(this.bmlProductType, false, 1, 2, name, "bmlProductType")
284
+ SchemaValidation.validate_size(this.termsAndConditions, false, -99999, 99999, name, 'termsAndConditions')
285
+ SchemaValidation.validate_length(this.preapprovalNumber, false, 13, 25, name, "preapprovalNumber")
286
+ SchemaValidation.validate_size(this.merchantPromotionalCode, false, -9999, 9999, name, 'merchantPromotionalCode')
287
+ SchemaValidation.validate_boolean(this.customerPasswordChanged, false, name, 'customerPasswordChanged')
288
+ SchemaValidation.validate_boolean(this.customerBillingAddressChanged, false, name, 'customerBillingAddressChanged')
289
+ SchemaValidation.validate_boolean(this.customerEmailChanged, false, name, 'customerEmailChanged')
290
+ SchemaValidation.validate_boolean(this.customerPhoneChanged, false, name, 'customerPhoneChanged')
291
+ SchemaValidation.validate_length(this.secretQuestionCode, false, 1, 2, name, "secretQuestionCode")
292
+ SchemaValidation.validate_length(this.secretQuestionAnswer, false, 1, 25, name, "secretQuestionAnswer")
293
+ SchemaValidation.validate_length(this.virtualAuthenticationKeyPresenceIndicator, false, 1, 1, name, "virtualAuthenticationKeyPresenceIndicator")
294
+ SchemaValidation.validate_length(this.virtualAuthenticationKeyData, false, 1, 4, name, "virtualAuthenticationKeyData")
295
+ SchemaValidation.validate_size(this.itemCategoryCode, false, -9999, 9999, name, 'itemCategoryCode')
296
+ this
297
+ else
298
+ nil
299
+ end
300
+ end
301
+ end
302
+
303
+ class FraudCheck
304
+ include XML::Mapping
305
+ text_node :authenticationValue, "authenticationValue", :default_value=>nil
306
+ text_node :authenticationTransactionId, "authenticationTransactionId", :default_value=>nil
307
+ text_node :customerIpAddress, "customerIpAddress", :default_value=>nil
308
+ text_node :authenticatedByMerchant, "authenticatedByMerchant", :default_value=>nil
309
+ def self.from_hash(hash, name='fraudCheck')
310
+ base = hash[name]
311
+ if(base)
312
+ this = FraudCheck.new
313
+ this.authenticationValue = base['authenticationValue']
314
+ this.authenticationTransactionId = base['authenticationTransactionId']
315
+ this.customerIpAddress = base['customerIpAddress']
316
+ this.authenticatedByMerchant = base['authenticatedByMerchant']
317
+ SchemaValidation.validate_length(this.authenticationValue, false, 1, 32, name, "authenticationValue")
318
+ SchemaValidation.validate_length(this.authenticationTransactionId, false, 1, 28, name, "authenticationTransactionId")
319
+ SchemaValidation.validate_regex(this.customerIpAddress, false, /\A(\d{1,3}.){3}\d{1,3}\Z/, name, 'customerIpAddress')
320
+ SchemaValidation.validate_boolean(this.authenticatedByMerchant, false, name, 'authenticatedByMerchant')
321
+ this
322
+ else
323
+ nil
324
+ end
325
+ end
326
+ end
327
+
328
+ class FraudResult
329
+ include XML::Mapping
330
+ text_node :avsResult, "avsResult", :default_value=>nil
331
+ text_node :cardValidationResult, "cardValidationResult", :default_value=>nil
332
+ text_node :authenticationResult, "authenticationResult", :default_value=>nil
333
+ text_node :advancedAVSResult, "advancedAVSResult", :default_value=>nil
334
+ def self.from_hash(hash, name='fraudResult')
335
+ base = hash[name]
336
+ if(base)
337
+ this = FraudResult.new
338
+ this.avsResult = base['avsResult']
339
+ this.cardValidationResult = base['cardValidationResult']
340
+ this.authenticationResult = base['authenticationResult']
341
+ this.advancedAVSResult = base['advancedAVSResult']
342
+ SchemaValidation.validate_length(this.avsResult, false, 1, 2, name, "avsResult")
343
+ SchemaValidation.validate_length(this.authenticationResult, false, 1, 1, name, "authenticationResult")
344
+ SchemaValidation.validate_length(this.advancedAVSResult, false, 1, 3, name, "advancedAVSResult")
345
+ this
346
+ else
347
+ nil
348
+ end
349
+ end
350
+ end
351
+
352
+ class AuthInformation
353
+ include XML::Mapping
354
+ text_node :authDate, "authDate", :default_value=>nil
355
+ text_node :authCode, "authCode", :default_value=>nil
356
+ object_node :fraudResult, "fraudResult", :class=>FraudResult, :default_value=>nil
357
+ text_node :authAmount, "authAmount", :default_value=>nil
358
+ def self.from_hash(hash, name='authInformation')
359
+ base = hash[name]
360
+ if(base)
361
+ this = AuthInformation.new
362
+ this.authDate = base['authDate']
363
+ this.authCode = base['authCode']
364
+ this.fraudResult = FraudResult.from_hash(base)
365
+ this.authAmount = base['authAmount']
366
+ SchemaValidation.validate_date(this.authDate, false, name, 'authDate')
367
+ SchemaValidation.validate_length(this.authCode, false, 1, 6, name, "authCode")
368
+ SchemaValidation.validate_size(this.authAmount, false, -999999999999, 999999999999, name, 'authAmount')
369
+ this
370
+ else
371
+ nil
372
+ end
373
+ end
374
+ end
375
+
376
+ class HealthcareAmounts
377
+ include XML::Mapping
378
+ text_node :totalHealthcareAmount, "totalHealthcareAmount", :default_value=>nil
379
+ text_node :rxAmount, "RxAmount", :default_value=>nil
380
+ text_node :visionAmount, "visionAmount", :default_value=>nil
381
+ text_node :clinicOtherAmount, "clinicOtherAmount", :default_value=>nil
382
+ text_node :dentalAmount, "dentalAmount", :default_value=>nil
383
+ def self.from_hash(hash, name='healthcareAmounts')
384
+ base = hash[name]
385
+ if(base)
386
+ this = HealthcareAmounts.new
387
+ this.totalHealthcareAmount = base['totalHealthcareAmount']
388
+ this.rxAmount = base['RxAmount']
389
+ this.visionAmount = base['visionAmount']
390
+ this.clinicOtherAmount = base['clinicOtherAmount']
391
+ this.dentalAmount = base['dentalAmount']
392
+ SchemaValidation.validate_size(this.totalHealthcareAmount, true, -999999999999, 999999999999, name, 'totalHealthcareAmount')
393
+ SchemaValidation.validate_size(this.rxAmount, false, -999999999999, 999999999999, name, 'RxAmount')
394
+ SchemaValidation.validate_size(this.visionAmount, false, -999999999999, 999999999999, name, 'visionAmount')
395
+ SchemaValidation.validate_size(this.clinicOtherAmount, false, -999999999999, 999999999999, name, 'clinicOtherAmount')
396
+ SchemaValidation.validate_size(this.dentalAmount, false, -999999999999, 999999999999, name, 'dentalAmount')
397
+ this
398
+ else
399
+ nil
400
+ end
401
+ end
402
+ end
403
+
404
+ class HealthcareIIAS
405
+ include XML::Mapping
406
+ object_node :healthcareAmounts, "healthcareAmounts", :class=>HealthcareAmounts, :default_value=>nil
407
+ text_node :iiasFlag, "IIASFlag", :default_value=>nil
408
+ def self.from_hash(hash, name='healthcareIIAS')
409
+ base = hash[name]
410
+ if(base)
411
+ this = HealthcareIIAS.new
412
+ this.healthcareAmounts = HealthcareAmounts.from_hash(base)
413
+ this.iiasFlag = base['IIASFlag']
414
+ SchemaValidation.validate_enum(this.iiasFlag, true, ['Y'], name, 'IIASFlag')
415
+ this
416
+ else
417
+ nil
418
+ end
419
+ end
420
+ end
421
+
422
+ class Pos
423
+ include XML::Mapping
424
+ text_node :capability, "capability", :default_value=>nil
425
+ text_node :entryMode, "entryMode", :default_value=>nil
426
+ text_node :cardholderId, "cardholderId", :default_value=>nil
427
+ text_node :terminalId, "terminalId", :default_value=>nil
428
+ def self.from_hash(hash, name='pos')
429
+ base = hash[name]
430
+ if(base)
431
+ this = Pos.new
432
+ this.capability = base['capability']
433
+ this.entryMode = base['entryMode']
434
+ this.cardholderId = base['cardholderId']
435
+ this.terminalId = base['terminalId']
436
+ SchemaValidation.validate_enum(this.capability, true, ['notused','magstripe','keyedonly'], name, 'capability')
437
+ SchemaValidation.validate_enum(this.entryMode, true, ['notused','keyed','track1','track2','completeread'], name, 'entryMode')
438
+ SchemaValidation.validate_enum(this.cardholderId, true, ['signature','pin','nopin','directmarket'], name, 'cardholderId')
439
+ this
440
+ else
441
+ nil
442
+ end
443
+ end
444
+ end
445
+
446
+ class DetailTax
447
+ include XML::Mapping
448
+ text_node :taxIncludedInTotal, "taxIncludedInTotal", :default_value=>nil
449
+ text_node :taxAmount, "taxAmount", :default_value=>nil
450
+ text_node :taxRate, "taxRate", :default_value=>nil
451
+ text_node :taxTypeIdentifier, "taxTypeIdentifier", :default_value=>nil
452
+ text_node :cardAcceptorTaxId, "cardAcceptorTaxId", :default_value=>nil
453
+ def self.from_hash(hash, index=0, name='detailTax')
454
+ base = hash[name][index]
455
+ if(base)
456
+ this = DetailTax.new
457
+ this.taxIncludedInTotal = base['taxIncludedInTotal']
458
+ this.taxAmount = base['taxAmount']
459
+ this.taxRate = base['taxRate']
460
+ this.taxTypeIdentifier = base['taxTypeIdentifier']
461
+ this.cardAcceptorTaxId = base['cardAcceptorTaxId']
462
+ SchemaValidation.validate_boolean(this.taxIncludedInTotal, false, name, 'taxIncludedInTotal')
463
+ SchemaValidation.validate_size(this.taxAmount, true, -999999999999, 999999999999, name, 'taxAmount')
464
+ SchemaValidation.validate_regex(this.taxRate, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'taxRate')
465
+ SchemaValidation.validate_enum(this.taxTypeIdentifier, false, ['00','01','02','03','04','05','06','10','11','12','13','14','20','21','22'], name, 'taxTypeIdentifier')
466
+ SchemaValidation.validate_length(this.cardAcceptorTaxId, false, 1, 20, name, 'cardAcceptorTaxId')
467
+ this
468
+ else
469
+ nil
470
+ end
471
+ end
472
+ end
473
+
474
+ class LineItemData
475
+ include XML::Mapping
476
+ text_node :itemSequenceNumber, "itemSequenceNumber", :default_value=>nil
477
+ text_node :itemDescription, "itemDescription", :default_value=>nil
478
+ text_node :productCode, "productCode", :default_value=>nil
479
+ text_node :quantity, "quantity", :default_value=>nil
480
+ text_node :unitOfMeasure, "unitOfMeasure", :default_value=>nil
481
+ text_node :taxAmount, "taxAmount", :default_value=>nil
482
+ text_node :lineItemTotal, "lineItemTotal", :default_value=>nil
483
+ text_node :lineItemTotalWithTax, "lineItemTotalWithTax", :default_value=>nil
484
+ text_node :itemDiscountAmount, "itemDiscountAmount", :default_value=>nil
485
+ text_node :commodityCode, "commodityCode", :default_value=>nil
486
+ text_node :unitCost, "unitCost", :default_value=>nil
487
+ array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
488
+ def self.from_hash(hash, index=0, name='lineItemData')
489
+ base = hash[name][index]
490
+ if(base)
491
+ this = LineItemData.new
492
+ this.itemSequenceNumber = base['itemSequenceNumber']
493
+ this.itemDescription = base['itemDescription']
494
+ this.productCode = base['productCode']
495
+ this.quantity = base['quantity']
496
+ this.unitOfMeasure = base['unitOfMeasure']
497
+ this.taxAmount = base['taxAmount']
498
+ this.lineItemTotal = base['lineItemTotal']
499
+ this.lineItemTotalWithTax = base['lineItemTotalWithTax']
500
+ this.itemDiscountAmount = base['itemDiscountAmount']
501
+ this.commodityCode = base['commodityCode']
502
+ this.unitCost = base['unitCost']
503
+ if(base['detailTax'])
504
+ base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
505
+ end
506
+ SchemaValidation.validate_size(this.itemSequenceNumber, false, 1, 99, name, 'itemSequenceNumber')
507
+ SchemaValidation.validate_length(this.itemDescription, true, 1, 26, name, 'itemDescription')
508
+ SchemaValidation.validate_length(this.productCode, false, 1, 12, name, 'productCode')
509
+ SchemaValidation.validate_regex(this.quantity, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'quantity')
510
+ SchemaValidation.validate_length(this.unitOfMeasure, false, 1, 12, name, 'unitOfMeasure')
511
+ SchemaValidation.validate_size(this.taxAmount, false, -999999999999, 999999999999, name, 'taxAmount')
512
+ SchemaValidation.validate_size(this.lineItemTotal, false, -999999999999, 999999999999, name, 'lineItemTotal')
513
+ SchemaValidation.validate_size(this.lineItemTotalWithTax, false, -999999999999, 999999999999, name, 'lineItemTotalWithTax')
514
+ SchemaValidation.validate_size(this.itemDiscountAmount, false, -999999999999, 999999999999, name, 'itemDiscountAmount')
515
+ SchemaValidation.validate_length(this.commodityCode, false, 1, 12, name, 'commodityCode')
516
+ SchemaValidation.validate_regex(this.unitCost, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'unitCost')
517
+ this
518
+ else
519
+ nil
520
+ end
521
+ end
522
+ end
523
+
524
+ class EnhancedData
525
+ include XML::Mapping
526
+ text_node :customerReference, "customerReference", :default_value=>nil
527
+ text_node :salesTax, "salesTax", :default_value=>nil
528
+ text_node :deliveryType, "deliveryType", :default_value=>nil
529
+ text_node :taxExempt, "taxExempt", :default_value=>nil
530
+ text_node :discountAmount, "discountAmount", :default_value=>nil
531
+ text_node :shippingAmount, "shippingAmount", :default_value=>nil
532
+ text_node :dutyAmount, "dutyAmount", :default_value=>nil
533
+ text_node :shipFromPostalCode, "shipFromPostalCode", :default_value=>nil
534
+ text_node :destinationPostalCode, "destinationPostalCode", :default_value=>nil
535
+ text_node :destinationCountryCode, "destinationCountryCode", :default_value=>nil
536
+ text_node :invoiceReferenceNumber, "invoiceReferenceNumber", :default_value=>nil
537
+ text_node :orderDate, "orderDate", :default_value=>nil
538
+ array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
539
+ array_node :lineItemData, "", "lineItemData", :class=>LineItemData, :default_value=>[]
540
+ def self.from_hash(hash, name='enhancedData')
541
+ base = hash[name]
542
+ if(base)
543
+ this = EnhancedData.new
544
+ this.customerReference = base['customerReference']
545
+ this.salesTax = base['salesTax']
546
+ this.deliveryType = base['deliveryType']
547
+ this.taxExempt = base['taxExempt']
548
+ this.discountAmount = base['discountAmount']
549
+ this.shippingAmount = base['shippingAmount']
550
+ this.dutyAmount = base['dutyAmount']
551
+ this.shipFromPostalCode = base['shipFromPostalCode']
552
+ this.destinationPostalCode = base['destinationPostalCode']
553
+ this.destinationCountryCode = base['destinationCountryCode']
554
+ this.invoiceReferenceNumber = base['invoiceReferenceNumber']
555
+ this.orderDate = base['orderDate']
556
+ if(base['detailTax'])
557
+ base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
558
+ end
559
+ if(base['lineItemData'])
560
+ base['lineItemData'].each_index {|index| this.lineItemData << LineItemData.from_hash(base,index)}
561
+ end
562
+ SchemaValidation.validate_length(this.customerReference, false, 1, 17, name, 'customerReference')
563
+ SchemaValidation.validate_size(this.salesTax, false, -999999999999, 999999999999, name, 'salesTax')
564
+ SchemaValidation.validate_enum(this.deliveryType, false, ['CNC','DIG','PHY','SVC','TBD'], name, 'deliveryType')
565
+ SchemaValidation.validate_boolean(this.taxExempt, false, name, 'taxExempt')
566
+ SchemaValidation.validate_size(this.discountAmount, false, -999999999999, 999999999999, name, 'discountAmount')
567
+ SchemaValidation.validate_size(this.shippingAmount, false, -999999999999, 999999999999, name, 'shippingAmount')
568
+ SchemaValidation.validate_size(this.dutyAmount, false, -999999999999, 999999999999, name, 'dutyAmount')
569
+ SchemaValidation.validate_length(this.shipFromPostalCode, false, 1, 20, name, 'shipFromPostalCode')
570
+ SchemaValidation.validate_length(this.destinationPostalCode, false, 1, 20, name, 'destinationPostalCode')
571
+ SchemaValidation.validate_country(this.destinationCountryCode, name, 'destinationCountryCode')
572
+ SchemaValidation.validate_length(this.invoiceReferenceNumber, false, 1, 15, name, 'invoiceReferenceNumber')
573
+ SchemaValidation.validate_date(this.orderDate, false, name, 'orderDate')
574
+ this
575
+ else
576
+ nil
577
+ end
578
+ end
579
+ end
580
+
581
+ class AmexAggregatorData
582
+ include XML::Mapping
583
+ text_node :sellerId, "sellerId", :default_value=>nil
584
+ text_node :sellerMerchantCategoryCode, "sellerMerchantCategoryCode", :default_value=>nil
585
+ def self.from_hash(hash, name='amexAggregatorData')
586
+ base = hash[name]
587
+ if(base)
588
+ this = AmexAggregatorData.new
589
+ this.sellerId = base['sellerId']
590
+ this.sellerMerchantCategoryCode = base['sellerMerchantCategoryCode']
591
+ SchemaValidation.validate_length(this.sellerId, false, 1, 16, name, 'sellerId')
592
+ SchemaValidation.validate_length(this.sellerMerchantCategoryCode, false, 1, 4, name, 'sellerMerchantCategoryCode')
593
+ this
594
+ else
595
+ nil
596
+ end
597
+ end
598
+ end
599
+
600
+ class Card
601
+ include XML::Mapping
602
+ text_node :mop, "type", :default_value=>nil
603
+ text_node :track, "track", :default_value=>nil
604
+ text_node :number, "number", :default_value=>nil
605
+ text_node :expDate, "expDate", :default_value=>nil
606
+ text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
607
+
608
+ def self.from_hash(hash, name='card')
609
+ base = hash[name]
610
+ if(base)
611
+ this = Card.new
612
+ this.mop = base['type']
613
+ this.track = base['track']
614
+ this.number = base['number']
615
+ this.expDate = base['expDate']
616
+ this.cardValidationNum = base['cardValidationNum']
617
+ SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC','GC'], name, 'type')
618
+ SchemaValidation.validate_length(this.track, false, 1, 256, name, 'track')
619
+ SchemaValidation.validate_length(this.number, false, 13, 25, name, 'number')
620
+ SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
621
+ SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
622
+ this
623
+ else
624
+ nil
625
+ end
626
+ end
627
+ end
628
+
629
+ class CardToken
630
+ include XML::Mapping
631
+ text_node :litleToken, "litleToken", :default_value=>nil
632
+ text_node :expDate, "expDate", :default_value=>nil
633
+ text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
634
+ text_node :mop, "type", :default_value=>nil
635
+ def self.from_hash(hash, name='cardToken')
636
+ base = hash[name]
637
+ if(base)
638
+ this = CardToken.new
639
+ this.litleToken = base['litleToken']
640
+ this.expDate = base['expDate']
641
+ this.cardValidationNum = base['cardValidationNum']
642
+ this.mop = base['type']
643
+ SchemaValidation.validate_length(this.litleToken, true, 13, 25, name, 'litleToken')
644
+ SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
645
+ SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
646
+ SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC'], name, 'type')
647
+ this
648
+ else
649
+ nil
650
+ end
651
+ end
652
+ end
653
+
654
+ class CardPaypage
655
+ include XML::Mapping
656
+ text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil
657
+ text_node :expDate, "expDate", :default_value=>nil
658
+ text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
659
+ text_node :mop, "type", :default_value=>nil
660
+ def self.from_hash(hash, name='cardPaypage')
661
+ base = hash[name]
662
+ if(base)
663
+ this = CardPaypage.new
664
+ this.paypageRegistrationId = base['paypageRegistrationId']
665
+ this.expDate = base['expDate']
666
+ this.cardValidationNum = base['cardValidationNum']
667
+ this.mop = base['type']
668
+ SchemaValidation.validate_length(this.paypageRegistrationId, true, 1, 512, name, 'paypageRegistrationId')
669
+ SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
670
+ SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
671
+ SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC'], name, 'type')
672
+ this
673
+ else
674
+ nil
675
+ end
676
+ end
677
+ end
678
+
679
+ class PayPal
680
+ include XML::Mapping
681
+ text_node :payerId, "payerId", :default_value=>nil
682
+ text_node :token, "token", :default_value=>nil
683
+ text_node :transactionId, "transactionId", :default_value=>nil
684
+ def self.from_hash(hash, name='payPal')
685
+ base = hash[name]
686
+ if(base)
687
+ this = PayPal.new
688
+ this.payerId = base['payerId']
689
+ this.token = base['token']
690
+ this.transactionId = base['transactionId']
691
+ SchemaValidation.validate_required(this.payerId, true, name, 'payerId')
692
+ SchemaValidation.validate_required(this.transactionId, true, name, 'transactionId')
693
+ this
694
+ else
695
+ nil
696
+ end
697
+ end
698
+ end
699
+
700
+ class CreditPayPal
701
+ include XML::Mapping
702
+ text_node :payerId, "payerId", :default_value=>nil
703
+ text_node :payerEmail, "payerEmail", :default_value=>nil
704
+ def self.from_hash(hash, name='creditPaypal')
705
+ base = hash[name]
706
+ if(base)
707
+ this = CreditPayPal.new
708
+ this.payerId = base['payerId']
709
+ this.payerEmail = base['payerEmail']
710
+ SchemaValidation.validate_length(this.payerId, false, 1, 17, name, 'payerId')
711
+ SchemaValidation.validate_length(this.payerEmail, false, 1, 127, name, 'payerEmail')
712
+ this
713
+ else
714
+ nil
715
+ end
716
+ end
717
+ end
718
+
719
+ class CustomBilling
720
+ include XML::Mapping
721
+ optional_choice_node :if, 'phone', :then, (text_node :phone, "phone", :default_value=>nil),
722
+ :elsif, 'city', :then, (text_node :city, "city", :default_value=>nil),
723
+ :elsif, 'url', :then, (text_node :url, "url", :default_value=>nil)
724
+ text_node :descriptor, "descriptor", :default_value=>nil
725
+ def self.from_hash(hash, name='customBilling')
726
+ base = hash[name]
727
+ if(base)
728
+ this = CustomBilling.new
729
+ this.phone = base['phone']
730
+ this.city = base['city']
731
+ this.url = base['url']
732
+ this.descriptor = base['descriptor']
733
+ SchemaValidation.validate_regex(this.phone, false, /\A\d{1,13}\Z/, name, 'phone')
734
+ SchemaValidation.validate_length(this.city, false, 1, 35, name, 'city')
735
+ SchemaValidation.validate_regex(this.url, false, /\A([A-Z,a-z,0-9,\/,\-,_,.]){1,13}\Z/, name, 'url')
736
+ SchemaValidation.validate_regex(this.descriptor, false, /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/, name, 'descriptor')
737
+ this
738
+ else
739
+ nil
740
+ end
741
+ end
742
+ end
743
+
744
+ class ProcessingInstructions
745
+ include XML::Mapping
746
+ text_node :bypassVelocityCheck, "bypassVelocityCheck", :default_value=>nil
747
+ def self.from_hash(hash, name='processingInstructions')
748
+ base = hash[name]
749
+ if(base)
750
+ this = ProcessingInstructions.new
751
+ this.bypassVelocityCheck = base['bypassVelocityCheck']
752
+ SchemaValidation.validate_boolean(this.bypassVelocityCheck, false, name, 'bypassVelocityCheck')
753
+ this
754
+ else
755
+ nil
756
+ end
757
+ end
758
+ end
759
+
760
+ class EcheckForToken
761
+ include XML::Mapping
762
+ text_node :accNum, "accNum", :default_value=>nil
763
+ text_node :routingNum, "routingNum", :default_value=>nil
764
+ def self.from_hash(hash, name='echeckForToken')
765
+ base = hash[name]
766
+ if(base)
767
+ this = EcheckForToken.new
768
+ this.accNum = base['accNum']
769
+ this.routingNum = base['routingNum']
770
+ SchemaValidation.validate_length(this.accNum, true, 1, 17, name, 'accNum')
771
+ SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
772
+ this
773
+ else
774
+ nil
775
+ end
776
+ end
777
+ end
778
+
779
+ class Filtering
780
+ include XML::Mapping
781
+ text_node :prepaid, "prepaid", :default_value=>nil
782
+ text_node :international, "international", :default_value=>nil
783
+ text_node :chargeback, "chargeback", :default_value=>nil
784
+ def self.from_hash(hash, name='filtering')
785
+ base = hash[name]
786
+ if(base)
787
+ this = Filtering.new
788
+ this.prepaid = base['prepaid']
789
+ this.international = base['international']
790
+ this.chargeback = base['chargeback']
791
+ SchemaValidation.validate_boolean(this.prepaid, false, name, 'prepaid')
792
+ SchemaValidation.validate_boolean(this.international, false, name, 'international')
793
+ SchemaValidation.validate_boolean(this.chargeback, false, name, 'chargeback')
794
+ this
795
+ else
796
+ nil
797
+ end
798
+ end
799
+ end
800
+
801
+ class MerchantData
802
+ include XML::Mapping
803
+ text_node :campaign, "campaign", :default_value=>nil
804
+ text_node :affiliate, "affiliate", :default_value=>nil
805
+ text_node :merchantGroupingId, "merchantGroupingId", :default_value=>nil
806
+ def self.from_hash(hash, name='merchantData')
807
+ base = hash[name]
808
+ if(base)
809
+ this = MerchantData.new
810
+ this.campaign = base['campaign']
811
+ this.affiliate = base['affiliate']
812
+ this.merchantGroupingId = base['merchantGroupingId']
813
+ SchemaValidation.validate_length(this.campaign, false, 1, 25, name, 'campaign')
814
+ SchemaValidation.validate_length(this.affiliate, false, 1, 25, name, 'affiliate')
815
+ SchemaValidation.validate_length(this.merchantGroupingId, false, 1, 25, name, 'merchantGroupingId')
816
+ this
817
+ else
818
+ nil
819
+ end
820
+ end
821
+ end
822
+
823
+ class Echeck
824
+ include XML::Mapping
825
+ text_node :accType, "accType", :default_value=>nil
826
+ text_node :accNum, "accNum", :default_value=>nil
827
+ text_node :routingNum, "routingNum", :default_value=>nil
828
+ text_node :checkNum, "checkNum", :default_value=>nil
829
+ def self.from_hash(hash, name='echeck')
830
+ base = hash[name]
831
+ if(base)
832
+ this = Echeck.new
833
+ this.accType = base['accType']
834
+ this.accNum = base['accNum']
835
+ this.routingNum = base['routingNum']
836
+ this.checkNum = base['checkNum']
837
+ SchemaValidation.validate_enum(this.accType, true, ['Checking','Savings','Corporate','Corp Savings'], name, 'accType')
838
+ SchemaValidation.validate_length(this.accNum, true, 1, 17, name, 'accNum')
839
+ SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
840
+ SchemaValidation.validate_length(this.checkNum, false, 1, 15, name, 'checkNum')
841
+ this
842
+ else
843
+ nil
844
+ end
845
+ end
846
+ end
847
+
848
+ class EcheckToken
849
+ include XML::Mapping
850
+ text_node :litleToken, "litleToken", :default_value=>nil
851
+ text_node :routingNum, "routingNum", :default_value=>nil
852
+ text_node :accType, "accType", :default_value=>nil
853
+ text_node :checkNum, "checkNum", :default_value=>nil
854
+ def self.from_hash(hash, name='echeckToken')
855
+ base = hash[name]
856
+ if(base)
857
+ this = EcheckToken.new
858
+ this.litleToken = base['litleToken']
859
+ this.routingNum = base['routingNum']
860
+ this.accType = base['accType']
861
+ this.checkNum = base['checkNum']
862
+ SchemaValidation.validate_length(this.litleToken, true, 13, 25, name, 'litleToken')
863
+ SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
864
+ SchemaValidation.validate_enum(this.accType, true, ['Checking','Savings','Corporate','Corp Savings'], name, 'accType')
865
+ SchemaValidation.validate_length(this.checkNum, false, 1, 15, name, 'checkNum')
866
+ this
867
+ else
868
+ nil
869
+ end
870
+ end
871
+ end
872
+
873
+ class RecyclingRequest
874
+ include XML::Mapping
875
+ text_node :recycleBy, "recycleBy", :default_value=>nil
876
+ text_node :recycleId, "recycleId", :default_value=>nil
877
+ def self.from_hash(hash, name='recyclingRequest')
878
+ base = hash[name]
879
+ if(base)
880
+ this = RecyclingRequest.new
881
+ this.recycleBy = base['recycleBy']
882
+ this.recycleId = base['recycleId']
883
+ SchemaValidation.validate_enum(this.recycleBy, false, ['Merchant','Litle','None'], name, 'recycleBy')
884
+ SchemaValidation.validate_length(this.recycleId, false, 1, 25, name, 'recycleId')
885
+ this
886
+ else
887
+ nil
888
+ end
889
+ end
890
+ end
891
+
892
+ class Subscription
893
+ include XML::Mapping
894
+ text_node :planCode, "planCode", :default_value=>nil
895
+ text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
896
+ text_node :startDate,"startDate",:default_value=>nil
897
+ text_node :amount,"amount",:default_value=>nil
898
+
899
+ def self.from_hash(hash, name="subscription")
900
+ base = hash[name]
901
+ if(base)
902
+ this = Subscription.new
903
+ this.planCode = base['planCode']
904
+ this.numberOfPayments = base['numberOfPayments']
905
+ this.startDate = base['startDate']
906
+ this.amount = base['amount']
907
+ SchemaValidation.validate_length(this.planCode, true, 1, 25, name, 'planCode')
908
+ SchemaValidation.validate_size(this.numberOfPayments, false, 1, 99, name, 'numberOfPayments')
909
+ SchemaValidation.validate_date(this.startDate,false,name,'startDate')
910
+ SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
911
+ this
912
+ end
913
+ end
914
+ end
915
+
916
+ class RecurringRequest
917
+ include XML::Mapping
918
+ object_node :subscription, "subscription", :class=>Subscription, :default_value=>nil
919
+ def self.from_hash(hash, name="recurringRequest")
920
+ base = hash[name]
921
+ if(base)
922
+ this = RecurringRequest.new
923
+ this.subscription = Subscription.from_hash(base)
924
+ this
925
+ end
926
+ end
927
+ end
928
+
929
+ class LitleInternalRecurringRequest
930
+ include XML::Mapping
931
+ text_node :subscriptionId, "subscriptionId", :default_value=>nil
932
+ text_node :recurringTxnId, "recurringTxnId", :default_value=>nil
933
+ def self.from_hash(hash, name="litleInternalRecurringRequest")
934
+ base = hash[name]
935
+ if(base)
936
+ this = LitleInternalRecurringRequest.new
937
+ this.subscriptionId = base['subscriptionId']
938
+ this.recurringTxnId = base['recurringTxnId']
939
+ SchemaValidation.validate_length(this.subscriptionId, true, 19, 19, name, "subscriptionId")
940
+ SchemaValidation.validate_length(this.recurringTxnId, true, 19, 19, name, "recurringTxnId")
941
+ this
942
+ end
943
+ end
944
+ end
945
+
946
+ class Authorization
947
+ include XML::Mapping
948
+ root_element_name "authorization"
949
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
950
+ text_node :transactionId, "@id", :default_value=>nil
951
+ text_node :customerId, "@customerId", :default_value=>nil
952
+
953
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
954
+ text_node :orderId, "orderId", :default_value=>nil
955
+ text_node :amount, "amount", :default_value=>nil
956
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
957
+ text_node :orderSource, "orderSource", :default_value=>nil
958
+ object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
959
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
960
+ object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
961
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
962
+ :elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
963
+ :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
964
+ :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
965
+ object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
966
+ object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil
967
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
968
+ object_node :pos, "pos", :class=>Pos, :default_value=>nil
969
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
970
+ text_node :taxType, "taxType", :default_value=>nil
971
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
972
+ object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
973
+ text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
974
+ object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
975
+ object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
976
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
977
+ object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
978
+ text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
979
+ object_node :recurringRequest,"recurringRequest", class=>RecurringRequest, :default_value=>nil
980
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
981
+ end
982
+
983
+ class Sale
984
+ include XML::Mapping
985
+ root_element_name "sale"
986
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
987
+ text_node :transactionId, "@id", :default_value=>nil
988
+ text_node :customerId, "@customerId", :default_value=>nil
989
+
990
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
991
+ text_node :orderId, "orderId", :default_value=>nil
992
+ text_node :amount, "amount", :default_value=>nil
993
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
994
+ text_node :orderSource, "orderSource", :default_value=>nil
995
+ object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
996
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
997
+ object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
998
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
999
+ :elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
1000
+ :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
1001
+ :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
1002
+ object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
1003
+ optional_choice_node :if, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck, :default_value=>nil),
1004
+ :elsif, 'cardholderAuthentication', :then, (object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil)
1005
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1006
+ text_node :taxType, "taxType", :default_value=>nil
1007
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1008
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1009
+ object_node :pos, "pos", :class=>Pos, :default_value=>nil
1010
+ text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
1011
+ text_node :payPalNotes, "payPalNotes", :default_value=>nil
1012
+ object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1013
+ text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
1014
+ object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
1015
+ object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
1016
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1017
+ object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
1018
+ text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
1019
+ object_node :recurringRequest, "recurringRequest", :class=>RecurringRequest, :default_value=>nil
1020
+ object_node :litleInternalRecurringRequest, "litleInternalRecurringRequest", :class=>LitleInternalRecurringRequest, :default_value=>nil
1021
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1022
+ end
1023
+
1024
+ class Credit
1025
+ include XML::Mapping
1026
+ root_element_name "credit"
1027
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1028
+ text_node :transactionId, "@id", :default_value=>nil
1029
+ text_node :customerId, "@customerId", :default_value=>nil
1030
+
1031
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1032
+ text_node :orderId, "orderId", :default_value=>nil
1033
+ text_node :amount, "amount", :default_value=>nil
1034
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
1035
+ text_node :orderSource, "orderSource", :default_value=>nil
1036
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1037
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
1038
+ :elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>CreditPayPal),
1039
+ :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
1040
+ :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
1041
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1042
+ text_node :taxType, "taxType", :default_value=>nil
1043
+ object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
1044
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1045
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1046
+ object_node :pos, "pos", :class=>Pos, :default_value=>nil
1047
+ object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1048
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1049
+ text_node :payPalNotes, "payPalNotes", :default_value=>nil
1050
+ text_node :actionReason, "actionReason", :default_value=>nil
1051
+ end
1052
+
1053
+ class RegisterTokenRequest
1054
+ include XML::Mapping
1055
+ root_element_name "registerTokenRequest"
1056
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1057
+ text_node :transactionId, "@id", :default_value=>nil
1058
+ text_node :customerId, "@customerId", :default_value=>nil
1059
+
1060
+ text_node :orderId, "orderId", :default_value=>nil
1061
+ optional_choice_node :if, 'accountNumber', :then, (text_node :accountNumber, "accountNumber", :default_value=>nil),
1062
+ :elsif, 'echeckForToken', :then, (object_node :echeckForToken, "echeckForToken", :class=>EcheckForToken),
1063
+ :elsif, 'paypageRegistrationId', :then, (text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil)
1064
+ end
1065
+
1066
+ class CaptureGivenAuth
1067
+ include XML::Mapping
1068
+ root_element_name "captureGivenAuth"
1069
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1070
+ text_node :transactionId, "@id", :default_value=>nil
1071
+ text_node :customerId, "@customerId", :default_value=>nil
1072
+
1073
+ text_node :orderId, "orderId", :default_value=>nil
1074
+ object_node :authInformation, "authInformation", :class=>AuthInformation, :default_value=>nil
1075
+ text_node :amount, "amount", :default_value=>nil
1076
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
1077
+ text_node :orderSource, "orderSource", :default_value=>nil
1078
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1079
+ object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
1080
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
1081
+ :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
1082
+ :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
1083
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1084
+ text_node :taxType, "taxType", :default_value=>nil
1085
+ object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
1086
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1087
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1088
+ object_node :pos, "pos", :class=>Pos, :default_value=>nil
1089
+ object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1090
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1091
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1092
+ end
1093
+
1094
+ class ForceCapture
1095
+ include XML::Mapping
1096
+ root_element_name "forceCapture"
1097
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1098
+ text_node :transactionId, "@id", :default_value=>nil
1099
+ text_node :customerId, "@customerId", :default_value=>nil
1100
+
1101
+ text_node :orderId, "orderId", :default_value=>nil
1102
+ text_node :amount, "amount", :default_value=>nil
1103
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
1104
+ text_node :orderSource, "orderSource", :default_value=>nil
1105
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1106
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
1107
+ :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
1108
+ :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
1109
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1110
+ text_node :taxType, "taxType", :default_value=>nil
1111
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1112
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1113
+ object_node :pos, "pos", :class=>Pos, :default_value=>nil
1114
+ object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1115
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1116
+ text_node :debtRepayment,"debtRepayment", :default_value=>nil
1117
+ end
1118
+
1119
+ class AuthReversal
1120
+ include XML::Mapping
1121
+ root_element_name "authReversal"
1122
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1123
+ text_node :transactionId, "@id", :default_value=>nil
1124
+ text_node :customerId, "@customerId", :default_value=>nil
1125
+ text_node :partial, "@partial", :default_value=>nil
1126
+
1127
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1128
+ text_node :amount, "amount", :default_value=>nil
1129
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
1130
+ text_node :payPalNotes, "payPalNotes", :default_value=>nil
1131
+ text_node :actionReason, "actionReason", :default_value=>nil
1132
+ end
1133
+
1134
+ class Capture
1135
+ include XML::Mapping
1136
+ root_element_name "capture"
1137
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1138
+ text_node :transactionId, "@id", :default_value=>nil
1139
+ text_node :customerId, "@customerId", :default_value=>nil
1140
+ text_node :partial, "@partial", :default_value=>nil
1141
+
1142
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1143
+ text_node :amount, "amount", :default_value=>nil
1144
+ text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
1145
+ object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1146
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1147
+ text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
1148
+ text_node :payPalNotes, "payPalNotes", :default_value=>nil
1149
+ end
1150
+
1151
+ class Void
1152
+ include XML::Mapping
1153
+ root_element_name "void"
1154
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1155
+ text_node :transactionId, "@id", :default_value=>nil
1156
+ text_node :customerId, "@customerId", :default_value=>nil
1157
+
1158
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1159
+ object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1160
+ end
1161
+
1162
+ class EcheckVoid
1163
+ include XML::Mapping
1164
+ root_element_name "echeckVoid"
1165
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1166
+ text_node :transactionId, "@id", :default_value=>nil
1167
+ text_node :customerId, "@customerId", :default_value=>nil
1168
+
1169
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1170
+ end
1171
+
1172
+ class EcheckVerification
1173
+ include XML::Mapping
1174
+ root_element_name "echeckVerification"
1175
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1176
+ text_node :transactionId, "@id", :default_value=>nil
1177
+ text_node :customerId, "@customerId", :default_value=>nil
1178
+
1179
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1180
+ text_node :orderId, "orderId", :default_value=>nil
1181
+ text_node :amount, "amount", :default_value=>nil
1182
+ text_node :orderSource, "orderSource", :default_value=>nil
1183
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1184
+ object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
1185
+ optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck),
1186
+ :elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken)
1187
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1188
+ end
1189
+
1190
+ class EcheckCredit
1191
+ include XML::Mapping
1192
+ root_element_name "echeckCredit"
1193
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1194
+ text_node :transactionId, "@id", :default_value=>nil
1195
+ text_node :customerId, "@customerId", :default_value=>nil
1196
+
1197
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1198
+ text_node :orderId, "orderId", :default_value=>nil
1199
+ text_node :amount, "amount", :default_value=>nil
1200
+ text_node :orderSource, "orderSource", :default_value=>nil
1201
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1202
+ optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
1203
+ :elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
1204
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1205
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1206
+ end
1207
+
1208
+ class EcheckRedeposit
1209
+ include XML::Mapping
1210
+ root_element_name "echeckRedeposit"
1211
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1212
+ text_node :transactionId, "@id", :default_value=>nil
1213
+ text_node :customerId, "@customerId", :default_value=>nil
1214
+
1215
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1216
+ optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
1217
+ :elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
1218
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1219
+ end
1220
+
1221
+ class EcheckSale
1222
+ include XML::Mapping
1223
+ root_element_name "echeckSale"
1224
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1225
+ text_node :transactionId, "@id", :default_value=>nil
1226
+ text_node :customerId, "@customerId", :default_value=>nil
1227
+
1228
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1229
+ text_node :orderId, "orderId", :default_value=>nil
1230
+ text_node :verify, "verify", :default_value=>nil
1231
+ text_node :amount, "amount", :default_value=>nil
1232
+ text_node :orderSource, "orderSource", :default_value=>nil
1233
+ object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1234
+ object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
1235
+ optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
1236
+ :elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
1237
+ object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1238
+ object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1239
+ end
1240
+
1241
+ class UpdateCardValidationNumOnToken
1242
+ include XML::Mapping
1243
+ root_element_name "updateCardValidationNumOnToken"
1244
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1245
+ text_node :transactionId, "@id", :default_value=>nil
1246
+ text_node :customerId, "@customerId", :default_value=>nil
1247
+
1248
+ text_node :orderId, "orderId", :default_value=>nil
1249
+ text_node :litleToken, "litleToken", :default_value=>nil
1250
+ text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
1251
+ end
1252
+
1253
+ class AccountUpdate
1254
+ include XML::Mapping
1255
+ root_element_name "accountUpdate"
1256
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1257
+ text_node :transactionId, "@id", :default_value=>nil
1258
+ text_node :customerId, "@customerId", :default_value=>nil
1259
+
1260
+ text_node :orderId, "orderId", :default_value=>nil
1261
+ optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
1262
+ :else, (object_node :token, "token", :class=>CardToken)
1263
+ end
1264
+
1265
+ class OnlineRequest
1266
+ include XML::Mapping
1267
+ root_element_name "litleOnlineRequest"
1268
+ text_node :merchantId, "@merchantId", :default_value=>nil
1269
+ text_node :version, "@version", :default_value=>nil
1270
+ text_node :xmlns, "@xmlns", :default_value=>nil
1271
+ text_node :merchantSdk, "@merchantSdk", :default_value=>nil
1272
+ text_node :loggedInUser, "@loggedInUser", :default_value=>nil
1273
+ object_node :authentication, "authentication", :class=>Authentication
1274
+ optional_choice_node :if, 'authorization', :then, (object_node :authorization, "authorization", :class=>Authorization),
1275
+ :elsif, 'sale', :then, (object_node :sale, "sale", :class=>Sale),
1276
+ :elsif, 'captureTxn', :then, (object_node :captureTxn, "captureTxn", :class=>Capture),
1277
+ :elsif, 'captureGivenAuth', :then, (object_node :captureGivenAuth, "captureGivenAuth", :class=>CaptureGivenAuth),
1278
+ :elsif, 'void', :then, (object_node :void, "void", :class=>Void),
1279
+ :elsif, 'forceCapture', :then, (object_node :forceCapture, "forceCapture", :class=>ForceCapture),
1280
+ :elsif, 'credit', :then, (object_node :credit, "credit", :class=>Credit),
1281
+ :elsif, 'authReversal', :then, (object_node :authReversal, "authReversal", :class=>AuthReversal),
1282
+ :elsif, 'echeckCredit', :then, (object_node :echeckCredit, "echeckCredit", :class=>EcheckCredit),
1283
+ :elsif, 'echeckRedeposit', :then, (object_node :echeckRedeposit, "echeckRedeposit", :class=>EcheckRedeposit),
1284
+ :elsif, 'echeckSale', :then, (object_node :echeckSale, "echeckSale", :class=>EcheckSale),
1285
+ :elsif, 'echeckVoid', :then, (object_node :echeckVoid, "echeckVoid", :class=>EcheckVoid),
1286
+ :elsif, 'echeckVerification', :then, (object_node :echeckVerification, "echeckVerification", :class=>EcheckVerification),
1287
+ :elsif, 'registerTokenRequest', :then, (object_node :registerTokenRequest, "registerTokenRequest", :class=>RegisterTokenRequest),
1288
+ :elsif, 'updateCardValidationNumOnToken', :then, (object_node :updateCardValidationNumOnToken, "updateCardValidationNumOnToken", :class=>UpdateCardValidationNumOnToken)
1289
+ def post_save(xml, options={:Mapping=>:_default})
1290
+ xml.each_element() {|el|
1291
+ if(el.name == 'captureTxn')
1292
+ el.name = 'capture'
1293
+ end
1294
+ }
1295
+ end
1296
+
1297
+ end
1298
+
1299
+ class BatchRequest
1300
+ include XML::Mapping
1301
+ root_element_name "batchRequest"
1302
+
1303
+ text_node :numAuths, "@numAuths", :default_value=>"0"
1304
+ text_node :authAmount, "@authAmount", :default_value=>"0"
1305
+ text_node :numSales, "@numSales", :default_value=>"0"
1306
+ text_node :saleAmount, "@saleAmount", :default_value=>"0"
1307
+ text_node :numCredits, "@numCredits", :default_value=>"0"
1308
+ text_node :creditAmount, "@creditAmount", :default_value=>"0"
1309
+ text_node :numTokenRegistrations, "@numTokenRegistrations", :default_value=>"0"
1310
+ text_node :numCaptureGivenAuths, "@numCaptureGivenAuths", :default_value=>"0"
1311
+ text_node :captureGivenAuthAmount, "@captureGivenAuthAmount", :default_value=>"0"
1312
+ text_node :numForceCaptures, "@numForceCaptures", :default_value=>"0"
1313
+ text_node :forceCaptureAmount, "@forceCaptureAmount", :default_value=>"0"
1314
+ text_node :numAuthReversals, "@numAuthReversals", :default_value=>"0"
1315
+ text_node :authReversalAmount, "@authReversalAmount", :default_value=>"0"
1316
+ text_node :numCaptures, "@numCaptures", :default_value=>"0"
1317
+ text_node :captureAmount, "@captureAmount", :default_value=>"0"
1318
+ text_node :numEcheckSales, "@numEcheckSales", :default_value=>"0"
1319
+ text_node :echeckSalesAmount, "@echeckSalesAmount", :default_value=>"0"
1320
+ text_node :numEcheckRedeposit, "@numEcheckRedeposit", :default_value=>"0"
1321
+ text_node :numEcheckCredit, "@numEcheckCredit", :default_value=>"0"
1322
+ text_node :echeckCreditAmount, "@echeckCreditAmount", :default_value=>"0"
1323
+ text_node :numEcheckVerification, "@numEcheckVerification", :default_value=>"0"
1324
+ text_node :echeckVerificationAmount, "@echeckVerificationAmount", :default_value=>"0"
1325
+ text_node :numUpdateCardValidationNumOnTokens, "@numUpdateCardValidationNumOnTokens", :default_value=>"0"
1326
+ text_node :numAccountUpdates, "@numAccountUpdates", :default_value=>"0"
1327
+ text_node :merchantId, "@merchantId", :default_value=>nil
1328
+ text_node :id, "@id", :default_value=>nil
1329
+ end
1330
+
1331
+ class LitleRequest
1332
+ include XML::Mapping
1333
+ # version="6.0" xmlns="http://www.litle.com/schema" numBatchRequests = "1">
1334
+ # <authentication>
1335
+ # <user>XMLTESTV6ORG14</user>
1336
+ # <password>password</password>
1337
+ # </authentication>
1338
+ root_element_name "litleRequest"
1339
+
1340
+ text_node :version, "@version", :default_value=>"0"
1341
+ text_node :xmlns, "@xmlns", :default_value=>nil
1342
+ #TODO: ask greg about sessionId
1343
+ #text_node :sessionId, "@id", default_vale:nil
1344
+ text_node :numBatchRequests, "@numBatchRequests", :default_value=>"0"
1345
+ object_node :authentication, "authentication", :class=>Authentication
1346
+ end
1347
+
1348
+ class AccountUpdateFileRequestData
1349
+ include XML::Mapping
1350
+ root_element_name "accountUpdateFileRequestData"
1351
+
1352
+ text_node :merchantId, "merchantId", :default_value=>nil
1353
+ text_node :postDay, "postDay", :default_value=>nil
1354
+ end
1355
+
1356
+ class LitleRFRRequest
1357
+ include XML::Mapping
1358
+ root_element_name "RFRRequest"
1359
+ optional_choice_node :if, 'litleSessionId', :then, (text_node :litleSessionId, "litleSessionId"),
1360
+ :elsif, 'accountUpdateFileRequestData', :then, (object_node :accountUpdateFileRequestData, "accountUpdateFileRequestData", :class=>AccountUpdateFileRequestData)
1361
+ end
1362
+
1363
+ class LitleRequestForRFR
1364
+ include XML::Mapping
1365
+ root_element_name "litleRequest"
1366
+ text_node :version, "@version", :default_value=>"0"
1367
+ text_node :xmlns, "@xmlns", :default_value=>nil
1368
+ text_node :numBatchRequests, "@numBatchRequests", :default_value=>nil
1369
+ object_node :authentication, "authentication", :class=>Authentication
1370
+ object_node :rfrRequest, 'RFRRequest', :class=>LitleRFRRequest
1371
+ end
1372
+ # begin
1373
+ # class LitleOnlineResponse
1374
+ # attr_accessor :message
1375
+ # end
1376
+ #
1377
+ # class XMLFields
1378
+ #
1379
+ # end
1380
+ end