recurly 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of recurly might be problematic. Click here for more details.

Files changed (99) hide show
  1. data/README.md +15 -11
  2. data/lib/patches/active_resource/connection.rb +10 -0
  3. data/lib/recurly.rb +35 -9
  4. data/lib/recurly/account.rb +22 -1
  5. data/lib/recurly/account_base.rb +35 -0
  6. data/lib/recurly/base.rb +26 -39
  7. data/lib/recurly/billing_info.rb +40 -1
  8. data/lib/recurly/charge.rb +12 -1
  9. data/lib/recurly/coupon.rb +8 -0
  10. data/lib/recurly/credit.rb +12 -1
  11. data/lib/recurly/exceptions.rb +19 -0
  12. data/lib/recurly/invoice.rb +1 -1
  13. data/lib/recurly/plan.rb +13 -1
  14. data/lib/recurly/rails3/recurly.rake +5 -3
  15. data/lib/recurly/subscription.rb +21 -3
  16. data/lib/recurly/transaction.rb +29 -1
  17. data/lib/recurly/transparent.rb +140 -0
  18. data/lib/recurly/version.rb +1 -1
  19. data/spec/config/recurly.yml +12 -0
  20. data/spec/config/test1.yml +3 -1
  21. data/spec/config/test2.yml +4 -2
  22. data/spec/integration/credit_spec.rb +6 -6
  23. data/spec/integration/plan_spec.rb +2 -2
  24. data/spec/support/factory.rb +5 -3
  25. data/spec/unit/account_spec.rb +19 -0
  26. data/spec/unit/billing_info_spec.rb +38 -0
  27. data/spec/unit/charge_spec.rb +18 -0
  28. data/spec/unit/config_spec.rb +10 -6
  29. data/spec/unit/coupon_spec.rb +13 -0
  30. data/spec/unit/credit_spec.rb +18 -0
  31. data/spec/unit/plan_spec.rb +18 -0
  32. data/spec/unit/subscription_spec.rb +25 -0
  33. data/spec/unit/transaction_spec.rb +32 -0
  34. data/spec/unit/transparent_spec.rb +114 -0
  35. data/spec/vcr/account/accept-language-account/{1296674173.yml → 1297746103.yml} +16 -13
  36. data/spec/vcr/account/close/{1296674173.yml → 1297746103.yml} +31 -28
  37. data/spec/vcr/account/create-blank/{1296674173.yml → 1297746103.yml} +9 -5
  38. data/spec/vcr/account/create-duplicate/{1296674173.yml → 1297746103.yml} +22 -15
  39. data/spec/vcr/account/create-min/{1296674173.yml → 1297746103.yml} +16 -13
  40. data/spec/vcr/account/create/{1296674173.yml → 1297746103.yml} +16 -13
  41. data/spec/vcr/account/find/{1296674173.yml → 1297746103.yml} +29 -26
  42. data/spec/vcr/account/list/1297746103.yml +1579 -0
  43. data/spec/vcr/account/update/{1296674173.yml → 1297746103.yml} +54 -47
  44. data/spec/vcr/billing/create/{1296690812.yml → 1298594128.yml} +37 -34
  45. data/spec/vcr/billing/destroy/{1296690812.yml → 1298594128.yml} +46 -43
  46. data/spec/vcr/billing/find/{1296690812.yml → 1298594128.yml} +47 -44
  47. data/spec/vcr/billing/update/{1296690812.yml → 1298594128.yml} +50 -47
  48. data/spec/vcr/charge/create/{1296674173.yml → 1297746103.yml} +48 -45
  49. data/spec/vcr/charge/delete-uninvoiced/{1296674173.yml → 1297746103.yml} +49 -46
  50. data/spec/vcr/charge/list-all/{1296674173.yml → 1297746103.yml} +61 -58
  51. data/spec/vcr/charge/list-invoiced/{1296674173.yml → 1297746103.yml} +92 -89
  52. data/spec/vcr/charge/list-pending/{1296674173.yml → 1297746103.yml} +61 -58
  53. data/spec/vcr/charge/lookup/{1296674173.yml → 1297746103.yml} +34 -31
  54. data/spec/vcr/coupon/create/{1296774903.yml → 1299714521.yml} +35 -32
  55. data/spec/vcr/coupon/destroy/{1296688818.yml → 1299714521.yml} +34 -31
  56. data/spec/vcr/{coupon/create/1296688818.yml → credit/create/1299714599.yml} +53 -53
  57. data/spec/vcr/credit/delete/1299714599.yml +262 -0
  58. data/spec/vcr/credit/list/1299714599.yml +319 -0
  59. data/spec/vcr/credit/lookup/1299714599.yml +183 -0
  60. data/spec/vcr/invoice/create-no-charges/{1296674173.yml → 1297746103.yml} +34 -31
  61. data/spec/vcr/invoice/create/{1296674173.yml → 1297746103.yml} +63 -60
  62. data/spec/vcr/invoice/list/{1296674173.yml → 1297746103.yml} +87 -84
  63. data/spec/vcr/invoice/lookup/{1296674173.yml → 1297746103.yml} +64 -61
  64. data/spec/vcr/plan/all.yml +30 -30
  65. data/spec/vcr/plan/find.yml +25 -25
  66. data/spec/vcr/plan/update.yml +16 -15
  67. data/spec/vcr/subscription/addons/add/{1296674173.yml → 1297746103.yml} +44 -40
  68. data/spec/vcr/subscription/addons/create/{1296674173.yml → 1297746103.yml} +44 -40
  69. data/spec/vcr/subscription/addons/remove/{1296674173.yml → 1297746103.yml} +44 -40
  70. data/spec/vcr/subscription/cancel-with-code/{1296674173.yml → 1297746103.yml} +99 -95
  71. data/spec/vcr/subscription/cancel/{1296674173.yml → 1297746103.yml} +86 -82
  72. data/spec/vcr/subscription/change1/{1296674173.yml → 1297746103.yml} +82 -78
  73. data/spec/vcr/subscription/change2/{1296674173.yml → 1297746103.yml} +82 -78
  74. data/spec/vcr/subscription/create/{1296674173.yml → 1297746103.yml} +49 -45
  75. data/spec/vcr/subscription/find/{1296674173.yml → 1297746103.yml} +60 -56
  76. data/spec/vcr/subscription/reactivate/{1296674173.yml → 1297746103.yml} +93 -89
  77. data/spec/vcr/subscription/refund-full/{1296674173.yml → 1297746103.yml} +77 -73
  78. data/spec/vcr/subscription/refund-none/{1296674173.yml → 1297746103.yml} +77 -73
  79. data/spec/vcr/subscription/refund-partial/{1296674173.yml → 1297746103.yml} +77 -73
  80. data/spec/vcr/transaction/all/{1296674173.yml → 1297746103.yml} +107 -107
  81. data/spec/vcr/transaction/create-no-account/{1296674173.yml → 1297746103.yml} +14 -13
  82. data/spec/vcr/transaction/create-with-account/{1296674173.yml → 1297746103.yml} +46 -58
  83. data/spec/vcr/transaction/list-filled/1297746103.yml +213 -0
  84. data/spec/vcr/transaction/list-initial/{1296674173.yml → 1297746103.yml} +38 -35
  85. data/spec/vcr/transaction/lookup/1297746103.yml +213 -0
  86. data/spec/vcr/transaction/refund/1297746103.yml +213 -0
  87. data/spec/vcr/transaction/void/1297746103.yml +213 -0
  88. metadata +146 -139
  89. data/spec/vcr/account/list/1296674173.yml +0 -55
  90. data/spec/vcr/coupon/destroy/1296774903.yml +0 -207
  91. data/spec/vcr/credit/create/1296674173.yml +0 -121
  92. data/spec/vcr/credit/delete/1296674173.yml +0 -121
  93. data/spec/vcr/credit/list/1296674173.yml +0 -121
  94. data/spec/vcr/credit/lookup/1296674173.yml +0 -121
  95. data/spec/vcr/plan/delete/1296674173.yml +0 -225
  96. data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
  97. data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
  98. data/spec/vcr/transaction/refund/1296674173.yml +0 -287
  99. data/spec/vcr/transaction/void/1296674173.yml +0 -352
