recurly 0.4.11 → 0.4.13

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 (70) hide show
  1. data/README.md +4 -8
  2. data/lib/recurly.rb +10 -19
  3. data/lib/recurly/config_parser.rb +5 -2
  4. data/lib/recurly/plan.rb +0 -1
  5. data/lib/recurly/rails3/recurly.rake +10 -26
  6. data/lib/recurly/transparent.rb +2 -0
  7. data/lib/recurly/verification.rb +14 -8
  8. data/lib/recurly/version.rb +1 -1
  9. data/spec/config/recurly.yml +3 -3
  10. data/spec/config/test1.yml +1 -3
  11. data/spec/config/test2.yml +2 -6
  12. data/spec/unit/config_spec.rb +9 -16
  13. data/spec/unit/transparent_spec.rb +0 -20
  14. data/spec/unit/verification_spec.rb +15 -9
  15. data/spec/vcr/account/accept-language-account/1313708721.yml +52 -31
  16. data/spec/vcr/account/close/1313708721.yml +107 -79
  17. data/spec/vcr/account/create-blank/1313708721.yml +37 -26
  18. data/spec/vcr/account/create-duplicate/1313708721.yml +83 -54
  19. data/spec/vcr/account/create-min/1313708721.yml +48 -30
  20. data/spec/vcr/account/create/1313708721.yml +52 -31
  21. data/spec/vcr/account/find/1313708721.yml +111 -81
  22. data/spec/vcr/account/list/1313708721.yml +1148 -719
  23. data/spec/vcr/account/update/1313708721.yml +182 -124
  24. data/spec/vcr/billing/create/1313708721.yml +156 -93
  25. data/spec/vcr/billing/destroy/1313708721.yml +198 -135
  26. data/spec/vcr/billing/errors/1313708721.yml +91 -56
  27. data/spec/vcr/billing/find/1313708721.yml +200 -122
  28. data/spec/vcr/billing/update/1313708721.yml +218 -126
  29. data/spec/vcr/charge/create/1313708721.yml +189 -120
  30. data/spec/vcr/charge/delete-uninvoiced/1313708721.yml +195 -154
  31. data/spec/vcr/charge/list-all/1313708721.yml +235 -157
  32. data/spec/vcr/charge/list-invoiced/1313708721.yml +351 -234
  33. data/spec/vcr/charge/list-pending/1313708721.yml +235 -159
  34. data/spec/vcr/charge/lookup/1313708721.yml +127 -87
  35. data/spec/vcr/coupon/create/1296774903.yml +83 -95
  36. data/spec/vcr/coupon/destroy/1296774903.yml +81 -115
  37. data/spec/vcr/credit/create/1313708090.yml +127 -87
  38. data/spec/vcr/credit/delete/1313708090.yml +169 -129
  39. data/spec/vcr/credit/list/1313708090.yml +235 -157
  40. data/spec/vcr/credit/lookup/1313708090.yml +127 -87
  41. data/spec/vcr/invoice/create-no-charges/1296674173.yml +140 -89
  42. data/spec/vcr/invoice/create/1296674173.yml +259 -162
  43. data/spec/vcr/invoice/list/1296674173.yml +342 -227
  44. data/spec/vcr/invoice/lookup/1296674173.yml +260 -167
  45. data/spec/vcr/plan/all.yml +206 -198
  46. data/spec/vcr/plan/find.yml +109 -103
  47. data/spec/vcr/plan/update.yml +126 -93
  48. data/spec/vcr/subscription/addons/add/1296674173.yml +156 -261
  49. data/spec/vcr/subscription/addons/create/1296674173.yml +156 -164
  50. data/spec/vcr/subscription/addons/remove/1296674173.yml +156 -249
  51. data/spec/vcr/subscription/cancel-with-code/1296674173.yml +340 -243
  52. data/spec/vcr/subscription/cancel/1296674173.yml +297 -210
  53. data/spec/vcr/subscription/change1/1296674173.yml +303 -213
  54. data/spec/vcr/subscription/change2/1296674173.yml +303 -214
  55. data/spec/vcr/subscription/create/1296674173.yml +167 -111
  56. data/spec/vcr/subscription/find/1296674173.yml +210 -145
  57. data/spec/vcr/subscription/reactivate/1296674173.yml +318 -233
  58. data/spec/vcr/subscription/refund-full/1296674173.yml +277 -199
  59. data/spec/vcr/subscription/refund-none/1296674173.yml +277 -199
  60. data/spec/vcr/subscription/refund-partial/1296674173.yml +277 -199
  61. data/spec/vcr/transaction/all/1311126815.yml +388 -206
  62. data/spec/vcr/transaction/create-no-account/1311126815.yml +74 -43
  63. data/spec/vcr/transaction/create-with-account/1311126815.yml +172 -101
  64. data/spec/vcr/transaction/list-filled/1311126815.yml +486 -291
  65. data/spec/vcr/transaction/list-initial/1311126815.yml +159 -98
  66. data/spec/vcr/transaction/lookup/1311126815.yml +420 -268
  67. data/spec/vcr/transaction/void/1311126815.yml +280 -174
  68. metadata +109 -77
  69. data/spec/vcr/transaction/refund/1311126815.yml +0 -163
  70. data/spec/vcr/transparent/post-url/1311239470.yml +0 -76
