recurly 0.3.2 → 0.3.3

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 (86) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +4 -4
  3. data/lib/recurly.rb +8 -1
  4. data/lib/recurly/account.rb +5 -0
  5. data/lib/recurly/coupon.rb +5 -0
  6. data/lib/recurly/rails3/recurly.rake +3 -18
  7. data/lib/recurly/version.rb +1 -1
  8. data/spec/config/{test.yml → test1.yml} +0 -0
  9. data/spec/config/test2.yml +9 -0
  10. data/spec/integration/account_spec.rb +3 -3
  11. data/spec/integration/billing_info_spec.rb +4 -8
  12. data/spec/integration/coupon_spec.rb +49 -0
  13. data/spec/integration/plan_spec.rb +0 -28
  14. data/spec/integration/transaction_spec.rb +3 -3
  15. data/spec/spec_helper.rb +6 -0
  16. data/spec/support/factory.rb +1 -1
  17. data/spec/unit/config_spec.rb +9 -2
  18. data/spec/vcr/account/accept-language-account/{1294473653.yml → 1296674173.yml} +29 -27
  19. data/spec/vcr/account/close/{1294473761.yml → 1296674173.yml} +71 -67
  20. data/spec/vcr/account/create-blank/{1294473761.yml → 1296674173.yml} +20 -18
  21. data/spec/vcr/account/create-duplicate/{1294473761.yml → 1296674173.yml} +42 -38
  22. data/spec/vcr/account/create-min/{1294473761.yml → 1296674173.yml} +26 -24
  23. data/spec/vcr/account/create/{1294473761.yml → 1296674173.yml} +29 -27
  24. data/spec/vcr/account/find/{1294473761.yml → 1296674173.yml} +71 -63
  25. data/spec/vcr/account/list/1296674173.yml +55 -0
  26. data/spec/vcr/account/update/{1294473761.yml → 1296674173.yml} +113 -107
  27. data/spec/vcr/billing/create/{1286682213.yml → 1296690812.yml} +86 -82
  28. data/spec/vcr/billing/destroy/{1286682213.yml → 1296690812.yml} +126 -142
  29. data/spec/vcr/billing/find/{1286682213.yml → 1296690812.yml} +115 -109
  30. data/spec/vcr/billing/update/{1286682213.yml → 1296690812.yml} +119 -115
  31. data/spec/vcr/charge/create/{1287465632.yml → 1296674173.yml} +109 -103
  32. data/spec/vcr/charge/delete-uninvoiced/{1287465632.yml → 1296674173.yml} +129 -117
  33. data/spec/vcr/charge/list-all/{1287465632.yml → 1296674173.yml} +131 -121
  34. data/spec/vcr/charge/list-invoiced/{1287465632.yml → 1296674173.yml} +195 -177
  35. data/spec/vcr/charge/list-pending/{1287465632.yml → 1296674173.yml} +131 -121
  36. data/spec/vcr/charge/lookup/{1287465632.yml → 1296674173.yml} +77 -71
  37. data/spec/vcr/coupon/create/1296688818.yml +183 -0
  38. data/spec/vcr/coupon/create/1296774903.yml +183 -0
  39. data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
  40. data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
  41. data/spec/vcr/credit/create/1296674173.yml +121 -0
  42. data/spec/vcr/credit/delete/1296674173.yml +121 -0
  43. data/spec/vcr/credit/list/1296674173.yml +121 -0
  44. data/spec/vcr/credit/lookup/1296674173.yml +121 -0
  45. data/spec/vcr/invoice/create-no-charges/{1287167121.yml → 1296674173.yml} +79 -75
  46. data/spec/vcr/invoice/create/{1287167121.yml → 1296674173.yml} +141 -130
  47. data/spec/vcr/invoice/list/{1287167121.yml → 1296674173.yml} +196 -180
  48. data/spec/vcr/invoice/lookup/{1287167121.yml → 1296674173.yml} +145 -133
  49. data/spec/vcr/plan/all.yml +86 -136
  50. data/spec/vcr/plan/delete/{1286677585.yml → 1296674173.yml} +87 -79
  51. data/spec/vcr/plan/find.yml +73 -91
  52. data/spec/vcr/plan/update.yml +80 -76
  53. data/spec/vcr/subscription/addons/add/1296674173.yml +225 -0
  54. data/spec/vcr/subscription/addons/create/1296674173.yml +225 -0
  55. data/spec/vcr/subscription/addons/remove/1296674173.yml +225 -0
  56. data/spec/vcr/subscription/cancel-with-code/{1287455769.yml → 1296674173.yml} +201 -201
  57. data/spec/vcr/subscription/cancel/{1287455769.yml → 1296674173.yml} +173 -175
  58. data/spec/vcr/subscription/change1/{1287455769.yml → 1296674173.yml} +172 -174
  59. data/spec/vcr/subscription/change2/{1287455769.yml → 1296674173.yml} +172 -174
  60. data/spec/vcr/subscription/create/{1287455769.yml → 1296674173.yml} +93 -99
  61. data/spec/vcr/subscription/find/{1287455769.yml → 1296674173.yml} +119 -123
  62. data/spec/vcr/subscription/reactivate/{1287455769.yml → 1296674173.yml} +194 -196
  63. data/spec/vcr/subscription/{refund-none/1287455769.yml → refund-full/1296674173.yml} +162 -162
  64. data/spec/vcr/subscription/{refund-full/1287455769.yml → refund-none/1296674173.yml} +162 -162
  65. data/spec/vcr/subscription/refund-partial/{1287455769.yml → 1296674173.yml} +162 -162
  66. data/spec/vcr/transaction/all/{1289558212.yml → 1296674173.yml} +155 -153
  67. data/spec/vcr/transaction/create-no-account/{1289558212.yml → 1296674173.yml} +37 -35
  68. data/spec/vcr/transaction/create-with-account/{1289558212.yml → 1296674173.yml} +91 -87
  69. data/spec/vcr/transaction/list-filled/{1289558212.yml → 1296674173.yml} +200 -190
  70. data/spec/vcr/transaction/list-initial/{1289558212.yml → 1296674173.yml} +92 -88
  71. data/spec/vcr/transaction/lookup/{1289558212.yml → 1296674173.yml} +241 -227
  72. data/spec/vcr/transaction/refund/{1289558212.yml → 1296674173.yml} +119 -115
  73. data/spec/vcr/transaction/void/1296674173.yml +352 -0
  74. metadata +122 -122
  75. data/spec/config/recurly.yml +0 -4
  76. data/spec/vcr/account/accept-language-account/1294473761.yml +0 -68
  77. data/spec/vcr/account/accept-language/1294473117.yml +0 -167
  78. data/spec/vcr/account/list/1294473761.yml +0 -1597
  79. data/spec/vcr/credit/create/1287461400.yml +0 -174
  80. data/spec/vcr/credit/delete/1287461400.yml +0 -249
  81. data/spec/vcr/credit/list/1287461400.yml +0 -306
  82. data/spec/vcr/credit/lookup/1287461400.yml +0 -174
  83. data/spec/vcr/subscription/addons/add/1292420980.yml +0 -479
  84. data/spec/vcr/subscription/addons/create/1292420980.yml +0 -318
  85. data/spec/vcr/subscription/addons/remove/1292420980.yml +0 -448
  86. data/spec/vcr/transaction/void/1289558212.yml +0 -601
