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,153 +1,222 @@
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>charge-create-1313708721</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>charge-create-1313708721</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/charge-create-1313708721
22
- content-type:
30
+ headers:
31
+ location:
32
+ - http://api.lvh.me:3000/accounts/charge-create-1313708721
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=689c939201df451caa3d67bd626275f7; domain=.lvh.me; path=/;
30
- HttpOnly
31
- server:
39
+ set-cookie:
40
+ - _recurly_session=a24f9e09065743ec3e17bddb4402e6ee; 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>charge-create-1313708721</id>\n
34
- \ <account_code>charge-create-1313708721</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>51d3626b21bb4cf2a1e9f8f3740205cc</hosted_login_token>\n
38
- \ <created_at type=\"datetime\">2011-08-19T20:01:39Z</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>charge-create-1313708721</id>
47
+ <account_code>charge-create-1313708721</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>b4f07de10b6f4e2f907470f231d43499</hosted_login_token>
56
+ <created_at type="datetime">2011-09-22T22:01:45Z</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: :put
43
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-create-1313708721/billing_info.xml
44
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing-info>\n <first-name>Verena</first-name>\n
45
- \ <last-name>Test</last-name>\n <address1>123 Test St</address1>\n <city>San
46
- Francisco</city>\n <state>CA</state>\n <zip>94115</zip>\n <country>US</country>\n
47
- \ <credit-card>\n <number>4111111111111111</number>\n <year type=\"integer\">2012</year>\n
48
- \ <month type=\"integer\">8</month>\n <verification-value>123</verification-value>\n
49
- \ </credit-card>\n <account-code>charge-create-1313708721</account-code>\n</billing-info>\n"
50
- headers:
51
- user-agent:
52
- - Recurly Ruby Client v0.4.10
53
- content-type:
64
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-create-1313708721/billing_info.xml
65
+ body: |
66
+ <?xml version="1.0" encoding="UTF-8"?>
67
+ <billing-info>
68
+ <first-name>Verena</first-name>
69
+ <last-name>Test</last-name>
70
+ <address1>123 Test St</address1>
71
+ <city>San Francisco</city>
72
+ <state>CA</state>
73
+ <zip>94115</zip>
74
+ <country>US</country>
75
+ <credit-card>
76
+ <number>4111111111111111</number>
77
+ <year type="integer">2012</year>
78
+ <month type="integer">9</month>
79
+ <verification-value>123</verification-value>
80
+ </credit-card>
81
+ <account-code>charge-create-1313708721</account-code>
82
+ </billing-info>
83
+
84
+ headers:
85
+ user-agent:
86
+ - Recurly Ruby Client v0.4.13
87
+ content-type:
54
88
  - application/xml
55
- response: !ruby/struct:VCR::Response
56
- status: !ruby/struct:VCR::ResponseStatus
89
+ response: !ruby/struct:VCR::Response
90
+ status: !ruby/struct:VCR::ResponseStatus
57
91
  code: 200
58
92
  message: OK
59
- headers:
60
- content-type:
93
+ headers:
94
+ content-type:
61
95
  - application/xml; charset=utf-8
62
- etag:
63
- - ! '"1906be3fcdcbe3d0205fd3373fd366e8"'
64
- cache-control:
96
+ etag:
97
+ - "\"9a08d0ceca1c2ee63ed32a54031edc99\""
98
+ cache-control:
65
99
  - max-age=0, private, must-revalidate
66
- x-ua-compatible:
100
+ x-ua-compatible:
67
101
  - IE=Edge
68
- set-cookie:
69
- - _recurly_session=4ff636c6d4992a41060aacc615f88d34; domain=.lvh.me; path=/;
70
- HttpOnly
71
- server:
102
+ set-cookie:
103
+ - _recurly_session=ae65eb9f52e9b64fc52bfd0ba107fe2a; domain=.lvh.me; path=/; HttpOnly
104
+ server:
72
105
  - thin 1.2.11 codename Bat-Shit Crazy
