recurly 0.3.3 → 0.3.4

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 (99) hide show
  1. data/README.md +15 -11
  2. data/lib/patches/active_resource/connection.rb +10 -0
  3. data/lib/recurly.rb +35 -9
  4. data/lib/recurly/account.rb +22 -1
  5. data/lib/recurly/account_base.rb +35 -0
  6. data/lib/recurly/base.rb +26 -39
  7. data/lib/recurly/billing_info.rb +40 -1
  8. data/lib/recurly/charge.rb +12 -1
  9. data/lib/recurly/coupon.rb +8 -0
  10. data/lib/recurly/credit.rb +12 -1
  11. data/lib/recurly/exceptions.rb +19 -0
  12. data/lib/recurly/invoice.rb +1 -1
  13. data/lib/recurly/plan.rb +13 -1
  14. data/lib/recurly/rails3/recurly.rake +5 -3
  15. data/lib/recurly/subscription.rb +21 -3
  16. data/lib/recurly/transaction.rb +29 -1
  17. data/lib/recurly/transparent.rb +140 -0
  18. data/lib/recurly/version.rb +1 -1
  19. data/spec/config/recurly.yml +12 -0
  20. data/spec/config/test1.yml +3 -1
  21. data/spec/config/test2.yml +4 -2
  22. data/spec/integration/credit_spec.rb +6 -6
  23. data/spec/integration/plan_spec.rb +2 -2
  24. data/spec/support/factory.rb +5 -3
  25. data/spec/unit/account_spec.rb +19 -0
  26. data/spec/unit/billing_info_spec.rb +38 -0
  27. data/spec/unit/charge_spec.rb +18 -0
  28. data/spec/unit/config_spec.rb +10 -6
  29. data/spec/unit/coupon_spec.rb +13 -0
  30. data/spec/unit/credit_spec.rb +18 -0
  31. data/spec/unit/plan_spec.rb +18 -0
  32. data/spec/unit/subscription_spec.rb +25 -0
  33. data/spec/unit/transaction_spec.rb +32 -0
  34. data/spec/unit/transparent_spec.rb +114 -0
  35. data/spec/vcr/account/accept-language-account/{1296674173.yml → 1297746103.yml} +16 -13
  36. data/spec/vcr/account/close/{1296674173.yml → 1297746103.yml} +31 -28
  37. data/spec/vcr/account/create-blank/{1296674173.yml → 1297746103.yml} +9 -5
  38. data/spec/vcr/account/create-duplicate/{1296674173.yml → 1297746103.yml} +22 -15
  39. data/spec/vcr/account/create-min/{1296674173.yml → 1297746103.yml} +16 -13
  40. data/spec/vcr/account/create/{1296674173.yml → 1297746103.yml} +16 -13
  41. data/spec/vcr/account/find/{1296674173.yml → 1297746103.yml} +29 -26
  42. data/spec/vcr/account/list/1297746103.yml +1579 -0
  43. data/spec/vcr/account/update/{1296674173.yml → 1297746103.yml} +54 -47
  44. data/spec/vcr/billing/create/{1296690812.yml → 1298594128.yml} +37 -34
  45. data/spec/vcr/billing/destroy/{1296690812.yml → 1298594128.yml} +46 -43
  46. data/spec/vcr/billing/find/{1296690812.yml → 1298594128.yml} +47 -44
  47. data/spec/vcr/billing/update/{1296690812.yml → 1298594128.yml} +50 -47
  48. data/spec/vcr/charge/create/{1296674173.yml → 1297746103.yml} +48 -45
  49. data/spec/vcr/charge/delete-uninvoiced/{1296674173.yml → 1297746103.yml} +49 -46
  50. data/spec/vcr/charge/list-all/{1296674173.yml → 1297746103.yml} +61 -58
  51. data/spec/vcr/charge/list-invoiced/{1296674173.yml → 1297746103.yml} +92 -89
  52. data/spec/vcr/charge/list-pending/{1296674173.yml → 1297746103.yml} +61 -58
  53. data/spec/vcr/charge/lookup/{1296674173.yml → 1297746103.yml} +34 -31
  54. data/spec/vcr/coupon/create/{1296774903.yml → 1299714521.yml} +35 -32
  55. data/spec/vcr/coupon/destroy/{1296688818.yml → 1299714521.yml} +34 -31
  56. data/spec/vcr/{coupon/create/1296688818.yml → credit/create/1299714599.yml} +53 -53
  57. data/spec/vcr/credit/delete/1299714599.yml +262 -0
  58. data/spec/vcr/credit/list/1299714599.yml +319 -0
  59. data/spec/vcr/credit/lookup/1299714599.yml +183 -0
  60. data/spec/vcr/invoice/create-no-charges/{1296674173.yml → 1297746103.yml} +34 -31
  61. data/spec/vcr/invoice/create/{1296674173.yml → 1297746103.yml} +63 -60
  62. data/spec/vcr/invoice/list/{1296674173.yml → 1297746103.yml} +87 -84
  63. data/spec/vcr/invoice/lookup/{1296674173.yml → 1297746103.yml} +64 -61
  64. data/spec/vcr/plan/all.yml +30 -30
  65. data/spec/vcr/plan/find.yml +25 -25
  66. data/spec/vcr/plan/update.yml +16 -15
  67. data/spec/vcr/subscription/addons/add/{1296674173.yml → 1297746103.yml} +44 -40
  68. data/spec/vcr/subscription/addons/create/{1296674173.yml → 1297746103.yml} +44 -40
  69. data/spec/vcr/subscription/addons/remove/{1296674173.yml → 1297746103.yml} +44 -40
  70. data/spec/vcr/subscription/cancel-with-code/{1296674173.yml → 1297746103.yml} +99 -95
  71. data/spec/vcr/subscription/cancel/{1296674173.yml → 1297746103.yml} +86 -82
  72. data/spec/vcr/subscription/change1/{1296674173.yml → 1297746103.yml} +82 -78
  73. data/spec/vcr/subscription/change2/{1296674173.yml → 1297746103.yml} +82 -78
  74. data/spec/vcr/subscription/create/{1296674173.yml → 1297746103.yml} +49 -45
  75. data/spec/vcr/subscription/find/{1296674173.yml → 1297746103.yml} +60 -56
  76. data/spec/vcr/subscription/reactivate/{1296674173.yml → 1297746103.yml} +93 -89
  77. data/spec/vcr/subscription/refund-full/{1296674173.yml → 1297746103.yml} +77 -73
  78. data/spec/vcr/subscription/refund-none/{1296674173.yml → 1297746103.yml} +77 -73
  79. data/spec/vcr/subscription/refund-partial/{1296674173.yml → 1297746103.yml} +77 -73
  80. data/spec/vcr/transaction/all/{1296674173.yml → 1297746103.yml} +107 -107
  81. data/spec/vcr/transaction/create-no-account/{1296674173.yml → 1297746103.yml} +14 -13
  82. data/spec/vcr/transaction/create-with-account/{1296674173.yml → 1297746103.yml} +46 -58
  83. data/spec/vcr/transaction/list-filled/1297746103.yml +213 -0
  84. data/spec/vcr/transaction/list-initial/{1296674173.yml → 1297746103.yml} +38 -35
  85. data/spec/vcr/transaction/lookup/1297746103.yml +213 -0
  86. data/spec/vcr/transaction/refund/1297746103.yml +213 -0
  87. data/spec/vcr/transaction/void/1297746103.yml +213 -0
  88. metadata +146 -139
  89. data/spec/vcr/account/list/1296674173.yml +0 -55
  90. data/spec/vcr/coupon/destroy/1296774903.yml +0 -207
  91. data/spec/vcr/credit/create/1296674173.yml +0 -121
  92. data/spec/vcr/credit/delete/1296674173.yml +0 -121
  93. data/spec/vcr/credit/list/1296674173.yml +0 -121
  94. data/spec/vcr/credit/lookup/1296674173.yml +0 -121
  95. data/spec/vcr/plan/delete/1296674173.yml +0 -225
  96. data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
  97. data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
  98. data/spec/vcr/transaction/refund/1296674173.yml +0 -287
  99. data/spec/vcr/transaction/void/1296674173.yml +0 -352