@@ -2,57 +2,59 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
5
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>transaction-refund-1289558212</account-code>
9
+ <account-code>transaction-refund-1296674173</account-code>
10
+ <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
- <accept-language type="yaml" nil="true"></accept-language>
13
12
  <email>verena@test.com</email>
14
- <first-name>Verena</first-name>
13
+ <company-name>Recurly Ruby Gem</company-name>
14
+ <accept-language type="yaml" nil="true"></accept-language>
15
15
  </account>
16
16
 
17
17
  headers:
18
+ authorization:
19
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
20
+ content-type:
21
+ - application/xml
18
22
  accept:
19
23
  - "*/*"
24
+ user-agent:
25
+ - Ruby
20
26
  connection:
21
27
  - close
22
- content-type:
23
- - application/xml
24
- authorization:
25
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
26
28
  response: !ruby/struct:VCR::Response
27
29
  status: !ruby/struct:VCR::ResponseStatus
28
30
  code: 201
29
- message: Created
31
+ message: "Created "
30
32
  headers:
33
+ cache-control:
34
+ - no-cache
31
35
  location:
32
- - https://recurlytest3-test.recurly.com/accounts/transaction-refund-1289558212
33
- connection:
34
- - close
36
+ - http://litle-test.recurly.local:3000/accounts/transaction-refund-1296674173
37
+ x-runtime:
38
+ - "793"
35
39
  content-type:
36
40
  - application/xml; charset=utf-8
37
- x-runtime:
38
- - "345"
39
- date:
40
- - Sat, 08 Jan 2011 08:06:54 GMT
41
- server:
42
- - nginx/0.8.53
43
41
  content-length:
44
42
  - "591"
