recurly 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (61) hide show
  1. data/lib/recurly.rb +8 -0
  2. data/lib/recurly/account.rb +5 -0
  3. data/lib/recurly/rails3/railtie.rb +9 -0
  4. data/lib/recurly/version.rb +1 -1
  5. data/spec/integration/account_spec.rb +29 -1
  6. data/spec/integration/add_on_spec.rb +84 -0
  7. data/spec/vcr/account/accept-language-account/1294473653.yml +68 -0
  8. data/spec/vcr/account/accept-language-account/1294473761.yml +68 -0
  9. data/spec/vcr/account/accept-language/1294473117.yml +167 -0
  10. data/spec/vcr/account/close/{1288381765.yml → 1294473761.yml} +26 -25
  11. data/spec/vcr/account/create-blank/{1288381765.yml → 1294473761.yml} +5 -4
  12. data/spec/vcr/account/create-duplicate/{1288381765.yml → 1294473761.yml} +13 -11
  13. data/spec/vcr/account/create-min/{1288381765.yml → 1294473761.yml} +12 -11
  14. data/spec/vcr/account/create/{1288381765.yml → 1294473761.yml} +12 -11
  15. data/spec/vcr/account/find/{1288381765.yml → 1294473761.yml} +25 -24
  16. data/spec/vcr/account/list/{1288381765.yml → 1294473761.yml} +328 -287
  17. data/spec/vcr/account/update/{1288381765.yml → 1294473761.yml} +47 -45
  18. data/spec/vcr/billing/create/1286682213.yml +28 -27
  19. data/spec/vcr/billing/destroy/1286682213.yml +42 -41
  20. data/spec/vcr/billing/find/1286682213.yml +38 -37
  21. data/spec/vcr/billing/update/1286682213.yml +40 -39
  22. data/spec/vcr/charge/create/1287465632.yml +36 -35
  23. data/spec/vcr/charge/delete-uninvoiced/1287465632.yml +36 -35
  24. data/spec/vcr/charge/list-all/1287465632.yml +43 -42
  25. data/spec/vcr/charge/list-invoiced/1287465632.yml +70 -69
  26. data/spec/vcr/charge/list-pending/1287465632.yml +43 -42
  27. data/spec/vcr/charge/lookup/1287465632.yml +22 -21
  28. data/spec/vcr/credit/create/1287461400.yml +23 -22
  29. data/spec/vcr/credit/delete/1287461400.yml +33 -32
  30. data/spec/vcr/credit/list/1287461400.yml +43 -42
  31. data/spec/vcr/credit/lookup/1287461400.yml +24 -23
  32. data/spec/vcr/invoice/create-no-charges/1287167121.yml +23 -22
  33. data/spec/vcr/invoice/create/1287167121.yml +48 -47
  34. data/spec/vcr/invoice/list/1287167121.yml +67 -66
  35. data/spec/vcr/invoice/lookup/1287167121.yml +50 -49
  36. data/spec/vcr/plan/all.yml +29 -17
  37. data/spec/vcr/plan/delete/1286677585.yml +21 -21
  38. data/spec/vcr/plan/find.yml +42 -18
  39. data/spec/vcr/plan/update.yml +17 -17
  40. data/spec/vcr/subscription/addons/add/1292420980.yml +479 -0
  41. data/spec/vcr/subscription/addons/create/1292420980.yml +318 -0
  42. data/spec/vcr/subscription/addons/remove/1292420980.yml +448 -0
  43. data/spec/vcr/subscription/cancel-with-code/1287455769.yml +93 -69
  44. data/spec/vcr/subscription/cancel/1287455769.yml +80 -58
  45. data/spec/vcr/subscription/change1/1287455769.yml +77 -55
  46. data/spec/vcr/subscription/change2/1287455769.yml +77 -55
  47. data/spec/vcr/subscription/create/1287455769.yml +43 -27
  48. data/spec/vcr/subscription/find/1287455769.yml +54 -36
  49. data/spec/vcr/subscription/reactivate/1287455769.yml +83 -61
  50. data/spec/vcr/subscription/refund-full/1287455769.yml +69 -51
  51. data/spec/vcr/subscription/refund-none/1287455769.yml +70 -52
  52. data/spec/vcr/subscription/refund-partial/1287455769.yml +70 -52
  53. data/spec/vcr/transaction/all/1289558212.yml +46 -46
  54. data/spec/vcr/transaction/create-no-account/1289558212.yml +11 -11
  55. data/spec/vcr/transaction/create-with-account/1289558212.yml +27 -26
  56. data/spec/vcr/transaction/list-filled/1289558212.yml +54 -53
  57. data/spec/vcr/transaction/list-initial/1289558212.yml +27 -26
  58. data/spec/vcr/transaction/lookup/1289558212.yml +64 -63
  59. data/spec/vcr/transaction/refund/1289558212.yml +35 -34
  60. data/spec/vcr/transaction/void/1289558212.yml +71 -70
  61. metadata +34 -20