@@ -2,21 +2,25 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
5
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>coupon-create-1296774903</account-code>
9
+ <account-code>coupon-create-1299714521</account-code>
10
10
  <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <company-name>Recurly Ruby Gem</company-name>
14
+ <billing-info>
15
+ <credit-card>
16
+ </credit-card>
17
+ </billing-info>
14
18
  <accept-language type="yaml" nil="true"></accept-language>
15
19
  </account>
16
20
 
17
21
  headers:
18
22
  authorization:
19
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
23
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
20
24
  content-type:
21
25
  - application/xml
22
26
  accept:
@@ -33,9 +37,9 @@
33
37
  cache-control:
34
38
  - no-cache
35
39
  location:
36
- - http://litle-test.recurly.local:3000/accounts/coupon-create-1296774903
40
+ - http://app.recurly.local:3000/accounts/coupon-create-1299714521
37
41
  x-runtime:
38
- - "844"
42
+ - "565"
39
43
  content-type:
40
44
  - application/xml; charset=utf-8
41
45
  content-length:
@@ -43,18 +47,17 @@
43
47
  server:
44
48
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
49
  date:
46
- - Thu, 03 Feb 2011 23:15:18 GMT
50
+ - Fri, 11 Mar 2011 18:49:41 GMT
47
51
  connection:
48
52
  - close
49
53
  set-cookie:
50
- - account_credentials=ba6a3f642690766227ccea645786170547333116d87faabe016eb821ad7413fd7b143e082eff371170ef148151c2ddd3f568a4356d7287bfcb55a3304ce0fb93%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=d647a94b31e0d9645b3ec531dfabba14; domain=.recurly.local; path=/; HttpOnly
54
+ - account_credentials=c49e830ed38fe3e84df54568e5cc8a82317488cda09a2e9f5e68bd947df13035865ff17599a9aab90b78747db0731e3f5de995896f523ba003047c8970b11f97%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=9353d1436b27bb983025a044b08abf4b; domain=.recurly.local; path=/; HttpOnly
53
56
  body: |
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
58
  <account>
56
- <id>coupon-create-1296774903</id>
57
- <account_code>coupon-create-1296774903</account_code>
59
+ <id>coupon-create-1299714521</id>
60
+ <account_code>coupon-create-1299714521</account_code>
58
61
  <username></username>
59
62
  <email>verena@test.com</email>
60
63
  <first_name>Verena</first_name>
@@ -62,8 +65,8 @@
62
65
  <company_name>Recurly Ruby Gem</company_name>
63
66
  <balance_in_cents type="integer">0</balance_in_cents>
64
67
  <closed type="boolean">false</closed>
65
- <hosted_login_token>9d7a9cbdacfd43f7a2ec469f74645eca</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T23:15:18Z</created_at>
68
+ <hosted_login_token>a474946404734812824125db7d65e64c</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:49:41Z</created_at>
67
70
  <state>active</state>
68
71
  </account>
69
72
 
@@ -71,7 +74,7 @@
71
74
  - !ruby/struct:VCR::HTTPInteraction
72
75
  request: !ruby/struct:VCR::Request
73
76
  method: :post
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296774903/coupon.xml
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/coupon-create-1299714521/coupon.xml
75
78
  body: |
76
79
  <?xml version="1.0" encoding="UTF-8"?>
77
80
  <coupon>
@@ -80,7 +83,7 @@
80
83
 
81
84
  headers:
82
85
  authorization:
83
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
86
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
84
87
  content-type:
85
88
  - application/xml
86
89
  accept:
@@ -97,30 +100,30 @@
97
100
  cache-control:
98
101
  - no-cache
99
102
  x-runtime:
100
- - "578"
103
+ - "376"
101
104
  content-type:
102
105
  - application/xml; charset=utf-8
103
106
  content-length:
104
- - "522"
107
+ - "519"
105
108
  server:
106
109
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
107
110
  date:
108
- - Thu, 03 Feb 2011 23:15:21 GMT
111
+ - Fri, 11 Mar 2011 18:49:44 GMT
109
112
  connection:
110
113
  - close
111
114
  set-cookie:
112
- - _recurly_session=56fb7bc38d41878ef564f8501478e954; domain=.recurly.local; path=/; HttpOnly
115
+ - _recurly_session=793c52546ba220ad6fa9a1f3d116bc56; domain=.recurly.local; path=/; HttpOnly
113
116
  body: |
114
117
  <?xml version="1.0" encoding="UTF-8"?>
115
118
  <coupon>
116
- <account_code>coupon-create-1296774903</account_code>
119
+ <account_code>coupon-create-1299714521</account_code>
117
120
  <coupon_code>coupon</coupon_code>
118
121
  <name>coupon</name>
119
122
  <discount_in_cents type="integer"></discount_in_cents>
120
123
  <discount_percent type="integer">15</discount_percent>
121
124
  <redemption>
122
- <account_code>coupon-create-1296774903</account_code>
123
- <redeemed_at type="datetime">2011-02-03 23:15:21 UTC</redeemed_at>
125
+ <account_code>coupon-create-1299714521</account_code>
126
+ <redeemed_at type="datetime">2011-03-11T18:49:44Z</redeemed_at>
124
127
  <total_discounted_in_cents type="integer">0</total_discounted_in_cents>
125
128
  </redemption>
126
129
  </coupon>
@@ -129,11 +132,11 @@
129
132
  - !ruby/struct:VCR::HTTPInteraction
130
133
  request: !ruby/struct:VCR::Request
131
134
  method: :get
132
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296774903/coupon.xml
135
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/coupon-create-1299714521/coupon.xml
133
136
  body:
134
137
  headers:
135
138
  authorization:
136
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
139
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
137
140
  accept:
138
141
  - application/xml
139
142
  accept-encoding:
@@ -148,34 +151,34 @@
148
151
  message: "OK "
149
152
  headers:
150
153
  x-runtime:
151
- - "295"
154
+ - "327"
152
155
  content-type:
153
156
  - application/xml; charset=utf-8
154
157
  etag:
155
- - "\"5f8790c76e38901178e4fc498223ca45\""
158
+ - "\"bb6b757f674150db31d747121a250e55\""
156
159
  cache-control:
157
160
  - private, max-age=0, must-revalidate
158
161
  content-length:
159
- - "522"
162
+ - "519"
160
163
  server:
161
164
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
162
165
  date:
163
- - Thu, 03 Feb 2011 23:15:24 GMT
166
+ - Fri, 11 Mar 2011 18:49:46 GMT
164
167
  connection:
165
168
  - close
166
169
  set-cookie:
167
- - _recurly_session=6c9df18b6b5f0a67559d3273d4bb2512; domain=.recurly.local; path=/; HttpOnly
170
+ - _recurly_session=0333dba6e7458413a215bb1e6d7121a6; domain=.recurly.local; path=/; HttpOnly
168
171
  body: |
169
172
  <?xml version="1.0" encoding="UTF-8"?>
170
173
  <coupon>
171
- <account_code>coupon-create-1296774903</account_code>
174
+ <account_code>coupon-create-1299714521</account_code>
172
175
  <coupon_code>coupon</coupon_code>
173
176
  <name>coupon</name>
174
177
  <discount_in_cents type="integer"></discount_in_cents>
175
178
  <discount_percent type="integer">15</discount_percent>
176
179
  <redemption>
177
- <account_code>coupon-create-1296774903</account_code>
178
- <redeemed_at type="datetime">2011-02-03 23:15:21 UTC</redeemed_at>
180
+ <account_code>coupon-create-1299714521</account_code>
181
+ <redeemed_at type="datetime">2011-03-11T18:49:44Z</redeemed_at>
179
182
  <total_discounted_in_cents type="integer">0</total_discounted_in_cents>
180
183
  </redemption>
181
184
  </coupon>
@@ -2,21 +2,25 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
5
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>coupon-destroy-1296688818</account-code>
9
+ <account-code>coupon-destroy-1299714521</account-code>
10
10
  <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <company-name>Recurly Ruby Gem</company-name>
14
+ <billing-info>
15
+ <credit-card>
16
+ </credit-card>
17
+ </billing-info>
14
18
  <accept-language type="yaml" nil="true"></accept-language>