@@ -1,119 +1,152 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/site/plans/test.xml
6
- body: !!null
7
- headers:
8
- user-agent:
9
- - Recurly Ruby Client v0.4.10
10
- accept:
5
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/plans/test.xml
6
+ body:
7
+ headers:
8
+ user-agent:
9
+ - Recurly Ruby Client v0.4.13
10
+ accept:
11
11
  - application/xml
12
- accept-encoding:
12
+ accept-encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- response: !ruby/struct:VCR::Response
15
- status: !ruby/struct:VCR::ResponseStatus
14
+ response: !ruby/struct:VCR::Response
15
+ status: !ruby/struct:VCR::ResponseStatus
16
16
  code: 200
17
17
  message: OK
18
- headers:
19
- content-type:
18
+ headers:
19
+ content-type:
20
20
  - application/xml; charset=utf-8
21
- etag:
22
- - ! '"dafe33cb9edb7dee5277e875786e0443"'
23
- cache-control:
21
+ etag:
22
+ - "\"b648e205155e2d8f9ecb4a37fa0d8b9c\""
23
+ cache-control:
24
24
  - max-age=0, private, must-revalidate
25
- x-ua-compatible:
25
+ x-ua-compatible:
26
26
  - IE=Edge
27
- set-cookie:
28
- - _recurly_session=c378d616f949f7be2b07ba1d133a20a0; domain=.lvh.me; path=/;
29
- HttpOnly
30
- server:
27
+ server:
31
28
  - thin 1.2.11 codename Bat-Shit Crazy
32
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan_code>test</plan_code>\n
33
- \ <name>Test Plan</name>\n <description></description>\n <success_url></success_url>\n
34
- \ <cancel_url></cancel_url>\n <created_at type=\"datetime\">2011-08-17T23:23:17Z</created_at>\n
35
- \ <unit_amount_in_cents type=\"integer\">200</unit_amount_in_cents>\n <setup_fee_in_cents
36
- type=\"integer\">0</setup_fee_in_cents>\n <plan_interval_length type=\"integer\">1</plan_interval_length>\n
37
- \ <plan_interval_unit>months</plan_interval_unit>\n <trial_interval_length
38
- type=\"integer\">0</trial_interval_length>\n <trial_interval_unit>months</trial_interval_unit>\n</plan>\n"
39
- http_version: '1.1'
40
- - !ruby/struct:VCR::HTTPInteraction
41
- request: !ruby/struct:VCR::Request
29
+ body: |
30
+ <?xml version="1.0" encoding="UTF-8"?>
31
+ <plan>
32
+ <plan_code>test</plan_code>
33
+ <name>Test Plan</name>
34
+ <description></description>
35
+ <success_url></success_url>
36
+ <cancel_url></cancel_url>
37
+ <created_at type="datetime">2011-09-22T21:58:24Z</created_at>
38
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
39
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
40
+ <plan_interval_length type="integer">1</plan_interval_length>
41
+ <plan_interval_unit>months</plan_interval_unit>
42
+ <trial_interval_length type="integer">0</trial_interval_length>
43
+ <trial_interval_unit>months</trial_interval_unit>
44
+ </plan>
45
+
46
+ http_version: "1.1"
47
+ - !ruby/struct:VCR::HTTPInteraction
48
+ request: !ruby/struct:VCR::Request
42
49
  method: :put
