exact4r 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/CHANGELOG +6 -1
  2. data/README +71 -3
  3. data/Rakefile +8 -7
  4. data/VERSION +1 -1
  5. data/doc/classes/EWS/Transaction/FakeResponse.html +451 -0
  6. data/doc/classes/EWS/Transaction/Request.html +61 -80
  7. data/doc/classes/EWS/Transaction/Response.html +206 -14
  8. data/doc/classes/EWS/Transaction/Validator.html +182 -0
  9. data/doc/classes/EWS/Transporter.html +269 -0
  10. data/doc/classes/REXML/Document.html +176 -0
  11. data/doc/classes/REXML/Entity.html +150 -0
  12. data/doc/classes/REXML.html +112 -0
  13. data/doc/created.rid +1 -1
  14. data/doc/files/CHANGELOG.html +156 -0
  15. data/doc/files/LICENCE.html +109 -0
  16. data/doc/files/README.html +164 -23
  17. data/doc/files/VERSION.html +107 -0
  18. data/doc/files/lib/ews/transaction/fake_response_rb.html +101 -0
  19. data/doc/files/lib/ews/transaction/mapping_rb.html +1 -1
  20. data/doc/files/lib/ews/transaction/request_rb.html +8 -1
  21. data/doc/files/lib/ews/transaction/response_rb.html +1 -1
  22. data/doc/files/lib/ews/transaction/validator_rb.html +101 -0
  23. data/doc/files/lib/ews/{transaction/transporter_rb.html → transporter_rb.html} +3 -3
  24. data/doc/files/lib/exact4r_rb.html +6 -2
  25. data/doc/fr_class_index.html +6 -1
  26. data/doc/fr_file_index.html +6 -1
  27. data/doc/fr_method_index.html +22 -7
  28. data/lib/ews/transaction/mapping.rb +41 -40
  29. data/lib/ews/transaction/request.rb +3 -4
  30. data/lib/ews/transaction/response.rb +5 -0
  31. data/lib/ews/transaction/validator.rb +44 -34
  32. data/lib/ews/transporter.rb +3 -3
  33. data/lib/exact4r.rb +1 -1
  34. data/test/exhaustive/forced_post_test.rb +75 -0
  35. data/test/exhaustive/online_debit_purchase_test.rb +66 -0
  36. data/test/exhaustive/online_debit_refund_test.rb +66 -0
  37. data/test/exhaustive/pre_auth_completion_test.rb +99 -0
  38. data/test/exhaustive/pre_auth_only_test.rb +68 -0
  39. data/test/exhaustive/pre_auth_test.rb +68 -0
  40. data/test/exhaustive/purchase_correction_test.rb +79 -0
  41. data/test/exhaustive/purchase_test.rb +68 -0
  42. data/test/exhaustive/recurring_seed_pre_auth_test.rb +68 -0
  43. data/test/exhaustive/recurring_seed_purchase_test.rb +68 -0
  44. data/test/exhaustive/refund_correction_test.rb +79 -0
  45. data/test/exhaustive/refund_test.rb +68 -0
  46. data/test/exhaustive/secure_storage_test.rb +75 -0
  47. data/test/exhaustive/tagged_online_debit_refund_test.rb +168 -0
  48. data/test/exhaustive/tagged_pre_auth_completion_test.rb +119 -0
  49. data/test/exhaustive/tagged_pre_auth_test.rb +116 -0
  50. data/test/exhaustive/tagged_purchase_test.rb +116 -0
  51. data/test/exhaustive/tagged_refund_test.rb +144 -0
  52. data/test/exhaustive/transaction_details_test.rb +86 -0
  53. data/test/exhaustive/void_test.rb +75 -0
  54. data/{spec/avs_spec.rb → test/general/avs_test.rb} +33 -44
  55. data/test/general/json_encoding_test.rb +62 -0
  56. data/test/general/request_test.rb +185 -0
  57. data/test/general/rest_encoding_test.rb +174 -0
  58. data/test/general/soap_encoding_test.rb +211 -0
  59. data/test/general/transporter_test.rb +54 -0
  60. data/test/general/validator_test.rb +150 -0
  61. data/test/samples/rest.dodgy.response.xml +60 -0
  62. data/test/samples/rest.everything.response.xml +67 -0
  63. data/test/samples/rest.response.xml +60 -0
  64. data/test/samples/soap.deserialization.fault.xml +10 -0
  65. data/test/samples/soap.dodgy.response.xml +95 -0
  66. data/test/samples/soap.everything.response.xml +75 -0
  67. data/test/samples/soap.generalfailure.fault.xml +13 -0
  68. data/test/samples/soap.nulltransaction.fault.xml +14 -0
  69. data/test/samples/soap.response.xml +95 -0
  70. data/test/test_helper.rb +115 -0
  71. metadata +52 -12
  72. data/doc/classes/EWS/Transaction/Transporter.html +0 -251
  73. data/pkg/exact4r-0.5.gem +0 -0
  74. data/spec/mapping_spec.rb +0 -126
  75. data/spec/request_spec.rb +0 -154
  76. data/spec/spec_helper.rb +0 -55
  77. data/spec/transporter_spec.rb +0 -43
  78. data/spec/validator_spec.rb +0 -150
