postful 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/doc/classes/Postful/AuthorizationException.html +111 -0
  2. data/doc/classes/Postful/Base.html +255 -0
  3. data/doc/classes/Postful/Base.src/M000001.html +21 -0
  4. data/doc/classes/Postful/Base.src/M000002.html +23 -0
  5. data/doc/classes/Postful/Base.src/M000003.html +22 -0
  6. data/doc/classes/Postful/Base.src/M000004.html +22 -0
  7. data/doc/classes/Postful/Base.src/M000005.html +20 -0
  8. data/doc/classes/Postful/Base.src/M000006.html +18 -0
  9. data/doc/classes/Postful/InternalServerError.html +111 -0
  10. data/doc/classes/Postful/Letter.html +347 -0
  11. data/doc/classes/Postful/Letter.src/M000015.html +18 -0
  12. data/doc/classes/Postful/Letter.src/M000016.html +18 -0
  13. data/doc/classes/Postful/Letter.src/M000017.html +18 -0
  14. data/doc/classes/Postful/Letter.src/M000018.html +18 -0
  15. data/doc/classes/Postful/Letter.src/M000019.html +18 -0
  16. data/doc/classes/Postful/Letter.src/M000020.html +18 -0
  17. data/doc/classes/Postful/Letter.src/M000021.html +18 -0
  18. data/doc/classes/Postful/Letter.src/M000022.html +18 -0
  19. data/doc/classes/Postful/Letter.src/M000023.html +18 -0
  20. data/doc/classes/Postful/Letter.src/M000024.html +18 -0
  21. data/doc/classes/Postful/Letter.src/M000025.html +18 -0
  22. data/doc/classes/Postful/Letter.src/M000026.html +18 -0
  23. data/doc/classes/Postful/NotFoundException.html +111 -0
  24. data/doc/classes/Postful/Order.html +276 -0
  25. data/doc/classes/Postful/Order.src/M000007.html +19 -0
  26. data/doc/classes/Postful/Order.src/M000008.html +24 -0
  27. data/doc/classes/Postful/Order.src/M000009.html +26 -0
  28. data/doc/classes/Postful/Order.src/M000010.html +18 -0
  29. data/doc/classes/Postful/Service.html +191 -0
  30. data/doc/classes/Postful/Service.src/M000011.html +19 -0
  31. data/doc/classes/Postful/Service.src/M000012.html +24 -0
  32. data/doc/classes/Postful/Service.src/M000013.html +19 -0
  33. data/doc/classes/Postful/Service.src/M000014.html +24 -0
  34. data/doc/classes/Postful/UnknownResponseException.html +111 -0
  35. data/doc/classes/Postful/ValidationException.html +111 -0
  36. data/doc/created.rid +1 -0
  37. data/doc/files/MIT-LICENSE.html +129 -0
  38. data/doc/files/README.html +164 -0
  39. data/doc/files/lib/postful/base_rb.html +108 -0
  40. data/doc/files/lib/postful/instance_exec_module_rb.html +101 -0
  41. data/doc/files/lib/postful/letter_rb.html +109 -0
  42. data/doc/files/lib/postful/order_rb.html +110 -0
  43. data/doc/files/lib/postful/service_rb.html +109 -0
  44. data/doc/files/lib/postful/util_rb.html +101 -0
  45. data/doc/files/lib/postful_rb.html +110 -0
  46. data/doc/fr_class_index.html +35 -0
  47. data/doc/fr_file_index.html +35 -0
  48. data/doc/fr_method_index.html +52 -0
  49. data/doc/index.html +24 -0
  50. data/doc/rdoc-style.css +208 -0
  51. data/lib/postful.rb +3 -0
  52. data/lib/postful/base.rb +163 -0
  53. data/lib/postful/instance_exec_module.rb +25 -0
  54. data/lib/postful/letter.rb +134 -0
  55. data/lib/postful/order.rb +130 -0
  56. data/lib/postful/service.rb +40 -0
  57. data/lib/postful/util.rb +69 -0
  58. data/test/suite.rb +5 -0
  59. data/test/test_base.rb +131 -0
  60. data/test/test_letter.rb +115 -0
  61. data/test/test_order.rb +49 -0
  62. data/test/test_postcard.rb +12 -0
  63. data/test/test_service.rb +52 -0
  64. metadata +128 -0