@@ -19,21 +19,21 @@
19
19
  x-ua-compatible:
20
20
  - IE=Edge
21
21
  etag:
22
- - "\"31910d9b30fecc5e62f25a1ce00278e0\""
22
+ - "\"47a9e8e85691ef0600a2dd39f113a21e\""
23
23
  connection:
24
24
  - close
25
25
  content-type:
26
26
  - application/xml; charset=utf-8
27
27
  x-runtime:
28
- - "64"
28
+ - "14"
29
29
  date:
30
- - Tue, 16 Nov 2010 07:04:02 GMT
30
+ - Sat, 08 Jan 2011 08:05:14 GMT
31
31
  server:
32
- - nginx/0.7.65
32
+ - nginx/0.8.53
33
33
  content-length:
34
- - "1150"
34
+ - "1564"
35
35
  set-cookie:
36
- - _recurly_session=62167c504dc2fcd4af812c3a956012f3; domain=.recurly.com; path=/; secure; HttpOnly
36
+ - _recurly_session=799cd3c2eabe30517890b347ffecb946; domain=.recurly.com; path=/; secure; HttpOnly
37
37
  cache-control:
38
38
  - private, max-age=0, must-revalidate
39
39
  body: |
@@ -59,8 +59,20 @@
59
59
  <plan_interval_unit>months</plan_interval_unit>
60
60
  <trial_interval_length type="integer">0</trial_interval_length>
61
61
  <trial_interval_unit>months</trial_interval_unit>
62
- <created_at type="datetime">2010-09-19T00:56:05Z</created_at>
62
+ <created_at type="datetime">2010-12-10T19:19:03Z</created_at>
63
63
  </latest_version>
64
+ <add_ons type="collection">
65
+ <add_on>
66
+ <add_on_code>special</add_on_code>
67
+ <default_unit_amount_in_cents>1000</default_unit_amount_in_cents>
68
+ <default_quantity>1</default_quantity>
69
+ </add_on>
70
+ <add_on>
71
+ <add_on_code>special2</add_on_code>
72
+ <default_unit_amount_in_cents>1500</default_unit_amount_in_cents>
73
+ <default_quantity>1</default_quantity>
74
+ </add_on>
75
+ </add_ons>
64
76
  </plan>
65
77
 
66
78
  http_version: "1.1"
@@ -90,15 +102,15 @@
90
102
  content-type:
91
103
  - application/xml; charset=utf-8
92
104
  x-runtime:
93
- - "11"
105
+ - "14"
94
106
  date:
95
- - Tue, 16 Nov 2010 07:04:05 GMT
107
+ - Sat, 08 Jan 2011 08:05:15 GMT
96
108
  server:
97
- - nginx/0.7.65
109
+ - nginx/0.8.53
98
110
  content-length:
99
111
  - "1164"
100
112
  set-cookie:
101
- - _recurly_session=688f55f23266ebec03ea5acba134c708; domain=.recurly.com; path=/; secure; HttpOnly
113
+ - _recurly_session=6bfc355a5577bdb1274bcf14a1d7122f; domain=.recurly.com; path=/; secure; HttpOnly
102
114
  cache-control:
103
115
  - private, max-age=0, must-revalidate
104
116
  body: |
@@ -149,21 +161,21 @@
149
161
  x-ua-compatible:
150
162
  - IE=Edge
151
163
  etag:
152
- - "\"31910d9b30fecc5e62f25a1ce00278e0\""
164
+ - "\"47a9e8e85691ef0600a2dd39f113a21e\""
153
165
  connection:
154
166
  - close
155
167
  content-type:
156
168
  - application/xml; charset=utf-8
157
169
  x-runtime:
158
- - "11"
170
+ - "14"
159
171
  date:
160
- - Tue, 16 Nov 2010 07:04:03 GMT
172
+ - Sat, 08 Jan 2011 08:05:16 GMT
161
173
  server:
162
- - nginx/0.7.65
174
+ - nginx/0.8.53
163
175
  content-length:
164
- - "1150"
176
+ - "1564"
165
177
  set-cookie:
166
- - _recurly_session=f92668271382d0729567ebabbd06ba12; domain=.recurly.com; path=/; secure; HttpOnly
178
+ - _recurly_session=1a16e80d831f8af06365386d2a6ce529; domain=.recurly.com; path=/; secure; HttpOnly
167
179
  cache-control:
168
180
  - private, max-age=0, must-revalidate
169
181
  body: |
@@ -189,8 +201,20 @@
189
201
  <plan_interval_unit>months</plan_interval_unit>
190
202
  <trial_interval_length type="integer">0</trial_interval_length>
191
203
  <trial_interval_unit>months</trial_interval_unit>
192
- <created_at type="datetime">2010-09-19T00:56:05Z</created_at>
204
+ <created_at type="datetime">2010-12-10T19:19:03Z</created_at>
193
205
  </latest_version>
206
+ <add_ons type="collection">
207
+ <add_on>
208
+ <add_on_code>special</add_on_code>
209
+ <default_unit_amount_in_cents>1000</default_unit_amount_in_cents>
210
+ <default_quantity>1</default_quantity>
211
+ </add_on>
212
+ <add_on>
213
+ <add_on_code>special2</add_on_code>
214
+ <default_unit_amount_in_cents>1500</default_unit_amount_in_cents>
215
+ <default_quantity>1</default_quantity>
216
+ </add_on>
217
+ </add_ons>
194
218
  </plan>
195
219
 
196
220
  http_version: "1.1"
@@ -25,15 +25,15 @@
25
25
  content-type:
26
26
  - application/xml; charset=utf-8
27
27
  x-runtime:
28
- - "79"
28
+ - "13"
29
29
  date:
30
- - Tue, 16 Nov 2010 07:04:06 GMT
30
+ - Sat, 08 Jan 2011 08:05:17 GMT
31
31
  server:
32
- - nginx/0.7.65
32
+ - nginx/0.8.53
33
33
  content-length:
34
34
  - "1153"
35
35
  set-cookie:
36
- - _recurly_session=0d0b661b04510ee6f0f1ed4bcb5968b7; domain=.recurly.com; path=/; secure; HttpOnly
36
+ - _recurly_session=d558a6f2ddc2f6a359d105f25baae27c; domain=.recurly.com; path=/; secure; HttpOnly
37
37
  cache-control:
38
38
  - private, max-age=0, must-revalidate
39
39
  body: |
@@ -72,28 +72,28 @@
72
72
  <?xml version="1.0" encoding="UTF-8"?>
73
73
  <plan>
74
74
  <name>Test Plan</name>
75
- <cancel-url type="yaml" nil="true"></cancel-url>
76
75
  <created-at type="datetime">2010-09-19T01:31:33Z</created-at>
76
+ <cancel-url type="yaml" nil="true"></cancel-url>
77
77
  <plan-code>test</plan-code>
78
78
  <latest-version>
79
79
  <created-at type="datetime">2010-09-19T01:36:06Z</created-at>
80
- <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
81
80
  <trial-interval-length type="integer">0</trial-interval-length>
81
+ <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
82
82
  <version type="integer">1</version>
83
83
  <unit-amount-in-cents type="integer">200</unit-amount-in-cents>
84
84
  <depreciated>true</depreciated>
85
- <trial-interval-unit>months</trial-interval-unit>
86
85
  <plan-interval-unit>months</plan-interval-unit>
87
86
  <plan-interval-length type="integer">1</plan-interval-length>
87
+ <trial-interval-unit>months</trial-interval-unit>
88
88
  </latest-version>
89
- <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
90
89
  <trial-interval-length type="integer">0</trial-interval-length>
90
+ <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
91
91
  <unit-amount-in-cents type="integer">200</unit-amount-in-cents>
92
92
  <description type="yaml" nil="true"></description>