@@ -0,0 +1,150 @@
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: REXML::Entity</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">REXML::Entity</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/exact4r_rb.html">
59
+ lib/exact4r.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
+ Child
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
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000020">unnormalized</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Instance methods</h3>
110
+
111
+ <div id="method-M000020" class="method-detail">
112
+ <a name="M000020"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="#M000020" class="method-signature">
116
+ <span class="method-name">unnormalized</span><span class="method-args">()</span>
117
+ </a>
118
+ </div>
119
+
120
+ <div class="method-description">
121
+ <p><a class="source-toggle" href="#"
122
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000020-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/exact4r.rb, line 17</span>
126
+ 17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unnormalized</span>
127
+ 18: <span class="ruby-identifier">document</span>.<span class="ruby-identifier">record_entity_expansion!</span>
128
+ 19: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">value</span>()
129
+ 20: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
130
+ 21: <span class="ruby-ivar">@unnormalized</span> = <span class="ruby-constant">Text</span><span class="ruby-operator">::</span><span class="ruby-identifier">unnormalize</span>(<span class="ruby-identifier">v</span>, <span class="ruby-identifier">parent</span>)
131
+ 22: <span class="ruby-ivar">@unnormalized</span>
132
+ 23: <span class="ruby-keyword kw">end</span>
133
+ </pre>
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+
139
+ </div>
140
+
141
+
142
+ </div>
143
+
144
+
145
+ <div id="validator-badges">
146
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
147
+ </div>
148
+
149
+ </body>
150
+ </html>
@@ -0,0 +1,112 @@
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>Module: REXML</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>Module</strong></td>
53
+ <td class="class-name-in-header">REXML</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/exact4r_rb.html">
59
+ lib/exact4r.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+ <div id="class-list">
88
+ <h3 class="section-bar">Classes and Modules</h3>
89
+
90
+ Class <a href="REXML/Document.html" class="link">REXML::Document</a><br />
91
+ Class <a href="REXML/Entity.html" class="link">REXML::Entity</a><br />
92
+
93
+ </div>
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <div id="validator-badges">
108
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
109
+ </div>
110
+
111
+ </body>
112
+ </html>
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Thu, 29 May 2008 16:31:55 -0700
1
+ Tue, 15 Sep 2009 16:10:10 +1000
@@ -0,0 +1,156 @@
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>File: CHANGELOG</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="fileHeader">
50
+ <h1>CHANGELOG</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>CHANGELOG
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Sep 15 15:56:11 +1000 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h2>v0.9.2</h2>
73
+ <pre>
74
+ Converted tests to Test::Unit
75
+ Added complete test suite, testing all transaction types.
76
+ Enhanced validation of mandatory request information.
77
+ </pre>
78
+ <h2>v0.9.1</h2>
79
+ <pre>
80
+ Added unified Address Verification API
81
+ </pre>
82
+ <h2>v0.9</h2>
83
+ <pre>
84
+ Fixed incorrect decoding of boolean attributes from SOAP response
85
+ </pre>
86
+ <h2>v0.8</h2>
87
+ <pre>
88
+ Added User-Agent string to HTTP requests
89
+ </pre>
90
+ <h2>v0.7</h2>
91
+ <pre>
92
+ Updated with latest certificates for api.e-xact.com
93
+ Fixed SOAP namespace issue
94
+ Ensured expiry_date always submitted at MMYY
95
+ </pre>
96
+ <h2>v0.6</h2>
97
+ <pre>
98
+ Added client-side request validation
99
+ </pre>
100
+ <h2>v0.5.3</h2>
101
+ <pre>
102
+ Added fake response messages for testing purposes
103
+ Moved EWS::Transaction::Transporter to EWS::Transporter
104
+ Fixed typos
105
+ </pre>
106
+ <h2>v0.5.2</h2>
107
+ <pre>
108
+ Updated Transporter to play nicely with mod_security
109
+ Stripped trailing '/'s from URLs
110
+ Transporter ow re-uses connection
111
+ Updated RDoc with test login details
112
+ </pre>
113
+ <h2>v0.5.1</h2>
114
+ <pre>
115
+ Added CHANGELOG, LICENCE &amp; VERSION
116
+ Ensured README etc. were included in gem and displayed as default in RDoc
117
+ Renamed send() to submit() in Transporter
118
+ Fixed path to default E-xact certificates
119
+ </pre>
120
+ <h2>v0.5</h2>
121
+ <pre>
122
+ Initial Release
123
+ </pre>
124
+
125
+ </div>
126
+
127
+
128
+ </div>
129
+
130
+
131
+ </div>
132
+
133
+
134
+ <!-- if includes -->
135
+
136
+ <div id="section">
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <!-- if method_list -->
146
+
147
+
148
+ </div>
149
+
150
+
151
+ <div id="validator-badges">
152
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
+ </div>
154
+
155
+ </body>
156
+ </html>
@@ -0,0 +1,109 @@
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>File: LICENCE</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="fileHeader">
50
+ <h1>LICENCE</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>LICENCE
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Sep 15 15:52:11 +1000 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h1>Licence Terms</h1>
73
+ <p>
74
+ Distributed under the Ruby software <a
75
+ href="http://www.ruby-lang.org/en/LICENSE.txt">licence</a>
76
+ </p>
77
+
78
+ </div>
79
+
80
+
81
+ </div>
82
+
83
+
84
+ </div>
85
+
86
+
87
+ <!-- if includes -->
88
+
89
+ <div id="section">
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <!-- if method_list -->
99
+
100
+
101
+ </div>
102
+
103
+
104
+ <div id="validator-badges">
105
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
106
+ </div>
107
+
108
+ </body>
109
+ </html>