43
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/site/plans/test.xml
44
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan-code>test</plan-code>\n
45
- \ <name>Test Plan</name>\n <description nil=\"true\"></description>\n <success-url
46
- nil=\"true\"></success-url>\n <cancel-url nil=\"true\"></cancel-url>\n <created-at
47
- type=\"datetime\">2011-08-17T23:23:17Z</created-at>\n <unit-amount-in-cents
48
- type=\"integer\">200</unit-amount-in-cents>\n <setup-fee-in-cents type=\"integer\">0</setup-fee-in-cents>\n
49
- \ <plan-interval-length type=\"integer\">1</plan-interval-length>\n <plan-interval-unit>months</plan-interval-unit>\n
50
- \ <trial-interval-length type=\"integer\">0</trial-interval-length>\n <trial-interval-unit>months</trial-interval-unit>\n</plan>\n"
51
- headers:
52
- user-agent:
53
- - Recurly Ruby Client v0.4.10
54
- content-type:
50
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/plans/test.xml
51
+ body: |
52
+ <?xml version="1.0" encoding="UTF-8"?>
53
+ <plan>
54
+ <plan-code>test</plan-code>
55
+ <name>Test Plan</name>
56
+ <description nil="true"></description>
57
+ <success-url nil="true"></success-url>
58
+ <cancel-url nil="true"></cancel-url>
59
+ <created-at type="datetime">2011-09-22T21:58:24Z</created-at>
60
+ <unit-amount-in-cents type="integer">200</unit-amount-in-cents>
61
+ <setup-fee-in-cents type="integer">0</setup-fee-in-cents>
62
+ <plan-interval-length type="integer">1</plan-interval-length>
63
+ <plan-interval-unit>months</plan-interval-unit>
64
+ <trial-interval-length type="integer">0</trial-interval-length>
65
+ <trial-interval-unit>months</trial-interval-unit>
66
+ </plan>
67
+
68
+ headers:
69
+ user-agent:
70
+ - Recurly Ruby Client v0.4.13
71
+ content-type:
55
72
  - application/xml
56
- response: !ruby/struct:VCR::Response
57
- status: !ruby/struct:VCR::ResponseStatus
73
+ response: !ruby/struct:VCR::Response
74
+ status: !ruby/struct:VCR::ResponseStatus
58
75
  code: 200
59
76
  message: OK
60
- headers:
61
- content-type:
77
+ headers:
78
+ content-type:
62
79
  - application/xml; charset=utf-8
63
- etag:
64
- - ! '"dafe33cb9edb7dee5277e875786e0443"'
65
- cache-control:
80
+ etag:
81
+ - "\"b648e205155e2d8f9ecb4a37fa0d8b9c\""
82
+ cache-control:
66
83
  - max-age=0, private, must-revalidate
67
- x-ua-compatible:
84
+ x-ua-compatible:
68
85
  - IE=Edge
69
- set-cookie:
70
- - _recurly_session=9831a42716f42fc603e1b5aff75ffd2b; domain=.lvh.me; path=/;
71
- HttpOnly
72
- server:
86
+ set-cookie:
87
+ - _recurly_session=32783c12e0e06cb9470d4ae50029304b; domain=.lvh.me; path=/; HttpOnly
88
+ server:
73
89
  - thin 1.2.11 codename Bat-Shit Crazy
74
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan_code>test</plan_code>\n
75
- \ <name>Test Plan</name>\n <description></description>\n <success_url></success_url>\n
76
- \ <cancel_url></cancel_url>\n <created_at type=\"datetime\">2011-08-17T23:23:17Z</created_at>\n
77
- \ <unit_amount_in_cents type=\"integer\">200</unit_amount_in_cents>\n <setup_fee_in_cents
78
- type=\"integer\">0</setup_fee_in_cents>\n <plan_interval_length type=\"integer\">1</plan_interval_length>\n
79
- \ <plan_interval_unit>months</plan_interval_unit>\n <trial_interval_length
80
- type=\"integer\">0</trial_interval_length>\n <trial_interval_unit>months</trial_interval_unit>\n</plan>\n"
81
- http_version: '1.1'
82
- - !ruby/struct:VCR::HTTPInteraction
83
- request: !ruby/struct:VCR::Request
90
+ body: |
91
+ <?xml version="1.0" encoding="UTF-8"?>
92
+ <plan>
93
+ <plan_code>test</plan_code>
94
+ <name>Test Plan</name>
95
+ <description></description>
96
+ <success_url></success_url>
97
+ <cancel_url></cancel_url>
98
+ <created_at type="datetime">2011-09-22T21:58:24Z</created_at>
99
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
100
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
101
+ <plan_interval_length type="integer">1</plan_interval_length>
102
+ <plan_interval_unit>months</plan_interval_unit>
103
+ <trial_interval_length type="integer">0</trial_interval_length>
104
+ <trial_interval_unit>months</trial_interval_unit>
105
+ </plan>
106
+
107
+ http_version: "1.1"
108
+ - !ruby/struct:VCR::HTTPInteraction
109
+ request: !ruby/struct:VCR::Request
84
110
  method: :get
85
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/site/plans/test.xml
86
- body: !!null
87
- headers:
88
- user-agent:
89
- - Recurly Ruby Client v0.4.10
90
- accept:
111
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/plans/test.xml
112
+ body:
113
+ headers:
114
+ user-agent:
115
+ - Recurly Ruby Client v0.4.13
116
+ accept:
91
117
  - application/xml
92
- accept-encoding:
118
+ accept-encoding:
93
119
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
94
- response: !ruby/struct:VCR::Response
95
- status: !ruby/struct:VCR::ResponseStatus
120
+ response: !ruby/struct:VCR::Response
121
+ status: !ruby/struct:VCR::ResponseStatus
96
122
  code: 200
97
123
  message: OK
