recurly 0.4.7 → 0.4.8

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 (77) hide show
  1. data/README.md +6 -0
  2. data/lib/recurly/base.rb +15 -14
  3. data/lib/recurly/subscription.rb +2 -0
  4. data/lib/recurly/version.rb +1 -1
  5. data/spec/config/recurly.yml +4 -10
  6. data/spec/integration/transparent_spec.rb +72 -0
  7. data/spec/unit/transparent_spec.rb +6 -6
  8. data/spec/vcr/account/accept-language-account/{1301979678.yml → 1296674173.yml} +16 -18
  9. data/spec/vcr/account/close/{1301979678.yml → 1296674173.yml} +37 -39
  10. data/spec/vcr/account/create-blank/{1301979678.yml → 1296674173.yml} +8 -12
  11. data/spec/vcr/account/create-duplicate/{1301979678.yml → 1296674173.yml} +21 -27
  12. data/spec/vcr/account/create-min/{1301979678.yml → 1296674173.yml} +16 -18
  13. data/spec/vcr/account/create/{1301979678.yml → 1296674173.yml} +16 -18
  14. data/spec/vcr/account/find/{1301979678.yml → 1296674173.yml} +36 -38
  15. data/spec/vcr/account/list/1296674173.yml +55 -0
  16. data/spec/vcr/account/update/{1301979678.yml → 1296674173.yml} +59 -65
  17. data/spec/vcr/billing/create/{1302025874.yml → 1296690812.yml} +43 -45
  18. data/spec/vcr/billing/destroy/{1302025874.yml → 1296690812.yml} +58 -60
  19. data/spec/vcr/billing/find/{1302025874.yml → 1296690812.yml} +56 -58
  20. data/spec/vcr/billing/update/{1302025874.yml → 1296690812.yml} +59 -61
  21. data/spec/vcr/charge/create/{1297746103.yml → 1296674173.yml} +58 -64
  22. data/spec/vcr/charge/delete-uninvoiced/{1297746103.yml → 1296674173.yml} +66 -72
  23. data/spec/vcr/charge/list-all/{1297746103.yml → 1296674173.yml} +77 -91
  24. data/spec/vcr/charge/list-invoiced/{1297746103.yml → 1296674173.yml} +115 -131
  25. data/spec/vcr/charge/list-pending/{1297746103.yml → 1296674173.yml} +77 -91
  26. data/spec/vcr/charge/lookup/{1297746103.yml → 1296674173.yml} +43 -49
  27. data/spec/vcr/coupon/create/1296688818.yml +183 -0
  28. data/spec/vcr/coupon/create/1296774903.yml +183 -0
  29. data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
  30. data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
  31. data/spec/vcr/{coupon/create/1299714521.yml → credit/create/1296674173.yml} +34 -32
  32. data/spec/vcr/{billing/errors/1302025874.yml → credit/delete/1296674173.yml} +33 -42
  33. data/spec/vcr/{coupon/destroy/1299714521.yml → credit/list/1296674173.yml} +35 -33
  34. data/spec/vcr/credit/lookup/1296674173.yml +121 -0
  35. data/spec/vcr/invoice/create-no-charges/{1297746103.yml → 1296674173.yml} +40 -42
  36. data/spec/vcr/invoice/create/{1297746103.yml → 1296674173.yml} +77 -83
  37. data/spec/vcr/invoice/list/{1297746103.yml → 1296674173.yml} +107 -113
  38. data/spec/vcr/invoice/lookup/{1297746103.yml → 1296674173.yml} +77 -81
  39. data/spec/vcr/plan/all.yml +117 -98
  40. data/spec/vcr/plan/delete/1296674173.yml +225 -0
  41. data/spec/vcr/plan/find.yml +66 -36
  42. data/spec/vcr/plan/update.yml +64 -144
  43. data/spec/vcr/subscription/addons/add/{1301885121.yml → 1296674173.yml} +58 -51
  44. data/spec/vcr/subscription/addons/create/{1301885121.yml → 1296674173.yml} +58 -51
  45. data/spec/vcr/subscription/addons/remove/{1301885121.yml → 1296674173.yml} +58 -51
  46. data/spec/vcr/subscription/cancel-with-code/{1301881900.yml → 1296674173.yml} +135 -133
  47. data/spec/vcr/subscription/cancel/{1301881900.yml → 1296674173.yml} +117 -114
  48. data/spec/vcr/subscription/change1/{1301881900.yml → 1296674173.yml} +113 -110
  49. data/spec/vcr/subscription/change2/{1301881900.yml → 1296674173.yml} +112 -109
  50. data/spec/vcr/subscription/create/{1301881900.yml → 1296674173.yml} +65 -59
  51. data/spec/vcr/subscription/find/{1301881900.yml → 1296674173.yml} +81 -76
  52. data/spec/vcr/subscription/reactivate/{1301881900.yml → 1296674173.yml} +127 -124
  53. data/spec/vcr/subscription/refund-full/1296674173.yml +400 -0
  54. data/spec/vcr/subscription/refund-none/{1301881900.yml → 1296674173.yml} +106 -102
  55. data/spec/vcr/subscription/refund-partial/1296674173.yml +400 -0
  56. data/spec/vcr/transaction/all/{1301883347.yml → 1296674173.yml} +126 -126
  57. data/spec/vcr/transaction/create-no-account/{1301883347.yml → 1296674173.yml} +16 -16
  58. data/spec/vcr/transaction/create-with-account/{1301883347.yml → 1296674173.yml} +45 -51
  59. data/spec/vcr/transaction/list-filled/{1301883347.yml → 1296674173.yml} +91 -221
  60. data/spec/vcr/transaction/list-initial/{1301883347.yml → 1296674173.yml} +44 -46
  61. data/spec/vcr/transaction/lookup/{1301883347.yml → 1296674173.yml} +107 -121
  62. data/spec/vcr/transaction/refund/{1301883347.yml → 1296674173.yml} +57 -63
  63. data/spec/vcr/transaction/void/{1301883347.yml → 1296674173.yml} +69 -75
  64. data/spec/vcr/transparent/post-url/1311127536.yml +0 -0
  65. data/spec/vcr/transparent/post-url/1311127583.yml +0 -0
  66. data/spec/vcr/transparent/post-url/1311128042.yml +0 -0
  67. data/spec/vcr/transparent/post-url/1311128073.yml +0 -0
  68. data/spec/vcr/transparent/post-url/1311128087.yml +0 -0
  69. metadata +97 -155
  70. data/spec/vcr/account/list/1301979678.yml +0 -1588
  71. data/spec/vcr/credit/create/1299714599.yml +0 -186
  72. data/spec/vcr/credit/delete/1299714599.yml +0 -265
  73. data/spec/vcr/credit/list/1299714599.yml +0 -330
  74. data/spec/vcr/credit/lookup/1299714599.yml +0 -186
  75. data/spec/vcr/subscription/refund-full/1301881900.yml +0 -334
  76. data/spec/vcr/subscription/refund-partial/1301881900.yml +0 -334
  77. data/spec/vcr/transparent/post-url/1301879142.yml +0 -129