73
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing_info>\n <account_code>charge-create-1313708721</account_code>\n
74
- \ <first_name>Verena</first_name>\n <last_name>Test</last_name>\n <address1>123
75
- Test St</address1>\n <address2></address2>\n <city>San Francisco</city>\n
76
- \ <state>CA</state>\n <country>US</country>\n <zip>94115</zip>\n <phone></phone>\n
77
- \ <vat_number></vat_number>\n <ip_address></ip_address>\n <credit_card>\n
78
- \ <type>visa</type>\n <last_four>1111</last_four>\n <month type=\"integer\">8</month>\n
79
- \ <year type=\"integer\">2012</year>\n </credit_card>\n <updated_at type=\"datetime\">2011-08-19T20:01:42Z</updated_at>\n</billing_info>\n"
80
- http_version: '1.1'
81
- - !ruby/struct:VCR::HTTPInteraction
82
- request: !ruby/struct:VCR::Request
106
+ body: |
107
+ <?xml version="1.0" encoding="UTF-8"?>
108
+ <billing_info>
109
+ <account_code>charge-create-1313708721</account_code>
110
+ <first_name>Verena</first_name>
111
+ <last_name>Test</last_name>
112
+ <address1>123 Test St</address1>
113
+ <address2></address2>
114
+ <city>San Francisco</city>
115
+ <state>CA</state>
116
+ <country>US</country>
117
+ <zip>94115</zip>
118
+ <phone></phone>
119
+ <vat_number></vat_number>
120
+ <ip_address></ip_address>
121
+ <credit_card>
122
+ <type>visa</type>
123
+ <last_four>1111</last_four>
124
+ <month type="integer">9</month>
125
+ <year type="integer">2012</year>
126
+ </credit_card>
127
+ <updated_at type="datetime">2011-09-22T22:01:46Z</updated_at>
128
+ </billing_info>
129
+
130
+ http_version: "1.1"
131
+ - !ruby/struct:VCR::HTTPInteraction
132
+ request: !ruby/struct:VCR::Request
83
133
  method: :post
84
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-create-1313708721/charges.xml
85
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge>\n <amount type=\"float\">2.5</amount>\n
86
- \ <description>virtual cow maintence fee</description>\n</charge>\n"
87
- headers:
88
- user-agent:
89
- - Recurly Ruby Client v0.4.10
90
- content-type:
134
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-create-1313708721/charges.xml
135
+ body: |
136
+ <?xml version="1.0" encoding="UTF-8"?>
137
+ <charge>
138
+ <amount type="float">2.5</amount>
139
+ <description>virtual cow maintence fee</description>
140
+ </charge>
141
+
142
+ headers:
143
+ user-agent:
144
+ - Recurly Ruby Client v0.4.13
145
+ content-type:
91
146
  - application/xml
92
- response: !ruby/struct:VCR::Response
93
- status: !ruby/struct:VCR::ResponseStatus
147
+ response: !ruby/struct:VCR::Response
148
+ status: !ruby/struct:VCR::ResponseStatus
94
149
  code: 201
95
150
  message: Created
96
- headers:
97
- content-type:
151
+ headers:
152
+ content-type:
98
153
  - application/xml; charset=utf-8
99
- cache-control:
154
+ cache-control:
100
155
  - no-cache
101
- x-ua-compatible:
156
+ x-ua-compatible:
102
157
  - IE=Edge
103
- set-cookie:
104
- - _recurly_session=f314b355564917ad70fbab79c2c4b0c7; domain=.lvh.me; path=/;
105
- HttpOnly
106
- server:
158
+ set-cookie:
159
+ - _recurly_session=7832541ec6d595eac7a0a067b160ff9a; domain=.lvh.me; path=/; HttpOnly
160
+ server:
107
161
  - thin 1.2.11 codename Bat-Shit Crazy
108
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge type=\"charge\">\n
109
- \ <id>d0bb5e45e8bd49ec80ea641146420a43</id>\n <account_code>charge-create-1313708721</account_code>\n
110
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">250</unit_amount_in_cents>\n
111
- \ <amount_in_cents type=\"integer\">250</amount_in_cents>\n <currency>USD</currency>\n
112
- \ <start_date type=\"datetime\">2011-08-19T20:01:42Z</start_date>\n <end_date
113
- nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
114
- \ <description>virtual cow maintence fee</description>\n <created_at type=\"datetime\">2011-08-19T20:01:42Z</created_at>\n</charge>\n"
115
- http_version: '1.1'
116
- - !ruby/struct:VCR::HTTPInteraction
117
- request: !ruby/struct:VCR::Request
162
+ body: |
163
+ <?xml version="1.0" encoding="UTF-8"?>
164
+ <charge type="charge">
165
+ <id>8c0a6bcb9cb644c5bfa3079e0faaef51</id>
166
+ <account_code>charge-create-1313708721</account_code>
167
+ <quantity type="integer">1</quantity>
168
+ <unit_amount_in_cents type="integer">250</unit_amount_in_cents>
169
+ <amount_in_cents type="integer">250</amount_in_cents>
170
+ <currency>USD</currency>
171
+ <start_date type="datetime">2011-09-22T22:01:46Z</start_date>
172
+ <end_date nil="true" type="datetime"></end_date>
173
+ <invoice_number nil="true" type="integer"></invoice_number>
174
+ <description>virtual cow maintence fee</description>
175
+ <created_at type="datetime">2011-09-22T22:01:46Z</created_at>
176
+ </charge>
177
+
178
+ http_version: "1.1"
179
+ - !ruby/struct:VCR::HTTPInteraction
180
+ request: !ruby/struct:VCR::Request
118
181
  method: :get