98
- headers:
99
- content-type:
124
+ headers:
125
+ content-type:
100
126
  - application/xml; charset=utf-8
101
- etag:
102
- - ! '"dafe33cb9edb7dee5277e875786e0443"'
103
- cache-control:
127
+ etag:
128
+ - "\"b648e205155e2d8f9ecb4a37fa0d8b9c\""
129
+ cache-control:
104
130
  - max-age=0, private, must-revalidate
105
- x-ua-compatible:
131
+ x-ua-compatible:
106
132
  - IE=Edge
107
- set-cookie:
108
- - _recurly_session=cfdac8f12dcc825c9ace442dab9d77e9; domain=.lvh.me; path=/;
109
- HttpOnly
110
- server:
133
+ server:
111
134
  - thin 1.2.11 codename Bat-Shit Crazy
112
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan_code>test</plan_code>\n
113
- \ <name>Test Plan</name>\n <description></description>\n <success_url></success_url>\n
114
- \ <cancel_url></cancel_url>\n <created_at type=\"datetime\">2011-08-17T23:23:17Z</created_at>\n
115
- \ <unit_amount_in_cents type=\"integer\">200</unit_amount_in_cents>\n <setup_fee_in_cents
116
- type=\"integer\">0</setup_fee_in_cents>\n <plan_interval_length type=\"integer\">1</plan_interval_length>\n
117
- \ <plan_interval_unit>months</plan_interval_unit>\n <trial_interval_length
118
- type=\"integer\">0</trial_interval_length>\n <trial_interval_unit>months</trial_interval_unit>\n</plan>\n"
119
- http_version: '1.1'
135
+ body: |
136
+ <?xml version="1.0" encoding="UTF-8"?>
137
+ <plan>
138
+ <plan_code>test</plan_code>
139
+ <name>Test Plan</name>
140
+ <description></description>
141
+ <success_url></success_url>
142
+ <cancel_url></cancel_url>
143
+ <created_at type="datetime">2011-09-22T21:58:24Z</created_at>
144
+ <unit_amount_in_cents type="integer">200</unit_amount_in_cents>
145
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
146
+ <plan_interval_length type="integer">1</plan_interval_length>
147
+ <plan_interval_unit>months</plan_interval_unit>
148
+ <trial_interval_length type="integer">0</trial_interval_length>
149
+ <trial_interval_unit>months</trial_interval_unit>
150
+ </plan>
151
+
152
+ http_version: "1.1"
@@ -1,282 +1,177 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts.xml
6
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <account-code>subscription-addons-add-1296674173</account-code>\n
7
- \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
8
- \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <credit-card>\n
9
- \ </credit-card>\n </billing-info>\n <accept-language nil=\"true\"></accept-language>\n</account>\n"
10
- headers:
11
- user-agent:
12
- - Recurly Ruby Client v0.4.10
13
- content-type:
5
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
+ body: |
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <account>
9
+ <account-code>subscription-addons-add-1296674173</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 nil="true"></accept-language>
19
+ </account>
20
+
21
+ headers:
22
+ user-agent:
23
+ - Recurly Ruby Client v0.4.13
24
+ content-type:
14
25
  - application/xml
15
- response: !ruby/struct:VCR::Response
16
- status: !ruby/struct:VCR::ResponseStatus
26
+ response: !ruby/struct:VCR::Response
27
+ status: !ruby/struct:VCR::ResponseStatus
17
28
  code: 201
18
29
  message: Created
19
- headers:
20
- location:
21
- - http://app.lvh.me:3000/accounts/subscription-addons-add-1296674173
22
- content-type:
30
+ headers:
31
+ location:
32
+ - http://api.lvh.me:3000/accounts/subscription-addons-add-1296674173
33
+ content-type:
23
34
  - application/xml; charset=utf-8
24
- cache-control:
35
+ cache-control:
25
36
  - no-cache
26
- x-ua-compatible:
37
+ x-ua-compatible:
27
38
  - IE=Edge
28
- set-cookie:
29
- - _recurly_session=d9f84a54c8d6ee3061bb3168354bc8d6; domain=.lvh.me; path=/;
30
- HttpOnly
31
- server:
39
+ set-cookie:
40
+ - _recurly_session=bee1827688f46ea797d3b6bde1a5eab0; domain=.lvh.me; path=/; HttpOnly
41
+ server:
32
42
  - thin 1.2.11 codename Bat-Shit Crazy