@@ -2,31 +2,27 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts.xml
5
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>invoice-lookup-1297746103</account-code>
9
+ <account-code>invoice-lookup-1296674173</account-code>
10
10
  <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
14
  <accept-language type="yaml" nil="true"></accept-language>
19
15
  </account>
20
16
 
21
17
  headers:
22
18
  authorization:
23
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
24
- user-agent:
25
- - Recurly Ruby Client v0.4.6
19
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
26
20
  content-type:
27
21
  - application/xml
28
22
  accept:
29
23
  - "*/*"
24
+ user-agent:
25
+ - Ruby
30
26
  connection:
31
27
  - close
32
28
  response: !ruby/struct:VCR::Response
@@ -37,26 +33,28 @@
37
33
  cache-control:
38
34
  - no-cache
39
35
  location:
40
- - http://app.recurly.local:3000/accounts/invoice-lookup-1297746103
36
+ - http://litle-test.recurly.local:3000/accounts/invoice-lookup-1296674173
41
37
  x-runtime:
42
- - "266"
38
+ - "712"
43
39
  content-type:
44
40
  - application/xml; charset=utf-8
45
41
  content-length:
46
42
  - "583"
47
43
  server:
48
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
44
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
49
45
  date:
50
- - Thu, 21 Apr 2011 18:02:00 GMT
46
+ - Thu, 03 Feb 2011 22:20:29 GMT
51
47
  connection:
52
48
  - close
53
49
  set-cookie:
54
- - _recurly_session=736e0887afc03d78597eb65599bd320b; domain=.recurly.local; path=/; HttpOnly
50
+ - account_credentials=b0829d2cf37306f3c3313000e53ce5d639093d340416f97bc55fea79166ee0ba1ac54efa38552e2c28d32e607f3ffb4fefd608ffeb04e3ee89e720f51648bb0a%3A%3A; domain=.recurly.local; path=/
51
+ - ""
52
+ - _recurly_session=2732f2a17e24fe7694ac8ed3c64d0258; domain=.recurly.local; path=/; HttpOnly
55
53
  body: |
56
54
  <?xml version="1.0" encoding="UTF-8"?>
57
55
  <account>
58
- <id>invoice-lookup-1297746103</id>
59
- <account_code>invoice-lookup-1297746103</account_code>
56
+ <id>invoice-lookup-1296674173</id>
57
+ <account_code>invoice-lookup-1296674173</account_code>
60
58
  <username></username>
61
59
  <email>verena@test.com</email>
62
60
  <first_name>Verena</first_name>