119
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-create-1313708721/charges/d0bb5e45e8bd49ec80ea641146420a43.xml
120
- body: !!null
121
- headers:
122
- user-agent:
123
- - Recurly Ruby Client v0.4.10
124
- accept:
182
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-create-1313708721/charges/8c0a6bcb9cb644c5bfa3079e0faaef51.xml
183
+ body:
184
+ headers:
185
+ user-agent:
186
+ - Recurly Ruby Client v0.4.13
187
+ accept:
125
188
  - application/xml
126
- accept-encoding:
189
+ accept-encoding:
127
190
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
128
- response: !ruby/struct:VCR::Response
129
- status: !ruby/struct:VCR::ResponseStatus
191
+ response: !ruby/struct:VCR::Response
192
+ status: !ruby/struct:VCR::ResponseStatus
130
193
  code: 200
131
194
  message: OK
132
- headers:
133
- content-type:
195
+ headers:
196
+ content-type:
134
197
  - application/xml; charset=utf-8
135
- etag:
136
- - ! '"97f9213637b2756de5c231123437bc5b"'
137
- cache-control:
198
+ etag:
199
+ - "\"0780320662336dfb6c3089cc762c184e\""
200
+ cache-control:
138
201
  - max-age=0, private, must-revalidate
139
- x-ua-compatible:
202
+ x-ua-compatible:
140
203
  - IE=Edge
141
- set-cookie:
142
- - _recurly_session=15b389efbc69a70ea2a707c352abfbb6; domain=.lvh.me; path=/;
143
- HttpOnly
144
- server:
204
+ server:
145
205
  - thin 1.2.11 codename Bat-Shit Crazy
146
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge type=\"charge\">\n
147
- \ <id>d0bb5e45e8bd49ec80ea641146420a43</id>\n <account_code>charge-create-1313708721</account_code>\n
148
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">250</unit_amount_in_cents>\n
149
- \ <amount_in_cents type=\"integer\">250</amount_in_cents>\n <currency>USD</currency>\n
150
- \ <start_date type=\"datetime\">2011-08-19T20:01:42Z</start_date>\n <end_date
151
- nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
152
- \ <description>virtual cow maintence fee</description>\n <created_at type=\"datetime\">2011-08-19T20:01:42Z</created_at>\n</charge>\n"
153
- http_version: '1.1'
206
+ body: |
207
+ <?xml version="1.0" encoding="UTF-8"?>
208
+ <charge type="charge">
209
+ <id>8c0a6bcb9cb644c5bfa3079e0faaef51</id>
210
+ <account_code>charge-create-1313708721</account_code>
211
+ <quantity type="integer">1</quantity>
212
+ <unit_amount_in_cents type="integer">250</unit_amount_in_cents>
213
+ <amount_in_cents type="integer">250</amount_in_cents>
214
+ <currency>USD</currency>
215
+ <start_date type="datetime">2011-09-22T22:01:46Z</start_date>
216
+ <end_date nil="true" type="datetime"></end_date>
217
+ <invoice_number nil="true" type="integer"></invoice_number>
218
+ <description>virtual cow maintence fee</description>
219
+ <created_at type="datetime">2011-09-22T22:01:46Z</created_at>
220
+ </charge>
221
+
222
+ http_version: "1.1"
@@ -1,206 +1,247 @@
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>charge-delete-uinvoiced-1313708721</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>charge-delete-uinvoiced-1313708721</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/charge-delete-uinvoiced-1313708721
22
- content-type:
30
+ headers:
31
+ location:
32
+ - http://api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721
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=ce28007f3e2623d0c5ff035498a2466a; domain=.lvh.me; path=/;
30
- HttpOnly
31
- server:
39
+ set-cookie:
40
+ - _recurly_session=833b6b1537ce7fc4e71717e1b49b54bc; 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>charge-delete-uinvoiced-1313708721</id>\n
34
- \ <account_code>charge-delete-uinvoiced-1313708721</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>0735b9195b384c20aadef7c802364eb4</hosted_login_token>\n
38
- \ <created_at type=\"datetime\">2011-08-19T20:01:42Z</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>charge-delete-uinvoiced-1313708721</id>
47
+ <account_code>charge-delete-uinvoiced-1313708721</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>7a02cf6aee65413e868268e78bd1a9f6</hosted_login_token>
56
+ <created_at type="datetime">2011-09-22T22:01:46Z</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: :post
43
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges.xml
44
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge>\n <amount type=\"float\">13.15</amount>\n
45
- \ <description>inconvenience fee</description>\n</charge>\n"
46
- headers:
47
- user-agent:
48
- - Recurly Ruby Client v0.4.10
49
- content-type:
64
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges.xml
65
+ body: |
66
+ <?xml version="1.0" encoding="UTF-8"?>
67
+ <charge>
68
+ <amount type="float">13.15</amount>
69
+ <description>inconvenience fee</description>
70
+ </charge>
71
+
72
+ headers:
73
+ user-agent:
74
+ - Recurly Ruby Client v0.4.13
75
+ content-type:
50
76
  - application/xml