43
+ server:
44
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
+ date:
46
+ - Thu, 03 Feb 2011 22:26:18 GMT
47
+ connection:
48
+ - close
45
49
  set-cookie:
46
- - account_credentials=d34524d74c4e6cf4ecf5204954fd03af5dff28d13789173c16e6627d3b502cb8c32d28e1755c05ea006354df51d904eeaae7ac344ea5281e6963b79984319fae%3A%3A; domain=.recurly.com; path=/
50
+ - account_credentials=aaa04745895f78fef21de6cb3ab48889f5198ab15f2002faa8006434d503e3efb8fca5d6f8e4b1f908b9a38a525c07b6867bb21eedeff34ee86d4e1655b48dcf%3A%3A; domain=.recurly.local; path=/
47
51
  - ""
48
- - _recurly_session=98cbb9960f5ee4d409b39b41a3b7656a; domain=.recurly.com; path=/; secure; HttpOnly
49
- cache-control:
50
- - no-cache
52
+ - _recurly_session=ebf7b3e816052b159df0439f47419ace; domain=.recurly.local; path=/; HttpOnly
51
53
  body: |
52
54
  <?xml version="1.0" encoding="UTF-8"?>
53
55
  <account>
54
- <id>transaction-refund-1289558212</id>
55
- <account_code>transaction-refund-1289558212</account_code>
56
+ <id>transaction-refund-1296674173</id>
57
+ <account_code>transaction-refund-1296674173</account_code>
56
58
  <username></username>
57
59
  <email>verena@test.com</email>
58
60
  <first_name>Verena</first_name>
@@ -60,8 +62,8 @@
60
62
  <company_name>Recurly Ruby Gem</company_name>
61
63
  <balance_in_cents type="integer">0</balance_in_cents>
62
64
  <closed type="boolean">false</closed>
63
- <hosted_login_token>1884a1b2e4884fdc9072d1a101c712f1</hosted_login_token>
64
- <created_at type="datetime">2011-01-08T08:06:54Z</created_at>
65
+ <hosted_login_token>a9f4c1839eb44692b198c9d6a3a34b26</hosted_login_token>
66
+ <created_at type="datetime">2011-02-03T22:26:18Z</created_at>
65
67
  <state>active</state>
66
68
  </account>
67
69
 
@@ -69,64 +71,64 @@
69
71
  - !ruby/struct:VCR::HTTPInteraction
70
72
  request: !ruby/struct:VCR::Request
71
73
  method: :put
72
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/transaction-refund-1289558212/billing_info.xml
74
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/transaction-refund-1296674173/billing_info.xml
73
75
  body: |
74
76
  <?xml version="1.0" encoding="UTF-8"?>
75
77
  <billing-info>
76
78
  <address1>123 Test St</address1>
77
79
  <city>San Francisco</city>
80
+ <state>CA</state>
78
81
  <zip>94115</zip>
79
- <account-code>transaction-refund-1289558212</account-code>
80
82
  <country>US</country>
81
83
  <credit-card>
82
- <number>1</number>
83
- <month type="integer">1</month>
84
+ <number>4111111111111111</number>
84
85
  <year type="integer">2012</year>
86
+ <month type="integer">2</month>
85
87
  <verification-value>123</verification-value>
86
88
  </credit-card>
87
- <last-name>Test</last-name>
89
+ <account-code>transaction-refund-1296674173</account-code>
88
90
  <first-name>Verena</first-name>
89
- <state>CA</state>
91
+ <last-name>Test</last-name>
90
92
  </billing-info>
91
93
 
92
94
  headers:
95
+ authorization:
96
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
97
+ content-type:
98
+ - application/xml
93
99
  accept:
94
100
  - "*/*"
101
+ user-agent:
102
+ - Ruby
95
103
  connection:
96
104
  - close
97
- content-type:
98
- - application/xml
99
- authorization:
100
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
101
105
  response: !ruby/struct:VCR::Response
102
106
  status: !ruby/struct:VCR::ResponseStatus
103
107
  code: 200
104
- message: OK
108
+ message: "OK "
105
109
  headers:
106
- x-ua-compatible:
107
- - IE=Edge
108
- etag:
109
- - "\"4f0a8437b713060aa9b3eaf57e163f2d\""
110
- connection:
111
- - close
110
+ x-runtime:
111
+ - "1692"
112
112
  content-type:
113
113
  - application/xml; charset=utf-8