@@ -64,8 +62,8 @@
64
62
  <company_name>Recurly Ruby Gem</company_name>
65
63
  <balance_in_cents type="integer">0</balance_in_cents>
66
64
  <closed type="boolean">false</closed>
67
- <hosted_login_token>3bb33601f00b43eea691600c8cc94853</hosted_login_token>
68
- <created_at type="datetime">2011-04-21T18:02:00Z</created_at>
65
+ <hosted_login_token>375c54f7e83b4af5b0abb2a9e90077b5</hosted_login_token>
66
+ <created_at type="datetime">2011-02-03T22:20:29Z</created_at>
69
67
  <state>active</state>
70
68
  </account>
71
69
 
@@ -73,12 +71,10 @@
73
71
  - !ruby/struct:VCR::HTTPInteraction
74
72
  request: !ruby/struct:VCR::Request
75
73
  method: :put
76
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/billing_info.xml
74
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/invoice-lookup-1296674173/billing_info.xml
77
75
  body: |
78
76
  <?xml version="1.0" encoding="UTF-8"?>
79
77
  <billing-info>
80
- <first-name>Verena</first-name>
81
- <last-name>Test</last-name>
82
78
  <address1>123 Test St</address1>
83
79
  <city>San Francisco</city>
84
80
  <state>CA</state>
@@ -87,21 +83,23 @@
87
83
  <credit-card>
88
84
  <number>4111111111111111</number>
89
85
  <year type="integer">2012</year>
90
- <month type="integer">4</month>
86
+ <month type="integer">2</month>
91
87
  <verification-value>123</verification-value>
92
88
  </credit-card>
93
- <account-code>invoice-lookup-1297746103</account-code>
89
+ <account-code>invoice-lookup-1296674173</account-code>
90
+ <first-name>Verena</first-name>
91
+ <last-name>Test</last-name>
94
92
  </billing-info>
95
93
 
96
94
  headers:
97
95
  authorization:
98
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
99
- user-agent:
100
- - Recurly Ruby Client v0.4.6
96
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
101
97
  content-type:
102
98
  - application/xml
103
99
  accept:
104
100
  - "*/*"
101
+ user-agent:
102
+ - Ruby
105
103
  connection:
106
104
  - close
107
105
  response: !ruby/struct:VCR::Response
@@ -110,27 +108,27 @@
110
108
  message: "OK "
111
109
  headers:
112
110
  x-runtime:
113
- - "1471"
111
+ - "1658"
114
112
  content-type:
115
113
  - application/xml; charset=utf-8
116
114
  etag:
117
- - "\"ffa4a8f66e6e905424641cfc36bf64c3\""
115
+ - "\"d3c44deb1e11a9026489aa62eefa07b9\""
118
116
  cache-control:
119
117
  - private, max-age=0, must-revalidate
120
118
  content-length:
121
119
  - "640"
122
120
  server:
123
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
121
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
124
122
  date:
125
- - Thu, 21 Apr 2011 18:02:03 GMT
123
+ - Thu, 03 Feb 2011 22:20:33 GMT
126
124
  connection:
127
125
  - close
128
126
  set-cookie:
129
- - _recurly_session=5cc9ef54c3f60f8e05ac39bb81b2c36c; domain=.recurly.local; path=/; HttpOnly
127
+ - _recurly_session=af02fbe0f6ba19f0d5ee19d02527e259; domain=.recurly.local; path=/; HttpOnly
130
128
  body: |
131
129
  <?xml version="1.0" encoding="UTF-8"?>
132
130
  <billing_info>
133
- <account_code>invoice-lookup-1297746103</account_code>
131
+ <account_code>invoice-lookup-1296674173</account_code>
134
132
  <first_name>Verena</first_name>
135
133
  <last_name>Test</last_name>
136
134
  <address1>123 Test St</address1>
@@ -145,17 +143,17 @@
145
143
  <credit_card>
146
144
  <type>visa</type>
147
145
  <last_four>1111</last_four>
148
- <month type="integer">4</month>
146
+ <month type="integer">2</month>
149
147
  <year type="integer">2012</year>
150
148
  </credit_card>
151
- <updated_at type="datetime">2011-04-21T18:02:03Z</updated_at>
149
+ <updated_at type="datetime">2011-02-03T22:20:33Z</updated_at>
152
150
  </billing_info>
153
151
 
154
152
  http_version: "1.1"
155
153
  - !ruby/struct:VCR::HTTPInteraction
156
154
  request: !ruby/struct:VCR::Request
157
155
  method: :post
158
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/charges.xml
156
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/invoice-lookup-1296674173/charges.xml
159
157
  body: |
160
158
  <?xml version="1.0" encoding="UTF-8"?>
161
159
  <charge>
@@ -165,13 +163,13 @@
165
163
 
166
164
  headers:
167
165
  authorization:
168
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
169
- user-agent:
170
- - Recurly Ruby Client v0.4.6
166
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
171
167
  content-type:
172
168
  - application/xml
173
169
  accept:
174
170
  - "*/*"
171
+ user-agent:
172
+ - Ruby
175
173
  connection:
176
174
  - close
177
175
  response: !ruby/struct:VCR::Response
@@ -182,39 +180,37 @@
182
180
  cache-control:
183
181
  - no-cache
184
182
  x-runtime:
185
- - "229"
183
+ - "459"
186
184
  content-type:
187
185
  - application/xml; charset=utf-8
188
186
  content-length:
189
- - "626"
187
+ - "519"
190
188
  server:
191
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
189
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
192
190
  date:
193
- - Thu, 21 Apr 2011 18:02:05 GMT
191
+ - Thu, 03 Feb 2011 22:20:35 GMT
194
192
  connection:
195
193
  - close
196
194
  set-cookie:
197
- - _recurly_session=20e44adb595733e63adda7dfd47456cf; domain=.recurly.local; path=/; HttpOnly
195
+ - _recurly_session=af2011f8c41f08b945be76e0c0ac6464; domain=.recurly.local; path=/; HttpOnly
198
196
  body: |
199
197
  <?xml version="1.0" encoding="UTF-8"?>
200
198
  <charge type="charge">
201
- <id>cc80cf90bd314af6afde7fb336b56d55</id>
202
- <account_code>invoice-lookup-1297746103</account_code>
203
- <quantity type="integer">1</quantity>
204
- <unit_amount_in_cents type="integer">1500</unit_amount_in_cents>
199
+ <id>b2abd03ab22747e5b7a1445d23d80655</id>
200
+ <account_code>invoice-lookup-1296674173</account_code>
205
201
  <amount_in_cents type="integer">1500</amount_in_cents>
206
- <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
202
+ <start_date type="datetime">2011-02-03T22:20:35Z</start_date>
207
203
  <end_date nil="true" type="datetime"></end_date>
208
204
  <invoice_number nil="true" type="integer"></invoice_number>
209
205
  <description>charge description</description>
210
- <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
206
+ <created_at type="datetime">2011-02-03T22:20:35Z</created_at>
211
207
  </charge>
212
208
 
213
209
  http_version: "1.1"
214
210
  - !ruby/struct:VCR::HTTPInteraction
215
211
  request: !ruby/struct:VCR::Request
216
212
  method: :post
217
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/accounts/invoice-lookup-1297746103/invoices.xml
213
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/invoice-lookup-1296674173/invoices.xml
218
214
  body: |
219
215
  <?xml version="1.0" encoding="UTF-8"?>
220
216
  <invoice>
@@ -222,13 +218,13 @@
222
218
 
223
219
  headers:
224
220
  authorization:
225
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
226
- user-agent:
227
- - Recurly Ruby Client v0.4.6
221
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
228
222
  content-type:
229
223
  - application/xml
230
224
  accept:
231
225
  - "*/*"
226
+ user-agent:
227
+ - Ruby
232
228
  connection:
233
229
  - close
234
230
  response: !ruby/struct:VCR::Response
@@ -239,28 +235,28 @@
239
235
  cache-control:
240
236
  - no-cache
241
237
  location:
242
- - http://app.recurly.local:3000/invoices/cc5204bd7be84e4e8927bf97bceb61f1
238
+ - http://litle-test.recurly.local:3000/invoices/910ed0a5dc7b46118fa0b3100acc7e7a
243
239
  x-runtime:
244
- - "457"
240
+ - "607"
245
241
  content-type:
246
242
  - application/xml; charset=utf-8
247
243
  content-length:
248
244
  - "1214"
249
245
  server:
250
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
246
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
251
247
  date:
252
- - Thu, 21 Apr 2011 18:02:08 GMT
248
+ - Thu, 03 Feb 2011 22:20:38 GMT
253
249
  connection:
254
250
  - close
255
251
  set-cookie:
256
- - _recurly_session=fae95f308d6909b2cb9347b714870c13; domain=.recurly.local; path=/; HttpOnly
252
+ - _recurly_session=3f7d0ecc44d7af74b7a21f6f5fee283b; domain=.recurly.local; path=/; HttpOnly
257
253
  body: |
258
254
  <?xml version="1.0" encoding="UTF-8"?>
259
255
  <invoice>
260
- <id>cc5204bd7be84e4e8927bf97bceb61f1</id>
261
- <account_code>invoice-lookup-1297746103</account_code>
262
- <date type="datetime">2011-04-21T18:02:07Z</date>
263
- <invoice_number type="integer">1015</invoice_number>
256
+ <id>910ed0a5dc7b46118fa0b3100acc7e7a</id>
257
+ <account_code>invoice-lookup-1296674173</account_code>
258
+ <date type="datetime">2011-02-03T22:20:38Z</date>
259
+ <invoice_number type="integer">1238</invoice_number>
264
260
  <vat_number></vat_number>