15
19
  </account>
16
20
 
17
21
  headers:
18
22
  authorization:
19
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
23
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
20
24
  content-type:
21
25
  - application/xml
22
26
  accept:
@@ -33,9 +37,9 @@
33
37
  cache-control:
34
38
  - no-cache
35
39
  location:
36
- - http://litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818
40
+ - http://app.recurly.local:3000/accounts/coupon-destroy-1299714521
37
41
  x-runtime:
38
- - "623"
42
+ - "559"
39
43
  content-type:
40
44
  - application/xml; charset=utf-8
41
45
  content-length:
@@ -43,18 +47,17 @@
43
47
  server:
44
48
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
49
  date:
46
- - Thu, 03 Feb 2011 22:19:27 GMT
50
+ - Fri, 11 Mar 2011 18:49:48 GMT
47
51
  connection:
48
52
  - close
49
53
  set-cookie:
50
- - account_credentials=668c2883f0ac8767e186d42d39ec44e8ffc076327aa1ad3ffbd84f5e373c698e21eb93bd331b416c13571b48a66d2206b611a89e867759206c45c30d3d31b033%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=247668332584cc3dbdc783c05e0fe3eb; domain=.recurly.local; path=/; HttpOnly
54
+ - account_credentials=947fd645f934f7313decb566b66dccee41b8a2a50f0c75cdd7c76419f9c6884b43d10693c840d510471e1fd086800c28f1e4b80af5c50500db0a39fc513b9304%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=ed4c37176cdfe8020f05ebb39ae3b997; domain=.recurly.local; path=/; HttpOnly
53
56
  body: |
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
58
  <account>
56
- <id>coupon-destroy-1296688818</id>
57
- <account_code>coupon-destroy-1296688818</account_code>
59
+ <id>coupon-destroy-1299714521</id>
60
+ <account_code>coupon-destroy-1299714521</account_code>
58
61
  <username></username>
59
62
  <email>verena@test.com</email>
60
63
  <first_name>Verena</first_name>
@@ -62,8 +65,8 @@
62
65
  <company_name>Recurly Ruby Gem</company_name>
63
66
  <balance_in_cents type="integer">0</balance_in_cents>
64
67
  <closed type="boolean">false</closed>
65
- <hosted_login_token>5f286e20e92249308a61ba779d6bb3ba</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:19:27Z</created_at>
68
+ <hosted_login_token>6249dca8ed234895ba8a6b5df8552663</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:49:48Z</created_at>
67
70
  <state>active</state>
68
71
  </account>
69
72
 
@@ -71,7 +74,7 @@
71
74
  - !ruby/struct:VCR::HTTPInteraction
72
75
  request: !ruby/struct:VCR::Request
73
76
  method: :post
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/coupon-destroy-1299714521/coupon.xml
75
78
  body: |
76
79
  <?xml version="1.0" encoding="UTF-8"?>
77
80
  <coupon>
@@ -80,7 +83,7 @@
80
83
 
81
84
  headers:
82
85
  authorization:
83
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
86
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
84
87
  content-type:
85
88
  - application/xml
86
89
  accept:
@@ -97,30 +100,30 @@
97
100
  cache-control:
98
101
  - no-cache
99
102
  x-runtime:
100
- - "377"
103
+ - "250"
101
104
  content-type:
102
105
  - application/xml; charset=utf-8
103
106
  content-length:
104
- - "524"
107
+ - "521"
105
108
  server:
106
109
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
107
110
  date:
108
- - Thu, 03 Feb 2011 22:19:29 GMT
111
+ - Fri, 11 Mar 2011 18:49:50 GMT
109
112
  connection:
110
113
  - close
111
114
  set-cookie:
112
- - _recurly_session=34557113be2a6095ec883937a2311a20; domain=.recurly.local; path=/; HttpOnly
115
+ - _recurly_session=6e8e02a35bda68aa4322d2c9d518497b; domain=.recurly.local; path=/; HttpOnly
113
116
  body: |
114
117
  <?xml version="1.0" encoding="UTF-8"?>
115
118
  <coupon>