114
- x-runtime:
115
- - "198"
116
- date:
117
- - Sat, 08 Jan 2011 08:06:55 GMT
118
- server:
119
- - nginx/0.8.53
120
- content-length:
121
- - "642"
122
- set-cookie:
123
- - _recurly_session=76745a3e094ca92d62952bb0cf918ffa; domain=.recurly.com; path=/; secure; HttpOnly
114
+ etag:
115
+ - "\"feb91fdd8ab5c0689b9b14ea6421b36f\""
124
116
  cache-control:
125
117
  - private, max-age=0, must-revalidate
118
+ content-length:
119
+ - "644"
120
+ server:
121
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
122
+ date:
123
+ - Thu, 03 Feb 2011 22:26:22 GMT
124
+ connection:
125
+ - close
126
+ set-cookie:
127
+ - _recurly_session=d151cb317c705c25fa1b722f095b935e; domain=.recurly.local; path=/; HttpOnly
126
128
  body: |
127
129
  <?xml version="1.0" encoding="UTF-8"?>
128
130
  <billing_info>
129
- <account_code>transaction-refund-1289558212</account_code>
131
+ <account_code>transaction-refund-1296674173</account_code>
130
132
  <first_name>Verena</first_name>
131
133
  <last_name>Test</last_name>
132
134
  <address1>123 Test St</address1>
@@ -139,82 +141,84 @@
139
141
  <vat_number></vat_number>
140
142
  <ip_address></ip_address>
141
143
  <credit_card>
142
- <type>bogus</type>
143
- <last_four>1</last_four>
144
- <month type="integer">1</month>
144
+ <type>visa</type>
145
+ <last_four>1111</last_four>
146
+ <month type="integer">2</month>
145
147
  <year type="integer">2012</year>
146
148
  </credit_card>
147
- <updated_at type="datetime">2011-01-08T08:06:55Z</updated_at>
149
+ <updated_at type="datetime">2011-02-03T22:26:22Z</updated_at>
148
150
  </billing_info>
149
151
 
150
152
  http_version: "1.1"
151
153
  - !ruby/struct:VCR::HTTPInteraction
152
154
  request: !ruby/struct:VCR::Request
153
155
  method: :post
154
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/transactions.xml
156
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/transactions.xml
155
157
  body: |
156
158
  <?xml version="1.0" encoding="UTF-8"?>
157
159
  <transaction>
158
160
  <account>
159
- <account-code>transaction-refund-1289558212</account-code>
161
+ <account-code>transaction-refund-1296674173</account-code>
160
162
  </account>
161
163
  <amount-in-cents type="integer">1000</amount-in-cents>
162
164
  <description>one</description>
163
165
  </transaction>
164
166
 
165
167
  headers:
168
+ authorization:
169
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
170
+ content-type:
171
+ - application/xml
166
172
  accept:
167
173
  - "*/*"
174
+ user-agent:
175
+ - Ruby
168
176
  connection:
169
177
  - close
170
- content-type:
171
- - application/xml
172
- authorization:
173
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
174
178
  response: !ruby/struct:VCR::Response
175
179
  status: !ruby/struct:VCR::ResponseStatus
176
180
  code: 201
177
- message: Created
181
+ message: "Created "
178
182
  headers:
183
+ cache-control:
184
+ - no-cache
179
185
  location:
180
- - https://recurlytest3-test.recurly.com/transactions/0c0965f0caee4406be4d199e1a4479e1
181
- connection:
182
- - close
186
+ - http://litle-test.recurly.local:3000/transactions/6c39ecb5829a4c1f825a70348e7add3e
187
+ x-runtime:
188
+ - "4265"
183
189
  content-type:
184
190
  - application/xml; charset=utf-8
185
- x-runtime:
186
- - "453"
187
- date:
188
- - Sat, 08 Jan 2011 08:06:57 GMT
189
- server:
190
- - nginx/0.8.53
191
191
  content-length:
192
- - "851"
192
+ - "860"
193
+ server:
194
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
195
+ date:
196
+ - Thu, 03 Feb 2011 22:26:28 GMT
197
+ connection:
198
+ - close
193
199
  set-cookie:
194
- - _recurly_session=4074c0a5c2c62fc1afb893f9c870f658; domain=.recurly.com; path=/; secure; HttpOnly
195
- cache-control:
196
- - no-cache
200
+ - _recurly_session=df2e3662960966fa1964b9cb17f0fa6c; domain=.recurly.local; path=/; HttpOnly
197
201
  body: |
198
202
  <?xml version="1.0" encoding="UTF-8"?>
199
203
  <transaction type="Payment">
200
- <id>0c0965f0caee4406be4d199e1a4479e1</id>
201
- <account_code>transaction-refund-1289558212</account_code>
204
+ <id>6c39ecb5829a4c1f825a70348e7add3e</id>
205
+ <account_code>transaction-refund-1296674173</account_code>
202
206
  <action>purchase</action>