265
261
  <status>open</status>
266
262
  <subtotal_in_cents type="integer">1500</subtotal_in_cents>
@@ -271,13 +267,13 @@
271
267
  <discount_in_cents type="integer">0</discount_in_cents>
272
268
  <line_items type="array">
273
269
  <line_item>
274
- <id>cc80cf90bd314af6afde7fb336b56d55</id>
270
+ <id>b2abd03ab22747e5b7a1445d23d80655</id>
275
271
  <type>charge</type>
276
272
  <amount_in_cents type="integer">1500</amount_in_cents>
277
- <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
273
+ <start_date type="datetime">2011-02-03T22:20:35Z</start_date>
278
274
  <end_date nil="true" type="datetime"></end_date>
279
275
  <description>charge description</description>
280
- <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
276
+ <created_at type="datetime">2011-02-03T22:20:35Z</created_at>
281
277
  <applied_coupon_code></applied_coupon_code>
282
278
  </line_item>
283
279
  </line_items>
@@ -289,17 +285,17 @@
289
285
  - !ruby/struct:VCR::HTTPInteraction
290
286
  request: !ruby/struct:VCR::Request
291
287
  method: :get
292
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/invoices/cc5204bd7be84e4e8927bf97bceb61f1.xml
288
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/invoices/910ed0a5dc7b46118fa0b3100acc7e7a.xml
293
289
  body:
294
290
  headers:
295
291
  authorization:
296
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
297
- user-agent:
298
- - Recurly Ruby Client v0.4.6
292
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
299
293
  accept:
300
294
  - application/xml
301
295
  accept-encoding:
302
296
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
297
+ user-agent:
298
+ - Ruby
303
299
  connection:
304
300
  - close
305
301
  response: !ruby/struct:VCR::Response
@@ -308,30 +304,30 @@
308
304
  message: "OK "
309
305
  headers:
310
306
  x-runtime:
311
- - "221"
307
+ - "92"
312
308
  content-type:
313
309
  - application/xml; charset=utf-8
314
310
  etag:
315
- - "\"f6cfaab4c619b62284af66f02e0175af\""
311
+ - "\"21e3c0a1181e8d5a596be5d9f1a38541\""
316
312
  cache-control:
317
313
  - private, max-age=0, must-revalidate
318
314
  content-length:
319
315
  - "1214"
320
316
  server:
321
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
317
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
322
318
  date:
323
- - Thu, 21 Apr 2011 18:02:09 GMT
319
+ - Thu, 03 Feb 2011 22:20:40 GMT
324
320
  connection:
325
321
  - close
326
322
  set-cookie:
327
- - _recurly_session=10f1960f7b92a159d05e0ed2119af579; domain=.recurly.local; path=/; HttpOnly
323
+ - _recurly_session=2dedb3ea31ddb23518cf1d3e2a90af0b; domain=.recurly.local; path=/; HttpOnly
328
324
  body: |
329
325
  <?xml version="1.0" encoding="UTF-8"?>
330
326
  <invoice>
331
- <id>cc5204bd7be84e4e8927bf97bceb61f1</id>
332
- <account_code>invoice-lookup-1297746103</account_code>
333
- <date type="datetime">2011-04-21T18:02:07Z</date>
334
- <invoice_number type="integer">1015</invoice_number>
327
+ <id>910ed0a5dc7b46118fa0b3100acc7e7a</id>
328
+ <account_code>invoice-lookup-1296674173</account_code>
329
+ <date type="datetime">2011-02-03T22:20:38Z</date>
330
+ <invoice_number type="integer">1238</invoice_number>
335
331
  <vat_number></vat_number>
336
332
  <status>open</status>
337
333
  <subtotal_in_cents type="integer">1500</subtotal_in_cents>
@@ -342,13 +338,13 @@
342
338
  <discount_in_cents type="integer">0</discount_in_cents>
343
339
  <line_items type="array">
344
340
  <line_item>
345
- <id>cc80cf90bd314af6afde7fb336b56d55</id>
341
+ <id>b2abd03ab22747e5b7a1445d23d80655</id>
346
342
  <type>charge</type>
347
343
  <amount_in_cents type="integer">1500</amount_in_cents>
348
- <start_date type="datetime">2011-04-21T18:02:05Z</start_date>
344
+ <start_date type="datetime">2011-02-03T22:20:35Z</start_date>
349
345
  <end_date nil="true" type="datetime"></end_date>
350
346
  <description>charge description</description>
351
- <created_at type="datetime">2011-04-21T18:02:05Z</created_at>
347
+ <created_at type="datetime">2011-02-03T22:20:35Z</created_at>
352
348
  <applied_coupon_code></applied_coupon_code>
353
349
  </line_item>
354
350
  </line_items>
@@ -2,17 +2,17 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/paid.xml
5
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/company/plans/paid.xml
6
6
  body:
7
7
  headers:
8
8
  authorization:
9
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
10
- user-agent:
11
- - Recurly Ruby Client v0.4.6
9
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
12
10
  accept:
13
11
  - application/xml
14
12
  accept-encoding:
15
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ user-agent:
15
+ - Ruby
16
16
  connection:
17
17
  - close
18
18
  response: !ruby/struct:VCR::Response
@@ -21,23 +21,23 @@
21
21
  message: "OK "
22
22
  headers:
23
23
  x-runtime:
24
- - "226"
24
+ - "200"
25
25
  content-type:
26
26
  - application/xml; charset=utf-8
27
27
  etag:
28
- - "\"3888306c167f105a4e165433ee427264\""
28
+ - "\"70b5c605373b1a4346a2d7ed46048dc4\""
29
29
  cache-control:
30
30
  - private, max-age=0, must-revalidate
31
31
  content-length:
32
- - "612"
32
+ - "1150"
33
33
  server:
34
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
35
35
  date:
36
- - Thu, 21 Apr 2011 18:02:11 GMT
36
+ - Thu, 03 Feb 2011 22:20:42 GMT
37
37
  connection:
38
38
  - close
39
39
  set-cookie:
40
- - _recurly_session=eed110838468472735b2fc170bcb748a; domain=.recurly.local; path=/; HttpOnly
40
+ - _recurly_session=0b7df87b61e0695c5a443cd31c295598; domain=.recurly.local; path=/; HttpOnly
41
41
  body: |
42
42
  <?xml version="1.0" encoding="UTF-8"?>
43
43
  <plan>
@@ -46,108 +46,65 @@
46
46
  <description></description>
47
47
  <success_url></success_url>
48
48
  <cancel_url></cancel_url>
49
- <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
50
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
49
+ <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
50
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
51
51
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
52
52
  <plan_interval_length type="integer">1</plan_interval_length>
53
53
  <plan_interval_unit>months</plan_interval_unit>
54
54
  <trial_interval_length type="integer">0</trial_interval_length>
55
55
  <trial_interval_unit>months</trial_interval_unit>
56
+ <latest_version depreciated="true">
57
+ <version type="integer">1</version>
58
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
59
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
60
+ <plan_interval_length type="integer">1</plan_interval_length>
61
+ <plan_interval_unit>months</plan_interval_unit>
62
+ <trial_interval_length type="integer">0</trial_interval_length>
63
+ <trial_interval_unit>months</trial_interval_unit>
64
+ <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
65
+ </latest_version>
56
66
  </plan>
57
67
 
58
68
  http_version: "1.1"
59
69
  - !ruby/struct:VCR::HTTPInteraction
60
70
  request: !ruby/struct:VCR::Request
61
71
  method: :get
62
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans/trial.xml
72
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/company/plans/trial.xml
63
73
  body:
64
74
  headers:
65
75
  authorization:
66
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
67
- user-agent:
68
- - Recurly Ruby Client v0.4.6
76
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
69
77
  accept:
70
78
  - application/xml
71
79
  accept-encoding:
72
80
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
73
- connection:
74
- - close
75
- response: !ruby/struct:VCR::Response
76
- status: !ruby/struct:VCR::ResponseStatus
77
- code: 404
78
- message: "Not Found "
79
- headers:
80
- cache-control:
81
- - no-cache
82
- content-type:
83
- - application/xml; charset=utf-8
84
- content-length:
85
- - "90"
86
- server:
87
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
88
- date:
89
- - Thu, 21 Apr 2011 18:02:13 GMT
90
- connection:
91
- - close
92
- set-cookie:
93
- - _recurly_session=6689c78d65b24a3c0a070f99f346c121; domain=.recurly.local; path=/; HttpOnly
94
- body: |
95
- <?xml version="1.0" encoding="UTF-8"?>
96
- <errors>
97
- <error>Plan not found</error>
98
- </errors>
99
-
100
- http_version: "1.1"
101
- - !ruby/struct:VCR::HTTPInteraction
102
- request: !ruby/struct:VCR::Request
103
- method: :post
104
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans.xml
105
- body: |
106
- <?xml version="1.0" encoding="UTF-8"?>
107
- <plan>
108
- <plan-code>trial</plan-code>
109
- <name>Trial</name>
110
- <amount-in-cents type="integer">1000</amount-in-cents>
111
- <plan-interval-length type="integer">1</plan-interval-length>
112
- <plan-interval-unit>months</plan-interval-unit>
113
- <trial-interval-length type="integer">1</trial-interval-length>
114
- <trial-interval-unit>months</trial-interval-unit>
115
- </plan>
116
-
117
- headers:
118
- authorization:
119
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
120
81
  user-agent:
121
- - Recurly Ruby Client v0.4.6
122
- content-type:
123
- - application/xml
124
- accept:
125
- - "*/*"
82
+ - Ruby
126
83
  connection:
127
84
  - close
128
85
  response: !ruby/struct:VCR::Response
129
86
  status: !ruby/struct:VCR::ResponseStatus
130
- code: 201
131
- message: "Created "
87
+ code: 200
88
+ message: "OK "
132
89
  headers:
133
- cache-control:
134
- - no-cache
135
- location:
136
- - http://app.recurly.local:3000/company/plans/trial
137
90
  x-runtime:
138
- - "258"
91
+ - "200"
139
92
  content-type:
140
93
  - application/xml; charset=utf-8
94
+ etag:
95
+ - "\"1c3543a74edbf6c1e0257022eb26ce10\""
96
+ cache-control:
97
+ - private, max-age=0, must-revalidate
141
98
  content-length:
142
- - "614"
99
+ - "1152"
143
100
  server:
144
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
101
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
145
102
  date:
146
- - Thu, 21 Apr 2011 18:02:15 GMT
103
+ - Thu, 03 Feb 2011 22:20:44 GMT
147
104
  connection:
148
105
  - close
149
106
  set-cookie:
150
- - _recurly_session=61f874ecb4280951cc58c35b3b93eb1d; domain=.recurly.local; path=/; HttpOnly
107
+ - _recurly_session=429b4f6957e2b914f097ad7073e0077e; domain=.recurly.local; path=/; HttpOnly
151
108
  body: |
152
109
  <?xml version="1.0" encoding="UTF-8"?>
153
110
  <plan>
@@ -156,30 +113,40 @@
156
113
  <description></description>
157
114
  <success_url></success_url>
158
115
  <cancel_url></cancel_url>
159
- <created_at type="datetime">2011-04-21T18:02:14Z</created_at>
160
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
116
+ <created_at type="datetime">2011-02-02T21:10:36Z</created_at>
117
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
161
118
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
162
119
  <plan_interval_length type="integer">1</plan_interval_length>
163
120
  <plan_interval_unit>months</plan_interval_unit>
164
121
  <trial_interval_length type="integer">1</trial_interval_length>
165
122
  <trial_interval_unit>months</trial_interval_unit>
123
+ <latest_version depreciated="true">
124
+ <version type="integer">1</version>
125
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
126
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
127
+ <plan_interval_length type="integer">1</plan_interval_length>
128
+ <plan_interval_unit>months</plan_interval_unit>
129
+ <trial_interval_length type="integer">1</trial_interval_length>
130
+ <trial_interval_unit>months</trial_interval_unit>
131
+ <created_at type="datetime">2011-02-02T21:10:36Z</created_at>
132
+ </latest_version>
166
133
  </plan>
167
134
 
168
135
  http_version: "1.1"
169
136
  - !ruby/struct:VCR::HTTPInteraction
170
137
  request: !ruby/struct:VCR::Request
171
138
  method: :get
172
- uri: http://api-test%40facebook.com:c012090130704e748dae49f56f05f68f@app.recurly.local:3000/company/plans.xml
139
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/company/plans.xml
173
140
  body:
174
141
  headers:
175
142
  authorization:
176
- - Basic YXBpLXRlc3RAZmFjZWJvb2suY29tOmMwMTIwOTAxMzA3MDRlNzQ4ZGFlNDlmNTZmMDVmNjhm
177
- user-agent:
178
- - Recurly Ruby Client v0.4.6
143
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
179
144
  accept:
180
145
  - application/xml
181
146
  accept-encoding:
182
147
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
148
+ user-agent:
149
+ - Ruby
183
150
  connection:
184
151
  - close
185
152
  response: !ruby/struct:VCR::Response
@@ -188,23 +155,23 @@
188
155
  message: "OK "
189
156
  headers:
190
157
  x-runtime:
191
- - "218"
158
+ - "209"
192
159
  content-type:
193
160
  - application/xml; charset=utf-8
194
161
  etag:
195
- - "\"164cb5ad4e6383e6a998dd989abbb985\""
162
+ - "\"5877ae9ad610a0b3b7b2b4c310440d4c\""
196
163
  cache-control:
197
164
  - private, max-age=0, must-revalidate
198
165
  content-length:
199
- - "1689"
166
+ - "4464"
200
167
  server:
201
- - WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18)
168
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
202
169
  date:
203
- - Thu, 21 Apr 2011 18:02:17 GMT
170
+ - Thu, 03 Feb 2011 22:20:46 GMT
204
171
  connection:
205
172
  - close
206
173
  set-cookie:
207
- - _recurly_session=5e5b362dc0de47b88c4af55458a12202; domain=.recurly.local; path=/; HttpOnly
174
+ - _recurly_session=7e9e5159e6949b9b8f3d61470737dd58; domain=.recurly.local; path=/; HttpOnly
208
175
  body: |
209
176
  <?xml version="1.0" encoding="UTF-8"?>
