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.
- data/LICENSE +1 -1
- data/README.md +4 -4
- data/lib/recurly.rb +8 -1
- data/lib/recurly/account.rb +5 -0
- data/lib/recurly/coupon.rb +5 -0
- data/lib/recurly/rails3/recurly.rake +3 -18
- data/lib/recurly/version.rb +1 -1
- data/spec/config/{test.yml → test1.yml} +0 -0
- data/spec/config/test2.yml +9 -0
- data/spec/integration/account_spec.rb +3 -3
- data/spec/integration/billing_info_spec.rb +4 -8
- data/spec/integration/coupon_spec.rb +49 -0
- data/spec/integration/plan_spec.rb +0 -28
- data/spec/integration/transaction_spec.rb +3 -3
- data/spec/spec_helper.rb +6 -0
- data/spec/support/factory.rb +1 -1
- data/spec/unit/config_spec.rb +9 -2
- data/spec/vcr/account/accept-language-account/{1294473653.yml → 1296674173.yml} +29 -27
- data/spec/vcr/account/close/{1294473761.yml → 1296674173.yml} +71 -67
- data/spec/vcr/account/create-blank/{1294473761.yml → 1296674173.yml} +20 -18
- data/spec/vcr/account/create-duplicate/{1294473761.yml → 1296674173.yml} +42 -38
- data/spec/vcr/account/create-min/{1294473761.yml → 1296674173.yml} +26 -24
- data/spec/vcr/account/create/{1294473761.yml → 1296674173.yml} +29 -27
- data/spec/vcr/account/find/{1294473761.yml → 1296674173.yml} +71 -63
- data/spec/vcr/account/list/1296674173.yml +55 -0
- data/spec/vcr/account/update/{1294473761.yml → 1296674173.yml} +113 -107
- data/spec/vcr/billing/create/{1286682213.yml → 1296690812.yml} +86 -82
- data/spec/vcr/billing/destroy/{1286682213.yml → 1296690812.yml} +126 -142
- data/spec/vcr/billing/find/{1286682213.yml → 1296690812.yml} +115 -109
- data/spec/vcr/billing/update/{1286682213.yml → 1296690812.yml} +119 -115
- data/spec/vcr/charge/create/{1287465632.yml → 1296674173.yml} +109 -103
- data/spec/vcr/charge/delete-uninvoiced/{1287465632.yml → 1296674173.yml} +129 -117
- data/spec/vcr/charge/list-all/{1287465632.yml → 1296674173.yml} +131 -121
- data/spec/vcr/charge/list-invoiced/{1287465632.yml → 1296674173.yml} +195 -177
- data/spec/vcr/charge/list-pending/{1287465632.yml → 1296674173.yml} +131 -121
- data/spec/vcr/charge/lookup/{1287465632.yml → 1296674173.yml} +77 -71
- data/spec/vcr/coupon/create/1296688818.yml +183 -0
- data/spec/vcr/coupon/create/1296774903.yml +183 -0
- data/spec/vcr/coupon/destroy/1296688818.yml +207 -0
- data/spec/vcr/coupon/destroy/1296774903.yml +207 -0
- data/spec/vcr/credit/create/1296674173.yml +121 -0
- data/spec/vcr/credit/delete/1296674173.yml +121 -0
- data/spec/vcr/credit/list/1296674173.yml +121 -0
- data/spec/vcr/credit/lookup/1296674173.yml +121 -0
- data/spec/vcr/invoice/create-no-charges/{1287167121.yml → 1296674173.yml} +79 -75
- data/spec/vcr/invoice/create/{1287167121.yml → 1296674173.yml} +141 -130
- data/spec/vcr/invoice/list/{1287167121.yml → 1296674173.yml} +196 -180
- data/spec/vcr/invoice/lookup/{1287167121.yml → 1296674173.yml} +145 -133
- data/spec/vcr/plan/all.yml +86 -136
- data/spec/vcr/plan/delete/{1286677585.yml → 1296674173.yml} +87 -79
- data/spec/vcr/plan/find.yml +73 -91
- data/spec/vcr/plan/update.yml +80 -76
- data/spec/vcr/subscription/addons/add/1296674173.yml +225 -0
- data/spec/vcr/subscription/addons/create/1296674173.yml +225 -0
- data/spec/vcr/subscription/addons/remove/1296674173.yml +225 -0
- data/spec/vcr/subscription/cancel-with-code/{1287455769.yml → 1296674173.yml} +201 -201
- data/spec/vcr/subscription/cancel/{1287455769.yml → 1296674173.yml} +173 -175
- data/spec/vcr/subscription/change1/{1287455769.yml → 1296674173.yml} +172 -174
- data/spec/vcr/subscription/change2/{1287455769.yml → 1296674173.yml} +172 -174
- data/spec/vcr/subscription/create/{1287455769.yml → 1296674173.yml} +93 -99
- data/spec/vcr/subscription/find/{1287455769.yml → 1296674173.yml} +119 -123
- data/spec/vcr/subscription/reactivate/{1287455769.yml → 1296674173.yml} +194 -196
- data/spec/vcr/subscription/{refund-none/1287455769.yml → refund-full/1296674173.yml} +162 -162
- data/spec/vcr/subscription/{refund-full/1287455769.yml → refund-none/1296674173.yml} +162 -162
- data/spec/vcr/subscription/refund-partial/{1287455769.yml → 1296674173.yml} +162 -162
- data/spec/vcr/transaction/all/{1289558212.yml → 1296674173.yml} +155 -153
- data/spec/vcr/transaction/create-no-account/{1289558212.yml → 1296674173.yml} +37 -35
- data/spec/vcr/transaction/create-with-account/{1289558212.yml → 1296674173.yml} +91 -87
- data/spec/vcr/transaction/list-filled/{1289558212.yml → 1296674173.yml} +200 -190
- data/spec/vcr/transaction/list-initial/{1289558212.yml → 1296674173.yml} +92 -88
- data/spec/vcr/transaction/lookup/{1289558212.yml → 1296674173.yml} +241 -227
- data/spec/vcr/transaction/refund/{1289558212.yml → 1296674173.yml} +119 -115
- data/spec/vcr/transaction/void/1296674173.yml +352 -0
- metadata +122 -122
- data/spec/config/recurly.yml +0 -4
- data/spec/vcr/account/accept-language-account/1294473761.yml +0 -68
- data/spec/vcr/account/accept-language/1294473117.yml +0 -167
- data/spec/vcr/account/list/1294473761.yml +0 -1597
- data/spec/vcr/credit/create/1287461400.yml +0 -174
- data/spec/vcr/credit/delete/1287461400.yml +0 -249
- data/spec/vcr/credit/list/1287461400.yml +0 -306
- data/spec/vcr/credit/lookup/1287461400.yml +0 -174
- data/spec/vcr/subscription/addons/add/1292420980.yml +0 -479
- data/spec/vcr/subscription/addons/create/1292420980.yml +0 -318
- data/spec/vcr/subscription/addons/remove/1292420980.yml +0 -448
- data/spec/vcr/transaction/void/1289558212.yml +0 -601
@@ -0,0 +1,183 @@
|
|
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>coupon-create-1296688818</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/coupon-create-1296688818
|
37
|
+
x-runtime:
|
38
|
+
- "483"
|
39
|
+
content-type:
|
40
|
+
- application/xml; charset=utf-8
|
41
|
+
content-length:
|
42
|
+
- "581"
|
43
|
+
server:
|
44
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
45
|
+
date:
|
46
|
+
- Thu, 03 Feb 2011 22:19:20 GMT
|
47
|
+
connection:
|
48
|
+
- close
|
49
|
+
set-cookie:
|
50
|
+
- account_credentials=2a7936c545d00f94857e0c76d3d76652f7fef5968e53070f98509b4488800f0f620c1502444cfd13c746d2286cbcd77b652e53c665a1c008e4403c2e4eb5c4b1%3A%3A; domain=.recurly.local; path=/
|
51
|
+
- ""
|
52
|
+
- _recurly_session=03e3d05cee1b18a1574f53271d9da774; domain=.recurly.local; path=/; HttpOnly
|
53
|
+
body: |
|
54
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
55
|
+
<account>
|
56
|
+
<id>coupon-create-1296688818</id>
|
57
|
+
<account_code>coupon-create-1296688818</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>f0016ed8cbcf41b48370d836dc848109</hosted_login_token>
|
66
|
+
<created_at type="datetime">2011-02-03T22:19:20Z</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: :post
|
74
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296688818/coupon.xml
|
75
|
+
body: |
|
76
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
77
|
+
<coupon>
|
78
|
+
<coupon-code>coupon</coupon-code>
|
79
|
+
</coupon>
|
80
|
+
|
81
|
+
headers:
|
82
|
+
authorization:
|
83
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
84
|
+
content-type:
|
85
|
+
- application/xml
|
86
|
+
accept:
|
87
|
+
- "*/*"
|
88
|
+
user-agent:
|
89
|
+
- Ruby
|
90
|
+
connection:
|
91
|
+
- close
|
92
|
+
response: !ruby/struct:VCR::Response
|
93
|
+
status: !ruby/struct:VCR::ResponseStatus
|
94
|
+
code: 201
|
95
|
+
message: "Created "
|
96
|
+
headers:
|
97
|
+
cache-control:
|
98
|
+
- no-cache
|
99
|
+
x-runtime:
|
100
|
+
- "293"
|
101
|
+
content-type:
|
102
|
+
- application/xml; charset=utf-8
|
103
|
+
content-length:
|
104
|
+
- "522"
|
105
|
+
server:
|
106
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
107
|
+
date:
|
108
|
+
- Thu, 03 Feb 2011 22:19:22 GMT
|
109
|
+
connection:
|
110
|
+
- close
|
111
|
+
set-cookie:
|
112
|
+
- _recurly_session=0e5cede6ea512add19f1fb53a4c2c6cd; domain=.recurly.local; path=/; HttpOnly
|
113
|
+
body: |
|
114
|
+
<?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>
|
127
|
+
|
128
|
+
http_version: "1.1"
|
129
|
+
- !ruby/struct:VCR::HTTPInteraction
|
130
|
+
request: !ruby/struct:VCR::Request
|
131
|
+
method: :get
|
132
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296688818/coupon.xml
|
133
|
+
body:
|
134
|
+
headers:
|
135
|
+
authorization:
|
136
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
137
|
+
accept:
|
138
|
+
- application/xml
|
139
|
+
accept-encoding:
|
140
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
141
|
+
user-agent:
|
142
|
+
- Ruby
|
143
|
+
connection:
|
144
|
+
- close
|
145
|
+
response: !ruby/struct:VCR::Response
|
146
|
+
status: !ruby/struct:VCR::ResponseStatus
|
147
|
+
code: 200
|
148
|
+
message: "OK "
|
149
|
+
headers:
|
150
|
+
x-runtime:
|
151
|
+
- "253"
|
152
|
+
content-type:
|
153
|
+
- application/xml; charset=utf-8
|
154
|
+
etag:
|
155
|
+
- "\"90327603dcc2147a16e9fb91ae976062\""
|
156
|
+
cache-control:
|
157
|
+
- private, max-age=0, must-revalidate
|
158
|
+
content-length:
|
159
|
+
- "522"
|
160
|
+
server:
|
161
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
162
|
+
date:
|
163
|
+
- Thu, 03 Feb 2011 22:19:24 GMT
|
164
|
+
connection:
|
165
|
+
- close
|
166
|
+
set-cookie:
|
167
|
+
- _recurly_session=b6b41696ec251118381e38cae2664bb2; domain=.recurly.local; path=/; HttpOnly
|
168
|
+
body: |
|
169
|
+
<?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>
|
182
|
+
|
183
|
+
http_version: "1.1"
|
@@ -0,0 +1,183 @@
|
|
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>coupon-create-1296774903</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/coupon-create-1296774903
|
37
|
+
x-runtime:
|
38
|
+
- "844"
|
39
|
+
content-type:
|
40
|
+
- application/xml; charset=utf-8
|
41
|
+
content-length:
|
42
|
+
- "581"
|
43
|
+
server:
|
44
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
45
|
+
date:
|
46
|
+
- Thu, 03 Feb 2011 23:15:18 GMT
|
47
|
+
connection:
|
48
|
+
- close
|
49
|
+
set-cookie:
|
50
|
+
- account_credentials=ba6a3f642690766227ccea645786170547333116d87faabe016eb821ad7413fd7b143e082eff371170ef148151c2ddd3f568a4356d7287bfcb55a3304ce0fb93%3A%3A; domain=.recurly.local; path=/
|
51
|
+
- ""
|
52
|
+
- _recurly_session=d647a94b31e0d9645b3ec531dfabba14; domain=.recurly.local; path=/; HttpOnly
|
53
|
+
body: |
|
54
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
55
|
+
<account>
|
56
|
+
<id>coupon-create-1296774903</id>
|
57
|
+
<account_code>coupon-create-1296774903</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>9d7a9cbdacfd43f7a2ec469f74645eca</hosted_login_token>
|
66
|
+
<created_at type="datetime">2011-02-03T23:15:18Z</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: :post
|
74
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296774903/coupon.xml
|
75
|
+
body: |
|
76
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
77
|
+
<coupon>
|
78
|
+
<coupon-code>coupon</coupon-code>
|
79
|
+
</coupon>
|
80
|
+
|
81
|
+
headers:
|
82
|
+
authorization:
|
83
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
84
|
+
content-type:
|
85
|
+
- application/xml
|
86
|
+
accept:
|
87
|
+
- "*/*"
|
88
|
+
user-agent:
|
89
|
+
- Ruby
|
90
|
+
connection:
|
91
|
+
- close
|
92
|
+
response: !ruby/struct:VCR::Response
|
93
|
+
status: !ruby/struct:VCR::ResponseStatus
|
94
|
+
code: 201
|
95
|
+
message: "Created "
|
96
|
+
headers:
|
97
|
+
cache-control:
|
98
|
+
- no-cache
|
99
|
+
x-runtime:
|
100
|
+
- "578"
|
101
|
+
content-type:
|
102
|
+
- application/xml; charset=utf-8
|
103
|
+
content-length:
|
104
|
+
- "522"
|
105
|
+
server:
|
106
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
107
|
+
date:
|
108
|
+
- Thu, 03 Feb 2011 23:15:21 GMT
|
109
|
+
connection:
|
110
|
+
- close
|
111
|
+
set-cookie:
|
112
|
+
- _recurly_session=56fb7bc38d41878ef564f8501478e954; domain=.recurly.local; path=/; HttpOnly
|
113
|
+
body: |
|
114
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
115
|
+
<coupon>
|
116
|
+
<account_code>coupon-create-1296774903</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-1296774903</account_code>
|
123
|
+
<redeemed_at type="datetime">2011-02-03 23:15:21 UTC</redeemed_at>
|
124
|
+
<total_discounted_in_cents type="integer">0</total_discounted_in_cents>
|
125
|
+
</redemption>
|
126
|
+
</coupon>
|
127
|
+
|
128
|
+
http_version: "1.1"
|
129
|
+
- !ruby/struct:VCR::HTTPInteraction
|
130
|
+
request: !ruby/struct:VCR::Request
|
131
|
+
method: :get
|
132
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-create-1296774903/coupon.xml
|
133
|
+
body:
|
134
|
+
headers:
|
135
|
+
authorization:
|
136
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
137
|
+
accept:
|
138
|
+
- application/xml
|
139
|
+
accept-encoding:
|
140
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
141
|
+
user-agent:
|
142
|
+
- Ruby
|
143
|
+
connection:
|
144
|
+
- close
|
145
|
+
response: !ruby/struct:VCR::Response
|
146
|
+
status: !ruby/struct:VCR::ResponseStatus
|
147
|
+
code: 200
|
148
|
+
message: "OK "
|
149
|
+
headers:
|
150
|
+
x-runtime:
|
151
|
+
- "295"
|
152
|
+
content-type:
|
153
|
+
- application/xml; charset=utf-8
|
154
|
+
etag:
|
155
|
+
- "\"5f8790c76e38901178e4fc498223ca45\""
|
156
|
+
cache-control:
|
157
|
+
- private, max-age=0, must-revalidate
|
158
|
+
content-length:
|
159
|
+
- "522"
|
160
|
+
server:
|
161
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
162
|
+
date:
|
163
|
+
- Thu, 03 Feb 2011 23:15:24 GMT
|
164
|
+
connection:
|
165
|
+
- close
|
166
|
+
set-cookie:
|
167
|
+
- _recurly_session=6c9df18b6b5f0a67559d3273d4bb2512; domain=.recurly.local; path=/; HttpOnly
|
168
|
+
body: |
|
169
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
170
|
+
<coupon>
|
171
|
+
<account_code>coupon-create-1296774903</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-1296774903</account_code>
|
178
|
+
<redeemed_at type="datetime">2011-02-03 23:15:21 UTC</redeemed_at>
|
179
|
+
<total_discounted_in_cents type="integer">0</total_discounted_in_cents>
|
180
|
+
</redemption>
|
181
|
+
</coupon>
|
182
|
+
|
183
|
+
http_version: "1.1"
|
@@ -0,0 +1,207 @@
|
|
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>coupon-destroy-1296688818</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/coupon-destroy-1296688818
|
37
|
+
x-runtime:
|
38
|
+
- "623"
|
39
|
+
content-type:
|
40
|
+
- application/xml; charset=utf-8
|
41
|
+
content-length:
|
42
|
+
- "583"
|
43
|
+
server:
|
44
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
45
|
+
date:
|
46
|
+
- Thu, 03 Feb 2011 22:19:27 GMT
|
47
|
+
connection:
|
48
|
+
- close
|
49
|
+
set-cookie:
|
50
|
+
- account_credentials=668c2883f0ac8767e186d42d39ec44e8ffc076327aa1ad3ffbd84f5e373c698e21eb93bd331b416c13571b48a66d2206b611a89e867759206c45c30d3d31b033%3A%3A; domain=.recurly.local; path=/
|
51
|
+
- ""
|
52
|
+
- _recurly_session=247668332584cc3dbdc783c05e0fe3eb; domain=.recurly.local; path=/; HttpOnly
|
53
|
+
body: |
|
54
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
55
|
+
<account>
|
56
|
+
<id>coupon-destroy-1296688818</id>
|
57
|
+
<account_code>coupon-destroy-1296688818</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>5f286e20e92249308a61ba779d6bb3ba</hosted_login_token>
|
66
|
+
<created_at type="datetime">2011-02-03T22:19:27Z</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: :post
|
74
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
|
75
|
+
body: |
|
76
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
77
|
+
<coupon>
|
78
|
+
<coupon-code>coupon</coupon-code>
|
79
|
+
</coupon>
|
80
|
+
|
81
|
+
headers:
|
82
|
+
authorization:
|
83
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
84
|
+
content-type:
|
85
|
+
- application/xml
|
86
|
+
accept:
|
87
|
+
- "*/*"
|
88
|
+
user-agent:
|
89
|
+
- Ruby
|
90
|
+
connection:
|
91
|
+
- close
|
92
|
+
response: !ruby/struct:VCR::Response
|
93
|
+
status: !ruby/struct:VCR::ResponseStatus
|
94
|
+
code: 201
|
95
|
+
message: "Created "
|
96
|
+
headers:
|
97
|
+
cache-control:
|
98
|
+
- no-cache
|
99
|
+
x-runtime:
|
100
|
+
- "377"
|
101
|
+
content-type:
|
102
|
+
- application/xml; charset=utf-8
|
103
|
+
content-length:
|
104
|
+
- "524"
|
105
|
+
server:
|
106
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
107
|
+
date:
|
108
|
+
- Thu, 03 Feb 2011 22:19:29 GMT
|
109
|
+
connection:
|
110
|
+
- close
|
111
|
+
set-cookie:
|
112
|
+
- _recurly_session=34557113be2a6095ec883937a2311a20; domain=.recurly.local; path=/; HttpOnly
|
113
|
+
body: |
|
114
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
115
|
+
<coupon>
|
116
|
+
<account_code>coupon-destroy-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-destroy-1296688818</account_code>
|
123
|
+
<redeemed_at type="datetime">2011-02-03 22:19:29 UTC</redeemed_at>
|
124
|
+
<total_discounted_in_cents type="integer">0</total_discounted_in_cents>
|
125
|
+
</redemption>
|
126
|
+
</coupon>
|
127
|
+
|
128
|
+
http_version: "1.1"
|
129
|
+
- !ruby/struct:VCR::HTTPInteraction
|
130
|
+
request: !ruby/struct:VCR::Request
|
131
|
+
method: :delete
|
132
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
|
133
|
+
body:
|
134
|
+
headers:
|
135
|
+
authorization:
|
136
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
137
|
+
accept:
|
138
|
+
- application/xml
|
139
|
+
user-agent:
|
140
|
+
- Ruby
|
141
|
+
connection:
|
142
|
+
- close
|
143
|
+
response: !ruby/struct:VCR::Response
|
144
|
+
status: !ruby/struct:VCR::ResponseStatus
|
145
|
+
code: 200
|
146
|
+
message: "OK "
|
147
|
+
headers:
|
148
|
+
cache-control:
|
149
|
+
- no-cache
|
150
|
+
x-runtime:
|
151
|
+
- "71"
|
152
|
+
content-type:
|
153
|
+
- application/xml; charset=utf-8
|
154
|
+
content-length:
|
155
|
+
- "1"
|
156
|
+
server:
|
157
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
158
|
+
date:
|
159
|
+
- Thu, 03 Feb 2011 22:19:31 GMT
|
160
|
+
connection:
|
161
|
+
- close
|
162
|
+
set-cookie:
|
163
|
+
- _recurly_session=4d57ea82bd4d31080d6d0a45c2e55797; domain=.recurly.local; path=/; HttpOnly
|
164
|
+
body: " "
|
165
|
+
http_version: "1.1"
|
166
|
+
- !ruby/struct:VCR::HTTPInteraction
|
167
|
+
request: !ruby/struct:VCR::Request
|
168
|
+
method: :get
|
169
|
+
uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/coupon-destroy-1296688818/coupon.xml
|
170
|
+
body:
|
171
|
+
headers:
|
172
|
+
authorization:
|
173
|
+
- Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
|
174
|
+
accept:
|
175
|
+
- application/xml
|
176
|
+
accept-encoding:
|
177
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
178
|
+
user-agent:
|
179
|
+
- Ruby
|
180
|
+
connection:
|
181
|
+
- close
|
182
|
+
response: !ruby/struct:VCR::Response
|
183
|
+
status: !ruby/struct:VCR::ResponseStatus
|
184
|
+
code: 404
|
185
|
+
message: "Not Found "
|
186
|
+
headers:
|
187
|
+
cache-control:
|
188
|
+
- no-cache
|
189
|
+
content-type:
|
190
|
+
- application/xml; charset=utf-8
|
191
|
+
content-length:
|
192
|
+
- "92"
|
193
|
+
server:
|
194
|
+
- WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
|
195
|
+
date:
|
196
|
+
- Thu, 03 Feb 2011 22:19:32 GMT
|
197
|
+
connection:
|
198
|
+
- close
|
199
|
+
set-cookie:
|
200
|
+
- _recurly_session=e2c9db9faf3975dac6b70032c7cfc6bc; domain=.recurly.local; path=/; HttpOnly
|
201
|
+
body: |
|
202
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
203
|
+
<errors>
|
204
|
+
<error>Coupon not found</error>
|
205
|
+
</errors>
|
206
|
+
|
207
|
+
http_version: "1.1"
|