93
- <trial-interval-unit>months</trial-interval-unit>
94
93
  <plan-interval-unit>months</plan-interval-unit>
95
94
  <plan-interval-length type="integer">1</plan-interval-length>
96
95
  <success-url type="yaml" nil="true"></success-url>
96
+ <trial-interval-unit>months</trial-interval-unit>
97
97
  </plan>
98
98
 
99
99
  headers:
@@ -117,15 +117,15 @@
117
117
  content-type:
118
118
  - application/xml; charset=utf-8
119
119
  x-runtime:
120
- - "29"
120
+ - "27"
121
121
  date:
122
- - Tue, 16 Nov 2010 07:04:04 GMT
122
+ - Sat, 08 Jan 2011 08:05:17 GMT
123
123
  server:
124
- - nginx/0.7.65
124
+ - nginx/0.8.53
125
125
  content-length:
126
126
  - "1"
127
127
  set-cookie:
128
- - _recurly_session=e1066f2e59c233ddd34af7cc32a5cd0a; domain=.recurly.com; path=/; secure; HttpOnly
128
+ - _recurly_session=2e1c9b38c5f127f8b71d4dcecca3a927; domain=.recurly.com; path=/; secure; HttpOnly
129
129
  cache-control:
130
130
  - no-cache
131
131
  body: " "
@@ -156,15 +156,15 @@
156
156
  content-type:
157
157
  - application/xml; charset=utf-8
158
158
  x-runtime:
159
- - "11"
159
+ - "13"
160
160
  date:
161
- - Tue, 16 Nov 2010 07:04:07 GMT
161
+ - Sat, 08 Jan 2011 08:05:18 GMT
162
162
  server:
163
- - nginx/0.7.65
163
+ - nginx/0.8.53
164
164
  content-length:
165
165
  - "1153"
166
166
  set-cookie:
167
- - _recurly_session=2b02c122123f516d42663f33c2176ff9; domain=.recurly.com; path=/; secure; HttpOnly
167
+ - _recurly_session=e8980bb718eb90e8c2260847ac0bdeca; domain=.recurly.com; path=/; secure; HttpOnly
168
168
  cache-control:
169
169
  - private, max-age=0, must-revalidate
170
170
  body: |