210
177
  <plans type="array">
@@ -212,37 +179,89 @@
212
179
  <plan_code>gold</plan_code>
213
180
  <name>Gold</name>
214
181
  <description></description>
215
- <created_at type="datetime">2011-04-13T20:36:50Z</created_at>
216
- <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
217
- <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
182
+ <created_at type="datetime">2011-02-01T19:28:50Z</created_at>
183
+ <unit_amount_in_cents type="integer">1200</unit_amount_in_cents>
184
+ <setup_fee_in_cents type="integer">2000</setup_fee_in_cents>
218
185
  <plan_interval_length type="integer">1</plan_interval_length>
219
186
  <plan_interval_unit>months</plan_interval_unit>
220
187
  <trial_interval_length type="integer">0</trial_interval_length>
221
188
  <trial_interval_unit>days</trial_interval_unit>
189
+ <latest_version depreciated="true">
190
+ <version type="integer">1</version>
191
+ <unit_amount_in_cents type="integer">1200</unit_amount_in_cents>
192
+ <setup_fee_in_cents type="integer">2000</setup_fee_in_cents>
193
+ <plan_interval_length type="integer">1</plan_interval_length>
194
+ <plan_interval_unit>months</plan_interval_unit>
195
+ <trial_interval_length type="integer">0</trial_interval_length>
196
+ <trial_interval_unit>days</trial_interval_unit>
197
+ <created_at type="datetime">2011-02-01T19:28:50Z</created_at>
198
+ </latest_version>
222
199
  </plan>
223
200
  <plan>
224
201
  <plan_code>paid</plan_code>
225
202
  <name>Paid</name>
226
203
  <description></description>
227
- <created_at type="datetime">2011-04-21T17:57:33Z</created_at>
228
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
204
+ <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
205
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
206
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
207
+ <plan_interval_length type="integer">1</plan_interval_length>
208
+ <plan_interval_unit>months</plan_interval_unit>
209
+ <trial_interval_length type="integer">0</trial_interval_length>
210
+ <trial_interval_unit>months</trial_interval_unit>
211
+ <latest_version depreciated="true">
212
+ <version type="integer">1</version>
213
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
214
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
215
+ <plan_interval_length type="integer">1</plan_interval_length>
216
+ <plan_interval_unit>months</plan_interval_unit>
217
+ <trial_interval_length type="integer">0</trial_interval_length>
218
+ <trial_interval_unit>months</trial_interval_unit>
219
+ <created_at type="datetime">2011-02-02T21:02:59Z</created_at>
220
+ </latest_version>
221
+ </plan>
222
+ <plan>
223
+ <plan_code>test</plan_code>
224
+ <name>Test Plan</name>
225
+ <description></description>
226
+ <created_at type="datetime">2011-02-02T21:10:47Z</created_at>
227
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
229
228
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
230
229
  <plan_interval_length type="integer">1</plan_interval_length>
231
230
  <plan_interval_unit>months</plan_interval_unit>
232
231
  <trial_interval_length type="integer">0</trial_interval_length>
233
232
  <trial_interval_unit>months</trial_interval_unit>
233
+ <latest_version depreciated="true">
234
+ <version type="integer">1</version>
235
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
236
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
237
+ <plan_interval_length type="integer">1</plan_interval_length>
238
+ <plan_interval_unit>months</plan_interval_unit>
239
+ <trial_interval_length type="integer">0</trial_interval_length>
240
+ <trial_interval_unit>months</trial_interval_unit>
241
+ <created_at type="datetime">2011-02-02T21:10:51Z</created_at>
242
+ </latest_version>
234
243
  </plan>
235
244
  <plan>
236
245
  <plan_code>trial</plan_code>
237
246
  <name>Trial</name>
238
247
  <description></description>
239
- <created_at type="datetime">2011-04-21T18:02:14Z</created_at>
240
- <unit_amount_in_cents type="integer">0</unit_amount_in_cents>
248
+ <created_at type="datetime">2011-02-02T21:10:36Z</created_at>
249
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
241
250
  <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
242
251
  <plan_interval_length type="integer">1</plan_interval_length>
243
252
  <plan_interval_unit>months</plan_interval_unit>
244
253
  <trial_interval_length type="integer">1</trial_interval_length>
245
254
  <trial_interval_unit>months</trial_interval_unit>
255
+ <latest_version depreciated="true">
256
+ <version type="integer">1</version>
257
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
258
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
259
+ <plan_interval_length type="integer">1</plan_interval_length>
260
+ <plan_interval_unit>months</plan_interval_unit>
261
+ <trial_interval_length type="integer">1</trial_interval_length>
262
+ <trial_interval_unit>months</trial_interval_unit>
263
+ <created_at type="datetime">2011-02-02T21:10:36Z</created_at>
264
+ </latest_version>
246
265
  </plan>
247
266
  </plans>
248
267