CnpOnline 8.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +139 -0
- data/CONTRIBUTORS +2 -0
- data/DESCRIPTION +5 -0
- data/LICENSE +22 -0
- data/README.md +72 -0
- data/Rakefile +89 -0
- data/Rakefile~ +89 -0
- data/SETUP.md +46 -0
- data/bin/Setup.rb +124 -0
- data/bin/sample_batch_driver.rb +123 -0
- data/bin/sample_driver.rb +49 -0
- data/lib/Communications.rb +85 -0
- data/lib/Configuration.rb +67 -0
- data/lib/EnvironmentVariables.rb +22 -0
- data/lib/LitleBatchRequest.rb +562 -0
- data/lib/LitleListeners.rb +142 -0
- data/lib/LitleOnline.rb +62 -0
- data/lib/LitleOnlineRequest.rb +297 -0
- data/lib/LitleRequest.rb +494 -0
- data/lib/LitleTransaction.rb +463 -0
- data/lib/LitleXmlMapper.rb +64 -0
- data/lib/XMLFields.rb +1869 -0
- data/lib/cacert.pem +3331 -0
- data/samples/Auth/LitleAuthReversalTransaction.rb +15 -0
- data/samples/Auth/LitleAuthorizationTransaction.rb +31 -0
- data/samples/Auth/LitlePaymentFullLifeCycle.rb +47 -0
- data/samples/Batch/AccountUpdate.rb +64 -0
- data/samples/Batch/SampleBatchDriver.rb +94 -0
- data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +30 -0
- data/samples/Capture/LitleCaptureTransaction.rb +14 -0
- data/samples/Capture/LitleForceCaptureTransaction.rb +26 -0
- data/samples/Capture/LitlePartialCapture.rb +16 -0
- data/samples/Credit/LitleCreditTransaction.rb +16 -0
- data/samples/Credit/LitleRefundTransaction.rb +29 -0
- data/samples/Other/LitleAvsTransaction.rb +34 -0
- data/samples/Other/LitleVoidTransaction.rb +18 -0
- data/samples/Paypage/FullPaypageLifeCycle.rb +74 -0
- data/samples/Run_all.rb +17 -0
- data/samples/Sale/LitleSaleTransaction.rb +29 -0
- data/samples/Sale/SampleSaleTransaction.rb +24 -0
- data/test/certification/certTest1_base.rb +945 -0
- data/test/certification/certTest2_authenhanced.rb +573 -0
- data/test/certification/certTest3_authreversal.rb +185 -0
- data/test/certification/certTest4_echeck.rb +278 -0
- data/test/certification/certTest5_token.rb +204 -0
- data/test/certification/certTest_batchAll.rb +337 -0
- data/test/certification/ts_all.rb +33 -0
- data/test/functional/test_activate.rb +100 -0
- data/test/functional/test_activateReversal.rb +56 -0
- data/test/functional/test_auth.rb +298 -0
- data/test/functional/test_authReversal.rb +69 -0
- data/test/functional/test_balanceInquiry.rb +80 -0
- data/test/functional/test_batch.rb +164 -0
- data/test/functional/test_batchStream.rb +145 -0
- data/test/functional/test_cancelSubscription.rb +55 -0
- data/test/functional/test_capture.rb +84 -0
- data/test/functional/test_captureGivenAuth.rb +235 -0
- data/test/functional/test_configuration.rb +89 -0
- data/test/functional/test_createPlan.rb +85 -0
- data/test/functional/test_credit.rb +174 -0
- 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_echeckCredit.rb +134 -0
- data/test/functional/test_echeckRedeposit.rb +88 -0
- data/test/functional/test_echeckSale.rb +177 -0
- data/test/functional/test_echeckVerification.rb +127 -0
- data/test/functional/test_echeckVoid.rb +41 -0
- data/test/functional/test_forceCapture.rb +183 -0
- data/test/functional/test_litle_requests.rb +356 -0
- data/test/functional/test_load.rb +82 -0
- data/test/functional/test_loadReversal.rb +56 -0
- data/test/functional/test_override.rb +64 -0
- data/test/functional/test_refundReversal.rb +56 -0
- data/test/functional/test_sale.rb +259 -0
- data/test/functional/test_token.rb +115 -0
- data/test/functional/test_unload.rb +82 -0
- data/test/functional/test_unloadReversal.rb +56 -0
- data/test/functional/test_updateCardValidationNumOnToken.rb +43 -0
- data/test/functional/test_updatePlan.rb +58 -0
- data/test/functional/test_updateSubscription.rb +76 -0
- data/test/functional/test_xmlfields.rb +427 -0
- data/test/functional/ts_all.rb +66 -0
- data/test/unit/test_LitleAUBatch.rb +216 -0
- data/test/unit/test_LitleBatchRequest.rb +643 -0
- data/test/unit/test_LitleOnlineRequest.rb +295 -0
- data/test/unit/test_LitleRequest.rb +316 -0
- data/test/unit/test_LitleTransaction.rb +397 -0
- data/test/unit/test_activate.rb +92 -0
- data/test/unit/test_activateReversal.rb +44 -0
- data/test/unit/test_auth.rb +421 -0
- data/test/unit/test_authReversal.rb +82 -0
- data/test/unit/test_balanceInquiry.rb +52 -0
- data/test/unit/test_cancelSubscription.rb +43 -0
- data/test/unit/test_capture.rb +73 -0
- data/test/unit/test_captureGivenAuth.rb +188 -0
- data/test/unit/test_createPlan.rb +52 -0
- data/test/unit/test_credit.rb +342 -0
- 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_echeckCredit.rb +71 -0
- data/test/unit/test_echeckRedeposit.rb +94 -0
- data/test/unit/test_echeckSale.rb +71 -0
- data/test/unit/test_echeckVerification.rb +71 -0
- data/test/unit/test_echeckVoid.rb +54 -0
- data/test/unit/test_forceCapture.rb +145 -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 +465 -0
- data/test/unit/test_token.rb +144 -0
- data/test/unit/test_unload.rb +53 -0
- data/test/unit/test_unloadReversal.rb +44 -0
- data/test/unit/test_updateCardValidationNumOnToken.rb +80 -0
- data/test/unit/test_updatePlan.rb +45 -0
- data/test/unit/test_updateSubscription.rb +172 -0
- data/test/unit/test_xmlfields.rb +2930 -0
- data/test/unit/ts_unit.rb +65 -0
- metadata +255 -0
@@ -0,0 +1,64 @@
|
|
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
|
+
require 'logger'
|
27
|
+
|
28
|
+
#
|
29
|
+
# Handles round trip of transactions
|
30
|
+
# Maps the request to Litle XML -> Sends XML payload to Litle via HTTP(S) -> formats XML response into a Ruby hash and returns it
|
31
|
+
#
|
32
|
+
module LitleOnline
|
33
|
+
class LitleXmlMapper
|
34
|
+
def LitleXmlMapper.request(request_xml, config_hash)
|
35
|
+
logger = initialize_logger(config_hash)
|
36
|
+
|
37
|
+
logger.debug request_xml
|
38
|
+
# get the Litle Online Response from the API server over HTTP
|
39
|
+
response_xml = Communications.http_post(request_xml,config_hash)
|
40
|
+
logger.debug response_xml
|
41
|
+
|
42
|
+
# create response object from xml returned form the Litle API
|
43
|
+
response_object = XMLObject.new(response_xml)
|
44
|
+
|
45
|
+
return response_object
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def self.initialize_logger(config_hash)
|
51
|
+
# Sadly, this needs to be static (the alternative would be to change the LitleXmlMapper.request API
|
52
|
+
# to accept a Configuration instance instead of the config_hash)
|
53
|
+
Configuration.logger ||= default_logger config_hash['printxml'] ? Logger::DEBUG : Logger::INFO
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.default_logger(level) # :nodoc:
|
57
|
+
logger = Logger.new(STDOUT)
|
58
|
+
logger.level = level
|
59
|
+
# Backward compatible logging format for pre 8.16
|
60
|
+
logger.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" }
|
61
|
+
logger
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/lib/XMLFields.rb
ADDED
@@ -0,0 +1,1869 @@
|
|
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
|
+
def self.validate_required(value, required, class_name, field_name)
|
61
|
+
if(required)
|
62
|
+
if(value.nil?)
|
63
|
+
raise "If #{class_name} is specified, it must have a #{field_name}"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.validate_length(value, required, min, max, class_name, field_name)
|
69
|
+
validate_required(value, required, class_name, field_name)
|
70
|
+
if(value.nil?)
|
71
|
+
return
|
72
|
+
end
|
73
|
+
if(value.length < min || value.length > max)
|
74
|
+
raise "If " + class_name + " " + field_name + " is specified, it must be between " + min.to_s + " and " + max.to_s + " characters long"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.validate_size(value, required, min, max, class_name, field_name)
|
79
|
+
validate_required(value, required, class_name, field_name)
|
80
|
+
if(value.nil?)
|
81
|
+
return
|
82
|
+
end
|
83
|
+
if(value.to_i < min || value.to_i > max || !(/\A\-?\d+\Z/ =~ value))
|
84
|
+
raise "If " + class_name + " " + field_name + " is specified, it must be between " + min.to_s + " and " + max.to_s
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.validate_country(value, class_name, field_name)
|
89
|
+
if(value.nil?)
|
90
|
+
return
|
91
|
+
end
|
92
|
+
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"]
|
93
|
+
if(!list.include? value)
|
94
|
+
raise "If " + class_name + " " + field_name + " is specified, it must be valid. You specified " + value
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def self.validate_regex(value, required, regex, class_name, field_name)
|
99
|
+
validate_required(value, required, class_name, field_name)
|
100
|
+
if(value.nil?)
|
101
|
+
return
|
102
|
+
end
|
103
|
+
if(!(regex =~ value))
|
104
|
+
raise "If #{class_name} #{field_name} is specified, it must match the regular expression #{regex.inspect}"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.validate_enum(value, required, list, class_name, field_name)
|
109
|
+
validate_required(value, required, class_name, field_name)
|
110
|
+
if(value.nil?)
|
111
|
+
return
|
112
|
+
end
|
113
|
+
if(!list.include?(value))
|
114
|
+
str = '["'+ list.join('", "') + '"]'
|
115
|
+
raise "If #{class_name} #{field_name} is specified, it must be in #{str}"
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.validate_long(value, required, class_name, field_name)
|
120
|
+
validate_size(value, required, -9223372036854775808, 9223372036854775807, class_name, field_name)
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.validate_currency(value, required, class_name, field_name)
|
124
|
+
validate_enum(value, required, ['AUD','CAD','CHF','DKK','EUR','GBP','HKD','JPY','NOK','NZD','SEK','SGD','USD'], class_name, field_name)
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.validate_boolean(value, required, class_name, field_name)
|
128
|
+
validate_enum(value, required, ['true','false','1','0'], class_name, field_name)
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.validate_date(value, required, class_name, field_name)
|
132
|
+
validate_regex(value, required, /\A\d{4}-\d{2}-\d{2}\Z/, class_name, field_name)
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
class Contact
|
138
|
+
include XML::Mapping
|
139
|
+
text_node :name, "name", :default_value=>nil
|
140
|
+
text_node :firstName, "firstName", :default_value=>nil
|
141
|
+
text_node :middleInitial, "middleInitial", :default_value=>nil
|
142
|
+
text_node :lastName, "lastName", :default_value=>nil
|
143
|
+
text_node :companyName, "companyName", :default_value=>nil
|
144
|
+
text_node :addressLine1, "addressLine1", :default_value=>nil
|
145
|
+
text_node :addressLine2, "addressLine2", :default_value=>nil
|
146
|
+
text_node :addressLine3, "addressLine3", :default_value=>nil
|
147
|
+
text_node :city, "city", :default_value=>nil
|
148
|
+
text_node :state, "state", :default_value=>nil
|
149
|
+
text_node :zip, "zip", :default_value=>nil
|
150
|
+
text_node :country, "country", :default_value=>nil
|
151
|
+
text_node :email, "email", :default_value=>nil
|
152
|
+
text_node :phone, "phone", :default_value=>nil
|
153
|
+
def self.from_hash(hash, name='contact')
|
154
|
+
base = hash[name]
|
155
|
+
if(base)
|
156
|
+
this = Contact.new
|
157
|
+
this.name = base['name']
|
158
|
+
this.firstName = base['firstName']
|
159
|
+
this.middleInitial = base['middleInitial']
|
160
|
+
this.lastName = base['lastName']
|
161
|
+
this.companyName = base['companyName']
|
162
|
+
this.addressLine1 = base['addressLine1']
|
163
|
+
this.addressLine2 = base['addressLine2']
|
164
|
+
this.addressLine3 = base['addressLine3']
|
165
|
+
this.city = base['city']
|
166
|
+
this.state = base['state']
|
167
|
+
this.zip = base['zip']
|
168
|
+
this.country = base['country']
|
169
|
+
this.email = base['email']
|
170
|
+
this.phone = base['phone']
|
171
|
+
SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
|
172
|
+
SchemaValidation.validate_length(this.firstName, false, 1, 25, name, "firstName")
|
173
|
+
SchemaValidation.validate_length(this.middleInitial, false, 1, 1, name, "middleInitial")
|
174
|
+
SchemaValidation.validate_length(this.lastName, false, 1, 25, name, "lastName")
|
175
|
+
SchemaValidation.validate_length(this.companyName, false, 1, 40, name, "companyName")
|
176
|
+
SchemaValidation.validate_length(this.addressLine1, false, 1, 35, name, "addressLine1")
|
177
|
+
SchemaValidation.validate_length(this.addressLine2, false, 1, 35, name, "addressLine2")
|
178
|
+
SchemaValidation.validate_length(this.addressLine3, false, 1, 35, name, "addressLine3")
|
179
|
+
SchemaValidation.validate_length(this.city, false, 1, 35, name, "city")
|
180
|
+
SchemaValidation.validate_length(this.state, false, 1, 30, name, "state")
|
181
|
+
SchemaValidation.validate_length(this.zip, false, 1, 20, name, "zip")
|
182
|
+
SchemaValidation.validate_length(this.country, false, 1, 3, name, "country")
|
183
|
+
SchemaValidation.validate_country(this.country, name, "country")
|
184
|
+
SchemaValidation.validate_length(this.email, false, 1, 100, name, "email")
|
185
|
+
SchemaValidation.validate_length(this.phone, false, 1, 20, name, "phone")
|
186
|
+
this
|
187
|
+
else
|
188
|
+
nil
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class CustomerInfo
|
194
|
+
include XML::Mapping
|
195
|
+
text_node :ssn, "ssn", :default_value=>nil
|
196
|
+
text_node :dob, "dob", :default_value=>nil
|
197
|
+
text_node :customerRegistrationDate, "customerRegistrationDate", :default_value=>nil
|
198
|
+
text_node :customerType, "customerType", :default_value=>nil
|
199
|
+
text_node :incomeAmount, "incomeAmount", :default_value=>nil
|
200
|
+
text_node :incomeCurrency, "incomeCurrency", :default_value=>nil
|
201
|
+
text_node :customerCheckingAccount, "customerCheckingAccount", :default_value=>nil
|
202
|
+
text_node :customerSavingAccount, "customerSavingAccount", :default_value=>nil
|
203
|
+
text_node :employerName, "employerName", :default_value=>nil
|
204
|
+
text_node :customerWorkTelephone, "customerWorkTelephone", :default_value=>nil
|
205
|
+
text_node :residenceStatus, "residenceStatus", :default_value=>nil
|
206
|
+
text_node :yearsAtResidence, "yearsAtResidence", :default_value=>nil
|
207
|
+
text_node :yearsAtEmployer, "yearsAtEmployer", :default_value=>nil
|
208
|
+
def self.from_hash(hash, name='customerInfo')
|
209
|
+
base = hash[name]
|
210
|
+
if(base)
|
211
|
+
this = CustomerInfo.new
|
212
|
+
this.ssn = base['ssn']
|
213
|
+
this.dob = base['dob']
|
214
|
+
this.customerRegistrationDate = base['customerRegistrationDate']
|
215
|
+
this.customerType = base['customerType']
|
216
|
+
this.incomeAmount = base['incomeAmount']
|
217
|
+
this.incomeCurrency = base['incomeCurrency']
|
218
|
+
this.customerCheckingAccount = base['customerCheckingAccount']
|
219
|
+
this.customerSavingAccount = base['customerSavingAccount']
|
220
|
+
this.employerName = base['employerName']
|
221
|
+
this.customerWorkTelephone = base['customerWorkTelephone']
|
222
|
+
this.residenceStatus = base['residenceStatus']
|
223
|
+
this.yearsAtResidence = base['yearsAtResidence']
|
224
|
+
this.yearsAtEmployer = base['yearsAtEmployer']
|
225
|
+
SchemaValidation.validate_regex(this.ssn, false, /\A\d{9}\Z/, name, 'ssn')
|
226
|
+
SchemaValidation.validate_date(this.dob, false, name, 'dob')
|
227
|
+
SchemaValidation.validate_regex(this.customerRegistrationDate, false, /\A\d{4}-\d{2}-\d{2}/, name, 'customerRegistrationDate')
|
228
|
+
SchemaValidation.validate_enum(this.customerType, false, ['New','Existing'], name, 'customerType')
|
229
|
+
SchemaValidation.validate_long(this.incomeAmount, false, name, 'incomeAmount')
|
230
|
+
SchemaValidation.validate_currency(this.incomeCurrency, false, name, 'incomeCurrency')
|
231
|
+
SchemaValidation.validate_boolean(this.customerCheckingAccount, false, name, 'customerCheckingAccount')
|
232
|
+
SchemaValidation.validate_boolean(this.customerSavingAccount, false, name, 'customerSavingAccount')
|
233
|
+
SchemaValidation.validate_length(this.employerName, false, 1, 20, name, "employerName")
|
234
|
+
SchemaValidation.validate_length(this.customerWorkTelephone, false, 1, 20, name, "customerWorkTelephone")
|
235
|
+
SchemaValidation.validate_enum(this.residenceStatus, false, ['Own','Rent','Other'], name, 'residenceStatus')
|
236
|
+
SchemaValidation.validate_size(this.yearsAtResidence, false, 0, 99, name, 'yearsAtResidence')
|
237
|
+
SchemaValidation.validate_size(this.yearsAtEmployer, false, 0, 99, name, 'yearsAtEmployer')
|
238
|
+
this
|
239
|
+
else
|
240
|
+
nil
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
class BillMeLaterRequest
|
246
|
+
include XML::Mapping
|
247
|
+
text_node :bmlMerchantId, "bmlMerchantId", :default_value=>nil
|
248
|
+
text_node :bmlProductType, "bmlProductType", :default_value=>nil
|
249
|
+
text_node :termsAndConditions, "termsAndConditions", :default_value=>nil
|
250
|
+
text_node :preapprovalNumber, "preapprovalNumber", :default_value=>nil
|
251
|
+
text_node :merchantPromotionalCode, "merchantPromotionalCode", :default_value=>nil
|
252
|
+
text_node :customerPasswordChanged, "customerPasswordChanged", :default_value=>nil
|
253
|
+
text_node :customerBillingAddressChanged, "customerBillingAddressChanged", :default_value=>nil
|
254
|
+
text_node :customerEmailChanged, "customerEmailChanged", :default_value=>nil
|
255
|
+
text_node :customerPhoneChanged, "customerPhoneChanged", :default_value=>nil
|
256
|
+
text_node :secretQuestionCode, "secretQuestionCode", :default_value=>nil
|
257
|
+
text_node :secretQuestionAnswer, "secretQuestionAnswer", :default_value=>nil
|
258
|
+
text_node :virtualAuthenticationKeyPresenceIndicator, "virtualAuthenticationKeyPresenceIndicator", :default_value=>nil
|
259
|
+
text_node :virtualAuthenticationKeyData, "virtualAuthenticationKeyData", :default_value=>nil
|
260
|
+
text_node :itemCategoryCode, "itemCategoryCode", :default_value=>nil
|
261
|
+
text_node :authorizationSourcePlatform, "authorizationSourcePlatform", :default_value=>nil
|
262
|
+
def self.from_hash(hash, name='billMeLaterRequest')
|
263
|
+
base = hash[name]
|
264
|
+
if(base)
|
265
|
+
this = BillMeLaterRequest.new
|
266
|
+
this.bmlMerchantId = base['bmlMerchantId']
|
267
|
+
this.bmlProductType = base['bmlProductType']
|
268
|
+
this.termsAndConditions = base['termsAndConditions']
|
269
|
+
this.preapprovalNumber = base['preapprovalNumber']
|
270
|
+
this.merchantPromotionalCode = base['merchantPromotionalCode']
|
271
|
+
this.customerPasswordChanged = base['customerPasswordChanged']
|
272
|
+
this.customerBillingAddressChanged = base['customerBillingAddressChanged']
|
273
|
+
this.customerEmailChanged = base['customerEmailChanged']
|
274
|
+
this.customerPhoneChanged = base['customerPhoneChanged']
|
275
|
+
this.secretQuestionCode = base['secretQuestionCode']
|
276
|
+
this.secretQuestionAnswer = base['secretQuestionAnswer']
|
277
|
+
this.virtualAuthenticationKeyPresenceIndicator = base['virtualAuthenticationKeyPresenceIndicator']
|
278
|
+
this.virtualAuthenticationKeyData = base['virtualAuthenticationKeyData']
|
279
|
+
this.itemCategoryCode = base['itemCategoryCode']
|
280
|
+
this.authorizationSourcePlatform = base['authorizationSourcePlatform']
|
281
|
+
SchemaValidation.validate_long(this.bmlMerchantId, false, name, 'bmlMerchantId')
|
282
|
+
SchemaValidation.validate_length(this.bmlProductType, false, 1, 2, name, "bmlProductType")
|
283
|
+
SchemaValidation.validate_size(this.termsAndConditions, false, -99999, 99999, name, 'termsAndConditions')
|
284
|
+
SchemaValidation.validate_length(this.preapprovalNumber, false, 13, 25, name, "preapprovalNumber")
|
285
|
+
SchemaValidation.validate_size(this.merchantPromotionalCode, false, -9999, 9999, name, 'merchantPromotionalCode')
|
286
|
+
SchemaValidation.validate_boolean(this.customerPasswordChanged, false, name, 'customerPasswordChanged')
|
287
|
+
SchemaValidation.validate_boolean(this.customerBillingAddressChanged, false, name, 'customerBillingAddressChanged')
|
288
|
+
SchemaValidation.validate_boolean(this.customerEmailChanged, false, name, 'customerEmailChanged')
|
289
|
+
SchemaValidation.validate_boolean(this.customerPhoneChanged, false, name, 'customerPhoneChanged')
|
290
|
+
SchemaValidation.validate_length(this.secretQuestionCode, false, 1, 2, name, "secretQuestionCode")
|
291
|
+
SchemaValidation.validate_length(this.secretQuestionAnswer, false, 1, 25, name, "secretQuestionAnswer")
|
292
|
+
SchemaValidation.validate_length(this.virtualAuthenticationKeyPresenceIndicator, false, 1, 1, name, "virtualAuthenticationKeyPresenceIndicator")
|
293
|
+
SchemaValidation.validate_length(this.virtualAuthenticationKeyData, false, 1, 4, name, "virtualAuthenticationKeyData")
|
294
|
+
SchemaValidation.validate_size(this.itemCategoryCode, false, -9999, 9999, name, 'itemCategoryCode')
|
295
|
+
this
|
296
|
+
else
|
297
|
+
nil
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
class FraudCheck
|
303
|
+
include XML::Mapping
|
304
|
+
text_node :authenticationValue, "authenticationValue", :default_value=>nil
|
305
|
+
text_node :authenticationTransactionId, "authenticationTransactionId", :default_value=>nil
|
306
|
+
text_node :customerIpAddress, "customerIpAddress", :default_value=>nil
|
307
|
+
text_node :authenticatedByMerchant, "authenticatedByMerchant", :default_value=>nil
|
308
|
+
def self.from_hash(hash, name='fraudCheck')
|
309
|
+
base = hash[name]
|
310
|
+
if(base)
|
311
|
+
this = FraudCheck.new
|
312
|
+
this.authenticationValue = base['authenticationValue']
|
313
|
+
this.authenticationTransactionId = base['authenticationTransactionId']
|
314
|
+
this.customerIpAddress = base['customerIpAddress']
|
315
|
+
this.authenticatedByMerchant = base['authenticatedByMerchant']
|
316
|
+
SchemaValidation.validate_length(this.authenticationValue, false, 1, 56, name, "authenticationValue")
|
317
|
+
SchemaValidation.validate_length(this.authenticationTransactionId, false, 1, 28, name, "authenticationTransactionId")
|
318
|
+
SchemaValidation.validate_regex(this.customerIpAddress, false, /\A(\d{1,3}.){3}\d{1,3}\Z/, name, 'customerIpAddress')
|
319
|
+
SchemaValidation.validate_boolean(this.authenticatedByMerchant, false, name, 'authenticatedByMerchant')
|
320
|
+
this
|
321
|
+
else
|
322
|
+
nil
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
class AdvancedFraudResults
|
328
|
+
include XML::Mapping
|
329
|
+
root_element_name "advanceFraudResults"
|
330
|
+
text_node :deviceReviewStatus, "deviceReviewStatus", :default_value=>nil
|
331
|
+
text_node :deviceReputationScore, "deviceReputationScore", :default_value=>nil
|
332
|
+
array_node :triggeredRule, "", "triggeredRule", :default_value=>[]
|
333
|
+
def self.from_hash(hash, name="advancedFraudResults")
|
334
|
+
base = hash[name]
|
335
|
+
if(base)
|
336
|
+
this = AdvancedFraudResults.new
|
337
|
+
this.deviceReviewStatus = base['deviceReviewStatus']
|
338
|
+
this.deviceReputationScore = base['deviceReputationScore']
|
339
|
+
if(base['triggeredRule'])
|
340
|
+
base['triggeredRule'].each_index {|index| this.triggeredRule << base['triggeredRule'][index]}
|
341
|
+
end
|
342
|
+
this
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
class FraudResult
|
348
|
+
include XML::Mapping
|
349
|
+
text_node :avsResult, "avsResult", :default_value=>nil
|
350
|
+
text_node :cardValidationResult, "cardValidationResult", :default_value=>nil
|
351
|
+
text_node :authenticationResult, "authenticationResult", :default_value=>nil
|
352
|
+
text_node :advancedAVSResult, "advancedAVSResult", :default_value=>nil
|
353
|
+
object_node :advancedFraudResults, "advancedFraudResults",:class => AdvancedFraudResults, :default_value=>nil
|
354
|
+
def self.from_hash(hash, name='fraudResult')
|
355
|
+
base = hash[name]
|
356
|
+
if(base)
|
357
|
+
this = FraudResult.new
|
358
|
+
this.avsResult = base['avsResult']
|
359
|
+
this.cardValidationResult = base['cardValidationResult']
|
360
|
+
this.authenticationResult = base['authenticationResult']
|
361
|
+
this.advancedAVSResult = base['advancedAVSResult']
|
362
|
+
this.advancedFraudResults = AdvancedFraudResults.from_hash(base)
|
363
|
+
SchemaValidation.validate_length(this.avsResult, false, 1, 2, name, "avsResult")
|
364
|
+
SchemaValidation.validate_length(this.authenticationResult, false, 1, 1, name, "authenticationResult")
|
365
|
+
SchemaValidation.validate_length(this.advancedAVSResult, false, 1, 3, name, "advancedAVSResult")
|
366
|
+
this
|
367
|
+
else
|
368
|
+
nil
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
373
|
+
class AuthInformation
|
374
|
+
include XML::Mapping
|
375
|
+
text_node :authDate, "authDate", :default_value=>nil
|
376
|
+
text_node :authCode, "authCode", :default_value=>nil
|
377
|
+
object_node :fraudResult, "fraudResult", :class=>FraudResult, :default_value=>nil
|
378
|
+
text_node :authAmount, "authAmount", :default_value=>nil
|
379
|
+
def self.from_hash(hash, name='authInformation')
|
380
|
+
base = hash[name]
|
381
|
+
if(base)
|
382
|
+
this = AuthInformation.new
|
383
|
+
this.authDate = base['authDate']
|
384
|
+
this.authCode = base['authCode']
|
385
|
+
this.fraudResult = FraudResult.from_hash(base)
|
386
|
+
this.authAmount = base['authAmount']
|
387
|
+
SchemaValidation.validate_date(this.authDate, false, name, 'authDate')
|
388
|
+
SchemaValidation.validate_length(this.authCode, false, 1, 6, name, "authCode")
|
389
|
+
SchemaValidation.validate_size(this.authAmount, false, -999999999999, 999999999999, name, 'authAmount')
|
390
|
+
this
|
391
|
+
else
|
392
|
+
nil
|
393
|
+
end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
class HealthcareAmounts
|
398
|
+
include XML::Mapping
|
399
|
+
text_node :totalHealthcareAmount, "totalHealthcareAmount", :default_value=>nil
|
400
|
+
text_node :rxAmount, "RxAmount", :default_value=>nil
|
401
|
+
text_node :visionAmount, "visionAmount", :default_value=>nil
|
402
|
+
text_node :clinicOtherAmount, "clinicOtherAmount", :default_value=>nil
|
403
|
+
text_node :dentalAmount, "dentalAmount", :default_value=>nil
|
404
|
+
def self.from_hash(hash, name='healthcareAmounts')
|
405
|
+
base = hash[name]
|
406
|
+
if(base)
|
407
|
+
this = HealthcareAmounts.new
|
408
|
+
this.totalHealthcareAmount = base['totalHealthcareAmount']
|
409
|
+
this.rxAmount = base['RxAmount']
|
410
|
+
this.visionAmount = base['visionAmount']
|
411
|
+
this.clinicOtherAmount = base['clinicOtherAmount']
|
412
|
+
this.dentalAmount = base['dentalAmount']
|
413
|
+
SchemaValidation.validate_size(this.totalHealthcareAmount, true, -999999999999, 999999999999, name, 'totalHealthcareAmount')
|
414
|
+
SchemaValidation.validate_size(this.rxAmount, false, -999999999999, 999999999999, name, 'RxAmount')
|
415
|
+
SchemaValidation.validate_size(this.visionAmount, false, -999999999999, 999999999999, name, 'visionAmount')
|
416
|
+
SchemaValidation.validate_size(this.clinicOtherAmount, false, -999999999999, 999999999999, name, 'clinicOtherAmount')
|
417
|
+
SchemaValidation.validate_size(this.dentalAmount, false, -999999999999, 999999999999, name, 'dentalAmount')
|
418
|
+
this
|
419
|
+
else
|
420
|
+
nil
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
class HealthcareIIAS
|
426
|
+
include XML::Mapping
|
427
|
+
object_node :healthcareAmounts, "healthcareAmounts", :class=>HealthcareAmounts, :default_value=>nil
|
428
|
+
text_node :iiasFlag, "IIASFlag", :default_value=>nil
|
429
|
+
def self.from_hash(hash, name='healthcareIIAS')
|
430
|
+
base = hash[name]
|
431
|
+
if(base)
|
432
|
+
this = HealthcareIIAS.new
|
433
|
+
this.healthcareAmounts = HealthcareAmounts.from_hash(base)
|
434
|
+
this.iiasFlag = base['IIASFlag']
|
435
|
+
SchemaValidation.validate_enum(this.iiasFlag, true, ['Y'], name, 'IIASFlag')
|
436
|
+
this
|
437
|
+
else
|
438
|
+
nil
|
439
|
+
end
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
class Pos
|
444
|
+
include XML::Mapping
|
445
|
+
text_node :capability, "capability", :default_value=>nil
|
446
|
+
text_node :entryMode, "entryMode", :default_value=>nil
|
447
|
+
text_node :cardholderId, "cardholderId", :default_value=>nil
|
448
|
+
text_node :terminalId, "terminalId", :default_value=>nil
|
449
|
+
text_node :catLevel, "catLevel", :default_value=>nil
|
450
|
+
def self.from_hash(hash, name='pos')
|
451
|
+
base = hash[name]
|
452
|
+
if(base)
|
453
|
+
this = Pos.new
|
454
|
+
this.capability = base['capability']
|
455
|
+
this.entryMode = base['entryMode']
|
456
|
+
this.cardholderId = base['cardholderId']
|
457
|
+
this.terminalId = base['terminalId']
|
458
|
+
this.catLevel =base['catLevel']
|
459
|
+
SchemaValidation.validate_enum(this.capability, true, ['notused','magstripe','keyedonly'], name, 'capability')
|
460
|
+
SchemaValidation.validate_enum(this.entryMode, true, ['notused','keyed','track1','track2','completeread'], name, 'entryMode')
|
461
|
+
SchemaValidation.validate_enum(this.cardholderId, true, ['signature','pin','nopin','directmarket'], name, 'cardholderId')
|
462
|
+
SchemaValidation.validate_enum(this.catLevel, false, ['self service'], name, 'catLevel')
|
463
|
+
this
|
464
|
+
else
|
465
|
+
nil
|
466
|
+
end
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
class DetailTax
|
471
|
+
include XML::Mapping
|
472
|
+
text_node :taxIncludedInTotal, "taxIncludedInTotal", :default_value=>nil
|
473
|
+
text_node :taxAmount, "taxAmount", :default_value=>nil
|
474
|
+
text_node :taxRate, "taxRate", :default_value=>nil
|
475
|
+
text_node :taxTypeIdentifier, "taxTypeIdentifier", :default_value=>nil
|
476
|
+
text_node :cardAcceptorTaxId, "cardAcceptorTaxId", :default_value=>nil
|
477
|
+
def self.from_hash(hash, index=0, name='detailTax')
|
478
|
+
base = hash[name][index]
|
479
|
+
if(base)
|
480
|
+
this = DetailTax.new
|
481
|
+
this.taxIncludedInTotal = base['taxIncludedInTotal']
|
482
|
+
this.taxAmount = base['taxAmount']
|
483
|
+
this.taxRate = base['taxRate']
|
484
|
+
this.taxTypeIdentifier = base['taxTypeIdentifier']
|
485
|
+
this.cardAcceptorTaxId = base['cardAcceptorTaxId']
|
486
|
+
SchemaValidation.validate_boolean(this.taxIncludedInTotal, false, name, 'taxIncludedInTotal')
|
487
|
+
SchemaValidation.validate_size(this.taxAmount, true, -999999999999, 999999999999, name, 'taxAmount')
|
488
|
+
SchemaValidation.validate_regex(this.taxRate, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'taxRate')
|
489
|
+
SchemaValidation.validate_enum(this.taxTypeIdentifier, false, ['00','01','02','03','04','05','06','10','11','12','13','14','20','21','22'], name, 'taxTypeIdentifier')
|
490
|
+
SchemaValidation.validate_length(this.cardAcceptorTaxId, false, 1, 20, name, 'cardAcceptorTaxId')
|
491
|
+
this
|
492
|
+
else
|
493
|
+
nil
|
494
|
+
end
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
498
|
+
class LineItemData
|
499
|
+
include XML::Mapping
|
500
|
+
text_node :itemSequenceNumber, "itemSequenceNumber", :default_value=>nil
|
501
|
+
text_node :itemDescription, "itemDescription", :default_value=>nil
|
502
|
+
text_node :productCode, "productCode", :default_value=>nil
|
503
|
+
text_node :quantity, "quantity", :default_value=>nil
|
504
|
+
text_node :unitOfMeasure, "unitOfMeasure", :default_value=>nil
|
505
|
+
text_node :taxAmount, "taxAmount", :default_value=>nil
|
506
|
+
text_node :lineItemTotal, "lineItemTotal", :default_value=>nil
|
507
|
+
text_node :lineItemTotalWithTax, "lineItemTotalWithTax", :default_value=>nil
|
508
|
+
text_node :itemDiscountAmount, "itemDiscountAmount", :default_value=>nil
|
509
|
+
text_node :commodityCode, "commodityCode", :default_value=>nil
|
510
|
+
text_node :unitCost, "unitCost", :default_value=>nil
|
511
|
+
array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
|
512
|
+
def self.from_hash(hash, index=0, name='lineItemData')
|
513
|
+
base = hash[name][index]
|
514
|
+
if(base)
|
515
|
+
this = LineItemData.new
|
516
|
+
this.itemSequenceNumber = base['itemSequenceNumber']
|
517
|
+
this.itemDescription = base['itemDescription']
|
518
|
+
this.productCode = base['productCode']
|
519
|
+
this.quantity = base['quantity']
|
520
|
+
this.unitOfMeasure = base['unitOfMeasure']
|
521
|
+
this.taxAmount = base['taxAmount']
|
522
|
+
this.lineItemTotal = base['lineItemTotal']
|
523
|
+
this.lineItemTotalWithTax = base['lineItemTotalWithTax']
|
524
|
+
this.itemDiscountAmount = base['itemDiscountAmount']
|
525
|
+
this.commodityCode = base['commodityCode']
|
526
|
+
this.unitCost = base['unitCost']
|
527
|
+
if(base['detailTax'])
|
528
|
+
base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
|
529
|
+
end
|
530
|
+
SchemaValidation.validate_size(this.itemSequenceNumber, false, 1, 99, name, 'itemSequenceNumber')
|
531
|
+
SchemaValidation.validate_length(this.itemDescription, true, 1, 26, name, 'itemDescription')
|
532
|
+
SchemaValidation.validate_length(this.productCode, false, 1, 12, name, 'productCode')
|
533
|
+
SchemaValidation.validate_regex(this.quantity, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'quantity')
|
534
|
+
SchemaValidation.validate_length(this.unitOfMeasure, false, 1, 12, name, 'unitOfMeasure')
|
535
|
+
SchemaValidation.validate_size(this.taxAmount, false, -999999999999, 999999999999, name, 'taxAmount')
|
536
|
+
SchemaValidation.validate_size(this.lineItemTotal, false, -999999999999, 999999999999, name, 'lineItemTotal')
|
537
|
+
SchemaValidation.validate_size(this.lineItemTotalWithTax, false, -999999999999, 999999999999, name, 'lineItemTotalWithTax')
|
538
|
+
SchemaValidation.validate_size(this.itemDiscountAmount, false, -999999999999, 999999999999, name, 'itemDiscountAmount')
|
539
|
+
SchemaValidation.validate_length(this.commodityCode, false, 1, 12, name, 'commodityCode')
|
540
|
+
SchemaValidation.validate_regex(this.unitCost, false, /\A(\+|\-)?\d*\.?\d*\Z/, name, 'unitCost')
|
541
|
+
this
|
542
|
+
else
|
543
|
+
nil
|
544
|
+
end
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
class EnhancedData
|
549
|
+
include XML::Mapping
|
550
|
+
text_node :customerReference, "customerReference", :default_value=>nil
|
551
|
+
text_node :salesTax, "salesTax", :default_value=>nil
|
552
|
+
text_node :deliveryType, "deliveryType", :default_value=>nil
|
553
|
+
text_node :taxExempt, "taxExempt", :default_value=>nil
|
554
|
+
text_node :discountAmount, "discountAmount", :default_value=>nil
|
555
|
+
text_node :shippingAmount, "shippingAmount", :default_value=>nil
|
556
|
+
text_node :dutyAmount, "dutyAmount", :default_value=>nil
|
557
|
+
text_node :shipFromPostalCode, "shipFromPostalCode", :default_value=>nil
|
558
|
+
text_node :destinationPostalCode, "destinationPostalCode", :default_value=>nil
|
559
|
+
text_node :destinationCountryCode, "destinationCountryCode", :default_value=>nil
|
560
|
+
text_node :invoiceReferenceNumber, "invoiceReferenceNumber", :default_value=>nil
|
561
|
+
text_node :orderDate, "orderDate", :default_value=>nil
|
562
|
+
array_node :detailTax, "", "detailTax", :class=>DetailTax, :default_value=>[]
|
563
|
+
array_node :lineItemData, "", "lineItemData", :class=>LineItemData, :default_value=>[]
|
564
|
+
def self.from_hash(hash, name='enhancedData')
|
565
|
+
base = hash[name]
|
566
|
+
if(base)
|
567
|
+
this = EnhancedData.new
|
568
|
+
this.customerReference = base['customerReference']
|
569
|
+
this.salesTax = base['salesTax']
|
570
|
+
this.deliveryType = base['deliveryType']
|
571
|
+
this.taxExempt = base['taxExempt']
|
572
|
+
this.discountAmount = base['discountAmount']
|
573
|
+
this.shippingAmount = base['shippingAmount']
|
574
|
+
this.dutyAmount = base['dutyAmount']
|
575
|
+
this.shipFromPostalCode = base['shipFromPostalCode']
|
576
|
+
this.destinationPostalCode = base['destinationPostalCode']
|
577
|
+
this.destinationCountryCode = base['destinationCountryCode']
|
578
|
+
this.invoiceReferenceNumber = base['invoiceReferenceNumber']
|
579
|
+
this.orderDate = base['orderDate']
|
580
|
+
if(base['detailTax'])
|
581
|
+
base['detailTax'].each_index {|index| this.detailTax << DetailTax.from_hash(base,index)}
|
582
|
+
end
|
583
|
+
if(base['lineItemData'])
|
584
|
+
base['lineItemData'].each_index {|index| this.lineItemData << LineItemData.from_hash(base,index)}
|
585
|
+
end
|
586
|
+
SchemaValidation.validate_length(this.customerReference, false, 1, 17, name, 'customerReference')
|
587
|
+
SchemaValidation.validate_size(this.salesTax, false, -999999999999, 999999999999, name, 'salesTax')
|
588
|
+
SchemaValidation.validate_enum(this.deliveryType, false, ['CNC','DIG','PHY','SVC','TBD'], name, 'deliveryType')
|
589
|
+
SchemaValidation.validate_boolean(this.taxExempt, false, name, 'taxExempt')
|
590
|
+
SchemaValidation.validate_size(this.discountAmount, false, -999999999999, 999999999999, name, 'discountAmount')
|
591
|
+
SchemaValidation.validate_size(this.shippingAmount, false, -999999999999, 999999999999, name, 'shippingAmount')
|
592
|
+
SchemaValidation.validate_size(this.dutyAmount, false, -999999999999, 999999999999, name, 'dutyAmount')
|
593
|
+
SchemaValidation.validate_length(this.shipFromPostalCode, false, 1, 20, name, 'shipFromPostalCode')
|
594
|
+
SchemaValidation.validate_length(this.destinationPostalCode, false, 1, 20, name, 'destinationPostalCode')
|
595
|
+
SchemaValidation.validate_country(this.destinationCountryCode, name, 'destinationCountryCode')
|
596
|
+
SchemaValidation.validate_length(this.invoiceReferenceNumber, false, 1, 15, name, 'invoiceReferenceNumber')
|
597
|
+
SchemaValidation.validate_date(this.orderDate, false, name, 'orderDate')
|
598
|
+
this
|
599
|
+
else
|
600
|
+
nil
|
601
|
+
end
|
602
|
+
end
|
603
|
+
end
|
604
|
+
|
605
|
+
class AmexAggregatorData
|
606
|
+
include XML::Mapping
|
607
|
+
text_node :sellerId, "sellerId", :default_value=>nil
|
608
|
+
text_node :sellerMerchantCategoryCode, "sellerMerchantCategoryCode", :default_value=>nil
|
609
|
+
def self.from_hash(hash, name='amexAggregatorData')
|
610
|
+
base = hash[name]
|
611
|
+
if(base)
|
612
|
+
this = AmexAggregatorData.new
|
613
|
+
this.sellerId = base['sellerId']
|
614
|
+
this.sellerMerchantCategoryCode = base['sellerMerchantCategoryCode']
|
615
|
+
SchemaValidation.validate_length(this.sellerId, false, 1, 16, name, 'sellerId')
|
616
|
+
SchemaValidation.validate_length(this.sellerMerchantCategoryCode, false, 1, 4, name, 'sellerMerchantCategoryCode')
|
617
|
+
this
|
618
|
+
else
|
619
|
+
nil
|
620
|
+
end
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
class Card
|
625
|
+
include XML::Mapping
|
626
|
+
text_node :mop, "type", :default_value=>nil
|
627
|
+
text_node :track, "track", :default_value=>nil
|
628
|
+
text_node :number, "number", :default_value=>nil
|
629
|
+
text_node :expDate, "expDate", :default_value=>nil
|
630
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
631
|
+
def self.from_hash(hash, name='card')
|
632
|
+
base = hash[name]
|
633
|
+
if(base)
|
634
|
+
this = Card.new
|
635
|
+
this.mop = base['type']
|
636
|
+
this.track = base['track']
|
637
|
+
this.number = base['number']
|
638
|
+
this.expDate = base['expDate']
|
639
|
+
this.cardValidationNum = base['cardValidationNum']
|
640
|
+
SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC','GC'], name, 'type')
|
641
|
+
SchemaValidation.validate_length(this.track, false, 1, 256, name, 'track')
|
642
|
+
SchemaValidation.validate_length(this.number, false, 13, 25, name, 'number')
|
643
|
+
SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
|
644
|
+
SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
|
645
|
+
this
|
646
|
+
else
|
647
|
+
nil
|
648
|
+
end
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
class ApplepayHeader
|
653
|
+
include XML::Mapping
|
654
|
+
text_node :applicationData, "applicationData", :default_value=>nil
|
655
|
+
text_node :ephemeralPublicKey, "ephemeralPublicKey", :default_value=>nil
|
656
|
+
text_node :publicKeyHash, "publicKeyHash", :default_value=>nil
|
657
|
+
text_node :transactionId, "transactionId", :default_value=>nil
|
658
|
+
def self.from_hash(hash, name='header')
|
659
|
+
base = hash[name]
|
660
|
+
if(base)
|
661
|
+
this = ApplepayHeader.new
|
662
|
+
this.applicationData = base['applicationData']
|
663
|
+
this.ephemeralPublicKey = base['ephemeralPublicKey']
|
664
|
+
this.publicKeyHash = base['publicKeyHash']
|
665
|
+
this.transactionId = base['transactionId']
|
666
|
+
SchemaValidation.validate_required(this.applicationData,true,name,'applicationData')
|
667
|
+
SchemaValidation.validate_required(this.ephemeralPublicKey,true,name,'ephemeralPublicKey')
|
668
|
+
SchemaValidation.validate_required(this.publicKeyHash,true,name,'publicKeyHash')
|
669
|
+
SchemaValidation.validate_required(this.transactionId,true,name,'transactionId')
|
670
|
+
this
|
671
|
+
else
|
672
|
+
nil
|
673
|
+
end
|
674
|
+
end
|
675
|
+
end
|
676
|
+
|
677
|
+
class Applepay
|
678
|
+
include XML::Mapping
|
679
|
+
text_node :data, "data", :default_value=>nil
|
680
|
+
object_node :header, "header", :class=>ApplepayHeader, :default_value=>nil
|
681
|
+
text_node :signature, "signature", :default_value=>nil
|
682
|
+
text_node :version, "version", :default_value=>nil
|
683
|
+
def self.from_hash(hash, name='applepay')
|
684
|
+
base = hash[name]
|
685
|
+
if(base)
|
686
|
+
this = Applepay.new
|
687
|
+
this.data = base['data']
|
688
|
+
this.header = ApplepayHeader.from_hash(base)
|
689
|
+
this.signature = base['signature']
|
690
|
+
this.version = base['version']
|
691
|
+
SchemaValidation.validate_required(this.data,true,name,'data')
|
692
|
+
SchemaValidation.validate_required(this.header,true,name,'header')
|
693
|
+
SchemaValidation.validate_required(this.signature,true,name,'signature')
|
694
|
+
SchemaValidation.validate_required(this.version,true,name,'version')
|
695
|
+
this
|
696
|
+
else
|
697
|
+
nil
|
698
|
+
end
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
class Mpos
|
703
|
+
include XML::Mapping
|
704
|
+
text_node :ksn, "ksn", :default_value=>nil
|
705
|
+
text_node :formatId, "formatId", :default_value=>nil
|
706
|
+
text_node :encryptedTrack, "encryptedTrack", :default_value=>nil
|
707
|
+
text_node :track1Status,"track1Status", :default_value=>nil
|
708
|
+
text_node :track2Status,"track2Status", :default_value=>nil
|
709
|
+
def self.from_hash(hash, name='mpos')
|
710
|
+
base = hash[name]
|
711
|
+
if(base)
|
712
|
+
this = Mpos.new
|
713
|
+
this.ksn = base['ksn']
|
714
|
+
this.formatId = base['formatId']
|
715
|
+
this.encryptedTrack = base['encryptedTrack']
|
716
|
+
this.track1Status = base['track1Status']
|
717
|
+
this.track2Status = base['track2Status']
|
718
|
+
SchemaValidation.validate_length(this.ksn, true, 1, 1028 , name, 'ksn')
|
719
|
+
SchemaValidation.validate_length(this.formatId, true, 1, 1028, name, 'formatId')
|
720
|
+
SchemaValidation.validate_length(this.encryptedTrack, true, 1, 1028, name, 'encryptedTrack')
|
721
|
+
SchemaValidation.validate_size(this.track1Status, true, 0, 1028, name, 'track1Status')
|
722
|
+
SchemaValidation.validate_size(this.track2Status, true, 0, 1028, name, 'track2Status')
|
723
|
+
this
|
724
|
+
end
|
725
|
+
end
|
726
|
+
|
727
|
+
end
|
728
|
+
|
729
|
+
class CardToken
|
730
|
+
include XML::Mapping
|
731
|
+
text_node :litleToken, "litleToken", :default_value=>nil
|
732
|
+
text_node :expDate, "expDate", :default_value=>nil
|
733
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
734
|
+
text_node :mop, "type", :default_value=>nil
|
735
|
+
def self.from_hash(hash, name='cardToken')
|
736
|
+
base = hash[name]
|
737
|
+
if(base)
|
738
|
+
this = CardToken.new
|
739
|
+
this.litleToken = base['litleToken']
|
740
|
+
this.expDate = base['expDate']
|
741
|
+
this.cardValidationNum = base['cardValidationNum']
|
742
|
+
this.mop = base['type']
|
743
|
+
SchemaValidation.validate_length(this.litleToken, true, 13, 25, name, 'litleToken')
|
744
|
+
SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
|
745
|
+
SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
|
746
|
+
SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC'], name, 'type')
|
747
|
+
this
|
748
|
+
else
|
749
|
+
nil
|
750
|
+
end
|
751
|
+
end
|
752
|
+
end
|
753
|
+
|
754
|
+
class CardPaypage
|
755
|
+
include XML::Mapping
|
756
|
+
text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil
|
757
|
+
text_node :expDate, "expDate", :default_value=>nil
|
758
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
759
|
+
text_node :mop, "type", :default_value=>nil
|
760
|
+
def self.from_hash(hash, name='cardPaypage')
|
761
|
+
base = hash[name]
|
762
|
+
if(base)
|
763
|
+
this = CardPaypage.new
|
764
|
+
this.paypageRegistrationId = base['paypageRegistrationId']
|
765
|
+
this.expDate = base['expDate']
|
766
|
+
this.cardValidationNum = base['cardValidationNum']
|
767
|
+
this.mop = base['type']
|
768
|
+
SchemaValidation.validate_length(this.paypageRegistrationId, true, 1, 512, name, 'paypageRegistrationId')
|
769
|
+
SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
|
770
|
+
SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
|
771
|
+
SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC'], name, 'type')
|
772
|
+
this
|
773
|
+
else
|
774
|
+
nil
|
775
|
+
end
|
776
|
+
end
|
777
|
+
end
|
778
|
+
|
779
|
+
class PayPal
|
780
|
+
include XML::Mapping
|
781
|
+
text_node :payerId, "payerId", :default_value=>nil
|
782
|
+
text_node :token, "token", :default_value=>nil
|
783
|
+
text_node :transactionId, "transactionId", :default_value=>nil
|
784
|
+
def self.from_hash(hash, name='payPal')
|
785
|
+
base = hash[name]
|
786
|
+
if(base)
|
787
|
+
this = PayPal.new
|
788
|
+
this.payerId = base['payerId']
|
789
|
+
this.token = base['token']
|
790
|
+
this.transactionId = base['transactionId']
|
791
|
+
SchemaValidation.validate_required(this.payerId, true, name, 'payerId')
|
792
|
+
SchemaValidation.validate_required(this.transactionId, true, name, 'transactionId')
|
793
|
+
this
|
794
|
+
else
|
795
|
+
nil
|
796
|
+
end
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
class CreditPayPal
|
801
|
+
include XML::Mapping
|
802
|
+
text_node :payerId, "payerId", :default_value=>nil
|
803
|
+
text_node :payerEmail, "payerEmail", :default_value=>nil
|
804
|
+
def self.from_hash(hash, name='creditPaypal')
|
805
|
+
base = hash[name]
|
806
|
+
if(base)
|
807
|
+
this = CreditPayPal.new
|
808
|
+
this.payerId = base['payerId']
|
809
|
+
this.payerEmail = base['payerEmail']
|
810
|
+
SchemaValidation.validate_length(this.payerId, false, 1, 17, name, 'payerId')
|
811
|
+
SchemaValidation.validate_length(this.payerEmail, false, 1, 127, name, 'payerEmail')
|
812
|
+
this
|
813
|
+
else
|
814
|
+
nil
|
815
|
+
end
|
816
|
+
end
|
817
|
+
end
|
818
|
+
|
819
|
+
class CustomBilling
|
820
|
+
include XML::Mapping
|
821
|
+
optional_choice_node :if, 'phone', :then, (text_node :phone, "phone", :default_value=>nil),
|
822
|
+
:elsif, 'city', :then, (text_node :city, "city", :default_value=>nil),
|
823
|
+
:elsif, 'url', :then, (text_node :url, "url", :default_value=>nil)
|
824
|
+
text_node :descriptor, "descriptor", :default_value=>nil
|
825
|
+
def self.from_hash(hash, name='customBilling')
|
826
|
+
base = hash[name]
|
827
|
+
if(base)
|
828
|
+
this = CustomBilling.new
|
829
|
+
this.phone = base['phone']
|
830
|
+
this.city = base['city']
|
831
|
+
this.url = base['url']
|
832
|
+
this.descriptor = base['descriptor']
|
833
|
+
SchemaValidation.validate_regex(this.phone, false, /\A\d{1,13}\Z/, name, 'phone')
|
834
|
+
SchemaValidation.validate_length(this.city, false, 1, 35, name, 'city')
|
835
|
+
SchemaValidation.validate_regex(this.url, false, /\A([A-Z,a-z,0-9,\/,\-,_,.]){1,13}\Z/, name, 'url')
|
836
|
+
SchemaValidation.validate_regex(this.descriptor, false, /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/, name, 'descriptor')
|
837
|
+
this
|
838
|
+
else
|
839
|
+
nil
|
840
|
+
end
|
841
|
+
end
|
842
|
+
end
|
843
|
+
|
844
|
+
class ProcessingInstructions
|
845
|
+
include XML::Mapping
|
846
|
+
text_node :bypassVelocityCheck, "bypassVelocityCheck", :default_value=>nil
|
847
|
+
def self.from_hash(hash, name='processingInstructions')
|
848
|
+
base = hash[name]
|
849
|
+
if(base)
|
850
|
+
this = ProcessingInstructions.new
|
851
|
+
this.bypassVelocityCheck = base['bypassVelocityCheck']
|
852
|
+
SchemaValidation.validate_boolean(this.bypassVelocityCheck, false, name, 'bypassVelocityCheck')
|
853
|
+
this
|
854
|
+
else
|
855
|
+
nil
|
856
|
+
end
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
class EcheckForToken
|
861
|
+
include XML::Mapping
|
862
|
+
text_node :accNum, "accNum", :default_value=>nil
|
863
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
864
|
+
def self.from_hash(hash, name='echeckForToken')
|
865
|
+
base = hash[name]
|
866
|
+
if(base)
|
867
|
+
this = EcheckForToken.new
|
868
|
+
this.accNum = base['accNum']
|
869
|
+
this.routingNum = base['routingNum']
|
870
|
+
SchemaValidation.validate_length(this.accNum, true, 1, 17, name, 'accNum')
|
871
|
+
SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
|
872
|
+
this
|
873
|
+
else
|
874
|
+
nil
|
875
|
+
end
|
876
|
+
end
|
877
|
+
end
|
878
|
+
|
879
|
+
class Filtering
|
880
|
+
include XML::Mapping
|
881
|
+
text_node :prepaid, "prepaid", :default_value=>nil
|
882
|
+
text_node :international, "international", :default_value=>nil
|
883
|
+
text_node :chargeback, "chargeback", :default_value=>nil
|
884
|
+
def self.from_hash(hash, name='filtering')
|
885
|
+
base = hash[name]
|
886
|
+
if(base)
|
887
|
+
this = Filtering.new
|
888
|
+
this.prepaid = base['prepaid']
|
889
|
+
this.international = base['international']
|
890
|
+
this.chargeback = base['chargeback']
|
891
|
+
SchemaValidation.validate_boolean(this.prepaid, false, name, 'prepaid')
|
892
|
+
SchemaValidation.validate_boolean(this.international, false, name, 'international')
|
893
|
+
SchemaValidation.validate_boolean(this.chargeback, false, name, 'chargeback')
|
894
|
+
this
|
895
|
+
else
|
896
|
+
nil
|
897
|
+
end
|
898
|
+
end
|
899
|
+
end
|
900
|
+
|
901
|
+
class MerchantData
|
902
|
+
include XML::Mapping
|
903
|
+
text_node :campaign, "campaign", :default_value=>nil
|
904
|
+
text_node :affiliate, "affiliate", :default_value=>nil
|
905
|
+
text_node :merchantGroupingId, "merchantGroupingId", :default_value=>nil
|
906
|
+
def self.from_hash(hash, name='merchantData')
|
907
|
+
base = hash[name]
|
908
|
+
if(base)
|
909
|
+
this = MerchantData.new
|
910
|
+
this.campaign = base['campaign']
|
911
|
+
this.affiliate = base['affiliate']
|
912
|
+
this.merchantGroupingId = base['merchantGroupingId']
|
913
|
+
SchemaValidation.validate_length(this.campaign, false, 1, 25, name, 'campaign')
|
914
|
+
SchemaValidation.validate_length(this.affiliate, false, 1, 25, name, 'affiliate')
|
915
|
+
SchemaValidation.validate_length(this.merchantGroupingId, false, 1, 25, name, 'merchantGroupingId')
|
916
|
+
this
|
917
|
+
else
|
918
|
+
nil
|
919
|
+
end
|
920
|
+
end
|
921
|
+
end
|
922
|
+
|
923
|
+
class Echeck
|
924
|
+
include XML::Mapping
|
925
|
+
text_node :accType, "accType", :default_value=>nil
|
926
|
+
text_node :accNum, "accNum", :default_value=>nil
|
927
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
928
|
+
text_node :checkNum, "checkNum", :default_value=>nil
|
929
|
+
def self.from_hash(hash, name='echeck')
|
930
|
+
base = hash[name]
|
931
|
+
if(base)
|
932
|
+
this = Echeck.new
|
933
|
+
this.accType = base['accType']
|
934
|
+
this.accNum = base['accNum']
|
935
|
+
this.routingNum = base['routingNum']
|
936
|
+
this.checkNum = base['checkNum']
|
937
|
+
SchemaValidation.validate_enum(this.accType, true, ['Checking','Savings','Corporate','Corp Savings'], name, 'accType')
|
938
|
+
SchemaValidation.validate_length(this.accNum, true, 1, 17, name, 'accNum')
|
939
|
+
SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
|
940
|
+
SchemaValidation.validate_length(this.checkNum, false, 1, 15, name, 'checkNum')
|
941
|
+
this
|
942
|
+
else
|
943
|
+
nil
|
944
|
+
end
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
class EcheckToken
|
949
|
+
include XML::Mapping
|
950
|
+
text_node :litleToken, "litleToken", :default_value=>nil
|
951
|
+
text_node :routingNum, "routingNum", :default_value=>nil
|
952
|
+
text_node :accType, "accType", :default_value=>nil
|
953
|
+
text_node :checkNum, "checkNum", :default_value=>nil
|
954
|
+
def self.from_hash(hash, name='echeckToken')
|
955
|
+
base = hash[name]
|
956
|
+
if(base)
|
957
|
+
this = EcheckToken.new
|
958
|
+
this.litleToken = base['litleToken']
|
959
|
+
this.routingNum = base['routingNum']
|
960
|
+
this.accType = base['accType']
|
961
|
+
this.checkNum = base['checkNum']
|
962
|
+
SchemaValidation.validate_length(this.litleToken, true, 13, 25, name, 'litleToken')
|
963
|
+
SchemaValidation.validate_length(this.routingNum, true, 9, 9, name, 'routingNum')
|
964
|
+
SchemaValidation.validate_enum(this.accType, true, ['Checking','Savings','Corporate','Corp Savings'], name, 'accType')
|
965
|
+
SchemaValidation.validate_length(this.checkNum, false, 1, 15, name, 'checkNum')
|
966
|
+
this
|
967
|
+
else
|
968
|
+
nil
|
969
|
+
end
|
970
|
+
end
|
971
|
+
end
|
972
|
+
|
973
|
+
class RecyclingRequest
|
974
|
+
include XML::Mapping
|
975
|
+
text_node :recycleBy, "recycleBy", :default_value=>nil
|
976
|
+
text_node :recycleId, "recycleId", :default_value=>nil
|
977
|
+
def self.from_hash(hash, name='recyclingRequest')
|
978
|
+
base = hash[name]
|
979
|
+
if(base)
|
980
|
+
this = RecyclingRequest.new
|
981
|
+
this.recycleBy = base['recycleBy']
|
982
|
+
this.recycleId = base['recycleId']
|
983
|
+
SchemaValidation.validate_enum(this.recycleBy, false, ['Merchant','Litle','None'], name, 'recycleBy')
|
984
|
+
SchemaValidation.validate_length(this.recycleId, false, 1, 25, name, 'recycleId')
|
985
|
+
this
|
986
|
+
else
|
987
|
+
nil
|
988
|
+
end
|
989
|
+
end
|
990
|
+
end
|
991
|
+
|
992
|
+
class CreateDiscount
|
993
|
+
include XML::Mapping
|
994
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
995
|
+
text_node :name, "name", :default_value=>nil
|
996
|
+
text_node :amount, "amount", :default_value=>nil
|
997
|
+
text_node :startDate, "startDate", :default_value=>nil
|
998
|
+
text_node :endDate, "endDate", :default_value=>nil
|
999
|
+
def self.from_hash(hash,index=0, name="createDiscount")
|
1000
|
+
base = hash[name][index]
|
1001
|
+
if(base)
|
1002
|
+
this = CreateDiscount.new
|
1003
|
+
this.discountCode = base['discountCode']
|
1004
|
+
this.name = base['name']
|
1005
|
+
this.amount = base['amount']
|
1006
|
+
this.startDate = base['startDate']
|
1007
|
+
this.endDate = base['endDate']
|
1008
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
1009
|
+
SchemaValidation.validate_length(this.name, true, 1, 100, name, "name")
|
1010
|
+
SchemaValidation.validate_size(this.amount,true,0,999999999999,name,'amount')
|
1011
|
+
SchemaValidation.validate_date(this.startDate, true, name, 'startDate')
|
1012
|
+
SchemaValidation.validate_date(this.endDate, true, name, 'endDate')
|
1013
|
+
this
|
1014
|
+
end
|
1015
|
+
end
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
class CreateAddOn
|
1019
|
+
include XML::Mapping
|
1020
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
1021
|
+
text_node :name, "name", :default_value=>nil
|
1022
|
+
text_node :amount, "amount", :default_value=>nil
|
1023
|
+
text_node :startDate, "startDate", :default_value=>nil
|
1024
|
+
text_node :endDate, "endDate", :default_value=>nil
|
1025
|
+
def self.from_hash(hash,index=0, name="createAddOn")
|
1026
|
+
base = hash[name][index]
|
1027
|
+
if(base)
|
1028
|
+
this = CreateAddOn.new
|
1029
|
+
this.addOnCode = base['addOnCode']
|
1030
|
+
this.name = base['name']
|
1031
|
+
this.amount = base['amount']
|
1032
|
+
this.startDate = base['startDate']
|
1033
|
+
this.endDate = base['endDate']
|
1034
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
1035
|
+
SchemaValidation.validate_length(this.name, true, 1, 100, name, "name")
|
1036
|
+
SchemaValidation.validate_size(this.amount,true,0,999999999999,name,'amount')
|
1037
|
+
SchemaValidation.validate_date(this.startDate, true, name, 'startDate')
|
1038
|
+
SchemaValidation.validate_date(this.endDate, true, name, 'endDate')
|
1039
|
+
this
|
1040
|
+
end
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
class Subscription
|
1045
|
+
include XML::Mapping
|
1046
|
+
text_node :planCode, "planCode", :default_value=>nil
|
1047
|
+
text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
|
1048
|
+
text_node :startDate,"startDate",:default_value=>nil
|
1049
|
+
text_node :amount,"amount",:default_value=>nil
|
1050
|
+
array_node :createDiscount, "", "createDiscount", :class=>CreateDiscount, :default_value=>[]
|
1051
|
+
array_node :createAddOn, "", "createAddOn", :class=>CreateAddOn, :default_value=>[]
|
1052
|
+
def self.from_hash(hash, name="subscription")
|
1053
|
+
base = hash[name]
|
1054
|
+
if(base)
|
1055
|
+
this = Subscription.new
|
1056
|
+
this.planCode = base['planCode']
|
1057
|
+
this.numberOfPayments = base['numberOfPayments']
|
1058
|
+
this.startDate = base['startDate']
|
1059
|
+
this.amount = base['amount']
|
1060
|
+
if(base['createDiscount'])
|
1061
|
+
base['createDiscount'].each_index {|index| this.createDiscount << CreateDiscount.from_hash(base,index)}
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
if(base['createAddOn'])
|
1065
|
+
base['createAddOn'].each_index {|index| this.createAddOn << CreateAddOn.from_hash(base,index)}
|
1066
|
+
end
|
1067
|
+
SchemaValidation.validate_length(this.planCode, true, 1, 25, name, 'planCode')
|
1068
|
+
SchemaValidation.validate_size(this.numberOfPayments, false, 1, 99, name, 'numberOfPayments')
|
1069
|
+
SchemaValidation.validate_date(this.startDate,false,name,'startDate')
|
1070
|
+
SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
|
1071
|
+
this
|
1072
|
+
end
|
1073
|
+
end
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
class RecurringRequest
|
1077
|
+
include XML::Mapping
|
1078
|
+
object_node :subscription, "subscription", :class=>Subscription, :default_value=>nil
|
1079
|
+
def self.from_hash(hash, name="recurringRequest")
|
1080
|
+
base = hash[name]
|
1081
|
+
if(base)
|
1082
|
+
this = RecurringRequest.new
|
1083
|
+
this.subscription = Subscription.from_hash(base)
|
1084
|
+
this
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
class LitleInternalRecurringRequest
|
1090
|
+
include XML::Mapping
|
1091
|
+
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
1092
|
+
text_node :recurringTxnId, "recurringTxnId", :default_value=>nil
|
1093
|
+
text_node :finalPayment, "finalPayment", :default_value=>nil
|
1094
|
+
def self.from_hash(hash, name="litleInternalRecurringRequest")
|
1095
|
+
base = hash[name]
|
1096
|
+
if(base)
|
1097
|
+
this = LitleInternalRecurringRequest.new
|
1098
|
+
this.subscriptionId = base['subscriptionId']
|
1099
|
+
this.recurringTxnId = base['recurringTxnId']
|
1100
|
+
this.finalPayment = base['finalPayment']
|
1101
|
+
SchemaValidation.validate_length(this.subscriptionId, true, 19, 19, name, "subscriptionId")
|
1102
|
+
SchemaValidation.validate_length(this.recurringTxnId, true, 19, 19, name, "recurringTxnId")
|
1103
|
+
SchemaValidation.validate_boolean(this.finalPayment, true, name, "finalPayment")
|
1104
|
+
this
|
1105
|
+
end
|
1106
|
+
end
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
class UpdateDiscount
|
1110
|
+
include XML::Mapping
|
1111
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
1112
|
+
text_node :name, "name", :default_value=>nil
|
1113
|
+
text_node :amount, "amount", :default_value=>nil
|
1114
|
+
text_node :startDate, "startDate", :default_value=>nil
|
1115
|
+
text_node :endDate, "endDate", :default_value=>nil
|
1116
|
+
def self.from_hash(hash,index=0, name="updateDiscount")
|
1117
|
+
base = hash[name][index]
|
1118
|
+
if(base)
|
1119
|
+
this = UpdateDiscount.new
|
1120
|
+
this.discountCode = base['discountCode']
|
1121
|
+
this.name = base['name']
|
1122
|
+
this.amount = base['amount']
|
1123
|
+
this.startDate = base['startDate']
|
1124
|
+
this.endDate = base['endDate']
|
1125
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
1126
|
+
SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
|
1127
|
+
SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
|
1128
|
+
SchemaValidation.validate_date(this.startDate, false, name, 'startDate')
|
1129
|
+
SchemaValidation.validate_date(this.endDate, false, name, 'endDate')
|
1130
|
+
this
|
1131
|
+
end
|
1132
|
+
end
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
class DeleteDiscount
|
1136
|
+
include XML::Mapping
|
1137
|
+
text_node :discountCode, "discountCode", :default_value=>nil
|
1138
|
+
def self.from_hash(hash,index=0, name="deleteDiscount")
|
1139
|
+
base = hash[name][index]
|
1140
|
+
if(base)
|
1141
|
+
this = DeleteDiscount.new
|
1142
|
+
this.discountCode = base['discountCode']
|
1143
|
+
SchemaValidation.validate_length(this.discountCode, true, 1, 25, name, 'discountCode')
|
1144
|
+
this
|
1145
|
+
end
|
1146
|
+
end
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
class DeleteAddOn
|
1150
|
+
include XML::Mapping
|
1151
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
1152
|
+
def self.from_hash(hash,index=0, name="updateDiscount")
|
1153
|
+
base = hash[name][index]
|
1154
|
+
if(base)
|
1155
|
+
this = DeleteAddOn.new
|
1156
|
+
this.addOnCode = base['addOnCode']
|
1157
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
1158
|
+
this
|
1159
|
+
end
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
class UpdateAddOn
|
1164
|
+
include XML::Mapping
|
1165
|
+
text_node :addOnCode, "addOnCode", :default_value=>nil
|
1166
|
+
text_node :name, "name", :default_value=>nil
|
1167
|
+
text_node :amount, "amount", :default_value=>nil
|
1168
|
+
text_node :startDate, "startDate", :default_value=>nil
|
1169
|
+
text_node :endDate, "endDate", :default_value=>nil
|
1170
|
+
def self.from_hash(hash,index=0, name="updateAddOn")
|
1171
|
+
base = hash[name][index]
|
1172
|
+
if(base)
|
1173
|
+
this = UpdateAddOn.new
|
1174
|
+
this.addOnCode = base['addOnCode']
|
1175
|
+
this.name = base['name']
|
1176
|
+
this.amount = base['amount']
|
1177
|
+
this.startDate = base['startDate']
|
1178
|
+
this.endDate = base['endDate']
|
1179
|
+
SchemaValidation.validate_length(this.addOnCode, true, 1, 25, name, 'addOnCode')
|
1180
|
+
SchemaValidation.validate_length(this.name, false, 1, 100, name, "name")
|
1181
|
+
SchemaValidation.validate_size(this.amount,false,0,999999999999,name,'amount')
|
1182
|
+
SchemaValidation.validate_date(this.startDate, false, name, 'startDate')
|
1183
|
+
SchemaValidation.validate_date(this.endDate, false, name, 'endDate')
|
1184
|
+
this
|
1185
|
+
end
|
1186
|
+
end
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
class CancelSubscription
|
1190
|
+
include XML::Mapping
|
1191
|
+
root_element_name "cancelSubscription"
|
1192
|
+
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
class UpdateSubscription
|
1196
|
+
include XML::Mapping
|
1197
|
+
root_element_name "updateSubscription"
|
1198
|
+
text_node :subscriptionId, "subscriptionId", :default_value=>nil
|
1199
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1200
|
+
object_node :billToAddress , 'billToAddress', :class=>Contact, :default_value=>nil
|
1201
|
+
#object_node :card,'card',:class=>Card, :default_value=>nil
|
1202
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card, :default_value=>nil),
|
1203
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken, :default_value=>nil),
|
1204
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage, :default_value=>nil)
|
1205
|
+
text_node :billingDate,'billingDate', :default_value=>nil
|
1206
|
+
array_node :createDiscount, "", "createDiscount", :class=>CreateDiscount, :default_value=>[]
|
1207
|
+
array_node :updateDiscount, "", "updateDiscount", :class=>UpdateDiscount, :default_value=>[]
|
1208
|
+
array_node :deleteDiscount, "", "deleteDiscount", :class=>DeleteDiscount,:default_value=>[]
|
1209
|
+
array_node :createAddOn, "", "createAddOn", :class=>CreateAddOn, :default_value=>[]
|
1210
|
+
array_node :updateAddOn, "", "updateAddOn", :class=>UpdateAddOn, :default_value=>[]
|
1211
|
+
array_node :deleteAddOn, "", "deleteAddOn", :class=>DeleteAddOn, :default_value=>[]
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
class CreatePlan
|
1215
|
+
include XML::Mapping
|
1216
|
+
root_element_name "createPlan"
|
1217
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1218
|
+
text_node :name, "name", :default_value=>nil
|
1219
|
+
text_node :description, "description", :default_value=>nil
|
1220
|
+
text_node :intervalType, "intervalType", :defaul_value=>nil
|
1221
|
+
text_node :amount, "amount", :default_value=>nil
|
1222
|
+
text_node :numberOfPayments, "numberOfPayments", :default_value=>nil
|
1223
|
+
text_node :trialNumberOfIntervals,"trialNumberOfIntervals", :default_value=>nil
|
1224
|
+
text_node :trialIntervalType,"trialIntervalType", :default_value=>nil
|
1225
|
+
text_node :active,"active", :default_value=>nil
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
class UpdatePlan
|
1229
|
+
include XML::Mapping
|
1230
|
+
root_element_name "updatePlan"
|
1231
|
+
text_node :planCode,"planCode",:default_value=>nil
|
1232
|
+
text_node :active,"active", :default_value=>nil
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
class VirtualGiftCard
|
1236
|
+
include XML::Mapping
|
1237
|
+
root_element_name "virtualGiftCard"
|
1238
|
+
text_node "accountNumberLength","accountNumberLength", :default_value=>nil
|
1239
|
+
text_node "giftCardBin","giftCardBin", :default_value=>nil
|
1240
|
+
def self.from_hash(hash, name="virtualGiftCard")
|
1241
|
+
base = hash[name]
|
1242
|
+
if(base)
|
1243
|
+
this = VirtualGiftCard.new
|
1244
|
+
this.accountNumberLength = base['accountNumberLength']
|
1245
|
+
this.giftCardBin = base['giftCardBin']
|
1246
|
+
this
|
1247
|
+
end
|
1248
|
+
end
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
class Activate
|
1252
|
+
include XML::Mapping
|
1253
|
+
root_element_name "activate"
|
1254
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1255
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1256
|
+
text_node :amount, "amount", :default_value=>nil
|
1257
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1258
|
+
#object_node :card,'card',:class=>Card, :default_value=>nil
|
1259
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1260
|
+
:elsif, 'virtualGiftCard', :then, (object_node :virtualGiftCard, "virtualGiftCard", :class=>VirtualGiftCard)
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
class Deactivate
|
1264
|
+
include XML::Mapping
|
1265
|
+
root_element_name "deactivate"
|
1266
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1267
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1268
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1269
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
class Load
|
1273
|
+
include XML::Mapping
|
1274
|
+
root_element_name "load"
|
1275
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1276
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1277
|
+
text_node :amount, "amount", :default_value=>nil
|
1278
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1279
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
class Unload
|
1283
|
+
include XML::Mapping
|
1284
|
+
root_element_name "unload"
|
1285
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1286
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1287
|
+
text_node :amount, "amount", :default_value=>nil
|
1288
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1289
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1290
|
+
end
|
1291
|
+
|
1292
|
+
class BalanceInquiry
|
1293
|
+
include XML::Mapping
|
1294
|
+
root_element_name "balanceInquiry"
|
1295
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1296
|
+
text_node :orderId,'orderId', :default_value=>nil
|
1297
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1298
|
+
object_node :card,'card',:class=>Card, :default_value=>nil
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
class AdvancedFraudChecks
|
1302
|
+
include XML::Mapping
|
1303
|
+
root_element_name "advancedFraudChecks"
|
1304
|
+
text_node :threatMetrixSessionId, 'threatMetrixSessionId', :default_value=>nil
|
1305
|
+
def self.from_hash(hash, name="advancedFraudChecks")
|
1306
|
+
base = hash[name]
|
1307
|
+
if(base)
|
1308
|
+
this = AdvancedFraudChecks.new
|
1309
|
+
this.threatMetrixSessionId = base['threatMetrixSessionId'] # /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/
|
1310
|
+
#SchemaValidation.validate_regex(this.threatMetrixSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'threatMetrixSessionId')
|
1311
|
+
this
|
1312
|
+
end
|
1313
|
+
end
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
class Authorization
|
1317
|
+
include XML::Mapping
|
1318
|
+
root_element_name "authorization"
|
1319
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1320
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1321
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1322
|
+
|
1323
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1324
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1325
|
+
text_node :amount, "amount", :default_value=>nil
|
1326
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1327
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1328
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1329
|
+
object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
|
1330
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1331
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1332
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1333
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
1334
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1335
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1336
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos),
|
1337
|
+
:elsif, 'applepay', :then, (object_node :applepay, "applepay", :class=>Applepay)
|
1338
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
1339
|
+
object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil
|
1340
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1341
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
1342
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1343
|
+
text_node :taxType, "taxType", :default_value=>nil
|
1344
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1345
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
1346
|
+
text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
|
1347
|
+
object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
|
1348
|
+
object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
|
1349
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1350
|
+
object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
|
1351
|
+
text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
|
1352
|
+
object_node :recurringRequest,"recurringRequest", :class=>RecurringRequest, :default_value=>nil
|
1353
|
+
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1354
|
+
object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
|
1355
|
+
text_node :processingType, "processingType", :default_value=>nil
|
1356
|
+
text_node :originalNetworkTransactionId, "originalNetworkTransactionId", :default_value=>nil
|
1357
|
+
text_node :originalTransactionAmount, "originalTransactionAmount", :default_value=>nil
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
class Sale
|
1361
|
+
include XML::Mapping
|
1362
|
+
root_element_name "sale"
|
1363
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1364
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1365
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1366
|
+
|
1367
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1368
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1369
|
+
text_node :amount, "amount", :default_value=>nil
|
1370
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1371
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1372
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1373
|
+
object_node :customerInfo, "customerInfo", :class=>CustomerInfo, :default_value=>nil
|
1374
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1375
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1376
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1377
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>PayPal),
|
1378
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1379
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1380
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos),
|
1381
|
+
:elsif, 'applepay', :then, (object_node :applepay, "applepay", :class=>Applepay)
|
1382
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
1383
|
+
optional_choice_node :if, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck, :default_value=>nil),
|
1384
|
+
:elsif, 'cardholderAuthentication', :then, (object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil)
|
1385
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1386
|
+
text_node :taxType, "taxType", :default_value=>nil
|
1387
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1388
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1389
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
1390
|
+
text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
|
1391
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
1392
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
1393
|
+
text_node :allowPartialAuth, "allowPartialAuth", :default_value=>nil
|
1394
|
+
object_node :healthcareIIAS, "healthcareIIAS", :class=>HealthcareIIAS, :default_value=>nil
|
1395
|
+
object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
|
1396
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1397
|
+
object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
|
1398
|
+
text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
|
1399
|
+
object_node :recurringRequest, "recurringRequest", :class=>RecurringRequest, :default_value=>nil
|
1400
|
+
object_node :litleInternalRecurringRequest, "litleInternalRecurringRequest", :class=>LitleInternalRecurringRequest, :default_value=>nil
|
1401
|
+
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1402
|
+
object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
|
1403
|
+
text_node :processingType, "processingType", :default_value=>nil
|
1404
|
+
text_node :originalNetworkTransactionId, "originalNetworkTransactionId", :default_value=>nil
|
1405
|
+
text_node :originalTransactionAmount, "originalTransactionAmount", :default_value=>nil
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
class Credit
|
1409
|
+
include XML::Mapping
|
1410
|
+
root_element_name "credit"
|
1411
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1412
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1413
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1414
|
+
|
1415
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1416
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1417
|
+
text_node :amount, "amount", :default_value=>nil
|
1418
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1419
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1420
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1421
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1422
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1423
|
+
:elsif, 'paypal', :then, (object_node :paypal, "paypal", :class=>CreditPayPal),
|
1424
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1425
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1426
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1427
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1428
|
+
text_node :taxType, "taxType", :default_value=>nil
|
1429
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
1430
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1431
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1432
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
1433
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
1434
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1435
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
1436
|
+
text_node :actionReason, "actionReason", :default_value=>nil
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
class RegisterTokenRequest
|
1440
|
+
include XML::Mapping
|
1441
|
+
root_element_name "registerTokenRequest"
|
1442
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1443
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1444
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1445
|
+
|
1446
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1447
|
+
optional_choice_node :if, 'accountNumber', :then, (text_node :accountNumber, "accountNumber", :default_value=>nil),
|
1448
|
+
:elsif, 'echeckForToken', :then, (object_node :echeckForToken, "echeckForToken", :class=>EcheckForToken),
|
1449
|
+
:elsif, 'paypageRegistrationId', :then, (text_node :paypageRegistrationId, "paypageRegistrationId", :default_value=>nil),
|
1450
|
+
:elsif, 'applepay', :then, (object_node :applepay, "applepay", :class=>Applepay)
|
1451
|
+
end
|
1452
|
+
|
1453
|
+
class CaptureGivenAuth
|
1454
|
+
include XML::Mapping
|
1455
|
+
root_element_name "captureGivenAuth"
|
1456
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1457
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1458
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1459
|
+
|
1460
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1461
|
+
object_node :authInformation, "authInformation", :class=>AuthInformation, :default_value=>nil
|
1462
|
+
text_node :amount, "amount", :default_value=>nil
|
1463
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1464
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1465
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1466
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1467
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1468
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1469
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1470
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1471
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1472
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1473
|
+
text_node :taxType, "taxType", :default_value=>nil
|
1474
|
+
object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
|
1475
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1476
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1477
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
1478
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
1479
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1480
|
+
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1481
|
+
text_node :processingType, "processingType", :default_value=>nil
|
1482
|
+
text_node :originalNetworkTransactionId, "originalNetworkTransactionId", :default_value=>nil
|
1483
|
+
text_node :originalTransactionAmount, "originalTransactionAmount", :default_value=>nil
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
class ForceCapture
|
1487
|
+
include XML::Mapping
|
1488
|
+
root_element_name "forceCapture"
|
1489
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1490
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1491
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1492
|
+
|
1493
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1494
|
+
text_node :amount, "amount", :default_value=>nil
|
1495
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1496
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1497
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1498
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1499
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1500
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
|
1501
|
+
:elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
|
1502
|
+
:elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos)
|
1503
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1504
|
+
text_node :taxType, "taxType", :default_value=>nil
|
1505
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1506
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1507
|
+
object_node :pos, "pos", :class=>Pos, :default_value=>nil
|
1508
|
+
object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
|
1509
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1510
|
+
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1511
|
+
text_node :processingType, "processingType", :default_value=>nil
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
class AuthReversal
|
1515
|
+
include XML::Mapping
|
1516
|
+
root_element_name "authReversal"
|
1517
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1518
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1519
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1520
|
+
text_node :partial, "@partial", :default_value=>nil
|
1521
|
+
|
1522
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1523
|
+
text_node :amount, "amount", :default_value=>nil
|
1524
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1525
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
1526
|
+
text_node :actionReason, "actionReason", :default_value=>nil
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
class Capture
|
1530
|
+
include XML::Mapping
|
1531
|
+
root_element_name "capture"
|
1532
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1533
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1534
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1535
|
+
text_node :partial, "@partial", :default_value=>nil
|
1536
|
+
|
1537
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1538
|
+
text_node :amount, "amount", :default_value=>nil
|
1539
|
+
text_node :surchargeAmount, "surchargeAmount", :default_value=>nil
|
1540
|
+
object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
|
1541
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1542
|
+
text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
|
1543
|
+
text_node :payPalNotes, "payPalNotes", :default_value=>nil
|
1544
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
class Void
|
1548
|
+
include XML::Mapping
|
1549
|
+
root_element_name "void"
|
1550
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1551
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1552
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1553
|
+
|
1554
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1555
|
+
object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
|
1556
|
+
end
|
1557
|
+
|
1558
|
+
class EcheckVoid
|
1559
|
+
include XML::Mapping
|
1560
|
+
root_element_name "echeckVoid"
|
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
|
+
class DepositReversal
|
1569
|
+
include XML::Mapping
|
1570
|
+
root_element_name "depositReversal"
|
1571
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1572
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1573
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1574
|
+
|
1575
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
class RefundReversal
|
1579
|
+
include XML::Mapping
|
1580
|
+
root_element_name "refundReversal"
|
1581
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1582
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1583
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1584
|
+
|
1585
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1586
|
+
end
|
1587
|
+
|
1588
|
+
class ActivateReversal
|
1589
|
+
include XML::Mapping
|
1590
|
+
root_element_name "activateReversal"
|
1591
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1592
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1593
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1594
|
+
|
1595
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1596
|
+
end
|
1597
|
+
|
1598
|
+
class DeactivateReversal
|
1599
|
+
include XML::Mapping
|
1600
|
+
root_element_name "deactivateReversal"
|
1601
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1602
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1603
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1604
|
+
|
1605
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1606
|
+
end
|
1607
|
+
|
1608
|
+
class LoadReversal
|
1609
|
+
include XML::Mapping
|
1610
|
+
root_element_name "loadReversal"
|
1611
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1612
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1613
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1614
|
+
|
1615
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1616
|
+
end
|
1617
|
+
|
1618
|
+
class UnloadReversal
|
1619
|
+
include XML::Mapping
|
1620
|
+
root_element_name "unloadReversal"
|
1621
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1622
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1623
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1624
|
+
|
1625
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
class EcheckVerification
|
1629
|
+
include XML::Mapping
|
1630
|
+
root_element_name "echeckVerification"
|
1631
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1632
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1633
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1634
|
+
|
1635
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1636
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1637
|
+
text_node :amount, "amount", :default_value=>nil
|
1638
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1639
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1640
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1641
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck),
|
1642
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken)
|
1643
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1644
|
+
end
|
1645
|
+
|
1646
|
+
class EcheckCredit
|
1647
|
+
include XML::Mapping
|
1648
|
+
root_element_name "echeckCredit"
|
1649
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1650
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1651
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1652
|
+
|
1653
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1654
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1655
|
+
text_node :amount, "amount", :default_value=>nil
|
1656
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1657
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1658
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1659
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
1660
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
1661
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1662
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1663
|
+
end
|
1664
|
+
|
1665
|
+
class EcheckRedeposit
|
1666
|
+
include XML::Mapping
|
1667
|
+
root_element_name "echeckRedeposit"
|
1668
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1669
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1670
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1671
|
+
|
1672
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1673
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
1674
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
1675
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1676
|
+
end
|
1677
|
+
|
1678
|
+
class EcheckSale
|
1679
|
+
include XML::Mapping
|
1680
|
+
root_element_name "echeckSale"
|
1681
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1682
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1683
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1684
|
+
|
1685
|
+
text_node :litleTxnId, "litleTxnId", :default_value=>nil
|
1686
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1687
|
+
text_node :verify, "verify", :default_value=>nil
|
1688
|
+
text_node :amount, "amount", :default_value=>nil
|
1689
|
+
text_node :secondaryAmount, "secondaryAmount", :default_value=>nil
|
1690
|
+
text_node :orderSource, "orderSource", :default_value=>nil
|
1691
|
+
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1692
|
+
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1693
|
+
optional_choice_node :if, 'echeck', :then, (object_node :echeck, "echeck", :class=>Echeck, :default_value=>nil),
|
1694
|
+
:elsif, 'echeckToken', :then, (object_node :echeckToken, "echeckToken", :class=>EcheckToken, :default_value=>nil)
|
1695
|
+
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1696
|
+
object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
|
1697
|
+
end
|
1698
|
+
|
1699
|
+
class UpdateCardValidationNumOnToken
|
1700
|
+
include XML::Mapping
|
1701
|
+
root_element_name "updateCardValidationNumOnToken"
|
1702
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1703
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1704
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1705
|
+
|
1706
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1707
|
+
text_node :litleToken, "litleToken", :default_value=>nil
|
1708
|
+
text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
|
1709
|
+
end
|
1710
|
+
|
1711
|
+
class AccountUpdate
|
1712
|
+
include XML::Mapping
|
1713
|
+
root_element_name "accountUpdate"
|
1714
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
1715
|
+
text_node :transactionId, "@id", :default_value=>nil
|
1716
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
1717
|
+
|
1718
|
+
text_node :orderId, "orderId", :default_value=>nil
|
1719
|
+
optional_choice_node :if, 'card', :then, (object_node :card, "card", :class=>Card),
|
1720
|
+
:elsif, 'token', :then, (object_node :token, "token", :class=>CardToken)
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
class OnlineRequest
|
1724
|
+
include XML::Mapping
|
1725
|
+
root_element_name "litleOnlineRequest"
|
1726
|
+
text_node :merchantId, "@merchantId", :default_value=>nil
|
1727
|
+
text_node :version, "@version", :default_value=>nil
|
1728
|
+
text_node :xmlns, "@xmlns", :default_value=>nil
|
1729
|
+
text_node :merchantSdk, "@merchantSdk", :default_value=>nil
|
1730
|
+
text_node :loggedInUser, "@loggedInUser", :default_value=>nil
|
1731
|
+
object_node :authentication, "authentication", :class=>Authentication
|
1732
|
+
optional_choice_node :if, 'authorization', :then, (object_node :authorization, "authorization", :class=>Authorization),
|
1733
|
+
:elsif, 'sale', :then, (object_node :sale, "sale", :class=>Sale),
|
1734
|
+
:elsif, 'captureTxn', :then, (object_node :captureTxn, "captureTxn", :class=>Capture),
|
1735
|
+
:elsif, 'captureGivenAuth', :then, (object_node :captureGivenAuth, "captureGivenAuth", :class=>CaptureGivenAuth),
|
1736
|
+
:elsif, 'void', :then, (object_node :void, "void", :class=>Void),
|
1737
|
+
:elsif, 'forceCapture', :then, (object_node :forceCapture, "forceCapture", :class=>ForceCapture),
|
1738
|
+
:elsif, 'credit', :then, (object_node :credit, "credit", :class=>Credit),
|
1739
|
+
:elsif, 'authReversal', :then, (object_node :authReversal, "authReversal", :class=>AuthReversal),
|
1740
|
+
:elsif, 'echeckCredit', :then, (object_node :echeckCredit, "echeckCredit", :class=>EcheckCredit),
|
1741
|
+
:elsif, 'echeckRedeposit', :then, (object_node :echeckRedeposit, "echeckRedeposit", :class=>EcheckRedeposit),
|
1742
|
+
:elsif, 'echeckSale', :then, (object_node :echeckSale, "echeckSale", :class=>EcheckSale),
|
1743
|
+
:elsif, 'echeckVoid', :then, (object_node :echeckVoid, "echeckVoid", :class=>EcheckVoid),
|
1744
|
+
:elsif, 'echeckVerification', :then, (object_node :echeckVerification, "echeckVerification", :class=>EcheckVerification),
|
1745
|
+
:elsif, 'registerTokenRequest', :then, (object_node :registerTokenRequest, "registerTokenRequest", :class=>RegisterTokenRequest),
|
1746
|
+
:elsif, 'updateCardValidationNumOnToken', :then, (object_node :updateCardValidationNumOnToken, "updateCardValidationNumOnToken", :class=>UpdateCardValidationNumOnToken),
|
1747
|
+
:elsif, 'cancelSubscription', :then, (object_node :cancelSubscription, "cancelSubscription", :class=>CancelSubscription),
|
1748
|
+
:elsif, 'updateSubscription', :then, (object_node :updateSubscription, "updateSubscription", :class=>UpdateSubscription),
|
1749
|
+
:elsif, 'activate',:then,(object_node :activate,"activate", :class=>Activate),
|
1750
|
+
:elsif, 'deactivate',:then,(object_node :deactivate,"deactivate", :class=>Deactivate),
|
1751
|
+
:elsif, 'load',:then,(object_node :load,"load", :class=>Load),
|
1752
|
+
:elsif, 'unload',:then,(object_node :unload,"unload", :class=>Unload),
|
1753
|
+
:elsif, 'balanceInquiry',:then,(object_node :balanceInquiry,"balanceInquiry", :class=>BalanceInquiry),
|
1754
|
+
:elsif, 'createPlan',:then,(object_node :createPlan,"createPlan",:class=>CreatePlan),
|
1755
|
+
:elsif, 'updatePlan',:then,(object_node :updatePlan,"updatePlan",:class=>UpdatePlan),
|
1756
|
+
:elsif, 'virtualGiftCard', :then,(object_node :virtualGiftCard,"virtualGiftCard",:class=>VirtualGiftCard),
|
1757
|
+
:elsif, 'activateReversal', :then, (object_node :activateReversal,"activateReversal", :class=>ActivateReversal),
|
1758
|
+
:elsif, 'depositReversal', :then, (object_node :depositReversal,"depositReversal", :class=>DepositReversal),
|
1759
|
+
:elsif, 'refundReversal', :then, (object_node :refundReversal,"refundReversal", :class=>RefundReversal),
|
1760
|
+
:elsif, 'deactivateReversal', :then, (object_node :deactivateReversal,"deactivateReversal", :class=>DeactivateReversal),
|
1761
|
+
:elsif, 'loadReversal', :then, (object_node :loadReversal,"loadReversal", :class=>LoadReversal),
|
1762
|
+
:elsif, 'unloadReversal', :then, (object_node :unloadReversal,"unloadReversal", :class=>UnloadReversal),
|
1763
|
+
:elsif, 'advancedFraudResults', :then, (object_node :advancedFraudResults,"advancedFraudResults", :class=>AdvancedFraudResults)
|
1764
|
+
def post_save(xml, options={:Mapping=>:_default})
|
1765
|
+
xml.each_element() {|el|
|
1766
|
+
if(el.name == 'captureTxn')
|
1767
|
+
el.name = 'capture'
|
1768
|
+
end
|
1769
|
+
}
|
1770
|
+
end
|
1771
|
+
|
1772
|
+
end
|
1773
|
+
|
1774
|
+
class BatchRequest
|
1775
|
+
include XML::Mapping
|
1776
|
+
root_element_name "batchRequest"
|
1777
|
+
|
1778
|
+
text_node :numAuths, "@numAuths", :default_value=>"0"
|
1779
|
+
text_node :authAmount, "@authAmount", :default_value=>"0"
|
1780
|
+
text_node :numSales, "@numSales", :default_value=>"0"
|
1781
|
+
text_node :saleAmount, "@saleAmount", :default_value=>"0"
|
1782
|
+
text_node :numCredits, "@numCredits", :default_value=>"0"
|
1783
|
+
text_node :creditAmount, "@creditAmount", :default_value=>"0"
|
1784
|
+
text_node :numTokenRegistrations, "@numTokenRegistrations", :default_value=>"0"
|
1785
|
+
text_node :numCaptureGivenAuths, "@numCaptureGivenAuths", :default_value=>"0"
|
1786
|
+
text_node :captureGivenAuthAmount, "@captureGivenAuthAmount", :default_value=>"0"
|
1787
|
+
text_node :numForceCaptures, "@numForceCaptures", :default_value=>"0"
|
1788
|
+
text_node :forceCaptureAmount, "@forceCaptureAmount", :default_value=>"0"
|
1789
|
+
text_node :numAuthReversals, "@numAuthReversals", :default_value=>"0"
|
1790
|
+
text_node :authReversalAmount, "@authReversalAmount", :default_value=>"0"
|
1791
|
+
text_node :numCaptures, "@numCaptures", :default_value=>"0"
|
1792
|
+
text_node :captureAmount, "@captureAmount", :default_value=>"0"
|
1793
|
+
text_node :numEcheckSales, "@numEcheckSales", :default_value=>"0"
|
1794
|
+
text_node :echeckSalesAmount, "@echeckSalesAmount", :default_value=>"0"
|
1795
|
+
text_node :numEcheckRedeposit, "@numEcheckRedeposit", :default_value=>"0"
|
1796
|
+
text_node :numEcheckCredit, "@numEcheckCredit", :default_value=>"0"
|
1797
|
+
text_node :echeckCreditAmount, "@echeckCreditAmount", :default_value=>"0"
|
1798
|
+
text_node :numEcheckVerification, "@numEcheckVerification", :default_value=>"0"
|
1799
|
+
text_node :echeckVerificationAmount, "@echeckVerificationAmount", :default_value=>"0"
|
1800
|
+
text_node :numUpdateCardValidationNumOnTokens, "@numUpdateCardValidationNumOnTokens", :default_value=>"0"
|
1801
|
+
text_node :numAccountUpdates, "@numAccountUpdates", :default_value=>"0"
|
1802
|
+
text_node :merchantId, "@merchantId", :default_value=>nil
|
1803
|
+
text_node :id, "@id", :default_value=>nil
|
1804
|
+
text_node :numCancelSubscriptions,"@numCancelSubscriptions", :default_value=>"0"
|
1805
|
+
text_node :numUpdateSubscriptions,"@numUpdateSubscriptions", :default_value=>"0"
|
1806
|
+
text_node :numCreatePlans,"@numCreatePlans",:default_value=>"0"
|
1807
|
+
text_node :numUpdatePlans,"@numUpdatePlans",:default_value=>"0"
|
1808
|
+
text_node :numActivates,"@numActivates",:default_value=>"0"
|
1809
|
+
text_node :numDeactivates,"@numDeactivates",:default_value=>"0"
|
1810
|
+
text_node :activateAmount,"@activateAmount",:default_value=>"0"
|
1811
|
+
text_node :numLoads,"@numLoads",:default_value=>"0"
|
1812
|
+
text_node :loadAmount,"@loadAmount",:default_value=>"0"
|
1813
|
+
text_node :numUnloads,"@numUnloads",:default_value=>"0"
|
1814
|
+
text_node :unloadAmount,"@unloadAmount",:default_value=>"0"
|
1815
|
+
text_node :numBalanceInquirys,"@numBalanceInquirys",:default_value=>"0"
|
1816
|
+
text_node :merchantSdk,"merchantSdk",:default_value=>"0"
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
class LitleRequest
|
1820
|
+
include XML::Mapping
|
1821
|
+
# version="6.0" xmlns="http://www.litle.com/schema" numBatchRequests = "1">
|
1822
|
+
# <authentication>
|
1823
|
+
# <user>XMLTESTV6ORG14</user>
|
1824
|
+
# <password>password</password>
|
1825
|
+
# </authentication>
|
1826
|
+
root_element_name "litleRequest"
|
1827
|
+
|
1828
|
+
text_node :version, "@version", :default_value=>"0"
|
1829
|
+
text_node :xmlns, "@xmlns", :default_value=>nil
|
1830
|
+
#TODO: ask greg about sessionId
|
1831
|
+
#text_node :sessionId, "@id", default_vale:nil
|
1832
|
+
text_node :numBatchRequests, "@numBatchRequests", :default_value=>"0"
|
1833
|
+
object_node :authentication, "authentication", :class=>Authentication
|
1834
|
+
end
|
1835
|
+
|
1836
|
+
class AccountUpdateFileRequestData
|
1837
|
+
include XML::Mapping
|
1838
|
+
root_element_name "accountUpdateFileRequestData"
|
1839
|
+
|
1840
|
+
text_node :merchantId, "merchantId", :default_value=>nil
|
1841
|
+
text_node :postDay, "postDay", :default_value=>nil
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
class LitleRFRRequest
|
1845
|
+
include XML::Mapping
|
1846
|
+
root_element_name "RFRRequest"
|
1847
|
+
optional_choice_node :if, 'litleSessionId', :then, (text_node :litleSessionId, "litleSessionId"),
|
1848
|
+
:elsif, 'accountUpdateFileRequestData', :then, (object_node :accountUpdateFileRequestData, "accountUpdateFileRequestData", :class=>AccountUpdateFileRequestData)
|
1849
|
+
end
|
1850
|
+
|
1851
|
+
class LitleRequestForRFR
|
1852
|
+
include XML::Mapping
|
1853
|
+
root_element_name "litleRequest"
|
1854
|
+
text_node :version, "@version", :default_value=>"0"
|
1855
|
+
text_node :xmlns, "@xmlns", :default_value=>nil
|
1856
|
+
text_node :numBatchRequests, "@numBatchRequests", :default_value=>nil
|
1857
|
+
object_node :authentication, "authentication", :class=>Authentication
|
1858
|
+
object_node :rfrRequest, 'RFRRequest', :class=>LitleRFRRequest
|
1859
|
+
end
|
1860
|
+
|
1861
|
+
# begin
|
1862
|
+
# class LitleOnlineResponse
|
1863
|
+
# attr_accessor :message
|
1864
|
+
# end
|
1865
|
+
#
|
1866
|
+
# class XMLFields
|
1867
|
+
#
|
1868
|
+
# end
|
1869
|
+
end
|