116
- <account_code>coupon-destroy-1296688818</account_code>
119
+ <account_code>coupon-destroy-1299714521</account_code>
117
120
  <coupon_code>coupon</coupon_code>
118
121
  <name>coupon</name>
119
122
  <discount_in_cents type="integer"></discount_in_cents>
120
123
  <discount_percent type="integer">15</discount_percent>
121
124
  <redemption>
122
- <account_code>coupon-destroy-1296688818</account_code>
123
- <redeemed_at type="datetime">2011-02-03 22:19:29 UTC</redeemed_at>
125
+ <account_code>coupon-destroy-1299714521</account_code>
126
+ <redeemed_at type="datetime">2011-03-11T18:49:50Z</redeemed_at>
124
127
  <total_discounted_in_cents type="integer">0</total_discounted_in_cents>
125
128
  </redemption>
126
129
  </coupon>
@@ -129,11 +132,11 @@
129
132
  - !ruby/struct:VCR::HTTPInteraction
130
133
  request: !ruby/struct:VCR::Request
131
134
  method: :delete
132
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
135
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/coupon-destroy-1299714521/coupon.xml
133
136
  body:
134
137
  headers:
135
138
  authorization:
136
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
139
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
137
140
  accept:
138
141
  - application/xml
139
142
  user-agent:
@@ -148,7 +151,7 @@
148
151
  cache-control:
149
152
  - no-cache
150
153
  x-runtime:
151
- - "71"
154
+ - "204"
152
155
  content-type:
153
156
  - application/xml; charset=utf-8
154
157
  content-length:
@@ -156,21 +159,21 @@
156
159
  server:
157
160
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
158
161
  date:
159
- - Thu, 03 Feb 2011 22:19:31 GMT
162
+ - Fri, 11 Mar 2011 18:49:53 GMT
160
163
  connection:
161
164
  - close
162
165
  set-cookie:
163
- - _recurly_session=4d57ea82bd4d31080d6d0a45c2e55797; domain=.recurly.local; path=/; HttpOnly
166
+ - _recurly_session=f69aafbe08c4b55ebf1630ae4e4722e6; domain=.recurly.local; path=/; HttpOnly
164
167
  body: " "
165
168
  http_version: "1.1"
166
169
  - !ruby/struct:VCR::HTTPInteraction
167
170
  request: !ruby/struct:VCR::Request
168
171
  method: :get
169
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
172
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/coupon-destroy-1299714521/coupon.xml
170
173
  body:
171
174
  headers:
172
175
  authorization:
173
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
176
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
174
177
  accept:
175
178
  - application/xml
176
179
  accept-encoding:
@@ -193,11 +196,11 @@
193
196
  server:
194
197
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
195
198
  date:
196
- - Thu, 03 Feb 2011 22:19:32 GMT
199
+ - Fri, 11 Mar 2011 18:49:55 GMT
197
200
  connection:
198
201
  - close
199
202
  set-cookie:
200
- - _recurly_session=e2c9db9faf3975dac6b70032c7cfc6bc; domain=.recurly.local; path=/; HttpOnly
203
+ - _recurly_session=c6ff26c9c370548871de60a3c0083823; domain=.recurly.local; path=/; HttpOnly
201
204
  body: |
202
205
  <?xml version="1.0" encoding="UTF-8"?>
203
206
  <errors>
@@ -2,21 +2,25 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts.xml
5
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml
6
6
  body: |
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
- <account-code>coupon-create-1296688818</account-code>
9
+ <account-code>credit-create-1299714599</account-code>
10
10
  <first-name>Verena</first-name>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <company-name>Recurly Ruby Gem</company-name>
14
+ <billing-info>
15
+ <credit-card>
16
+ </credit-card>
17
+ </billing-info>
14
18
  <accept-language type="yaml" nil="true"></accept-language>
15
19
  </account>
16
20
 
17
21
  headers:
18
22
  authorization:
19
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
23
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
20
24
  content-type:
21
25
  - application/xml
22
26
  accept:
@@ -33,9 +37,9 @@
33
37
  cache-control:
34
38
  - no-cache
35
39
  location:
36
- - http://litle-test.recurly.local:3000/accounts/coupon-create-1296688818
40
+ - http://app.recurly.local:3000/accounts/credit-create-1299714599
37
41
  x-runtime:
38
- - "483"
42
+ - "439"
39
43
  content-type:
40
44
  - application/xml; charset=utf-8
41
45
  content-length:
@@ -43,18 +47,17 @@
43
47
  server:
44
48
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
49
  date:
46
- - Thu, 03 Feb 2011 22:19:20 GMT
50
+ - Fri, 11 Mar 2011 18:49:57 GMT
47
51
  connection:
48
52
  - close
49
53
  set-cookie:
50
- - account_credentials=2a7936c545d00f94857e0c76d3d76652f7fef5968e53070f98509b4488800f0f620c1502444cfd13c746d2286cbcd77b652e53c665a1c008e4403c2e4eb5c4b1%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=03e3d05cee1b18a1574f53271d9da774; domain=.recurly.local; path=/; HttpOnly
54
+ - account_credentials=495220f8521542269cbde4abfb2ca30e51cfc696f594c16edf627a1265135e262517fc50143e9e329639e61827f14ea358c829a79b9f067a38226aeb1b9201df%3A%3A; domain=.recurly.local; path=/
55
+ - _recurly_session=c334af861198953880be06c2bcd7a8d1; domain=.recurly.local; path=/; HttpOnly
53
56
  body: |
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
58
  <account>
56
- <id>coupon-create-1296688818</id>
57
- <account_code>coupon-create-1296688818</account_code>
59
+ <id>credit-create-1299714599</id>
60
+ <account_code>credit-create-1299714599</account_code>
58
61
  <username></username>
59
62
  <email>verena@test.com</email>
60
63
  <first_name>Verena</first_name>
@@ -62,8 +65,8 @@
62
65
  <company_name>Recurly Ruby Gem</company_name>
63
66
  <balance_in_cents type="integer">0</balance_in_cents>
64
67
  <closed type="boolean">false</closed>
65
- <hosted_login_token>f0016ed8cbcf41b48370d836dc848109</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:19:20Z</created_at>
68
+ <hosted_login_token>cb1a4b1c480846a6818446c9c712f7f8</hosted_login_token>
69
+ <created_at type="datetime">2011-03-11T18:49:57Z</created_at>
67
70
  <state>active</state>
68
71
  </account>
69
72
 
@@ -71,16 +74,17 @@
71
74
  - !ruby/struct:VCR::HTTPInteraction
72
75
  request: !ruby/struct:VCR::Request
73
76
  method: :post
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296688818/coupon.xml
77
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-create-1299714599/credits.xml
75
78
  body: |
76
79
  <?xml version="1.0" encoding="UTF-8"?>
77
- <coupon>
78
- <coupon-code>coupon</coupon-code>
79
- </coupon>
80
+ <credit>
81
+ <amount-in-cents type="integer">1005</amount-in-cents>
82
+ <description>free moniez</description>
83
+ </credit>
80
84
 
81
85
  headers:
82
86
  authorization:
83
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
87
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
84
88
  content-type:
85
89
  - application/xml
86
90
  accept:
@@ -97,43 +101,41 @@
97
101
  cache-control:
98
102
  - no-cache
99
103
  x-runtime:
100
- - "293"
104
+ - "229"
101
105
  content-type:
102
106
  - application/xml; charset=utf-8
103
107
  content-length:
104
- - "522"
108
+ - "512"
105
109
  server:
106
110
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
107
111
  date:
108
- - Thu, 03 Feb 2011 22:19:22 GMT
112
+ - Fri, 11 Mar 2011 18:49:59 GMT
109
113
  connection:
110
114
  - close
111
115
  set-cookie:
112
- - _recurly_session=0e5cede6ea512add19f1fb53a4c2c6cd; domain=.recurly.local; path=/; HttpOnly
116
+ - _recurly_session=ab81d3b144883cce4250d3bee66228b9; domain=.recurly.local; path=/; HttpOnly
113
117
  body: |
114
118
  <?xml version="1.0" encoding="UTF-8"?>