51
- response: !ruby/struct:VCR::Response
52
- status: !ruby/struct:VCR::ResponseStatus
77
+ response: !ruby/struct:VCR::Response
78
+ status: !ruby/struct:VCR::ResponseStatus
53
79
  code: 201
54
80
  message: Created
55
- headers:
56
- content-type:
81
+ headers:
82
+ content-type:
57
83
  - application/xml; charset=utf-8
58
- cache-control:
84
+ cache-control:
59
85
  - no-cache
60
- x-ua-compatible:
86
+ x-ua-compatible:
61
87
  - IE=Edge
62
- set-cookie:
63
- - _recurly_session=250e58811d886c025664eca9a4dee08b; domain=.lvh.me; path=/;
64
- HttpOnly
65
- server:
88
+ set-cookie:
89
+ - _recurly_session=42de862c94d660c9c03487e15c656653; domain=.lvh.me; path=/; HttpOnly
90
+ server:
66
91
  - thin 1.2.11 codename Bat-Shit Crazy
67
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge type=\"charge\">\n
68
- \ <id>31eec133f99544d8abe92a6d0d7580e4</id>\n <account_code>charge-delete-uinvoiced-1313708721</account_code>\n
69
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1315</unit_amount_in_cents>\n
70
- \ <amount_in_cents type=\"integer\">1315</amount_in_cents>\n <currency>USD</currency>\n
71
- \ <start_date type=\"datetime\">2011-08-19T20:01:43Z</start_date>\n <end_date
72
- nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
73
- \ <description>inconvenience fee</description>\n <created_at type=\"datetime\">2011-08-19T20:01:43Z</created_at>\n</charge>\n"
74
- http_version: '1.1'
75
- - !ruby/struct:VCR::HTTPInteraction
76
- request: !ruby/struct:VCR::Request
92
+ body: |
93
+ <?xml version="1.0" encoding="UTF-8"?>
94
+ <charge type="charge">
95
+ <id>c775274040a64332867ec9f9c6d9cee4</id>
96
+ <account_code>charge-delete-uinvoiced-1313708721</account_code>
97
+ <quantity type="integer">1</quantity>
98
+ <unit_amount_in_cents type="integer">1315</unit_amount_in_cents>
99
+ <amount_in_cents type="integer">1315</amount_in_cents>
100
+ <currency>USD</currency>
101
+ <start_date type="datetime">2011-09-22T22:01:46Z</start_date>
102
+ <end_date nil="true" type="datetime"></end_date>
103
+ <invoice_number nil="true" type="integer"></invoice_number>
104
+ <description>inconvenience fee</description>
105
+ <created_at type="datetime">2011-09-22T22:01:46Z</created_at>
106
+ </charge>
107
+
108
+ http_version: "1.1"
109
+ - !ruby/struct:VCR::HTTPInteraction
110
+ request: !ruby/struct:VCR::Request
77
111
  method: :get
78
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/31eec133f99544d8abe92a6d0d7580e4.xml
79
- body: !!null
80
- headers:
81
- user-agent:
82
- - Recurly Ruby Client v0.4.10
83
- accept:
112
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/c775274040a64332867ec9f9c6d9cee4.xml
113
+ body:
114
+ headers:
115
+ user-agent:
116
+ - Recurly Ruby Client v0.4.13
117
+ accept:
84
118
  - application/xml
