exact4r 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
3
+ UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
4
+ dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
5
+ MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
6
+ dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
7
+ AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
8
+ BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
9
+ cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
10
+ AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
11
+ MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
12
+ aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
13
+ ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
14
+ IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
15
+ MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
16
+ A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
17
+ 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
18
+ 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
19
+ -----END CERTIFICATE-----
data/certs/exact.cer ADDED
@@ -0,0 +1,18 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIC7DCCAlWgAwIBAgIDCFDUMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
3
+ MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
4
+ aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMTE1MDA0MDAyWhcNMDkwMjE0MDA0MDAy
5
+ WjB3MQswCQYDVQQGEwJDQTEZMBcGA1UECBMQQnJpdGlzaCBDb2x1bWJpYTESMBAG
6
+ A1UEBxMJVmFuY291dmVyMSIwIAYDVQQKExlFLXhhY3QgVHJhbnNhY3Rpb25zLCBM
7
+ dGQuMRUwEwYDVQQDFAwqLmUteGFjdC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
8
+ MIGJAoGBAKDWJW7DQ9EAkYE0j8QKZtGyRPx84NHaMLA9uJsqG9EMPfNCRd8Puafx
9
+ dJ6phUS/gP/ELRmJLlKO7qg6hTfLB3UwvAoMfF8VZM8jNbd3/b+SQD6CiPX0vETH
10
+ 85qIegdNrRQNm0ZKhq10bQlzKyoOrk0MDzDd6a98NyrLhVvb1nDlAgMBAAGjga4w
11
+ gaswDgYDVR0PAQH/BAQDAgTwMB0GA1UdDgQWBBTsLqYhwlm0BeEOq0Mhl6P5lxWP
12
+ cTA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxz
13
+ L3NlY3VyZWNhLmNybDAfBgNVHSMEGDAWgBRI5mj5K9KylddH2CMgEE8zmJCf1DAd
14
+ BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEA
15
+ X5PCTOTdEnxbG3qcrpgiwnh3ax0Orgy8VUEv3q08GlTu8b+p96/p9e4pWFnZ1FtH
16
+ F8B9PGPeDGZDu0+d3HcMuPBgdl/qyVPI7BIfED7V/PXLj92QQP5VI49R9DI1dj+O
17
+ bWaptb3x1gcxEP7ifBLl4fg080RlxAJmFrHTF2h9TQ4=
18
+ -----END CERTIFICATE-----
@@ -0,0 +1,488 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: EWS::Transaction::Request</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">EWS::Transaction::Request</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/ews/transaction/request_rb.html">
59
+ lib/ews/transaction/request.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ The <a href="Request.html">Request</a> class allows you to build
84
+ transaction requests for submission to the E-xact Web Service.
85
+ </p>
86
+ <p>
87
+ All requests will result in a financial transaction occurring, with the
88
+ exception of the <tt>:transaction_details</tt> request, which looks up the
89
+ details of a pre-existing transaction.
90
+ </p>
91
+ <p>
92
+ The following fields are <b>mandatory</b> on all requests:
93
+ </p>
94
+ <pre>
95
+ :gateway_id the gateway to which this request should be sent
96
+ :password your password for that gateway
97
+ :transaction_type the type of transaction you want to perform
98
+ </pre>
99
+ <p>
100
+ Different transaction types will have their own additional requirements
101
+ when it comes to mandatory and optional fields, and it is recommended that
102
+ the E-xact Web Service Programming Reference Guide, v8.5 be consulted. This
103
+ document is contained in the Webservice Plugin ZIP file: <a
104
+ href="http://www.e-xact.com/wp-content/uploads/2007/06/E-xact_Payment_Webservice_Plug-In.zip">www.e-xact.com/wp-content/uploads/2007/06/E-xact_Payment_Webservice_Plug-In.zip</a>
105
+ </p>
106
+ <p>
107
+ Please note that, if your chosen transaction requires it, credit card
108
+ expiry dates <b>must</b> be entered in YYMM format.
109
+ </p>
110
+ <h1>Allowable transaction types</h1>
111
+ <pre>
112
+ :purchase
113
+ :pre_auth
114
+ :pre_auth_completion
115
+ :forced_post
116
+ :refund
117
+ :pre_auth_only
118
+ :purchase_correction
119
+ :refund_correction
120
+ :void
121
+ :tagged_purchase
122
+ :tagged_pre_auth
123
+ :tagged_pre_auth_completion
124
+ :tagged_void
125
+ :tagged_refund
126
+ :tagged_online_debit_refund
127
+ :recurring_seed_pre_auth
128
+ :recurring_seed_purchase
129
+ :idebit_purchase
130
+ :idebit_refund
131
+ :secure_storage
132
+ :secure_storage_eft
133
+ :transaction_details
134
+ </pre>
135
+
136
+ </div>
137
+
138
+
139
+ </div>
140
+
141
+ <div id="method-list">
142
+ <h3 class="section-bar">Methods</h3>
143
+
144
+ <div class="name-list">
145
+ <a href="#M000006">is_find_transaction?</a>&nbsp;&nbsp;
146
+ <a href="#M000004">new</a>&nbsp;&nbsp;
147
+ <a href="#M000005">transaction_type=</a>&nbsp;&nbsp;
148
+ <a href="#M000007">valid?</a>&nbsp;&nbsp;
149
+ </div>
150
+ </div>
151
+
152
+ </div>
153
+
154
+
155
+ <!-- if includes -->
156
+
157
+ <div id="section">
158
+
159
+
160
+
161
+
162
+
163
+ <div id="attribute-list">
164
+ <h3 class="section-bar">Attributes</h3>
165
+
166
+ <div class="name-list">
167
+ <table>
168
+ <tr class="top-aligned-row context-row">
169
+ <td class="context-item-name">amount</td>
170
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
171
+ <td class="context-item-desc"></td>
172
+ </tr>
173
+ <tr class="top-aligned-row context-row">
174
+ <td class="context-item-name">auth_number</td>
175
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
176
+ <td class="context-item-desc"></td>
177
+ </tr>
178
+ <tr class="top-aligned-row context-row">
179
+ <td class="context-item-name">cardholder_name</td>
180
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
181
+ <td class="context-item-desc"></td>
182
+ </tr>
183
+ <tr class="top-aligned-row context-row">
184
+ <td class="context-item-name">cavv</td>
185
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
186
+ <td class="context-item-desc"></td>
187
+ </tr>
188
+ <tr class="top-aligned-row context-row">
189
+ <td class="context-item-name">cavv_algorithm</td>
190
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
191
+ <td class="context-item-desc"></td>
192
+ </tr>
193
+ <tr class="top-aligned-row context-row">
194
+ <td class="context-item-name">cc_expiry</td>
195
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
196
+ <td class="context-item-desc"></td>
197
+ </tr>
198
+ <tr class="top-aligned-row context-row">
199
+ <td class="context-item-name">cc_number</td>
200
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
201
+ <td class="context-item-desc"></td>
202
+ </tr>
203
+ <tr class="top-aligned-row context-row">
204
+ <td class="context-item-name">cc_verification_str1</td>
205
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
206
+ <td class="context-item-desc"></td>
207
+ </tr>
208
+ <tr class="top-aligned-row context-row">
209
+ <td class="context-item-name">cc_verification_str2</td>
210
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
211
+ <td class="context-item-desc"></td>
212
+ </tr>
213
+ <tr class="top-aligned-row context-row">
214
+ <td class="context-item-name">client_email</td>
215
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
216
+ <td class="context-item-desc"></td>
217
+ </tr>
218
+ <tr class="top-aligned-row context-row">
219
+ <td class="context-item-name">client_ip</td>
220
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
221
+ <td class="context-item-desc"></td>
222
+ </tr>
223
+ <tr class="top-aligned-row context-row">
224
+ <td class="context-item-name">customer_ref</td>
225
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
226
+ <td class="context-item-desc"></td>
227
+ </tr>
228
+ <tr class="top-aligned-row context-row">
229
+ <td class="context-item-name">cvd_presence_ind</td>
230
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
231
+ <td class="context-item-desc"></td>
232
+ </tr>
233
+ <tr class="top-aligned-row context-row">
234
+ <td class="context-item-name">ecommerce_flag</td>
235
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
236
+ <td class="context-item-desc"></td>
237
+ </tr>
238
+ <tr class="top-aligned-row context-row">
239
+ <td class="context-item-name">errors</td>
240
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
241
+ <td class="context-item-desc"></td>
242
+ </tr>
243
+ <tr class="top-aligned-row context-row">
244
+ <td class="context-item-name">gateway_id</td>
245
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
246
+ <td class="context-item-desc"></td>
247
+ </tr>
248
+ <tr class="top-aligned-row context-row">
249
+ <td class="context-item-name">language</td>
250
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
251
+ <td class="context-item-desc"></td>
252
+ </tr>
253
+ <tr class="top-aligned-row context-row">
254
+ <td class="context-item-name">pan</td>
255
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
256
+ <td class="context-item-desc"></td>
257
+ </tr>
258
+ <tr class="top-aligned-row context-row">
259
+ <td class="context-item-name">password</td>
260
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
261
+ <td class="context-item-desc"></td>
262
+ </tr>
263
+ <tr class="top-aligned-row context-row">
264
+ <td class="context-item-name">reference_3</td>
265
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
266
+ <td class="context-item-desc"></td>
267
+ </tr>
268
+ <tr class="top-aligned-row context-row">
269
+ <td class="context-item-name">reference_no</td>
270
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
271
+ <td class="context-item-desc"></td>
272
+ </tr>
273
+ <tr class="top-aligned-row context-row">
274
+ <td class="context-item-name">secure_auth_required</td>
275
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
276
+ <td class="context-item-desc"></td>
277
+ </tr>
278
+ <tr class="top-aligned-row context-row">
279
+ <td class="context-item-name">secure_auth_result</td>
280
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
281
+ <td class="context-item-desc"></td>
282
+ </tr>
283
+ <tr class="top-aligned-row context-row">
284
+ <td class="context-item-name">surcharge_amount</td>
285
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
286
+ <td class="context-item-desc"></td>
287
+ </tr>
288
+ <tr class="top-aligned-row context-row">
289
+ <td class="context-item-name">tax1_amount</td>
290
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
291
+ <td class="context-item-desc"></td>
292
+ </tr>
293
+ <tr class="top-aligned-row context-row">
294
+ <td class="context-item-name">tax1_number</td>
295
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
296
+ <td class="context-item-desc"></td>
297
+ </tr>
298
+ <tr class="top-aligned-row context-row">
299
+ <td class="context-item-name">tax2_amount</td>
300
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
301
+ <td class="context-item-desc"></td>
302
+ </tr>
303
+ <tr class="top-aligned-row context-row">
304
+ <td class="context-item-name">tax2_number</td>
305
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
306
+ <td class="context-item-desc"></td>
307
+ </tr>
308
+ <tr class="top-aligned-row context-row">
309
+ <td class="context-item-name">track1</td>
310
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
311
+ <td class="context-item-desc"></td>
312
+ </tr>
313
+ <tr class="top-aligned-row context-row">
314
+ <td class="context-item-name">track2</td>
315
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
316
+ <td class="context-item-desc"></td>
317
+ </tr>
318
+ <tr class="top-aligned-row context-row">
319
+ <td class="context-item-name">transaction_tag</td>
320
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
321
+ <td class="context-item-desc"></td>
322
+ </tr>
323
+ <tr class="top-aligned-row context-row">
324
+ <td class="context-item-name">transaction_type</td>
325
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
326
+ <td class="context-item-desc"></td>
327
+ </tr>
328
+ <tr class="top-aligned-row context-row">
329
+ <td class="context-item-name">user_name</td>
330
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
331
+ <td class="context-item-desc"></td>
332
+ </tr>
333
+ <tr class="top-aligned-row context-row">
334
+ <td class="context-item-name">xid</td>
335
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
336
+ <td class="context-item-desc"></td>
337
+ </tr>
338
+ </table>
339
+ </div>
340
+ </div>
341
+
342
+
343
+
344
+ <!-- if method_list -->
345
+ <div id="methods">
346
+ <h3 class="section-bar">Public Class methods</h3>
347
+
348
+ <div id="method-M000004" class="method-detail">
349
+ <a name="M000004"></a>
350
+
351
+ <div class="method-heading">
352
+ <a href="#M000004" class="method-signature">
353
+ <span class="method-name">new</span><span class="method-args">(hash = {})</span>
354
+ </a>
355
+ </div>
356
+
357
+ <div class="method-description">
358
+ <p>
359
+ Initialize a <a href="Request.html">Request</a> with a hash of values
360
+ </p>
361
+ <p><a class="source-toggle" href="#"
362
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
363
+ <div class="method-source-code" id="M000004-source">
364
+ <pre>
365
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 54</span>
366
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span> = {})
367
+ <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">&quot;#{k.to_s}=&quot;</span>, <span class="ruby-identifier">v</span>}
368
+ <span class="ruby-ivar">@errors</span> = {}
369
+ <span class="ruby-keyword kw">end</span>
370
+ </pre>
371
+ </div>
372
+ </div>
373
+ </div>
374
+
375
+ <h3 class="section-bar">Public Instance methods</h3>
376
+
377
+ <div id="method-M000006" class="method-detail">
378
+ <a name="M000006"></a>
379
+
380
+ <div class="method-heading">
381
+ <a href="#M000006" class="method-signature">
382
+ <span class="method-name">is_find_transaction?</span><span class="method-args">()</span>
383
+ </a>
384
+ </div>
385
+
386
+ <div class="method-description">
387
+ <p>
388
+ Indicates whether or not this transaction is a
389
+ <tt>:transaction_details</tt> transaction
390
+ </p>
391
+ <p><a class="source-toggle" href="#"
392
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
393
+ <div class="method-source-code" id="M000006-source">
394
+ <pre>
395
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 71</span>
396
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_find_transaction?</span>
397
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transaction_type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;CR&quot;</span>
398
+ <span class="ruby-keyword kw">end</span>
399
+ </pre>
400
+ </div>
401
+ </div>
402
+ </div>
403
+
404
+ <div id="method-M000005" class="method-detail">
405
+ <a name="M000005"></a>
406
+
407
+ <div class="method-heading">
408
+ <a href="#M000005" class="method-signature">
409
+ <span class="method-name">transaction_type=</span><span class="method-args">(type_sym)</span>
410
+ </a>
411
+ </div>
412
+
413
+ <div class="method-description">
414
+ <p>
415
+ Set the <tt>transasction_type&lt;tt&gt; using either a symbol or the
416
+ relevant code, e.g: for a purchase you can use either
417
+ &lt;tt&gt;:purchase</tt> or <tt>&#8216;00&#8216;</tt>
418
+ </p>
419
+ <p><a class="source-toggle" href="#"
420
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
421
+ <div class="method-source-code" id="M000005-source">
422
+ <pre>
423
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 61</span>
424
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transaction_type=</span>(<span class="ruby-identifier">type_sym</span>)
425
+ <span class="ruby-comment cmt"># assume we're given a symbol, so look up the code</span>
426
+ <span class="ruby-identifier">value</span> = <span class="ruby-ivar">@@transaction_codes</span>[<span class="ruby-identifier">type_sym</span>]
427
+ <span class="ruby-comment cmt"># if nothing found, then maybe we were given an actual code?</span>
428
+ <span class="ruby-identifier">value</span> = <span class="ruby-identifier">type_sym</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@@transaction_codes</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type_sym</span>
429
+
430
+ <span class="ruby-ivar">@transaction_type</span> = <span class="ruby-identifier">value</span>
431
+ <span class="ruby-keyword kw">end</span>
432
+ </pre>
433
+ </div>
434
+ </div>
435
+ </div>
436
+
437
+ <div id="method-M000007" class="method-detail">
438
+ <a name="M000007"></a>
439
+
440
+ <div class="method-heading">
441
+ <a href="#M000007" class="method-signature">
442
+ <span class="method-name">valid?</span><span class="method-args">()</span>
443
+ </a>
444
+ </div>
445
+
446
+ <div class="method-description">
447
+ <p><a class="source-toggle" href="#"
448
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
449
+ <div class="method-source-code" id="M000007-source">
450
+ <pre>
451
+ <span class="ruby-comment cmt"># File lib/ews/transaction/request.rb, line 75</span>
452
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
453
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:transaction_type</span>] = <span class="ruby-value str">&quot;transaction_type must be supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transaction_type</span>.<span class="ruby-identifier">blank?</span>
454
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:transaction_type</span>] = <span class="ruby-value str">&quot;invalid transaction_type supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@transaction_codes</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">include?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transaction_type</span>
455
+
456
+ <span class="ruby-comment cmt"># need to authenticate</span>
457
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:gateway_id</span>] = <span class="ruby-value str">&quot;gateway_id must be supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gateway_id</span>.<span class="ruby-identifier">blank?</span>
458
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:password</span>] = <span class="ruby-value str">&quot;password must be supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">password</span>.<span class="ruby-identifier">blank?</span>
459
+
460
+ <span class="ruby-comment cmt"># ensure we've been given valid amounts</span>
461
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:amount</span>] = <span class="ruby-value str">&quot;invalid amount supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_amount?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">amount</span>)
462
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:surcharge_amount</span>] = <span class="ruby-value str">&quot;invalid surcharge_amount supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_amount?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">surcharge_amount</span>)
463
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:tax1_amount</span>] = <span class="ruby-value str">&quot;invalid tax1_amount supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_amount?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">tax1_amount</span>)
464
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:tax2_amount</span>] = <span class="ruby-value str">&quot;invalid tax2_amount supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_amount?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">tax2_amount</span>)
465
+
466
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:cc_number</span>] = <span class="ruby-value str">&quot;invalid cc_number supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_card_number?</span>
467
+ <span class="ruby-identifier">errors</span>[<span class="ruby-identifier">:cc_expiry</span>] = <span class="ruby-value str">&quot;invalid cc_expiry supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_expiry_date?</span>
468
+
469
+ <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">empty?</span>
470
+ <span class="ruby-keyword kw">end</span>
471
+ </pre>
472
+ </div>
473
+ </div>
474
+ </div>
475
+
476
+
477
+ </div>
478
+
479
+
480
+ </div>
481
+
482
+
483
+ <div id="validator-badges">
484
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
485
+ </div>
486
+
487
+ </body>
488
+ </html>