LitleOnline 8.19.0 → 8.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG +34 -0
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/bin/Setup.rb +16 -6
- data/lib/LitleBatchRequest.rb +85 -2
- data/lib/LitleOnlineRequest.rb +108 -5
- data/lib/LitleRequest.rb +14 -9
- data/lib/LitleTransaction.rb +152 -3
- data/lib/XMLFields.rb +441 -7
- data/test/functional/test_activate.rb +100 -0
- data/test/functional/test_activateReversal.rb +56 -0
- data/test/functional/test_auth.rb +38 -1
- data/test/functional/test_balanceInquiry.rb +80 -0
- data/test/functional/test_batchStream.rb +145 -0
- data/test/functional/test_cancelSubscription.rb +55 -0
- data/test/functional/test_captureGivenAuth.rb +32 -2
- data/test/functional/test_createPlan.rb +85 -0
- data/test/functional/test_credit.rb +22 -1
- data/test/functional/test_deactivate.rb +80 -0
- data/test/functional/test_deactivateReversal.rb +56 -0
- data/test/functional/test_depositReversal.rb +56 -0
- data/test/functional/test_forceCapture.rb +23 -1
- data/test/functional/test_litle_requests.rb +3 -2
- data/test/functional/test_load.rb +82 -0
- data/test/functional/test_loadReversal.rb +56 -0
- data/test/functional/test_refundReversal.rb +56 -0
- data/test/functional/test_sale.rb +23 -1
- data/test/functional/test_unload.rb +82 -0
- data/test/functional/test_unloadReversal.rb +56 -0
- data/test/functional/test_updatePlan.rb +58 -0
- data/test/functional/test_updateSubscription.rb +76 -0
- data/test/functional/ts_all.rb +21 -2
- data/test/unit/test_LitleBatchRequest.rb +47 -2
- data/test/unit/test_LitleOnlineRequest.rb +2 -2
- data/test/unit/test_activate.rb +92 -0
- data/test/{functional/ts_all.rb~ → unit/test_activateReversal.rb} +17 -17
- data/test/unit/test_auth.rb +37 -3
- data/test/unit/test_balanceInquiry.rb +52 -0
- data/test/unit/test_cancelSubscription.rb +43 -0
- data/test/unit/test_captureGivenAuth.rb +44 -2
- data/test/unit/test_createPlan.rb +52 -0
- data/test/unit/test_credit.rb +3 -2
- data/test/unit/test_deactivate.rb +52 -0
- data/test/unit/test_deactivateReversal.rb +44 -0
- data/test/unit/test_depositReversal.rb +44 -0
- data/test/unit/test_load.rb +53 -0
- data/test/unit/test_loadReversal.rb +44 -0
- data/test/unit/test_refundReversal.rb +44 -0
- data/test/unit/test_sale.rb +18 -1
- data/test/unit/test_unload.rb +53 -0
- data/test/unit/test_unloadReversal.rb +44 -0
- data/test/unit/test_updatePlan.rb +45 -0
- data/test/unit/test_updateSubscription.rb +172 -0
- data/test/unit/test_xmlfields.rb +395 -0
- data/test/unit/ts_unit.rb +19 -2
- metadata +51 -34
- data/CHANGELOG~ +0 -81
- data/Rakefile~ +0 -93
- data/lib/LitleOnlineRequest.rb~ +0 -198
- data/lib/LitleRequest.rb~ +0 -513
- data/lib/LitleTransaction.rb~ +0 -297
- data/lib/XMLFields.rb~ +0 -1380
- data/test/unit/test_LitleOnlineRequest.rb~ +0 -296
- data/test/unit/test_sale.rb~ +0 -390
- data/test/unit/test_xmlfields.rb~ +0 -2515
data/lib/XMLFields.rb
CHANGED
@@ -325,12 +325,33 @@ module LitleOnline
|
|
325
325
|
end
|
326
326
|
end
|
327
327
|
|
328
|
+
class AdvancedFraudResults
|
329
|
+
include XML::Mapping
|
330
|
+
root_element_name "advanceFraudResults"
|
331
|
+
text_node :deviceReviewStatus, "deviceReviewStatus", :default_value=>nil
|
332
|
+
text_node :deviceReputationScore, "deviceReputationScore", :default_value=>nil
|
333
|
+
array_node :triggeredRule, "", "triggeredRule", :default_value=>[]
|
334
|
+
def self.from_hash(hash, name="advancedFraudResults")
|
335
|
+
base = hash[name]
|
336
|
+
if(base)
|
337
|
+
this = AdvancedFraudResults.new
|
338
|
+
this.deviceReviewStatus = base['deviceReviewStatus']
|
339
|
+
this.deviceReputationScore = base['deviceReputationScore']
|
340
|
+
if(base['triggeredRule'])
|
341
|
+
base['triggeredRule'].each_index {|index| this.triggeredRule << base['triggeredRule'][index]}
|
342
|
+
end
|
343
|
+
this
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
328
348
|
class FraudResult
|
329
349
|
include XML::Mapping
|
330
350
|
text_node :avsResult, "avsResult", :default_value=>nil
|
331
351
|
text_node :cardValidationResult, "cardValidationResult", :default_value=>nil
|
332
352
|
text_node :authenticationResult, "authenticationResult", :default_value=>nil
|
333
353
|
text_node :advancedAVSResult, "advancedAVSResult", :default_value=>nil
|
354
|
+
object_node :advancedFraudResults, "advancedFraudResults",:class => AdvancedFraudResults, :default_value=>nil
|
334
355
|
def self.from_hash(hash, name='fraudResult')
|
335
356
|
base = hash[name]
|
336
357
|
if(base)
|
@@ -339,6 +360,7 @@ module LitleOnline
|
|
339
360
|
this.cardValidationResult = base['cardValidationResult']
|
340
361
|
this.authenticationResult = base['authenticationResult']
|
341
362
|
this.advancedAVSResult = base['advancedAVSResult']
|
363
|
+
this.advancedFraudResults = AdvancedFraudResults.from_hash(base)
|
342
364
|
SchemaValidation.validate_length(this.avsResult, false, 1, 2, name, "avsResult")
|
343
365
|
SchemaValidation.validate_length(this.authenticationResult, false, 1, 1, name, "authenticationResult")
|
344
366
|
SchemaValidation.validate_length(this.advancedAVSResult, false, 1, 3, name, "advancedAVSResult")
|
@@ -425,6 +447,7 @@ module LitleOnline
|
|
425
447
|
text_node :entryMode, "entryMode", :default_value=>nil
|
426
448
|
text_node :cardholderId, "cardholderId", :default_value=>nil
|
427
449
|
text_node :terminalId, "terminalId", :default_value=>nil
|
450
|
+
text_node :catLevel, "catLevel", :default_value=>nil
|
428
451
|
def self.from_hash(hash, name='pos')
|
429
452
|
base = hash[name]
|
430
453
|
if(base)
|
@@ -433,9 +456,11 @@ module LitleOnline
|
|
433
456
|
this.entryMode = base['entryMode']
|
434
457
|
this.cardholderId = base['cardholderId']
|
435
458
|
this.terminalId = base['terminalId']
|
459
|
+
this.catLevel =base['catLevel']
|
436
460
|
SchemaValidation.validate_enum(this.capability, true, ['notused','magstripe','keyedonly'], name, 'capability')
|
437
461
|
SchemaValidation.validate_enum(this.entryMode, true, ['notused','keyed','track1','track2','completeread'], name, 'entryMode')
|
438
462
|
SchemaValidation.validate_enum(this.cardholderId, true, ['signature','pin','nopin','directmarket'], name, 'cardholderId')
|
463
|
+
SchemaValidation.validate_enum(this.catLevel, false, ['self service'], name, 'catLevel')
|
439
464
|
this
|
440
465
|
else
|
441
466
|
nil
|
@@ -625,6 +650,33 @@ module LitleOnline
|
|
625
650
|
end
|
626
651
|
end
|
627
652
|
end
|
653
|
+
|
654
|
+
class Mpos
|
655
|
+
include XML::Mapping
|
656
|
+
text_node :ksn, "ksn", :default_value=>nil
|
657
|
+
text_node :formatId, "formatId", :default_value=>nil
|
658
|
+
text_node :encryptedTrack, "encryptedTrack", :default_value=>nil
|
659
|
+
text_node :track1Status,"track1Status", :default_value=>nil
|
660
|
+
text_node :track2Status,"track2Status", :default_value=>nil
|
661
|
+
def self.from_hash(hash, name='mpos')
|
662
|
+
base = hash[name]
|
663
|
+
if(base)
|
664
|
+
this = Mpos.new
|
665
|
+
this.ksn = base['ksn']
|
666
|
+
this.formatId = base['formatId']
|
667
|
+
this.encryptedTrack = base['encryptedTrack']
|
668
|
+
this.track1Status = base['track1Status']
|
669
|
+
this.track2Status = base['track2Status']
|
670
|
+
SchemaValidation.validate_length(this.ksn, true, 1, 1028 , name, 'ksn')
|
671
|
+
SchemaValidation.validate_length(this.formatId, true, 1, 1028, name, 'formatId')
|
672
|
+
SchemaValidation.validate_length(this.encryptedTrack, true, 1, 1028, name, 'encryptedTrack')
|
673
|
+
SchemaValidation.validate_size(this.track1Status, true, 0, 1028, name, 'track1Status')
|
674
|
+
SchemaValidation.validate_size(this.track2Status, true, 0, 1028, name, 'track2Status')
|
675
|
+
this
|
676
|
+
end
|
677
|
+
end
|
678
|
+
|
679
|
+
end
|
628
680
|
|
629
681
|
class CardToken
|
630
682
|
include XML::Mapping
|
@@ -888,6 +940,58 @@ module LitleOnline
|
|
888
940
|
end
|
889
941
|
end
|
890
942
|
end
|
943
|
+
|
944
|
+
class CreateDiscount
|
945
|
+
include XML::Mapping
|
946
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
947
|
+
text_node :name, "name", :default_value=>nil
|
948
|
+
text_node :amount, "amount", :default_value=>nil
|
949
|
+
text_node :startDate, "startDate", :default_value=>nil
|
950
|
+
text_node :endDate, "endDate", :default_value=>nil
|
951
|
+
def self.from_hash(hash,index=0, name="createDiscount")
|
952
|
+
base = hash[name][index]
|
953
|
+
if(base)
|
954
|
+
this = CreateDiscount.new
|
955
|
+
this.discountCode = base['discountCode']
|
956
|
+
this.name = base['name']
|
957
|
+
this.amount = base['amount']
|
958
|
+
this.startDate = base['startDate']
|
959
|
+
this.endDate = base['endDate']
|
960
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
961
|
+
SchemaValidation.validate_length(this.name, true, 1, 100, name, "name")
|
962
|
+
SchemaValidation.validate_size(this.amount,true,0,999999999999,name,'amount')
|
963
|
+
SchemaValidation.validate_date(this.startDate, true, name, 'startDate')
|
964
|
+
SchemaValidation.validate_date(this.endDate, true, name, 'endDate')
|
965
|
+
this
|
966
|
+
end
|
967
|
+
end
|
968
|
+
end
|
969
|
+
|
970
|
+
class CreateAddOn
|
971
|
+
include XML::Mapping
|
972
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
973
|
+
text_node :name, "name", :default_value=>nil
|
974
|
+
text_node :amount, "amount", :default_value=>nil
|
975
|
+
text_node :startDate, "startDate", :default_value=>nil
|
976
|
+
text_node :endDate, "endDate", :default_value=>nil
|
977
|
+
def self.from_hash(hash,index=0, name="createAddOn")
|
978
|
+
base = hash[name][index]
|
979
|
+
if(base)
|
980
|
+
this = CreateAddOn.new
|
981
|
+
this.addOnCode = base['addOnCode']
|
982
|
+
this.name = base['name']
|
983
|
+
this.amount = base['amount']
|
984
|
+
this.startDate = base['startDate']
|
985
|
+
this.endDate = base['endDate']
|
986
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
987
|
+
SchemaValidation.validate_length(this.name, true, 1, 100, name, "name")
|
988
|
+
SchemaValidation.validate_size(this.amount,true,0,999999999999,name,'amount')
|
989
|
+
SchemaValidation.validate_date(this.startDate, true, name, 'startDate')
|
990
|
+
SchemaValidation.validate_date(this.endDate, true, name, 'endDate')
|
991
|
+
this
|
992
|
+
end
|
993
|
+
end
|
994
|
+
end
|
891
995
|
|
892
996
|
class Subscription
|
893
997
|
include XML::Mapping
|
@@ -895,7 +999,9 @@ module LitleOnline
|
|
895
999
|
text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
|
896
1000
|
text_node :startDate,"startDate",:default_value=>nil
|
897
1001
|
text_node :amount,"amount",:default_value=>nil
|
898
|
-
|
1002
|
+
array_node :createDiscount, "", "createDiscount", :class=>CreateDiscount, :default_value=>[]
|
1003
|
+
array_node :createAddOn, "", "createAddOn", :class=>CreateAddOn, :default_value=>[]
|
1004
|
+
|
899
1005
|
def self.from_hash(hash, name="subscription")
|
900
1006
|
base = hash[name]
|
901
1007
|
if(base)
|
@@ -904,6 +1010,13 @@ module LitleOnline
|
|
904
1010
|
this.numberOfPayments = base['numberOfPayments']
|
905
1011
|
this.startDate = base['startDate']
|
906
1012
|
this.amount = base['amount']
|
1013
|
+
if(base['createDiscount'])
|
1014
|
+
base['createDiscount'].each_index {|index| this.createDiscount << CreateDiscount.from_hash(base,index)}
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
if(base['createAddOn'])
|
1018
|
+
base['createAddOn'].each_index {|index| this.createAddOn << CreateAddOn.from_hash(base,index)}
|
1019
|
+
end
|
907
1020
|
SchemaValidation.validate_length(this.planCode, true, 1, 25, name, 'planCode')
|
908
1021
|
SchemaValidation.validate_size(this.numberOfPayments, false, 1, 99, name, 'numberOfPayments')
|
909
1022
|
SchemaValidation.validate_date(this.startDate,false,name,'startDate')
|
@@ -930,18 +1043,234 @@ module LitleOnline
|
|
930
1043
|
include XML::Mapping
|
931
1044
|
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
932
1045
|
text_node :recurringTxnId, "recurringTxnId", :default_value=>nil
|
1046
|
+
text_node :finalPayment, "finalPayment", :default_value=>nil
|
933
1047
|
def self.from_hash(hash, name="litleInternalRecurringRequest")
|
934
1048
|
base = hash[name]
|
935
1049
|
if(base)
|
936
1050
|
this = LitleInternalRecurringRequest.new
|
937
1051
|
this.subscriptionId = base['subscriptionId']
|
938
1052
|
this.recurringTxnId = base['recurringTxnId']
|
1053
|
+
this.finalPayment = base['finalPayment']
|
939
1054
|
SchemaValidation.validate_length(this.subscriptionId, true, 19, 19, name, "subscriptionId")
|
940
1055
|
SchemaValidation.validate_length(this.recurringTxnId, true, 19, 19, name, "recurringTxnId")
|
1056
|
+
SchemaValidation.validate_boolean(this.finalPayment, true, name, "finalPayment")
|
1057
|
+
this
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
class UpdateDiscount
|
1063
|
+
include XML::Mapping
|
1064
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
1065
|
+
text_node :name, "name", :default_value=>nil
|
1066
|
+
text_node :amount, "amount", :default_value=>nil
|
1067
|
+
text_node :startDate, "startDate", :default_value=>nil
|
1068
|
+
text_node :endDate, "endDate", :default_value=>nil
|
1069
|
+
def self.from_hash(hash,index=0, name="updateDiscount")
|
1070
|
+
base = hash[name][index]
|
1071
|
+
if(base)
|
1072
|
+
this = UpdateDiscount.new
|
1073
|
+
this.discountCode = base['discountCode']
|
1074
|
+
this.name = base['name']
|
1075
|
+
this.amount = base['amount']
|
1076
|
+
this.startDate = base['startDate']
|
1077
|
+
this.endDate = base['endDate']
|
1078
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
1079
|
+
SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
|
1080
|
+
SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
|
1081
|
+
SchemaValidation.validate_date(this.startDate, false, name, 'startDate')
|
1082
|
+
SchemaValidation.validate_date(this.endDate, false, name, 'endDate')
|
1083
|
+
this
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
class DeleteDiscount
|
1089
|
+
include XML::Mapping
|
1090
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
1091
|
+
def self.from_hash(hash,index=0, name="deleteDiscount")
|
1092
|
+
base = hash[name][index]
|
1093
|
+
if(base)
|
1094
|
+
this = DeleteDiscount.new
|
1095
|
+
this.discountCode = base['discountCode']
|
1096
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
1097
|
+
this
|
1098
|
+
end
|
1099
|
+
end
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
class DeleteAddOn
|
1103
|
+
include XML::Mapping
|
1104
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
1105
|
+
def self.from_hash(hash,index=0, name="updateDiscount")
|
1106
|
+
base = hash[name][index]
|
1107
|
+
if(base)
|
1108
|
+
this = DeleteAddOn.new
|
1109
|
+
this.addOnCode = base['addOnCode']
|
1110
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
1111
|
+
this
|
1112
|
+
end
|
1113
|
+
end
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
|
1117
|
+
class UpdateAddOn
|
1118
|
+
include XML::Mapping
|
1119
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
1120
|
+
text_node :name, "name", :default_value=>nil
|
1121
|
+
text_node :amount, "amount", :default_value=>nil
|
1122
|
+
text_node :startDate, "startDate", :default_value=>nil
|
1123
|
+
text_node :endDate, "endDate", :default_value=>nil
|
1124
|
+
def self.from_hash(hash,index=0, name="updateAddOn")
|
1125
|
+
base = hash[name][index]
|
1126
|
+
if(base)
|
1127
|
+
this = UpdateAddOn.new
|
1128
|
+
this.addOnCode = base['addOnCode']
|
1129
|
+
this.name = base['name']
|
1130
|
+
this.amount = base['amount']
|
1131
|
+
this.startDate = base['startDate']
|
1132
|
+
this.endDate = base['endDate']
|
1133
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
1134
|
+
SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
|
1135
|
+
SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
|
1136
|
+
SchemaValidation.validate_date(this.startDate, false, name, 'startDate')
|
1137
|
+
SchemaValidation.validate_date(this.endDate, false, name, 'endDate')
|
1138
|
+
this
|
1139
|
+
end
|
1140
|
+
end
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
class CancelSubscription
|
1146
|
+
include XML::Mapping
|
1147
|
+
root_element_name "cancelSubscription"
|
1148
|
+
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
class UpdateSubscription
|
1152
|
+
include XML::Mapping
|
1153
|
+
root_element_name "updateSubscription"
|
1154
|
+
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
1155
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1156
|
+
object_node :billToAddress , 'billToAddress', :class=>Contact, :default_value=>nil
|
1157
|
+
#object_node :card,'card',:class=>Card, :default_value=>nil
|
1158
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card, :default_value=>nil),
|
1159
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken, :default_value=>nil),
|
1160
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage, :default_value=>nil)
|
1161
|
+
text_node :billingDate,'billingDate', :default_value=>nil
|
1162
|
+
array_node :createDiscount, "", "createDiscount", :class=>CreateDiscount, :default_value=>[]
|
1163
|
+
array_node :updateDiscount, "", "updateDiscount", :class=>UpdateDiscount, :default_value=>[]
|
1164
|
+
array_node :deleteDiscount, "", "deleteDiscount", :class=>DeleteDiscount,:default_value=>[]
|
1165
|
+
array_node :createAddOn, "", "createAddOn", :class=>CreateAddOn, :default_value=>[]
|
1166
|
+
array_node :updateAddOn, "", "updateAddOn", :class=>UpdateAddOn, :default_value=>[]
|
1167
|
+
array_node :deleteAddOn, "", "deleteAddOn", :class=>DeleteAddOn, :default_value=>[]
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
class CreatePlan
|
1171
|
+
include XML::Mapping
|
1172
|
+
root_element_name "createPlan"
|
1173
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1174
|
+
text_node :name, "name", :default_value=>nil
|
1175
|
+
text_node :description, "description", :default_value=>nil
|
1176
|
+
text_node :intervalType, "intervalType", :defaul_value=>nil
|
1177
|
+
text_node :amount, "amount", :default_value=>nil
|
1178
|
+
text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
|
1179
|
+
text_node :trialNumberOfIntervals,"trialNumberOfIntervals", :default_value=>nil
|
1180
|
+
text_node :trialIntervalType,"trialIntervalType", :default_value=>nil
|
1181
|
+
text_node :active,"active", :default_value=>nil
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
class UpdatePlan
|
1185
|
+
include XML::Mapping
|
1186
|
+
root_element_name "updatePlan"
|
1187
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1188
|
+
text_node :active,"active", :default_value=>nil
|
1189
|
+
end
|
1190
|
+
|
1191
|
+
class VirtualGiftCard
|
1192
|
+
include XML::Mapping
|
1193
|
+
root_element_name "virtualGiftCard"
|
1194
|
+
text_node "accountNumberLength","accountNumberLength", :default_value=>nil
|
1195
|
+
text_node "giftCardBin","giftCardBin", :default_value=>nil
|
1196
|
+
|
1197
|
+
def self.from_hash(hash, name="virtualGiftCard")
|
1198
|
+
base = hash[name]
|
1199
|
+
if(base)
|
1200
|
+
this = VirtualGiftCard.new
|
1201
|
+
this.accountNumberLength = base['accountNumberLength']
|
1202
|
+
this.giftCardBin = base['giftCardBin']
|
941
1203
|
this
|
942
1204
|
end
|
943
1205
|
end
|
944
1206
|
end
|
1207
|
+
|
1208
|
+
class Activate
|
1209
|
+
include XML::Mapping
|
1210
|
+
root_element_name "activate"
|
1211
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1212
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1213
|
+
text_node :amount, "amount", :default_value=>nil
|
1214
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1215
|
+
#object_node :card,'card',:class=>Card, :default_value=>nil
|
1216
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1217
|
+
:elsif, 'virtualGiftCard', :then, (object_node :virtualGiftCard, "virtualGiftCard", :class=>VirtualGiftCard)
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
class Deactivate
|
1221
|
+
include XML::Mapping
|
1222
|
+
root_element_name "deactivate"
|
1223
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1224
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1225
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1226
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
class Load
|
1230
|
+
include XML::Mapping
|
1231
|
+
root_element_name "load"
|
1232
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1233
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1234
|
+
text_node :amount, "amount", :default_value=>nil
|
1235
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1236
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
class Unload
|
1240
|
+
include XML::Mapping
|
1241
|
+
root_element_name "unload"
|
1242
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1243
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1244
|
+
text_node :amount, "amount", :default_value=>nil
|
1245
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1246
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
class BalanceInquiry
|
1250
|
+
include XML::Mapping
|
1251
|
+
root_element_name "balanceInquiry"
|
1252
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1253
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1254
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1255
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
class AdvancedFraudChecks
|
1259
|
+
include XML::Mapping
|
1260
|
+
root_element_name "advancedFraudChecks"
|
1261
|
+
text_node :threatMetrixSessionId, 'threatMetrixSessionId', :default_value=>nil
|
1262
|
+
|
1263
|
+
def self.from_hash(hash, name="advancedFraudChecks")
|
1264
|
+
base = hash[name]
|
1265
|
+
if(base)
|
1266
|
+
this = AdvancedFraudChecks.new
|
1267
|
+
this.threatMetrixSessionId = base['threatMetrixSessionId'] # /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/
|
1268
|
+
#SchemaValidation.validate_regex(this.threatMetrixSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'threatMetrixSessionId')
|
1269
|
+
this
|
1270
|
+
end
|
1271
|
+
end
|
1272
|
+
end
|
1273
|
+
|
945
1274
|
|
946
1275
|
class Authorization
|
947
1276
|
include XML::Mapping
|
@@ -961,7 +1290,8 @@ module LitleOnline
|
|
961
1290
|
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
962
1291
|
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
963
1292
|
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
964
|
-
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
1293
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1294
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
965
1295
|
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
966
1296
|
object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil
|
967
1297
|
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
@@ -978,6 +1308,7 @@ module LitleOnline
|
|
978
1308
|
text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
|
979
1309
|
object_node :recurringRequest,"recurringRequest", :class=>RecurringRequest, :default_value=>nil
|
980
1310
|
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1311
|
+
object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
|
981
1312
|
end
|
982
1313
|
|
983
1314
|
class Sale
|
@@ -998,7 +1329,8 @@ module LitleOnline
|
|
998
1329
|
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
999
1330
|
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
1000
1331
|
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1001
|
-
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
1332
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1333
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1002
1334
|
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
1003
1335
|
optional_choice_node :if, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck, :default_value=>nil),
|
1004
1336
|
:elsif, 'cardholderAuthentication', :then, (object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil)
|
@@ -1019,6 +1351,7 @@ module LitleOnline
|
|
1019
1351
|
object_node :recurringRequest, "recurringRequest", :class=>RecurringRequest, :default_value=>nil
|
1020
1352
|
object_node :litleInternalRecurringRequest, "litleInternalRecurringRequest", :class=>LitleInternalRecurringRequest, :default_value=>nil
|
1021
1353
|
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1354
|
+
object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
|
1022
1355
|
end
|
1023
1356
|
|
1024
1357
|
class Credit
|
@@ -1037,7 +1370,8 @@ module LitleOnline
|
|
1037
1370
|
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1038
1371
|
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>CreditPayPal),
|
1039
1372
|
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1040
|
-
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
1373
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1374
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1041
1375
|
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1042
1376
|
text_node :taxType, "taxType", :default_value=>nil
|
1043
1377
|
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
@@ -1079,7 +1413,8 @@ module LitleOnline
|
|
1079
1413
|
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1080
1414
|
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1081
1415
|
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1082
|
-
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
1416
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1417
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1083
1418
|
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1084
1419
|
text_node :taxType, "taxType", :default_value=>nil
|
1085
1420
|
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
@@ -1105,7 +1440,8 @@ module LitleOnline
|
|
1105
1440
|
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1106
1441
|
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1107
1442
|
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1108
|
-
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage)
|
1443
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1444
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1109
1445
|
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1110
1446
|
text_node :taxType, "taxType", :default_value=>nil
|
1111
1447
|
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
@@ -1168,7 +1504,69 @@ module LitleOnline
|
|
1168
1504
|
|
1169
1505
|
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1170
1506
|
end
|
1507
|
+
|
1508
|
+
class DepositReversal
|
1509
|
+
include XML::Mapping
|
1510
|
+
root_element_name "depositReversal"
|
1511
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1512
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1513
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1171
1514
|
|
1515
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
class RefundReversal
|
1519
|
+
include XML::Mapping
|
1520
|
+
root_element_name "refundReversal"
|
1521
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1522
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1523
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1524
|
+
|
1525
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
class ActivateReversal
|
1529
|
+
include XML::Mapping
|
1530
|
+
root_element_name "activateReversal"
|
1531
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1532
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1533
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1534
|
+
|
1535
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
class DeactivateReversal
|
1539
|
+
include XML::Mapping
|
1540
|
+
root_element_name "deactivateReversal"
|
1541
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1542
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1543
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1544
|
+
|
1545
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1546
|
+
end
|
1547
|
+
|
1548
|
+
class LoadReversal
|
1549
|
+
include XML::Mapping
|
1550
|
+
root_element_name "loadReversal"
|
1551
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1552
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1553
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1554
|
+
|
1555
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1556
|
+
end
|
1557
|
+
|
1558
|
+
class UnloadReversal
|
1559
|
+
include XML::Mapping
|
1560
|
+
root_element_name "unloadReversal"
|
1561
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1562
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1563
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1564
|
+
|
1565
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
|
1569
|
+
|
1172
1570
|
class EcheckVerification
|
1173
1571
|
include XML::Mapping
|
1174
1572
|
root_element_name "echeckVerification"
|
@@ -1285,7 +1683,25 @@ module LitleOnline
|
|
1285
1683
|
:elsif, 'echeckVoid', :then, (object_node :echeckVoid, "echeckVoid", :class=>EcheckVoid),
|
1286
1684
|
:elsif, 'echeckVerification', :then, (object_node :echeckVerification, "echeckVerification", :class=>EcheckVerification),
|
1287
1685
|
:elsif, 'registerTokenRequest', :then, (object_node :registerTokenRequest, "registerTokenRequest", :class=>RegisterTokenRequest),
|
1288
|
-
:elsif, 'updateCardValidationNumOnToken', :then, (object_node :updateCardValidationNumOnToken, "updateCardValidationNumOnToken", :class=>UpdateCardValidationNumOnToken)
|
1686
|
+
:elsif, 'updateCardValidationNumOnToken', :then, (object_node :updateCardValidationNumOnToken, "updateCardValidationNumOnToken", :class=>UpdateCardValidationNumOnToken),
|
1687
|
+
:elsif, 'cancelSubscription', :then, (object_node :cancelSubscription, "cancelSubscription", :class=>CancelSubscription),
|
1688
|
+
:elsif, 'updateSubscription', :then, (object_node :updateSubscription, "updateSubscription", :class=>UpdateSubscription),
|
1689
|
+
:elsif, 'activate',:then,(object_node :activate,"activate", :class=>Activate),
|
1690
|
+
:elsif, 'deactivate',:then,(object_node :deactivate,"deactivate", :class=>Deactivate),
|
1691
|
+
:elsif, 'load',:then,(object_node :load,"load", :class=>Load),
|
1692
|
+
:elsif, 'unload',:then,(object_node :unload,"unload", :class=>Unload),
|
1693
|
+
:elsif, 'balanceInquiry',:then,(object_node :balanceInquiry,"balanceInquiry", :class=>BalanceInquiry),
|
1694
|
+
:elsif, 'createPlan',:then,(object_node :createPlan,"createPlan",:class=>CreatePlan),
|
1695
|
+
:elsif, 'updatePlan',:then,(object_node :updatePlan,"updatePlan",:class=>UpdatePlan),
|
1696
|
+
:elsif, 'virtualGiftCard', :then,(object_node :virtualGiftCard,"virtualGiftCard",:class=>VirtualGiftCard),
|
1697
|
+
:elsif, 'activateReversal', :then, (object_node :activateReversal,"activateReversal", :class=>ActivateReversal),
|
1698
|
+
:elsif, 'depositReversal', :then, (object_node :depositReversal,"depositReversal", :class=>DepositReversal),
|
1699
|
+
:elsif, 'refundReversal', :then, (object_node :refundReversal,"refundReversal", :class=>RefundReversal),
|
1700
|
+
:elsif, 'deactivateReversal', :then, (object_node :deactivateReversal,"deactivateReversal", :class=>DeactivateReversal),
|
1701
|
+
:elsif, 'loadReversal', :then, (object_node :loadReversal,"loadReversal", :class=>LoadReversal),
|
1702
|
+
:elsif, 'unloadReversal', :then, (object_node :unloadReversal,"unloadReversal", :class=>UnloadReversal),
|
1703
|
+
:elsif, 'advancedFraudResults', :then, (object_node :advancedFraudResults,"advancedFraudResults", :class=>AdvancedFraudResults)
|
1704
|
+
|
1289
1705
|
def post_save(xml, options={:Mapping=>:_default})
|
1290
1706
|
xml.each_element() {|el|
|
1291
1707
|
if(el.name == 'captureTxn')
|
@@ -1326,6 +1742,19 @@ module LitleOnline
|
|
1326
1742
|
text_node :numAccountUpdates, "@numAccountUpdates", :default_value=>"0"
|
1327
1743
|
text_node :merchantId, "@merchantId", :default_value=>nil
|
1328
1744
|
text_node :id, "@id", :default_value=>nil
|
1745
|
+
text_node :numCancelSubscriptions,"@numCancelSubscriptions", :default_value=>"0"
|
1746
|
+
text_node :numUpdateSubscriptions,"@numUpdateSubscriptions", :default_value=>"0"
|
1747
|
+
text_node :numCreatePlans,"@numCreatePlans",:default_value=>"0"
|
1748
|
+
text_node :numUpdatePlans,"@numUpdatePlans",:default_value=>"0"
|
1749
|
+
text_node :numActivates,"@numActivates",:default_value=>"0"
|
1750
|
+
text_node :numDeactivates,"@numDeactivates",:default_value=>"0"
|
1751
|
+
text_node :activateAmount,"@activateAmount",:default_value=>"0"
|
1752
|
+
text_node :numLoads,"@numLoads",:default_value=>"0"
|
1753
|
+
text_node :loadAmount,"@loadAmount",:default_value=>"0"
|
1754
|
+
text_node :numUnloads,"@numUnloads",:default_value=>"0"
|
1755
|
+
text_node :unloadAmount,"@unloadAmount",:default_value=>"0"
|
1756
|
+
text_node :numBalanceInquirys,"@numBalanceInquirys",:default_value=>"0"
|
1757
|
+
text_node :merchantSdk,"merchantSdk",:default_value=>"0"
|
1329
1758
|
end
|
1330
1759
|
|
1331
1760
|
class LitleRequest
|
@@ -1369,6 +1798,11 @@ module LitleOnline
|
|
1369
1798
|
object_node :authentication, "authentication", :class=>Authentication
|
1370
1799
|
object_node :rfrRequest, 'RFRRequest', :class=>LitleRFRRequest
|
1371
1800
|
end
|
1801
|
+
|
1802
|
+
|
1803
|
+
|
1804
|
+
|
1805
|
+
|
1372
1806
|
# begin
|
1373
1807
|
# class LitleOnlineResponse
|
1374
1808
|
# attr_accessor :message
|