203
- <date type="datetime">2011-01-08T08:06:56Z</date>
207
+ <date type="datetime">2011-02-03T22:26:25Z</date>
204
208
  <amount_in_cents type="integer">1000</amount_in_cents>
205
209
  <status>success</status>
206
210
  <message>Test Gateway: Successful test transaction</message>
207
- <reference></reference>
211
+ <reference>12345</reference>
208
212
  <cvv_result code="M">Match</cvv_result>
209
213
  <avs_result code="D">Street address and postal code match.</avs_result>
210
- <avs_result_street></avs_result_street>
211
- <avs_result_postal></avs_result_postal>
214
+ <avs_result_street>Y</avs_result_street>
215
+ <avs_result_postal>Y</avs_result_postal>
212
216
  <test type="boolean">true</test>
213
217
  <voidable type="boolean">true</voidable>
214
218
  <refundable type="boolean">true</refundable>
215
219
  <credit_card>
216
- <type>bogus</type>
217
- <last_four>1</last_four>
220
+ <type>visa</type>
221
+ <last_four>1111</last_four>
218
222
  </credit_card>
219
223
  </transaction>
220
224
 
@@ -222,61 +226,61 @@
222
226
  - !ruby/struct:VCR::HTTPInteraction
223
227
  request: !ruby/struct:VCR::Request
224
228
  method: :delete
225
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/transactions/0c0965f0caee4406be4d199e1a4479e1.xml?action=refund&amount=1000
229
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/transactions/6c39ecb5829a4c1f825a70348e7add3e.xml?action=refund&amount=1000
226
230
  body:
227
231
  headers:
232
+ authorization:
233
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
228
234
  accept:
229
235
  - application/xml
236
+ user-agent:
237
+ - Ruby
230
238
  connection:
231
239
  - close
232
- authorization:
233
- - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
234
240
  response: !ruby/struct:VCR::Response
235
241
  status: !ruby/struct:VCR::ResponseStatus
236
242
  code: 200
237
- message: OK
243
+ message: "OK "
238
244
  headers:
239
- x-ua-compatible:
240
- - IE=Edge
241
- etag:
242
- - "\"0c7da2221ce802c1c87fa53c21a74fcb\""
243
- connection:
244
- - close
245
+ x-runtime:
246
+ - "780"
245
247
  content-type:
246
248
  - application/xml; charset=utf-8
247
- x-runtime:
248
- - "31"
249
- date:
250
- - Sat, 08 Jan 2011 08:06:57 GMT
251
- server:
252
- - nginx/0.8.53
253
- content-length:
254
- - "850"
255
- set-cookie:
256
- - _recurly_session=5da5c1d57c567bfa0e8b496d7ec7f34d; domain=.recurly.com; path=/; secure; HttpOnly
249
+ etag:
250
+ - "\"0e8cc745bc2bfded2ff1758673051f0d\""
257
251
  cache-control:
258
252
  - private, max-age=0, must-revalidate
253
+ content-length:
254
+ - "859"
255
+ server:
256
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
257
+ date:
258
+ - Thu, 03 Feb 2011 22:26:31 GMT
259
+ connection:
260
+ - close
261
+ set-cookie:
262
+ - _recurly_session=e3f4e177709fcd3920158faa0ae16961; domain=.recurly.local; path=/; HttpOnly
259
263
  body: |
260
264
  <?xml version="1.0" encoding="UTF-8"?>
261
265
  <transaction type="Payment">
262
- <id>0c0965f0caee4406be4d199e1a4479e1</id>
263
- <account_code>transaction-refund-1289558212</account_code>
266
+ <id>6c39ecb5829a4c1f825a70348e7add3e</id>
267
+ <account_code>transaction-refund-1296674173</account_code>
264
268
  <action>purchase</action>
265
- <date type="datetime">2011-01-08T08:06:56Z</date>
269
+ <date type="datetime">2011-02-03T22:26:25Z</date>
266
270
  <amount_in_cents type="integer">1000</amount_in_cents>
267
271
  <status>void</status>
268
272
  <message>Test Gateway: Successful test transaction</message>
269
- <reference></reference>
273
+ <reference>12345</reference>
270
274
  <cvv_result code="M">Match</cvv_result>
271
275
  <avs_result code="D">Street address and postal code match.</avs_result>
272
- <avs_result_street></avs_result_street>
273
- <avs_result_postal></avs_result_postal>
276
+ <avs_result_street>Y</avs_result_street>
277
+ <avs_result_postal>Y</avs_result_postal>
274
278
  <test type="boolean">true</test>