33
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <id>subscription-addons-add-1296674173</id>\n
34
- \ <account_code>subscription-addons-add-1296674173</account_code>\n <username></username>\n
35
- \ <email>verena@test.com</email>\n <first_name>Verena</first_name>\n <last_name>Test</last_name>\n
36
- \ <company_name>Recurly Ruby Gem</company_name>\n <balance_in_cents type=\"integer\">0</balance_in_cents>\n
37
- \ <closed type=\"boolean\">false</closed>\n <hosted_login_token>f46a4ce05f414b52a8ca3ef719f944e1</hosted_login_token>\n
38
- \ <created_at type=\"datetime\">2011-08-19T20:01:12Z</created_at>\n <state>active</state>\n</account>\n"
39
- http_version: '1.1'
40
- - !ruby/struct:VCR::HTTPInteraction
41
- request: !ruby/struct:VCR::Request
43
+ body: |
44
+ <?xml version="1.0" encoding="UTF-8"?>
45
+ <account>
46
+ <id>subscription-addons-add-1296674173</id>
47
+ <account_code>subscription-addons-add-1296674173</account_code>
48
+ <username></username>
49
+ <email>verena@test.com</email>
50
+ <first_name>Verena</first_name>
51
+ <last_name>Test</last_name>
52
+ <company_name>Recurly Ruby Gem</company_name>
53
+ <balance_in_cents type="integer">0</balance_in_cents>
54
+ <closed type="boolean">false</closed>
55
+ <hosted_login_token>0812174f8ab04592b0044df5dc3f6e57</hosted_login_token>
56
+ <created_at type="datetime">2011-09-22T22:01:37Z</created_at>
57
+ <state>active</state>
58
+ </account>
59
+
60
+ http_version: "1.1"
61
+ - !ruby/struct:VCR::HTTPInteraction
62
+ request: !ruby/struct:VCR::Request
42
63
  method: :get
43
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/site/plans/paid.xml
44
- body: !!null
45
- headers:
46
- user-agent:
47
- - Recurly Ruby Client v0.4.10
48
- accept:
64
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/plans/paid.xml
65
+ body:
66
+ headers:
67
+ user-agent:
68
+ - Recurly Ruby Client v0.4.13
69
+ accept:
49
70
  - application/xml
50
- accept-encoding:
71
+ accept-encoding:
51
72
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
52
- response: !ruby/struct:VCR::Response
53
- status: !ruby/struct:VCR::ResponseStatus
73
+ response: !ruby/struct:VCR::Response
74
+ status: !ruby/struct:VCR::ResponseStatus
54
75
  code: 200
55
76
  message: OK
56
- headers:
57
- content-type:
77
+ headers:
78
+ content-type:
58
79
  - application/xml; charset=utf-8
59
- etag:
60
- - ! '"30df1bac5befaf2f9fc4564c2103a07b"'
61
- cache-control:
80
+ etag:
81
+ - "\"7487d065869e9c487e0a588e1edea5dc\""
82
+ cache-control:
62
83
  - max-age=0, private, must-revalidate
63
- x-ua-compatible:
84
+ x-ua-compatible:
64
85
  - IE=Edge
65
- set-cookie:
66
- - _recurly_session=7e0175dc40f985349c570c46343e6559; domain=.lvh.me; path=/;
67
- HttpOnly
68
- server:
86
+ server:
69
87
  - thin 1.2.11 codename Bat-Shit Crazy
70
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plan>\n <plan_code>paid</plan_code>\n
71
- \ <name>Paid Plan</name>\n <description></description>\n <success_url></success_url>\n
72
- \ <cancel_url></cancel_url>\n <created_at type=\"datetime\">2011-08-02T14:08:28Z</created_at>\n
73
- \ <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n <setup_fee_in_cents
74
- type=\"integer\">0</setup_fee_in_cents>\n <plan_interval_length type=\"integer\">1</plan_interval_length>\n
75
- \ <plan_interval_unit>months</plan_interval_unit>\n <trial_interval_length
76
- type=\"integer\">0</trial_interval_length>\n <trial_interval_unit>days</trial_interval_unit>\n
77
- \ <add_ons type=\"array\">\n <add_on>\n <add_on_code>special</add_on_code>\n
78
- \ <default_quantity type=\"integer\">1</default_quantity>\n <default_unit_amount_in_cents
79
- type=\"integer\">400</default_unit_amount_in_cents>\n </add_on>\n <add_on>\n
80
- \ <add_on_code>special2</add_on_code>\n <default_quantity type=\"integer\">1</default_quantity>\n
81
- \ <default_unit_amount_in_cents type=\"integer\">1600</default_unit_amount_in_cents>\n
82
- \ </add_on>\n </add_ons>\n</plan>\n"
83
- http_version: '1.1'
84
- - !ruby/struct:VCR::HTTPInteraction
85
- request: !ruby/struct:VCR::Request
88
+ body: |
89
+ <?xml version="1.0" encoding="UTF-8"?>
90
+ <plan>
91
+ <plan_code>paid</plan_code>
92
+ <name>paid</name>
93
+ <description></description>
94
+ <success_url></success_url>
95
+ <cancel_url></cancel_url>
96
+ <created_at type="datetime">2011-09-22T21:54:04Z</created_at>
97
+ <unit_amount_in_cents type="integer">1400</unit_amount_in_cents>
98
+ <setup_fee_in_cents type="integer">0</setup_fee_in_cents>
99
+ <plan_interval_length type="integer">1</plan_interval_length>
100
+ <plan_interval_unit>months</plan_interval_unit>
101
+ <trial_interval_length type="integer">0</trial_interval_length>
102
+ <trial_interval_unit>days</trial_interval_unit>
103
+ </plan>
104
+
105
+ http_version: "1.1"
106
+ - !ruby/struct:VCR::HTTPInteraction
107
+ request: !ruby/struct:VCR::Request
86
108
  method: :post