85
- accept-encoding:
119
+ accept-encoding:
86
120
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
- response: !ruby/struct:VCR::Response
88
- status: !ruby/struct:VCR::ResponseStatus
121
+ response: !ruby/struct:VCR::Response
122
+ status: !ruby/struct:VCR::ResponseStatus
89
123
  code: 200
90
124
  message: OK
91
- headers:
92
- content-type:
125
+ headers:
126
+ content-type:
93
127
  - application/xml; charset=utf-8
94
- etag:
95
- - ! '"0f899ea6a717e3bfec770631c620d964"'
96
- cache-control:
128
+ etag:
129
+ - "\"4a93a23b5b20c9c7205e665e4483d8e8\""
130
+ cache-control:
97
131
  - max-age=0, private, must-revalidate
98
- x-ua-compatible:
132
+ x-ua-compatible:
99
133
  - IE=Edge
100
- set-cookie:
101
- - _recurly_session=bda2cdd6ad5cbc16c86f3e950d529aab; domain=.lvh.me; path=/;
102
- HttpOnly
103
- server:
134
+ server:
104
135
  - thin 1.2.11 codename Bat-Shit Crazy
105
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<charge type=\"charge\">\n
106
- \ <id>31eec133f99544d8abe92a6d0d7580e4</id>\n <account_code>charge-delete-uinvoiced-1313708721</account_code>\n
107
- \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">1315</unit_amount_in_cents>\n
108
- \ <amount_in_cents type=\"integer\">1315</amount_in_cents>\n <currency>USD</currency>\n
109
- \ <start_date type=\"datetime\">2011-08-19T20:01:43Z</start_date>\n <end_date
110
- nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
111
- \ <description>inconvenience fee</description>\n <created_at type=\"datetime\">2011-08-19T20:01:43Z</created_at>\n</charge>\n"
112
- http_version: '1.1'
113
- - !ruby/struct:VCR::HTTPInteraction
114
- request: !ruby/struct:VCR::Request
136
+ body: |
137
+ <?xml version="1.0" encoding="UTF-8"?>
138
+ <charge type="charge">
139
+ <id>c775274040a64332867ec9f9c6d9cee4</id>
140
+ <account_code>charge-delete-uinvoiced-1313708721</account_code>
141
+ <quantity type="integer">1</quantity>
142
+ <unit_amount_in_cents type="integer">1315</unit_amount_in_cents>
143
+ <amount_in_cents type="integer">1315</amount_in_cents>
144
+ <currency>USD</currency>
145
+ <start_date type="datetime">2011-09-22T22:01:46Z</start_date>
146
+ <end_date nil="true" type="datetime"></end_date>
147
+ <invoice_number nil="true" type="integer"></invoice_number>
148
+ <description>inconvenience fee</description>
149
+ <created_at type="datetime">2011-09-22T22:01:46Z</created_at>
150
+ </charge>
151
+
152
+ http_version: "1.1"
153
+ - !ruby/struct:VCR::HTTPInteraction
154
+ request: !ruby/struct:VCR::Request
115
155
  method: :delete
116
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/31eec133f99544d8abe92a6d0d7580e4.xml
117
- body: !!null
118
- headers:
119
- user-agent:
120
- - Recurly Ruby Client v0.4.10
121
- accept:
156
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/c775274040a64332867ec9f9c6d9cee4.xml
157
+ body:
158
+ headers:
159
+ user-agent:
160
+ - Recurly Ruby Client v0.4.13
161
+ accept:
122
162
  - application/xml
123
- response: !ruby/struct:VCR::Response
124
- status: !ruby/struct:VCR::ResponseStatus
163
+ response: !ruby/struct:VCR::Response
164
+ status: !ruby/struct:VCR::ResponseStatus
125
165
  code: 200
126
166
  message: OK
127
- headers:
128
- content-type:
167
+ headers:
168
+ content-type:
129
169
  - application/xml; charset=utf-8
130
- cache-control:
170
+ cache-control:
131
171
  - no-cache
132
- x-ua-compatible:
172
+ x-ua-compatible:
133
173
  - IE=Edge
134
- set-cookie:
135
- - _recurly_session=2065934139eb11f0dc62cb00e84a61bf; domain=.lvh.me; path=/;
136
- HttpOnly
137
- server:
174
+ set-cookie:
175
+ - _recurly_session=62d3ee8086ff35ee600655acf544833d; domain=.lvh.me; path=/; HttpOnly
176
+ server:
138
177
  - thin 1.2.11 codename Bat-Shit Crazy