@@ -0,0 +1,111 @@
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: Postful::AuthorizationException</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">Postful::AuthorizationException</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/postful/base_rb.html">
59
+ lib/postful/base.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
+ StandardError
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
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
+ </html>
@@ -0,0 +1,255 @@
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: Postful::Base</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">Postful::Base</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/postful/base_rb.html">
59
+ lib/postful/base.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
+
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="#M000002">add_address</a>&nbsp;&nbsp;
90
+ <a href="#M000003">add_international_address</a>&nbsp;&nbsp;
91
+ <a href="#M000006">errors</a>&nbsp;&nbsp;
92
+ <a href="#M000004">mail!</a>&nbsp;&nbsp;
93
+ <a href="#M000001">new</a>&nbsp;&nbsp;
94
+ <a href="#M000005">valid?</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+ <div id="includes">
103
+ <h3 class="section-bar">Included Modules</h3>
104
+
105
+ <div id="includes-list">
106
+ <span class="include-name">Util</span>
107
+ </div>
108
+ </div>
109
+
110
+ <div id="section">
111
+
112
+
113
+
114
+
115
+
116
+ <div id="attribute-list">
117
+ <h3 class="section-bar">Attributes</h3>
118
+
119
+ <div class="name-list">
120
+ <table>
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">return_address</td>
123
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
124
+ <td class="context-item-desc"></td>
125
+ </tr>
126
+ <tr class="top-aligned-row context-row">
127
+ <td class="context-item-name">tag1</td>
128
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
129
+ <td class="context-item-desc"></td>
130
+ </tr>
131
+ <tr class="top-aligned-row context-row">
132
+ <td class="context-item-name">tag2</td>
133
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
134
+ <td class="context-item-desc"></td>
135
+ </tr>
136
+ <tr class="top-aligned-row context-row">
137
+ <td class="context-item-name">tag3</td>
138
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
139
+ <td class="context-item-desc"></td>
140
+ </tr>
141
+ </table>
142
+ </div>
143
+ </div>
144
+
145
+
146
+
147
+ <!-- if method_list -->
148
+ <div id="methods">
149
+ <h3 class="section-bar">Public Class methods</h3>
150
+
151
+ <div id="method-M000001" class="method-detail">
152
+ <a name="M000001"></a>
153
+
154
+ <div class="method-heading">
155
+ <a href="Base.src/M000001.html" target="Code" class="method-signature"
156
+ onclick="popupCode('Base.src/M000001.html');return false;">
157
+ <span class="method-name">new</span><span class="method-args">(email, password)</span>
158
+ </a>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+ </div>
163
+ </div>
164
+
165
+ <h3 class="section-bar">Public Instance methods</h3>
166
+
167
+ <div id="method-M000002" class="method-detail">
168
+ <a name="M000002"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="Base.src/M000002.html" target="Code" class="method-signature"
172
+ onclick="popupCode('Base.src/M000002.html');return false;">
173
+ <span class="method-name">add_address</span><span class="method-args">(attributes = {})</span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ <p>
179
+ Add a domestic recipient to a mailing
180
+ </p>
181
+ </div>
182
+ </div>
183
+
184
+ <div id="method-M000003" class="method-detail">
185
+ <a name="M000003"></a>
186
+
187
+ <div class="method-heading">
188
+ <a href="Base.src/M000003.html" target="Code" class="method-signature"
189
+ onclick="popupCode('Base.src/M000003.html');return false;">
190
+ <span class="method-name">add_international_address</span><span class="method-args">(lines, country)</span>
191
+ </a>
192
+ </div>
193
+
194
+ <div class="method-description">
195
+ <p>
196
+ Add an international recipient to a mailing
197
+ </p>
198
+ </div>
199
+ </div>
200
+
201
+ <div id="method-M000006" class="method-detail">
202
+ <a name="M000006"></a>
203
+
204
+ <div class="method-heading">
205
+ <a href="Base.src/M000006.html" target="Code" class="method-signature"
206
+ onclick="popupCode('Base.src/M000006.html');return false;">
207
+ <span class="method-name">errors</span><span class="method-args">()</span>
208
+ </a>
209
+ </div>
210
+
211
+ <div class="method-description">
212
+ </div>
213
+ </div>
214
+
215
+ <div id="method-M000004" class="method-detail">
216
+ <a name="M000004"></a>
217
+
218
+ <div class="method-heading">
219
+ <a href="Base.src/M000004.html" target="Code" class="method-signature"
220
+ onclick="popupCode('Base.src/M000004.html');return false;">
221
+ <span class="method-name">mail!</span><span class="method-args">()</span>
222
+ </a>
223
+ </div>
224
+
225
+ <div class="method-description">
226
+ </div>
227
+ </div>
228
+
229
+ <div id="method-M000005" class="method-detail">
230
+ <a name="M000005"></a>
231
+
232
+ <div class="method-heading">
233
+ <a href="Base.src/M000005.html" target="Code" class="method-signature"
234
+ onclick="popupCode('Base.src/M000005.html');return false;">
235
+ <span class="method-name">valid?</span><span class="method-args">()</span>
236
+ </a>
237
+ </div>
238
+
239
+ <div class="method-description">
240
+ </div>
241
+ </div>
242
+
243
+
244
+ </div>
245
+
246
+
247
+ </div>
248
+
249
+
250
+ <div id="validator-badges">
251
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
252
+ </div>
253
+
254
+ </body>
255
+ </html>
@@ -0,0 +1,21 @@
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>
7
+ <head>
8
+ <title>new (Postful::Base)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/base.rb, line 23</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">password</span>)
15
+ <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
16
+ <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
17
+ <span class="ruby-ivar">@documents</span> = []
18
+ <span class="ruby-ivar">@addressees</span> = []
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,23 @@
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>
7
+ <head>
8
+ <title>add_address (Postful::Base)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/base.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_address</span>(<span class="ruby-identifier">attributes</span> = {})
15
+ <span class="ruby-identifier">returning</span> <span class="ruby-constant">DomesticAddress</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">address</span><span class="ruby-operator">|</span>
16
+ [<span class="ruby-identifier">:name</span>, <span class="ruby-identifier">:company</span>, <span class="ruby-identifier">:address</span>, <span class="ruby-identifier">:address2</span>, <span class="ruby-identifier">:city</span>, <span class="ruby-identifier">:state</span>, <span class="ruby-identifier">:postal_code</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-identifier">address</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{field}=&quot;</span>, <span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">field</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">field</span>.<span class="ruby-identifier">to_s</span>])
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-ivar">@addressees</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">address</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>add_international_address (Postful::Base)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/base.rb, line 41</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_international_address</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">country</span>)
15
+ <span class="ruby-identifier">returning</span> <span class="ruby-constant">InternationalAddress</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">address</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">address</span>.<span class="ruby-identifier">lines</span> = <span class="ruby-identifier">lines</span>
17
+ <span class="ruby-identifier">address</span>.<span class="ruby-identifier">country</span> = <span class="ruby-identifier">country</span>
18
+ <span class="ruby-ivar">@addressees</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">address</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>mail! (Postful::Base)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/base.rb, line 49</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mail!</span>
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">valid?</span>
16
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
17
+ <span class="ruby-keyword kw">else</span>
18
+ <span class="ruby-identifier">mail_without_validation!</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>