87
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-addons-add-1296674173/subscription.xml
88
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <plan-code>paid</plan-code>\n
89
- \ <quantity type=\"integer\">1</quantity>\n <account>\n <account-code>subscription-addons-add-1296674173</account-code>\n
90
- \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
91
- \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <first-name>Verena</first-name>\n
92
- \ <last-name>Test</last-name>\n <address1>123 Test St</address1>\n
93
- \ <city>San Francisco</city>\n <state>CA</state>\n <zip>94115</zip>\n
94
- \ <country>US</country>\n <credit-card>\n <number>4111111111111111</number>\n
95
- \ <year type=\"integer\">2012</year>\n <month type=\"integer\">8</month>\n
96
- \ <verification-value>123</verification-value>\n </credit-card>\n
97
- \ </billing-info>\n <accept-language nil=\"true\"></accept-language>\n
98
- \ <id>subscription-addons-add-1296674173</id>\n <username nil=\"true\"></username>\n
99
- \ <balance-in-cents type=\"integer\">0</balance-in-cents>\n <closed type=\"boolean\">false</closed>\n
100
- \ <hosted-login-token>f46a4ce05f414b52a8ca3ef719f944e1</hosted-login-token>\n
101
- \ <created-at type=\"datetime\">2011-08-19T20:01:12Z</created-at>\n <state>active</state>\n
102
- \ </account>\n <add-ons type=\"array\">\n <add-on>\n <add-on-code>special</add-on-code>\n
103
- \ <quantity type=\"integer\">1</quantity>\n <unit-amount type=\"integer\">10</unit-amount>\n
104
- \ </add-on>\n </add-ons>\n <addons type=\"array\"/>\n</subscription>\n"
105
- headers:
106
- user-agent:
107
- - Recurly Ruby Client v0.4.10
108
- content-type:
109
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/subscription-addons-add-1296674173/subscription.xml
110
+ body: |
111
+ <?xml version="1.0" encoding="UTF-8"?>
112
+ <subscription>
113
+ <plan-code>paid</plan-code>
114
+ <quantity type="integer">1</quantity>
115
+ <account>
116
+ <account-code>subscription-addons-add-1296674173</account-code>
117
+ <first-name>Verena</first-name>
118
+ <last-name>Test</last-name>
119
+ <email>verena@test.com</email>
120
+ <company-name>Recurly Ruby Gem</company-name>
121
+ <billing-info>
122
+ <first-name>Verena</first-name>
123
+ <last-name>Test</last-name>
124
+ <address1>123 Test St</address1>
125
+ <city>San Francisco</city>
126
+ <state>CA</state>
127
+ <zip>94115</zip>
128
+ <country>US</country>
129
+ <credit-card>
130
+ <number>4111111111111111</number>
131
+ <year type="integer">2012</year>
132
+ <month type="integer">9</month>
133
+ <verification-value>123</verification-value>
134
+ </credit-card>
135
+ </billing-info>
136
+ <accept-language nil="true"></accept-language>
137
+ <id>subscription-addons-add-1296674173</id>
138
+ <username nil="true"></username>
139
+ <balance-in-cents type="integer">0</balance-in-cents>
140
+ <closed type="boolean">false</closed>
141
+ <hosted-login-token>0812174f8ab04592b0044df5dc3f6e57</hosted-login-token>
142
+ <created-at type="datetime">2011-09-22T22:01:37Z</created-at>
143
+ <state>active</state>
144
+ </account>
145
+ <add-ons type="array">
146
+ <add-on>
147
+ <add-on-code>special</add-on-code>
148
+ <quantity type="integer">1</quantity>
149
+ <unit-amount type="integer">10</unit-amount>
150
+ </add-on>
151
+ </add-ons>
152
+ <addons type="array"/>
153
+ </subscription>
154
+
155
+ headers:
156
+ user-agent:
157
+ - Recurly Ruby Client v0.4.13
158
+ content-type:
109
159
  - application/xml