@@ -0,0 +1,479 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
6
+ body: |
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <account>
9
+ <company-name>Recurly Ruby Gem</company-name>
10
+ <account-code>subscription-addons-add-1292420980</account-code>
11
+ <last-name>Test</last-name>
12
+ <accept-language type="yaml" nil="true"></accept-language>
13
+ <email>verena@test.com</email>
14
+ <first-name>Verena</first-name>
15
+ </account>
16
+
17
+ headers:
18
+ accept:
19
+ - "*/*"
20
+ connection:
21
+ - close
22
+ content-type:
23
+ - application/xml
24
+ authorization:
25
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
26
+ response: !ruby/struct:VCR::Response
27
+ status: !ruby/struct:VCR::ResponseStatus
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ location:
32
+ - https://recurlytest3-test.recurly.com/accounts/subscription-addons-add-1292420980
33
+ connection:
34
+ - close
35
+ content-type:
36
+ - application/xml; charset=utf-8
37
+ x-runtime:
38
+ - "347"
39
+ date:
40
+ - Sat, 08 Jan 2011 08:03:33 GMT
41
+ server:
42
+ - nginx/0.8.53
43
+ content-length:
44
+ - "601"
45
+ set-cookie:
46
+ - account_credentials=eb041513b74636973252b8218412176c39d698a43e6da87c94fc2f4fcbcf5baaed81a211a8ad7b8da8a0793c2f08c89c5bfa0a0c12f9a9cccf71f7f36111d42f%3A%3A; domain=.recurly.com; path=/
47
+ - ""
48
+ - _recurly_session=9ef3369a2fcdb063647d7cfcb4118ef1; domain=.recurly.com; path=/; secure; HttpOnly
49
+ cache-control:
50
+ - no-cache
51
+ body: |
52
+ <?xml version="1.0" encoding="UTF-8"?>
53
+ <account>
54
+ <id>subscription-addons-add-1292420980</id>
55
+ <account_code>subscription-addons-add-1292420980</account_code>
56
+ <username></username>
57
+ <email>verena@test.com</email>
58
+ <first_name>Verena</first_name>
59
+ <last_name>Test</last_name>
60
+ <company_name>Recurly Ruby Gem</company_name>
61
+ <balance_in_cents type="integer">0</balance_in_cents>
62
+ <closed type="boolean">false</closed>
63
+ <hosted_login_token>eea1eec49c9a49dfb3899cf55893f539</hosted_login_token>
64
+ <created_at type="datetime">2011-01-08T08:03:33Z</created_at>
65
+ <state>active</state>
66
+ </account>
67
+
68
+ http_version: "1.1"
69
+ - !ruby/struct:VCR::HTTPInteraction
70
+ request: !ruby/struct:VCR::Request
71
+ method: :get
72
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/company/plans/paid.xml
73
+ body:
74
+ headers:
75
+ accept:
76
+ - application/xml
77
+ connection:
78
+ - close
79
+ authorization:
80
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
81
+ response: !ruby/struct:VCR::Response
82
+ status: !ruby/struct:VCR::ResponseStatus
83
+ code: 200
84
+ message: OK
85
+ headers:
86
+ x-ua-compatible:
87
+ - IE=Edge
88
+ etag:
89
+ - "\"47a9e8e85691ef0600a2dd39f113a21e\""
90
+ connection:
91
+ - close
92
+ content-type:
93
+ - application/xml; charset=utf-8
94
+ x-runtime:
95
+ - "14"
96
+ date:
97
+ - Sat, 08 Jan 2011 08:03:34 GMT
98
+ server:
99
+ - nginx/0.8.53
100
+ content-length:
101
+ - "1564"
102
+ set-cookie:
103
+ - _recurly_session=ecf92c8e4290969a84268a407d54f9d6; domain=.recurly.com; path=/; secure; HttpOnly
104
+ cache-control:
105
+ - private, max-age=0, must-revalidate
106
+ body: |
107
+ <?xml version="1.0" encoding="UTF-8"?>
108
+ <plan>
109
+ <plan_code>paid</plan_code>
110
+ <name>Paid</name>
111
+ <description></description>
112
+ <success_url></success_url>
113
+ <cancel_url></cancel_url>
114
+ <created_at type="datetime">2010-09-19T00:56:05Z</created_at>
115
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
116
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
117
+ <plan_interval_length type="integer">1</plan_interval_length>
118
+ <plan_interval_unit>months</plan_interval_unit>
119
+ <trial_interval_length type="integer">0</trial_interval_length>
120
+ <trial_interval_unit>months</trial_interval_unit>
121
+ <latest_version depreciated="true">
122
+ <version type="integer">1</version>
123
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
124
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
125
+ <plan_interval_length type="integer">1</plan_interval_length>
126
+ <plan_interval_unit>months</plan_interval_unit>
127
+ <trial_interval_length type="integer">0</trial_interval_length>
128
+ <trial_interval_unit>months</trial_interval_unit>
129
+ <created_at type="datetime">2010-12-10T19:19:03Z</created_at>
130
+ </latest_version>
131
+ <add_ons type="collection">
132
+ <add_on>
133
+ <add_on_code>special</add_on_code>
134
+ <default_unit_amount_in_cents>1000</default_unit_amount_in_cents>
135
+ <default_quantity>1</default_quantity>
136
+ </add_on>
137
+ <add_on>
138
+ <add_on_code>special2</add_on_code>
139
+ <default_unit_amount_in_cents>1500</default_unit_amount_in_cents>
140
+ <default_quantity>1</default_quantity>
141
+ </add_on>
142
+ </add_ons>
143
+ </plan>
144
+
145
+ http_version: "1.1"
146
+ - !ruby/struct:VCR::HTTPInteraction
147
+ request: !ruby/struct:VCR::Request
148
+ method: :post
149
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/subscription-addons-add-1292420980/subscription.xml
150
+ body: |
151
+ <?xml version="1.0" encoding="UTF-8"?>
152
+ <subscription>
153
+ <quantity type="integer">1</quantity>
154
+ <plan-code>paid</plan-code>
155
+ <add-ons type="array">
156
+ <add-on>
157
+ <unit-amount type="integer">10</unit-amount>
158
+ <quantity type="integer">1</quantity>
159
+ <add-on-code>special</add-on-code>
160
+ </add-on>
161
+ </add-ons>
162
+ <account>
163
+ <created-at type="datetime">2011-01-08T08:03:33Z</created-at>
164
+ <hosted-login-token>eea1eec49c9a49dfb3899cf55893f539</hosted-login-token>
165
+ <company-name>Recurly Ruby Gem</company-name>
166
+ <account-code>subscription-addons-add-1292420980</account-code>
167
+ <closed type="boolean">false</closed>
168
+ <username type="yaml" nil="true"></username>
169
+ <id>subscription-addons-add-1292420980</id>
170
+ <last-name>Test</last-name>
171
+ <accept-language type="yaml" nil="true"></accept-language>
172
+ <billing-info>
173
+ <address1>123 Test St</address1>
174
+ <city>San Francisco</city>
175
+ <zip>94115</zip>
176
+ <country>US</country>
177
+ <credit-card>
178
+ <number>1</number>
179
+ <month type="integer">1</month>
180
+ <year type="integer">2012</year>
181
+ <verification-value>123</verification-value>
182
+ </credit-card>
183
+ <last-name>Test</last-name>
184
+ <first-name>Verena</first-name>
185
+ <state>CA</state>
186
+ </billing-info>
187
+ <balance-in-cents type="integer">0</balance-in-cents>
188
+ <state>active</state>
189
+ <email>verena@test.com</email>
190
+ <first-name>Verena</first-name>
191
+ </account>
192
+ </subscription>
193
+
194
+ headers:
195
+ accept:
196
+ - "*/*"
197
+ connection:
198
+ - close
199
+ content-type:
200
+ - application/xml
201
+ authorization:
202
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
203
+ response: !ruby/struct:VCR::Response
204
+ status: !ruby/struct:VCR::ResponseStatus
205
+ code: 201
206
+ message: Created
207
+ headers:
208
+ connection:
209
+ - close
210
+ content-type:
211
+ - application/xml; charset=utf-8
212
+ x-runtime:
213
+ - "555"
214
+ date:
215
+ - Sat, 08 Jan 2011 08:03:35 GMT
216
+ server:
217
+ - nginx/0.8.53
218
+ content-length:
219
+ - "1099"
220
+ set-cookie:
221
+ - _recurly_session=55b1dcbdfd4a3400f1b10e0dd4eff25f; domain=.recurly.com; path=/; secure; HttpOnly
222
+ cache-control:
223
+ - no-cache
224
+ body: |
225
+ <?xml version="1.0" encoding="UTF-8"?>
226
+ <subscription>
227
+ <id>subscription-addons-add-1292420980</id>
228
+ <account_code>subscription-addons-add-1292420980</account_code>
229
+ <plan>
230
+ <plan_code>paid</plan_code>
231
+ <name>Paid</name>
232
+ </plan>
233
+ <state>active</state>
234
+ <quantity type="integer">1</quantity>
235
+ <total_amount_in_cents type="integer">2000</total_amount_in_cents>
236
+ <activated_at type="datetime">2011-01-08T08:03:35Z</activated_at>
237
+ <canceled_at nil="true" type="datetime"></canceled_at>
238
+ <expires_at nil="true" type="datetime"></expires_at>
239
+ <current_period_started_at type="datetime">2011-01-08T08:03:35Z</current_period_started_at>
240
+ <current_period_ends_at type="datetime">2011-02-08T08:03:35Z</current_period_ends_at>
241
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
242
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
243
+ <add_ons type="array">
244
+ <add_on>
245
+ <add_on_code>special</add_on_code>
246
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
247
+ <quantity type="integer">1</quantity>
248
+ </add_on>
249
+ </add_ons>
250
+ </subscription>
251
+
252
+ http_version: "1.1"
253
+ - !ruby/struct:VCR::HTTPInteraction
254
+ request: !ruby/struct:VCR::Request
255
+ method: :get
256
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/subscription-addons-add-1292420980/subscription.xml
257
+ body:
258
+ headers:
259
+ accept:
260
+ - application/xml
261
+ connection:
262
+ - close
263
+ authorization:
264
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
265
+ response: !ruby/struct:VCR::Response
266
+ status: !ruby/struct:VCR::ResponseStatus
267
+ code: 200
268
+ message: OK
269
+ headers:
270
+ x-ua-compatible:
271
+ - IE=Edge
272
+ etag:
273
+ - "\"84751aceb45a34141fbf7ccd2f936f5d\""
274
+ connection:
275
+ - close
276
+ content-type:
277
+ - application/xml; charset=utf-8
278
+ x-runtime:
279
+ - "25"
280
+ date:
281
+ - Sat, 08 Jan 2011 08:03:36 GMT
282
+ server:
283
+ - nginx/0.8.53
284
+ content-length:
285
+ - "1099"
286
+ set-cookie:
287
+ - _recurly_session=7502db040e070c7ce927260351c64e5c; domain=.recurly.com; path=/; secure; HttpOnly
288
+ cache-control:
289
+ - private, max-age=0, must-revalidate
290
+ body: |
291
+ <?xml version="1.0" encoding="UTF-8"?>
292
+ <subscription>
293
+ <id>subscription-addons-add-1292420980</id>
294
+ <account_code>subscription-addons-add-1292420980</account_code>
295
+ <plan>
296
+ <plan_code>paid</plan_code>
297
+ <name>Paid</name>
298
+ </plan>
299
+ <state>active</state>
300
+ <quantity type="integer">1</quantity>
301
+ <total_amount_in_cents type="integer">2000</total_amount_in_cents>
302
+ <activated_at type="datetime">2011-01-08T08:03:35Z</activated_at>
303
+ <canceled_at nil="true" type="datetime"></canceled_at>
304
+ <expires_at nil="true" type="datetime"></expires_at>
305
+ <current_period_started_at type="datetime">2011-01-08T08:03:35Z</current_period_started_at>
306
+ <current_period_ends_at type="datetime">2011-02-08T08:03:35Z</current_period_ends_at>
307
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
308
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
309
+ <add_ons type="array">
310
+ <add_on>
311
+ <add_on_code>special</add_on_code>
312
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
313
+ <quantity type="integer">1</quantity>
314
+ </add_on>
315
+ </add_ons>
316
+ </subscription>
317
+
318
+ http_version: "1.1"
319
+ - !ruby/struct:VCR::HTTPInteraction
320
+ request: !ruby/struct:VCR::Request
321
+ method: :put
322
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/subscription-addons-add-1292420980/subscription.xml
323
+ body: |
324
+ <?xml version="1.0" encoding="UTF-8"?>
325
+ <subscription>
326
+ <timeframe>now</timeframe>
327
+ <add-ons type="array">
328
+ <add-on>
329
+ <quantity type="integer">1</quantity>
330
+ <unit-amount-in-cents type="integer">1000</unit-amount-in-cents>
331
+ <add-on-code>special</add-on-code>
332
+ </add-on>
333
+ <add-on>
334
+ <unit-amount type="integer">500</unit-amount>
335
+ <quantity type="integer">2</quantity>
336
+ <add-on-code>special2</add-on-code>
337
+ </add-on>
338
+ </add-ons>
339
+ </subscription>
340
+
341
+ headers:
342
+ accept:
343
+ - "*/*"
344
+ connection:
345
+ - close
346
+ content-type:
347
+ - application/xml
348
+ authorization:
349
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
350
+ response: !ruby/struct:VCR::Response
351
+ status: !ruby/struct:VCR::ResponseStatus
352
+ code: 200
353
+ message: OK
354
+ headers:
355
+ x-ua-compatible:
356
+ - IE=Edge
357
+ etag:
358
+ - "\"392d5655c92dadc914a08df18ea083ea\""
359
+ connection:
360
+ - close
361
+ content-type:
362
+ - application/xml; charset=utf-8
363
+ x-runtime:
364
+ - "671"
365
+ date:
366
+ - Sat, 08 Jan 2011 08:03:38 GMT
367
+ server:
368
+ - nginx/0.8.53
369
+ content-length:
370
+ - "1286"
371
+ set-cookie:
372
+ - _recurly_session=50e10b863f146ed411dac71b9fc315aa; domain=.recurly.com; path=/; secure; HttpOnly
373
+ cache-control:
374
+ - private, max-age=0, must-revalidate
375
+ body: |
376
+ <?xml version="1.0" encoding="UTF-8"?>
377
+ <subscription>
378
+ <id>subscription-addons-add-1292420980</id>
379
+ <account_code>subscription-addons-add-1292420980</account_code>
380
+ <plan>
381
+ <plan_code>paid</plan_code>
382
+ <name>Paid</name>
383
+ </plan>
384
+ <state>active</state>
385
+ <quantity type="integer">1</quantity>
386
+ <total_amount_in_cents type="integer">102000</total_amount_in_cents>
387
+ <activated_at type="datetime">2011-01-08T08:03:37Z</activated_at>
388
+ <canceled_at nil="true" type="datetime"></canceled_at>
389
+ <expires_at nil="true" type="datetime"></expires_at>
390
+ <current_period_started_at type="datetime">2011-01-08T08:03:35Z</current_period_started_at>
391
+ <current_period_ends_at type="datetime">2011-02-08T08:03:35Z</current_period_ends_at>
392
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
393
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
394
+ <add_ons type="array">
395
+ <add_on>
396
+ <add_on_code>special</add_on_code>
397
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
398
+ <quantity type="integer">1</quantity>
399
+ </add_on>
400
+ <add_on>
401
+ <add_on_code>special2</add_on_code>
402
+ <unit_amount_in_cents type="integer">50000</unit_amount_in_cents>
403
+ <quantity type="integer">2</quantity>
404
+ </add_on>
405
+ </add_ons>
406
+ </subscription>
407
+
408
+ http_version: "1.1"
409
+ - !ruby/struct:VCR::HTTPInteraction
410
+ request: !ruby/struct:VCR::Request
411
+ method: :get
412
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/subscription-addons-add-1292420980/subscription.xml
413
+ body:
414
+ headers:
415
+ accept:
416
+ - application/xml
417
+ connection:
418
+ - close
419
+ authorization:
420
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
421
+ response: !ruby/struct:VCR::Response
422
+ status: !ruby/struct:VCR::ResponseStatus
423
+ code: 200
424
+ message: OK
425
+ headers:
426
+ x-ua-compatible:
427
+ - IE=Edge
428
+ etag:
429
+ - "\"392d5655c92dadc914a08df18ea083ea\""
430
+ connection:
431
+ - close
432
+ content-type:
433
+ - application/xml; charset=utf-8
434
+ x-runtime:
435
+ - "26"
436
+ date:
437
+ - Sat, 08 Jan 2011 08:03:38 GMT
438
+ server:
439
+ - nginx/0.8.53
440
+ content-length:
441
+ - "1286"
442
+ set-cookie:
443
+ - _recurly_session=f2b8638cde754278bbeb86b552db7b71; domain=.recurly.com; path=/; secure; HttpOnly
444
+ cache-control:
445
+ - private, max-age=0, must-revalidate
446
+ body: |
447
+ <?xml version="1.0" encoding="UTF-8"?>
448
+ <subscription>
449
+ <id>subscription-addons-add-1292420980</id>
450
+ <account_code>subscription-addons-add-1292420980</account_code>
451
+ <plan>
452
+ <plan_code>paid</plan_code>
453
+ <name>Paid</name>
454
+ </plan>
455
+ <state>active</state>
456
+ <quantity type="integer">1</quantity>
457
+ <total_amount_in_cents type="integer">102000</total_amount_in_cents>
458
+ <activated_at type="datetime">2011-01-08T08:03:37Z</activated_at>
459
+ <canceled_at nil="true" type="datetime"></canceled_at>
460
+ <expires_at nil="true" type="datetime"></expires_at>
461
+ <current_period_started_at type="datetime">2011-01-08T08:03:35Z</current_period_started_at>
462
+ <current_period_ends_at type="datetime">2011-02-08T08:03:35Z</current_period_ends_at>
463
+ <trial_started_at nil="true" type="datetime"></trial_started_at>
464
+ <trial_ends_at nil="true" type="datetime"></trial_ends_at>
465
+ <add_ons type="array">
466
+ <add_on>
467
+ <add_on_code>special</add_on_code>
468
+ <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
469
+ <quantity type="integer">1</quantity>
470
+ </add_on>
471
+ <add_on>
472
+ <add_on_code>special2</add_on_code>
473
+ <unit_amount_in_cents type="integer">50000</unit_amount_in_cents>
474
+ <quantity type="integer">2</quantity>
475
+ </add_on>
476
+ </add_ons>
477
+ </subscription>
478
+
479
+ http_version: "1.1"