@@ -0,0 +1,262 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
6
+ body: |
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <account>
9
+ <account-code>delete-uninvoiced-1299714599</account-code>
10
+ <first-name>Verena</first-name>
11
+ <last-name>Test</last-name>
12
+ <email>verena@test.com</email>
13
+ <company-name>Recurly Ruby Gem</company-name>
14
+ <billing-info>
15
+ <credit-card>
16
+ </credit-card>
17
+ </billing-info>
18
+ <accept-language type="yaml" nil="true"></accept-language>
19
+ </account>
20
+
21
+ headers:
22
+ authorization:
23
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
24
+ content-type:
25
+ - application/xml
26
+ accept:
27
+ - "*/*"
28
+ user-agent:
29
+ - Ruby
30
+ connection:
31
+ - close
32
+ response: !ruby/struct:VCR::Response
33
+ status: !ruby/struct:VCR::ResponseStatus
34
+ code: 201
35
+ message: "Created "
36
+ headers:
37
+ cache-control:
38
+ - no-cache
39
+ location:
40
+ - http://app.recurly.local:3000/accounts/delete-uninvoiced-1299714599
41
+ x-runtime:
42
+ - "451"
43
+ content-type:
44
+ - application/xml; charset=utf-8
45
+ content-length:
46
+ - "589"
47
+ server:
48
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
49
+ date:
50
+ - Fri, 11 Mar 2011 18:50:21 GMT
51
+ connection:
52
+ - close
53
+ set-cookie:
54
+ - account_credentials=9501c7dbb3a196eadada6d0f3402954b78eed33da41909edcb12ac7df54bbd6a2e9a26de3c083614b451e194101aad0813f87ff276db30f09b7507273a431b21%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=0b0aef010c24900ae3592a8f7e4366e2; domain=.recurly.local; path=/; HttpOnly
56
+ body: |
57
+ <?xml version="1.0" encoding="UTF-8"?>
58
+ <account>
59
+ <id>delete-uninvoiced-1299714599</id>
60
+ <account_code>delete-uninvoiced-1299714599</account_code>
61
+ <username></username>
62
+ <email>verena@test.com</email>
63
+ <first_name>Verena</first_name>
64
+ <last_name>Test</last_name>
65
+ <company_name>Recurly Ruby Gem</company_name>
66
+ <balance_in_cents type="integer">0</balance_in_cents>
67
+ <closed type="boolean">false</closed>
68
+ <hosted_login_token>fd38895fcb794cdbbf8a4eaa7bb442c9</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:50:21Z</created_at>
70
+ <state>active</state>
71
+ </account>
72
+
73
+ http_version: "1.1"
74
+ - !ruby/struct:VCR::HTTPInteraction
75
+ request: !ruby/struct:VCR::Request
76
+ method: :post
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/delete-uninvoiced-1299714599/credits.xml
78
+ body: |
79
+ <?xml version="1.0" encoding="UTF-8"?>
80
+ <credit>
81
+ <amount-in-cents type="integer">1315</amount-in-cents>
82
+ <description>free moniez 4 u</description>
83
+ </credit>
84
+
85
+ headers:
86
+ authorization:
87
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
88
+ content-type:
89
+ - application/xml
90
+ accept:
91
+ - "*/*"
92
+ user-agent:
93
+ - Ruby
94
+ connection:
95
+ - close
96
+ response: !ruby/struct:VCR::Response
97
+ status: !ruby/struct:VCR::ResponseStatus
98
+ code: 201
99
+ message: "Created "
100
+ headers:
101
+ cache-control:
102
+ - no-cache
103
+ x-runtime:
104
+ - "341"
105
+ content-type:
106
+ - application/xml; charset=utf-8
107
+ content-length:
108
+ - "520"
109
+ server:
110
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
111
+ date:
112
+ - Fri, 11 Mar 2011 18:50:23 GMT
113
+ connection:
114
+ - close
115
+ set-cookie:
116
+ - _recurly_session=1b2276147a7ea62329a95047a8a67e1b; domain=.recurly.local; path=/; HttpOnly
117
+ body: |
118
+ <?xml version="1.0" encoding="UTF-8"?>
119
+ <credit type="credit">
120
+ <id>45bbe40c631e43d4a3f3693c45d123b6</id>
121
+ <account_code>delete-uninvoiced-1299714599</account_code>
122
+ <amount_in_cents type="integer">-1315</amount_in_cents>
123
+ <start_date type="datetime">2011-03-11T18:50:23Z</start_date>
124
+ <end_date nil="true" type="datetime"></end_date>
125
+ <invoice_number nil="true" type="integer"></invoice_number>
126
+ <description>free moniez 4 u</description>
127
+ <created_at type="datetime">2011-03-11T18:50:23Z</created_at>
128
+ </credit>
129
+
130
+ http_version: "1.1"
131
+ - !ruby/struct:VCR::HTTPInteraction
132
+ request: !ruby/struct:VCR::Request
133
+ method: :get
134
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/delete-uninvoiced-1299714599/credits/45bbe40c631e43d4a3f3693c45d123b6.xml
135
+ body:
136
+ headers:
137
+ authorization:
138
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
139
+ accept:
140
+ - application/xml
141
+ accept-encoding:
142
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
143
+ user-agent:
144
+ - Ruby
145
+ connection:
146
+ - close
147
+ response: !ruby/struct:VCR::Response
148
+ status: !ruby/struct:VCR::ResponseStatus
149
+ code: 200
150
+ message: "OK "
151
+ headers:
152
+ x-runtime:
153
+ - "201"
154
+ content-type:
155
+ - application/xml; charset=utf-8
156
+ etag:
157
+ - "\"eed6c0446c76a89c925ed3cbcb9eb02b\""
158
+ cache-control:
159
+ - private, max-age=0, must-revalidate
160
+ content-length:
161
+ - "520"
162
+ server:
163
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
164
+ date:
165
+ - Fri, 11 Mar 2011 18:50:25 GMT
166
+ connection:
167
+ - close
168
+ set-cookie:
169
+ - _recurly_session=0f3c96d897e1889258e2a5b1dfb51165; domain=.recurly.local; path=/; HttpOnly
170
+ body: |
171
+ <?xml version="1.0" encoding="UTF-8"?>
172
+ <credit type="credit">
173
+ <id>45bbe40c631e43d4a3f3693c45d123b6</id>
174
+ <account_code>delete-uninvoiced-1299714599</account_code>
175
+ <amount_in_cents type="integer">-1315</amount_in_cents>
176
+ <start_date type="datetime">2011-03-11T18:50:23Z</start_date>
177
+ <end_date nil="true" type="datetime"></end_date>
178
+ <invoice_number nil="true" type="integer"></invoice_number>
179
+ <description>free moniez 4 u</description>
180
+ <created_at type="datetime">2011-03-11T18:50:23Z</created_at>
181
+ </credit>
182
+
183
+ http_version: "1.1"
184
+ - !ruby/struct:VCR::HTTPInteraction
185
+ request: !ruby/struct:VCR::Request
186
+ method: :delete
187
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/delete-uninvoiced-1299714599/credits/45bbe40c631e43d4a3f3693c45d123b6.xml
188
+ body:
189
+ headers:
190
+ authorization:
191
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
192
+ accept:
193
+ - application/xml
194
+ user-agent:
195
+ - Ruby
196
+ connection:
197
+ - close
198
+ response: !ruby/struct:VCR::Response
199
+ status: !ruby/struct:VCR::ResponseStatus
200
+ code: 200
201
+ message: "OK "
202
+ headers:
203
+ cache-control:
204
+ - no-cache
205
+ x-runtime:
206
+ - "207"
207
+ content-type:
208
+ - application/xml; charset=utf-8
209
+ content-length:
210
+ - "1"
211
+ server:
212
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
213
+ date:
214
+ - Fri, 11 Mar 2011 18:50:27 GMT
215
+ connection:
216
+ - close
217
+ set-cookie:
218
+ - _recurly_session=1e5ad3aef2e3f42a6d8f517e04599f62; domain=.recurly.local; path=/; HttpOnly
219
+ body: " "
220
+ http_version: "1.1"
221
+ - !ruby/struct:VCR::HTTPInteraction
222
+ request: !ruby/struct:VCR::Request
223
+ method: :get
224
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/delete-uninvoiced-1299714599/credits/45bbe40c631e43d4a3f3693c45d123b6.xml
225
+ body:
226
+ headers:
227
+ authorization:
228
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
229
+ accept:
230
+ - application/xml
231
+ accept-encoding:
232
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
233
+ user-agent:
234
+ - Ruby
235
+ connection:
236
+ - close
237
+ response: !ruby/struct:VCR::Response
238
+ status: !ruby/struct:VCR::ResponseStatus
239
+ code: 404
240
+ message: "Not Found "
241
+ headers:
242
+ cache-control:
243
+ - no-cache
244
+ content-type:
245
+ - application/xml; charset=utf-8
246
+ content-length:
247
+ - "92"
248
+ server:
249
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
250
+ date:
251
+ - Fri, 11 Mar 2011 18:50:30 GMT
252
+ connection:
253
+ - close
254
+ set-cookie:
255
+ - _recurly_session=7328bbf61a5b9ba8f8c21fec4e204cdf; domain=.recurly.local; path=/; HttpOnly
256
+ body: |
257
+ <?xml version="1.0" encoding="UTF-8"?>
258
+ <errors>
259
+ <error>Credit not found</error>
260
+ </errors>
261
+
262
+ http_version: "1.1"
@@ -0,0 +1,319 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
6
+ body: |
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <account>
9
+ <account-code>credit-list-1299714599</account-code>
10
+ <first-name>Verena</first-name>
11
+ <last-name>Test</last-name>
12
+ <email>verena@test.com</email>
13
+ <company-name>Recurly Ruby Gem</company-name>
14
+ <billing-info>
15
+ <credit-card>
16
+ </credit-card>
17
+ </billing-info>
18
+ <accept-language type="yaml" nil="true"></accept-language>
19
+ </account>
20
+
21
+ headers:
22
+ authorization:
23
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
24
+ content-type:
25
+ - application/xml
26
+ accept:
27
+ - "*/*"
28
+ user-agent:
29
+ - Ruby
30
+ connection:
31
+ - close
32
+ response: !ruby/struct:VCR::Response
33
+ status: !ruby/struct:VCR::ResponseStatus
34
+ code: 201
35
+ message: "Created "
36
+ headers:
37
+ cache-control:
38
+ - no-cache
39
+ location:
40
+ - http://app.recurly.local:3000/accounts/credit-list-1299714599
41
+ x-runtime:
42
+ - "573"
43
+ content-type:
44
+ - application/xml; charset=utf-8
45
+ content-length:
46
+ - "577"
47
+ server:
48
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
49
+ date:
50
+ - Fri, 11 Mar 2011 18:50:03 GMT
51
+ connection:
52
+ - close
53
+ set-cookie:
54
+ - account_credentials=7f300aa4e40b27e52e59d86295fe93df6a5edf4603ef194f8662df7c526b66aa0df9a4cadb82ba6af35789a8eac44ca1a048bd708bc170f3dadad686206d7ad7%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=24029c04bfa718483db127e8ba5cbcf0; domain=.recurly.local; path=/; HttpOnly
56
+ body: |
57
+ <?xml version="1.0" encoding="UTF-8"?>
58
+ <account>
59
+ <id>credit-list-1299714599</id>
60
+ <account_code>credit-list-1299714599</account_code>
61
+ <username></username>
62
+ <email>verena@test.com</email>
63
+ <first_name>Verena</first_name>
64
+ <last_name>Test</last_name>
65
+ <company_name>Recurly Ruby Gem</company_name>
66
+ <balance_in_cents type="integer">0</balance_in_cents>
67
+ <closed type="boolean">false</closed>
68
+ <hosted_login_token>73f994954a754e22a35431235919dedc</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:50:03Z</created_at>
70
+ <state>active</state>
71
+ </account>
72
+
73
+ http_version: "1.1"
74
+ - !ruby/struct:VCR::HTTPInteraction
75
+ request: !ruby/struct:VCR::Request
76
+ method: :post
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-list-1299714599/credits.xml
78
+ body: |
79
+ <?xml version="1.0" encoding="UTF-8"?>
80
+ <credit>
81
+ <amount-in-cents type="integer">100</amount-in-cents>
82
+ <description>one</description>
83
+ </credit>
84
+
85
+ headers:
86
+ authorization:
87
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
88
+ content-type:
89
+ - application/xml
90
+ accept:
91
+ - "*/*"
92
+ user-agent:
93
+ - Ruby
94
+ connection:
95
+ - close
96
+ response: !ruby/struct:VCR::Response
97
+ status: !ruby/struct:VCR::ResponseStatus
98
+ code: 201
99
+ message: "Created "
100
+ headers:
101
+ cache-control:
102
+ - no-cache
103
+ x-runtime:
104
+ - "332"
105
+ content-type:
106
+ - application/xml; charset=utf-8
107
+ content-length:
108
+ - "501"
109
+ server:
110
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
111
+ date:
112
+ - Fri, 11 Mar 2011 18:50:06 GMT
113
+ connection:
114
+ - close
115
+ set-cookie:
116
+ - _recurly_session=5eaec97f8f91e9bdfcbe5e8dcabd2803; domain=.recurly.local; path=/; HttpOnly
117
+ body: |
118
+ <?xml version="1.0" encoding="UTF-8"?>
119
+ <credit type="credit">
120
+ <id>33e0411d831c414ebb678435042d0dde</id>
121
+ <account_code>credit-list-1299714599</account_code>
122
+ <amount_in_cents type="integer">-100</amount_in_cents>
123
+ <start_date type="datetime">2011-03-11T18:50:06Z</start_date>
124
+ <end_date nil="true" type="datetime"></end_date>
125
+ <invoice_number nil="true" type="integer"></invoice_number>
126
+ <description>one</description>
127
+ <created_at type="datetime">2011-03-11T18:50:06Z</created_at>
128
+ </credit>
129
+
130
+ http_version: "1.1"
131
+ - !ruby/struct:VCR::HTTPInteraction
132
+ request: !ruby/struct:VCR::Request
133
+ method: :post
134
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-list-1299714599/credits.xml
135
+ body: |
136
+ <?xml version="1.0" encoding="UTF-8"?>
137
+ <credit>
138
+ <amount-in-cents type="integer">200</amount-in-cents>
139
+ <description>two</description>
140
+ </credit>
141
+
142
+ headers:
143
+ authorization:
144
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
145
+ content-type:
146
+ - application/xml
147
+ accept:
148
+ - "*/*"
149
+ user-agent:
150
+ - Ruby
151
+ connection:
152
+ - close
153
+ response: !ruby/struct:VCR::Response
154
+ status: !ruby/struct:VCR::ResponseStatus
155
+ code: 201
156
+ message: "Created "
157
+ headers:
158
+ cache-control:
159
+ - no-cache
160
+ x-runtime:
161
+ - "217"
162
+ content-type:
163
+ - application/xml; charset=utf-8
164
+ content-length:
165
+ - "501"
166
+ server:
167
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
168
+ date:
169
+ - Fri, 11 Mar 2011 18:50:08 GMT
170
+ connection:
171
+ - close
172
+ set-cookie:
173
+ - _recurly_session=ac4118c2764046bd54b22d4aff20ce95; domain=.recurly.local; path=/; HttpOnly
174
+ body: |
175
+ <?xml version="1.0" encoding="UTF-8"?>
176
+ <credit type="credit">
177
+ <id>feb343ad8ede47e9808616b97b53d0f3</id>
178
+ <account_code>credit-list-1299714599</account_code>
179
+ <amount_in_cents type="integer">-200</amount_in_cents>
180
+ <start_date type="datetime">2011-03-11T18:50:08Z</start_date>
181
+ <end_date nil="true" type="datetime"></end_date>
182
+ <invoice_number nil="true" type="integer"></invoice_number>
183
+ <description>two</description>
184
+ <created_at type="datetime">2011-03-11T18:50:08Z</created_at>
185
+ </credit>
186
+
187
+ http_version: "1.1"
188
+ - !ruby/struct:VCR::HTTPInteraction
189
+ request: !ruby/struct:VCR::Request
190
+ method: :post
191
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-list-1299714599/credits.xml
192
+ body: |
193
+ <?xml version="1.0" encoding="UTF-8"?>
194
+ <credit>
195
+ <amount-in-cents type="integer">300</amount-in-cents>
196
+ <description>three</description>
197
+ </credit>
198
+
199
+ headers:
200
+ authorization:
201
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
202
+ content-type:
203
+ - application/xml
204
+ accept:
205
+ - "*/*"
206
+ user-agent:
207
+ - Ruby
208
+ connection:
209
+ - close
210
+ response: !ruby/struct:VCR::Response
211
+ status: !ruby/struct:VCR::ResponseStatus
212
+ code: 201
213
+ message: "Created "
214
+ headers:
215
+ cache-control:
216
+ - no-cache
217
+ x-runtime:
218
+ - "223"
219
+ content-type:
220
+ - application/xml; charset=utf-8
221
+ content-length:
222
+ - "503"
223
+ server:
224
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
225
+ date:
226
+ - Fri, 11 Mar 2011 18:50:10 GMT
227
+ connection:
228
+ - close
229
+ set-cookie:
230
+ - _recurly_session=ab7f1b032afe9d38daeaabeb77517cfc; domain=.recurly.local; path=/; HttpOnly
231
+ body: |
232
+ <?xml version="1.0" encoding="UTF-8"?>
233
+ <credit type="credit">
234
+ <id>8bf30baf431d41de81bc5b19c00727ce</id>
235
+ <account_code>credit-list-1299714599</account_code>
236
+ <amount_in_cents type="integer">-300</amount_in_cents>
237
+ <start_date type="datetime">2011-03-11T18:50:10Z</start_date>
238
+ <end_date nil="true" type="datetime"></end_date>
239
+ <invoice_number nil="true" type="integer"></invoice_number>
240
+ <description>three</description>
241
+ <created_at type="datetime">2011-03-11T18:50:10Z</created_at>
242
+ </credit>
243
+
244
+ http_version: "1.1"
245
+ - !ruby/struct:VCR::HTTPInteraction
246
+ request: !ruby/struct:VCR::Request
247
+ method: :get
248
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-list-1299714599/credits.xml
249
+ body:
250
+ headers:
251
+ authorization:
252
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
253
+ accept:
254
+ - application/xml
255
+ accept-encoding:
256
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
257
+ user-agent:
258
+ - Ruby
259
+ connection:
260
+ - close
261
+ response: !ruby/struct:VCR::Response
262
+ status: !ruby/struct:VCR::ResponseStatus
263
+ code: 200
264
+ message: "OK "
265
+ headers:
266
+ x-runtime:
267
+ - "212"
268
+ content-type:
269
+ - application/xml; charset=utf-8
270
+ etag:
271
+ - "\"239bda0224ea84097ccd6ebdb699ba4d\""
272
+ cache-control:
273
+ - private, max-age=0, must-revalidate
274
+ content-length:
275
+ - "1521"
276
+ server:
277
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
278
+ date:
279
+ - Fri, 11 Mar 2011 18:50:12 GMT
280
+ connection:
281
+ - close
282
+ set-cookie:
283
+ - _recurly_session=63e973a8443fbe4b99c6145a4377221e; domain=.recurly.local; path=/; HttpOnly
284
+ body: |
285
+ <?xml version="1.0" encoding="UTF-8"?>
286
+ <credits type="array">
287
+ <credit type="credit">
288
+ <id>8bf30baf431d41de81bc5b19c00727ce</id>
289
+ <account_code>credit-list-1299714599</account_code>
290
+ <amount_in_cents type="integer">-300</amount_in_cents>
291
+ <start_date type="datetime">2011-03-11T18:50:10Z</start_date>
292
+ <end_date nil="true" type="datetime"></end_date>
293
+ <invoice_number nil="true" type="integer"></invoice_number>
294
+ <description>three</description>
295
+ <created_at type="datetime">2011-03-11T18:50:10Z</created_at>
296
+ </credit>
297
+ <credit type="credit">
298
+ <id>feb343ad8ede47e9808616b97b53d0f3</id>
299
+ <account_code>credit-list-1299714599</account_code>
300
+ <amount_in_cents type="integer">-200</amount_in_cents>
301
+ <start_date type="datetime">2011-03-11T18:50:08Z</start_date>
302
+ <end_date nil="true" type="datetime"></end_date>
303
+ <invoice_number nil="true" type="integer"></invoice_number>
304
+ <description>two</description>
305
+ <created_at type="datetime">2011-03-11T18:50:08Z</created_at>
306
+ </credit>
307
+ <credit type="credit">
308
+ <id>33e0411d831c414ebb678435042d0dde</id>
309
+ <account_code>credit-list-1299714599</account_code>
310
+ <amount_in_cents type="integer">-100</amount_in_cents>
311
+ <start_date type="datetime">2011-03-11T18:50:06Z</start_date>
312
+ <end_date nil="true" type="datetime"></end_date>
313
+ <invoice_number nil="true" type="integer"></invoice_number>
314
+ <description>one</description>
315
+ <created_at type="datetime">2011-03-11T18:50:06Z</created_at>
316
+ </credit>
317
+ </credits>
318
+
319
+ http_version: "1.1"