110
- response: !ruby/struct:VCR::Response
111
- status: !ruby/struct:VCR::ResponseStatus
112
- code: 201
113
- message: Created
114
- headers:
115
- content-type:
116
- - application/xml; charset=utf-8
117
- cache-control:
118
- - no-cache
119
- x-ua-compatible:
120
- - IE=Edge
121
- set-cookie:
122
- - _recurly_session=ec2ccc549ee046acbdf78bf70b673759; domain=.lvh.me; path=/;
123
- HttpOnly
124
- server:
125
- - thin 1.2.11 codename Bat-Shit Crazy
126
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-addons-add-1296674173</id>\n
127
- \ <account_code>subscription-addons-add-1296674173</account_code>\n <plan>\n
128
- \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
129
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
130
- \ <total_amount_in_cents type=\"integer\">2200</total_amount_in_cents>\n <activated_at
131
- type=\"datetime\">2011-08-19T20:01:12Z</activated_at>\n <canceled_at nil=\"true\"
132
- type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
133
- \ <current_period_started_at type=\"datetime\">2011-08-19T20:01:12Z</current_period_started_at>\n
134
- \ <current_period_ends_at type=\"datetime\">2011-09-19T20:01:12Z</current_period_ends_at>\n
135
- \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
136
- nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
137
- \ <add_on>\n <add_on_code>special</add_on_code>\n <unit_amount_in_cents
138
- type=\"integer\">1000</unit_amount_in_cents>\n <quantity type=\"integer\">1</quantity>\n
139
- \ </add_on>\n </add_ons>\n</subscription>\n"
140
- http_version: '1.1'
141
- - !ruby/struct:VCR::HTTPInteraction
142
- request: !ruby/struct:VCR::Request
143
- method: :get
144
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-addons-add-1296674173/subscription.xml
145
- body: !!null
146
- headers:
147
- user-agent:
148
- - Recurly Ruby Client v0.4.10
149
- accept:
150
- - application/xml
151
- accept-encoding:
152
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
153
- response: !ruby/struct:VCR::Response
154
- status: !ruby/struct:VCR::ResponseStatus
155
- code: 200
156
- message: OK
157
- headers:
158
- content-type:
159
- - application/xml; charset=utf-8
160
- etag:
161
- - ! '"1820e21ab58012dbf9bbaea267a8ebe8"'
162
- cache-control:
163
- - max-age=0, private, must-revalidate
164
- x-ua-compatible:
165
- - IE=Edge
166
- set-cookie:
167
- - _recurly_session=0b0290cea50f198e119afa41ac25a63d; domain=.lvh.me; path=/;
168
- HttpOnly
169
- server:
170
- - thin 1.2.11 codename Bat-Shit Crazy
171
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-addons-add-1296674173</id>\n
172
- \ <account_code>subscription-addons-add-1296674173</account_code>\n <plan>\n
173
- \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
174
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
175
- \ <total_amount_in_cents type=\"integer\">2200</total_amount_in_cents>\n <activated_at
176
- type=\"datetime\">2011-08-19T20:01:12Z</activated_at>\n <canceled_at nil=\"true\"
177
- type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
178
- \ <current_period_started_at type=\"datetime\">2011-08-19T20:01:12Z</current_period_started_at>\n
179
- \ <current_period_ends_at type=\"datetime\">2011-09-19T20:01:12Z</current_period_ends_at>\n
180
- \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
181
- nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
182
- \ <add_on>\n <add_on_code>special</add_on_code>\n <unit_amount_in_cents
183
- type=\"integer\">1000</unit_amount_in_cents>\n <quantity type=\"integer\">1</quantity>\n
184
- \ </add_on>\n </add_ons>\n</subscription>\n"
185
- http_version: '1.1'
186
- - !ruby/struct:VCR::HTTPInteraction
187
- request: !ruby/struct:VCR::Request
188
- method: :put
189
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-addons-add-1296674173/subscription.xml
190
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <add-ons
191
- type=\"array\">\n <add-on>\n <add-on-code>special</add-on-code>\n <unit-amount-in-cents
192
- type=\"integer\">1000</unit-amount-in-cents>\n <quantity type=\"integer\">1</quantity>\n
193
- \ </add-on>\n <add-on>\n <add-on-code>special2</add-on-code>\n <quantity
194
- type=\"integer\">2</quantity>\n <unit-amount type=\"integer\">500</unit-amount>\n
195
- \ </add-on>\n </add-ons>\n <timeframe>now</timeframe>\n</subscription>\n"
196
- headers:
197
- user-agent:
198
- - Recurly Ruby Client v0.4.10
199
- content-type:
160
+ response: !ruby/struct:VCR::Response
161
+ status: !ruby/struct:VCR::ResponseStatus
162
+ code: 422
163
+ message:
164
+ headers:
165
+ content-type:
200
166
  - application/xml