139
- body: ! ' '
140
- http_version: '1.1'
141
- - !ruby/struct:VCR::HTTPInteraction
142
- request: !ruby/struct:VCR::Request
178
+ body: " "
179
+ http_version: "1.1"
180
+ - !ruby/struct:VCR::HTTPInteraction
181
+ request: !ruby/struct:VCR::Request
143
182
  method: :get
144
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/31eec133f99544d8abe92a6d0d7580e4.xml
145
- body: !!null
146
- headers:
147
- user-agent:
148
- - Recurly Ruby Client v0.4.10
149
- accept:
183
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/charges/c775274040a64332867ec9f9c6d9cee4.xml
184
+ body:
185
+ headers:
186
+ user-agent:
187
+ - Recurly Ruby Client v0.4.13
188
+ accept:
150
189
  - application/xml
151
- accept-encoding:
190
+ accept-encoding:
152
191
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
153
- response: !ruby/struct:VCR::Response
154
- status: !ruby/struct:VCR::ResponseStatus
192
+ response: !ruby/struct:VCR::Response
193
+ status: !ruby/struct:VCR::ResponseStatus
155
194
  code: 404
156
195
  message: Not Found
157
- headers:
158
- content-type:
196
+ headers:
197
+ content-type:
159
198
  - application/xml; charset=utf-8
160
- cache-control:
199
+ cache-control:
161
200
  - no-cache
162
- x-ua-compatible:
201
+ x-ua-compatible:
163
202
  - IE=Edge
164
- set-cookie:
165
- - _recurly_session=d2c8fd31d0babf499ab8e1f43ee2351e; domain=.lvh.me; path=/;
166
- HttpOnly
167
- server:
203
+ server:
168
204
  - thin 1.2.11 codename Bat-Shit Crazy
169
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>\n <error>Charge
170
- not found</error>\n</errors>\n"
171
- http_version: '1.1'
172
- - !ruby/struct:VCR::HTTPInteraction
173
- request: !ruby/struct:VCR::Request
174
- method: :post
175
- uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/invoices.xml
176
- body: ! '<?xml version="1.0" encoding="UTF-8"?>
205
+ body: |
206
+ <?xml version="1.0" encoding="UTF-8"?>
207
+ <errors>
208
+ <error>Charge not found</error>
209
+ </errors>
177
210
 
211
+ http_version: "1.1"
212
+ - !ruby/struct:VCR::HTTPInteraction
213
+ request: !ruby/struct:VCR::Request
214
+ method: :post
215
+ uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/charge-delete-uinvoiced-1313708721/invoices.xml
216
+ body: |
217
+ <?xml version="1.0" encoding="UTF-8"?>
178
218
  <invoice>
179
-
180
219
  </invoice>
181
220
 
182
- '
183
- headers:
184
- user-agent:
185
- - Recurly Ruby Client v0.4.10
186
- content-type:
221
+ headers:
222
+ user-agent:
223
+ - Recurly Ruby Client v0.4.13
224
+ content-type:
187
225
  - application/xml
188
- response: !ruby/struct:VCR::Response
189
- status: !ruby/struct:VCR::ResponseStatus
226
+ response: !ruby/struct:VCR::Response
227
+ status: !ruby/struct:VCR::ResponseStatus
190
228
  code: 422
191
- message: !!null
192
- headers:
193
- content-type:
229
+ message:
230
+ headers:
231
+ content-type:
194
232
  - application/xml; charset=utf-8
195
- cache-control:
233
+ cache-control:
196
234
  - no-cache
197
- x-ua-compatible:
235
+ x-ua-compatible:
198
236
  - IE=Edge
199
- set-cookie:
200
- - _recurly_session=8696be3713cf6938045f7c97714aad52; domain=.lvh.me; path=/;
201
- HttpOnly
202
- server:
237
+ set-cookie:
238
+ - _recurly_session=f14b613796f363f3e61e4300fc875773; domain=.lvh.me; path=/; HttpOnly
239
+ server:
203
240
  - thin 1.2.11 codename Bat-Shit Crazy
204
- body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>\n <error>No charges
205
- to invoice.</error>\n</errors>\n"
206
- http_version: '1.1'
241
+ body: |
242
+ <?xml version="1.0" encoding="UTF-8"?>
243
+ <errors>
244
+ <error>No charges to invoice.</error>
245
+ </errors>
246
+
247
+ http_version: "1.1"