275
279
  <voidable type="boolean">false</voidable>
276
280
  <refundable type="boolean">false</refundable>
277
281
  <credit_card>
278
- <type>bogus</type>
279
- <last_four>1</last_four>
282
+ <type>visa</type>
283
+ <last_four>1111</last_four>
280
284
  </credit_card>
281
285
  </transaction>
282
286
 
@@ -0,0 +1,352 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
6
+ body: |
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <account>
9
+ <account-code>transaction-void-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
+ <accept-language type="yaml" nil="true"></accept-language>
15
+ </account>
16
+
17
+ headers:
18
+ authorization:
19
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
20
+ content-type:
21
+ - application/xml
22
+ accept:
23
+ - "*/*"
24
+ user-agent:
25
+ - Ruby
26
+ connection:
27
+ - close
28
+ response: !ruby/struct:VCR::Response
29
+ status: !ruby/struct:VCR::ResponseStatus
30
+ code: 201
31
+ message: "Created "
32
+ headers:
33
+ cache-control:
34
+ - no-cache
35
+ location:
36
+ - http://litle-test.recurly.local:3000/accounts/transaction-void-1296674173
37
+ x-runtime:
38
+ - "899"
39
+ content-type:
40
+ - application/xml; charset=utf-8
41
+ content-length:
42
+ - "587"
43
+ server:
44
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
+ date:
46
+ - Thu, 03 Feb 2011 22:26:00 GMT
47
+ connection:
48
+ - close
49
+ set-cookie:
50
+ - account_credentials=82756c4697af4c5d0bb2ce034c6d191e19b499a019dae325855e6d1ff19277bd33e65b1a3cd30449c68ea88be78bf00a6524194518c87e71d644b41cbc973aca%3A%3A; domain=.recurly.local; path=/
51
+ - ""
52
+ - _recurly_session=e16d80bc7e4d27b2c21badad8d61ae2f; domain=.recurly.local; path=/; HttpOnly
53
+ body: |
54
+ <?xml version="1.0" encoding="UTF-8"?>
55
+ <account>
56
+ <id>transaction-void-1296674173</id>
57
+ <account_code>transaction-void-1296674173</account_code>
58
+ <username></username>
59
+ <email>verena@test.com</email>
60
+ <first_name>Verena</first_name>
61
+ <last_name>Test</last_name>
62
+ <company_name>Recurly Ruby Gem</company_name>
63
+ <balance_in_cents type="integer">0</balance_in_cents>
64
+ <closed type="boolean">false</closed>
65
+ <hosted_login_token>1f33673b49fa4a329514a460614c847e</hosted_login_token>
66
+ <created_at type="datetime">2011-02-03T22:26:00Z</created_at>
67
+ <state>active</state>
68
+ </account>
69
+
70
+ http_version: "1.1"
71
+ - !ruby/struct:VCR::HTTPInteraction
72
+ request: !ruby/struct:VCR::Request
73
+ method: :put
74
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/transaction-void-1296674173/billing_info.xml
75
+ body: |
76
+ <?xml version="1.0" encoding="UTF-8"?>
77
+ <billing-info>
78
+ <address1>123 Test St</address1>
79
+ <city>San Francisco</city>
80
+ <state>CA</state>
81
+ <zip>94115</zip>
82
+ <country>US</country>
83
+ <credit-card>
84
+ <number>4111111111111111</number>
85
+ <year type="integer">2012</year>
86
+ <month type="integer">2</month>
87
+ <verification-value>123</verification-value>
88
+ </credit-card>
89
+ <account-code>transaction-void-1296674173</account-code>
90
+ <first-name>Verena</first-name>
91
+ <last-name>Test</last-name>
92
+ </billing-info>
93
+
94
+ headers:
95
+ authorization:
96
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
97
+ content-type:
98
+ - application/xml
99
+ accept:
100
+ - "*/*"
101
+ user-agent:
102
+ - Ruby
103
+ connection:
104
+ - close
105
+ response: !ruby/struct:VCR::Response
106
+ status: !ruby/struct:VCR::ResponseStatus
107
+ code: 200
108
+ message: "OK "
109
+ headers:
110
+ x-runtime:
111
+ - "1762"
112
+ content-type:
113
+ - application/xml; charset=utf-8
114
+ etag:
115
+ - "\"70c401337a4c43d807abef5650fd1dfc\""
116
+ cache-control:
117
+ - private, max-age=0, must-revalidate
118
+ content-length:
119
+ - "642"
120
+ server:
121
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
122
+ date:
123
+ - Thu, 03 Feb 2011 22:26:04 GMT
124
+ connection:
125
+ - close
126
+ set-cookie:
127
+ - _recurly_session=767d2a523e660bd5c4d27803317be1bb; domain=.recurly.local; path=/; HttpOnly
128
+ body: |
129
+ <?xml version="1.0" encoding="UTF-8"?>
130
+ <billing_info>
131
+ <account_code>transaction-void-1296674173</account_code>
132
+ <first_name>Verena</first_name>
133
+ <last_name>Test</last_name>
134
+ <address1>123 Test St</address1>
135
+ <address2></address2>
136
+ <city>San Francisco</city>
137
+ <state>CA</state>
138
+ <country>US</country>
139
+ <zip>94115</zip>
140
+ <phone></phone>
141
+ <vat_number></vat_number>
142
+ <ip_address></ip_address>
143
+ <credit_card>
144
+ <type>visa</type>
145
+ <last_four>1111</last_four>
146
+ <month type="integer">2</month>
147
+ <year type="integer">2012</year>
148
+ </credit_card>
149
+ <updated_at type="datetime">2011-02-03T22:26:04Z</updated_at>
150
+ </billing_info>
151
+
152
+ http_version: "1.1"
153
+ - !ruby/struct:VCR::HTTPInteraction
154
+ request: !ruby/struct:VCR::Request
155
+ method: :post
156
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/transactions.xml
157
+ body: |
158
+ <?xml version="1.0" encoding="UTF-8"?>
159
+ <transaction>
160
+ <account>
161
+ <account-code>transaction-void-1296674173</account-code>
162
+ </account>
163
+ <amount-in-cents type="integer">100</amount-in-cents>
164
+ <description>one</description>
165
+ </transaction>
166
+
167
+ headers:
168
+ authorization:
169
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
170
+ content-type:
171
+ - application/xml
172
+ accept:
173
+ - "*/*"
174
+ user-agent:
175
+ - Ruby
176
+ connection:
177
+ - close
178
+ response: !ruby/struct:VCR::Response
179
+ status: !ruby/struct:VCR::ResponseStatus
180
+ code: 201
181
+ message: "Created "
182
+ headers:
183
+ cache-control:
184
+ - no-cache
185
+ location:
186
+ - http://litle-test.recurly.local:3000/transactions/0ce0c2d62de64377a9c1c6f4ca0767e9
187
+ x-runtime:
188
+ - "4314"
189
+ content-type:
190
+ - application/xml; charset=utf-8
191
+ content-length:
192
+ - "857"
193
+ server:
194
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
195
+ date:
196
+ - Thu, 03 Feb 2011 22:26:10 GMT
197
+ connection:
198
+ - close
199
+ set-cookie:
200
+ - _recurly_session=405c188e9fb327d044029aae2b70f968; domain=.recurly.local; path=/; HttpOnly
201
+ body: |
202
+ <?xml version="1.0" encoding="UTF-8"?>
203
+ <transaction type="Payment">
204
+ <id>0ce0c2d62de64377a9c1c6f4ca0767e9</id>
205
+ <account_code>transaction-void-1296674173</account_code>
206
+ <action>purchase</action>
207
+ <date type="datetime">2011-02-03T22:26:07Z</date>
208
+ <amount_in_cents type="integer">100</amount_in_cents>
209
+ <status>success</status>
210
+ <message>Test Gateway: Successful test transaction</message>
211
+ <reference>12345</reference>
212
+ <cvv_result code="M">Match</cvv_result>
213
+ <avs_result code="D">Street address and postal code match.</avs_result>
214
+ <avs_result_street>Y</avs_result_street>
215
+ <avs_result_postal>Y</avs_result_postal>
216
+ <test type="boolean">true</test>
217
+ <voidable type="boolean">true</voidable>
218
+ <refundable type="boolean">true</refundable>
219
+ <credit_card>
220
+ <type>visa</type>
221
+ <last_four>1111</last_four>
222
+ </credit_card>
223
+ </transaction>
224
+
225
+ http_version: "1.1"
226
+ - !ruby/struct:VCR::HTTPInteraction
227
+ request: !ruby/struct:VCR::Request
228
+ method: :delete
229
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/transactions/0ce0c2d62de64377a9c1c6f4ca0767e9.xml?action=void
230
+ body:
231
+ headers:
232
+ authorization:
233
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
234
+ accept:
235
+ - application/xml
236
+ user-agent:
237
+ - Ruby
238
+ connection:
239
+ - close
240
+ response: !ruby/struct:VCR::Response
241
+ status: !ruby/struct:VCR::ResponseStatus
242
+ code: 200
243
+ message: "OK "
244
+ headers:
245
+ x-runtime:
246
+ - "497"
247
+ content-type:
248
+ - application/xml; charset=utf-8
249
+ etag:
250
+ - "\"2fa159b95ffba0ff731efa2ec06c108e\""
251
+ cache-control:
252
+ - private, max-age=0, must-revalidate
253
+ content-length:
254
+ - "856"
255
+ server:
256
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
257
+ date:
258
+ - Thu, 03 Feb 2011 22:26:13 GMT
259
+ connection:
260
+ - close
261
+ set-cookie:
262
+ - _recurly_session=e97a4ea7a4bc9321531047259d1b9b47; domain=.recurly.local; path=/; HttpOnly
263
+ body: |
264
+ <?xml version="1.0" encoding="UTF-8"?>
265
+ <transaction type="Payment">
266
+ <id>0ce0c2d62de64377a9c1c6f4ca0767e9</id>
267
+ <account_code>transaction-void-1296674173</account_code>
268
+ <action>purchase</action>
269
+ <date type="datetime">2011-02-03T22:26:07Z</date>
270
+ <amount_in_cents type="integer">100</amount_in_cents>
271
+ <status>void</status>
272
+ <message>Test Gateway: Successful test transaction</message>
273
+ <reference>12345</reference>
274
+ <cvv_result code="M">Match</cvv_result>
275
+ <avs_result code="D">Street address and postal code match.</avs_result>
276
+ <avs_result_street>Y</avs_result_street>
277
+ <avs_result_postal>Y</avs_result_postal>
278
+ <test type="boolean">true</test>
279
+ <voidable type="boolean">false</voidable>
280
+ <refundable type="boolean">false</refundable>
281
+ <credit_card>
282
+ <type>visa</type>
283
+ <last_four>1111</last_four>
284
+ </credit_card>
285
+ </transaction>
286
+
287
+ http_version: "1.1"
288
+ - !ruby/struct:VCR::HTTPInteraction
289
+ request: !ruby/struct:VCR::Request
290
+ method: :get
291
+ uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/transactions.xml?show=voided
292
+ body:
293
+ headers:
294
+ authorization:
295
+ - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
296
+ accept:
297
+ - application/xml
298
+ accept-encoding:
299
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
300
+ user-agent:
301
+ - Ruby
302
+ connection:
303
+ - close
304
+ response: !ruby/struct:VCR::Response
305
+ status: !ruby/struct:VCR::ResponseStatus
306
+ code: 200
307
+ message: "OK "
308
+ headers:
309
+ x-runtime:
310
+ - "341"
311
+ content-type:
312
+ - application/xml; charset=utf-8
313
+ etag:
314
+ - "\"ff8937537dcd0d6f2000e4e298d05023\""
315
+ cache-control:
316
+ - private, max-age=0, must-revalidate
317
+ content-length:
318
+ - "991"
319
+ server:
320
+ - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
321
+ date:
322
+ - Thu, 03 Feb 2011 22:26:15 GMT
323
+ connection:
324
+ - close
325
+ set-cookie:
326
+ - _recurly_session=ee733a74cab77353b2a5347712d1a822; domain=.recurly.local; path=/; HttpOnly
327
+ body: |
328
+ <?xml version="1.0" encoding="UTF-8"?>
329
+ <transactions type="collection">
330
+ <current_page type="integer">1</current_page>
331
+ <per_page type="integer">20</per_page>
332
+ <total_entries type="integer">1</total_entries>
333
+ <transaction type="Payment">
334
+ <id>0ce0c2d62de64377a9c1c6f4ca0767e9</id>
335
+ <account_code>transaction-void-1296674173</account_code>
336
+ <action>purchase</action>
337
+ <date type="datetime">2011-02-03T22:26:07Z</date>
338
+ <amount_in_cents type="integer">100</amount_in_cents>
339
+ <status>void</status>
340
+ <message>Test Gateway: Successful test transaction</message>
341
+ <reference>12345</reference>
342
+ <cvv_result code="M">Match</cvv_result>
343
+ <avs_result code="D">Street address and postal code match.</avs_result>
344
+ <avs_result_street>Y</avs_result_street>
345
+ <avs_result_postal>Y</avs_result_postal>
346
+ <test type="boolean">true</test>
347
+ <voidable type="boolean">false</voidable>
348
+ <refundable type="boolean">false</refundable>
349
+ </transaction>
350
+ </transactions>
351
+
352
+ http_version: "1.1"