201
- response: !ruby/struct:VCR::Response
202
- status: !ruby/struct:VCR::ResponseStatus
203
- code: 200
204
- message: OK
205
- headers:
206
- content-type:
207
- - application/xml; charset=utf-8
208
- etag:
209
- - ! '"ab59602b1900425750afeaf047cd82d3"'
210
- cache-control:
211
- - max-age=0, private, must-revalidate
212
- x-ua-compatible:
213
- - IE=Edge
214
- set-cookie:
215
- - _recurly_session=248a811ff0c68f317455eb3d5e20b736; domain=.lvh.me; path=/;
216
- HttpOnly
217
- server:
218
- - thin 1.2.11 codename Bat-Shit Crazy
219
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-addons-add-1296674173</id>\n
220
- \ <account_code>subscription-addons-add-1296674173</account_code>\n <plan>\n
221
- \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
222
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
223
- \ <total_amount_in_cents type=\"integer\">102200</total_amount_in_cents>\n <activated_at
224
- type=\"datetime\">2011-08-19T20:01:12Z</activated_at>\n <canceled_at nil=\"true\"
225
- type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
226
- \ <current_period_started_at type=\"datetime\">2011-08-19T20:01:12Z</current_period_started_at>\n
227
- \ <current_period_ends_at type=\"datetime\">2011-09-19T20:01:12Z</current_period_ends_at>\n
228
- \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
229
- nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
230
- \ <add_on>\n <add_on_code>special</add_on_code>\n <unit_amount_in_cents
231
- type=\"integer\">1000</unit_amount_in_cents>\n <quantity type=\"integer\">1</quantity>\n
232
- \ </add_on>\n <add_on>\n <add_on_code>special2</add_on_code>\n <unit_amount_in_cents
233
- type=\"integer\">50000</unit_amount_in_cents>\n <quantity type=\"integer\">2</quantity>\n
234
- \ </add_on>\n </add_ons>\n</subscription>\n"
235
- http_version: '1.1'
236
- - !ruby/struct:VCR::HTTPInteraction
237
- request: !ruby/struct:VCR::Request
238
- method: :get
239
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/subscription-addons-add-1296674173/subscription.xml
240
- body: !!null
241
- headers:
242
- user-agent:
243
- - Recurly Ruby Client v0.4.10
244
- accept:
245
- - application/xml
246
- accept-encoding:
247
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
248
- response: !ruby/struct:VCR::Response
249
- status: !ruby/struct:VCR::ResponseStatus
250
- code: 200
251
- message: OK
252
- headers:
253
- content-type:
254
- - application/xml; charset=utf-8
255
- etag:
256
- - ! '"ab59602b1900425750afeaf047cd82d3"'
257
- cache-control:
258
- - max-age=0, private, must-revalidate
259
- x-ua-compatible:
260
- - IE=Edge
261
- set-cookie:
262
- - _recurly_session=edf34ce4ad40a5dd4c6c9b628d399dd0; domain=.lvh.me; path=/;
263
- HttpOnly
264
- server:
167
+ content-length:
168
+ - "94"
169
+ server:
265
170
  - thin 1.2.11 codename Bat-Shit Crazy
266
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription>\n <id>subscription-addons-add-1296674173</id>\n
267
- \ <account_code>subscription-addons-add-1296674173</account_code>\n <plan>\n
268
- \ <plan_code>paid</plan_code>\n <name>Paid Plan</name>\n </plan>\n <state>active</state>\n
269
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1200</unit_amount_in_cents>\n
270
- \ <total_amount_in_cents type=\"integer\">102200</total_amount_in_cents>\n <activated_at
271
- type=\"datetime\">2011-08-19T20:01:12Z</activated_at>\n <canceled_at nil=\"true\"
272
- type=\"datetime\"></canceled_at>\n <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n
273
- \ <current_period_started_at type=\"datetime\">2011-08-19T20:01:12Z</current_period_started_at>\n
274
- \ <current_period_ends_at type=\"datetime\">2011-09-19T20:01:12Z</current_period_ends_at>\n
275
- \ <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n <trial_ends_at
276
- nil=\"true\" type=\"datetime\"></trial_ends_at>\n <add_ons type=\"array\">\n
277
- \ <add_on>\n <add_on_code>special</add_on_code>\n <unit_amount_in_cents
278
- type=\"integer\">1000</unit_amount_in_cents>\n <quantity type=\"integer\">1</quantity>\n
279
- \ </add_on>\n <add_on>\n <add_on_code>special2</add_on_code>\n <unit_amount_in_cents
280
- type=\"integer\">50000</unit_amount_in_cents>\n <quantity type=\"integer\">2</quantity>\n
281
- \ </add_on>\n </add_ons>\n</subscription>\n"
282
- http_version: '1.1'
171
+ body: |
172
+ <?xml version="1.0" encoding="UTF-8"?>
173
+ <errors>
174
+ <error>Method not allowed</error>
175
+ </errors>
176
+
177
+ http_version: "1.1"