115
- <coupon>
116
- <account_code>coupon-create-1296688818</account_code>
117
- <coupon_code>coupon</coupon_code>
118
- <name>coupon</name>
119
- <discount_in_cents type="integer"></discount_in_cents>
120
- <discount_percent type="integer">15</discount_percent>
121
- <redemption>
122
- <account_code>coupon-create-1296688818</account_code>
123
- <redeemed_at type="datetime">2011-02-03 22:19:22 UTC</redeemed_at>
124
- <total_discounted_in_cents type="integer">0</total_discounted_in_cents>
125
- </redemption>
126
- </coupon>
119
+ <credit type="credit">
120
+ <id>5aef8d81f0964dab852b01cf7be6a564</id>
121
+ <account_code>credit-create-1299714599</account_code>
122
+ <amount_in_cents type="integer">-1005</amount_in_cents>
123
+ <start_date type="datetime">2011-03-11T18:49:59Z</start_date>
124
+ <end_date nil="true" type="datetime"></end_date>
125
+ <invoice_number nil="true" type="integer"></invoice_number>
126
+ <description>free moniez</description>
127
+ <created_at type="datetime">2011-03-11T18:49:59Z</created_at>
128
+ </credit>
127
129
 
128
130
  http_version: "1.1"
129
131
  - !ruby/struct:VCR::HTTPInteraction
130
132
  request: !ruby/struct:VCR::Request
131
133
  method: :get
132
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296688818/coupon.xml
134
+ uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/credit-create-1299714599/credits/5aef8d81f0964dab852b01cf7be6a564.xml
133
135
  body:
134
136
  headers:
135
137
  authorization:
136
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
138
+ - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw==
137
139
  accept:
138
140
  - application/xml
139
141
  accept-encoding:
@@ -148,36 +150,34 @@
148
150
  message: "OK "
149
151
  headers:
150
152
  x-runtime:
151
- - "253"
153
+ - "198"
152
154
  content-type:
153
155
  - application/xml; charset=utf-8
154
156
  etag:
155
- - "\"90327603dcc2147a16e9fb91ae976062\""
157
+ - "\"62b4f4c3427d8c6b868565126ac16dc3\""
156
158
  cache-control:
157
159
  - private, max-age=0, must-revalidate
158
160
  content-length:
159
- - "522"
161
+ - "512"
160
162
  server:
161
163
  - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
162
164
  date:
163
- - Thu, 03 Feb 2011 22:19:24 GMT
165
+ - Fri, 11 Mar 2011 18:50:01 GMT
164
166
  connection:
165
167
  - close
166
168
  set-cookie:
167
- - _recurly_session=b6b41696ec251118381e38cae2664bb2; domain=.recurly.local; path=/; HttpOnly
169
+ - _recurly_session=007d90729b0c1e3e5709af6e67f8ca00; domain=.recurly.local; path=/; HttpOnly
168
170
  body: |
169
171
  <?xml version="1.0" encoding="UTF-8"?>
170
- <coupon>
171
- <account_code>coupon-create-1296688818</account_code>
172
- <coupon_code>coupon</coupon_code>
173
- <name>coupon</name>
174
- <discount_in_cents type="integer"></discount_in_cents>
175
- <discount_percent type="integer">15</discount_percent>
176
- <redemption>
177
- <account_code>coupon-create-1296688818</account_code>
178
- <redeemed_at type="datetime">2011-02-03 22:19:22 UTC</redeemed_at>
179
- <total_discounted_in_cents type="integer">0</total_discounted_in_cents>
180
- </redemption>
181
- </coupon>
172
+ <credit type="credit">
173
+ <id>5aef8d81f0964dab852b01cf7be6a564</id>
174
+ <account_code>credit-create-1299714599</account_code>
175
+ <amount_in_cents type="integer">-1005</amount_in_cents>
176
+ <start_date type="datetime">2011-03-11T18:49:59Z</start_date>
177
+ <end_date nil="true" type="datetime"></end_date>
178
+ <invoice_number nil="true" type="integer"></invoice_number>
179
+ <description>free moniez</description>
180
+ <created_at type="datetime">2011-03-11T18:49:59Z</created_at>
181
+ </credit>
182
182
 
183
183
  http_version: "1.1"