recurly 0.2.5 → 0.2.6
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/lib/recurly.rb +6 -1
- data/lib/recurly/rails2/compatibility.rb +8 -0
- data/lib/recurly/{rails → rails3}/railtie.rb +1 -1
- data/lib/recurly/{rails → rails3}/recurly.rake +0 -0
- data/lib/recurly/version.rb +1 -1
- data/spec/vcr/account/close/1288381369.yml +159 -0
- data/spec/vcr/account/close/1288381447.yml +159 -0
- data/spec/vcr/account/create-blank/1288381369.yml +49 -0
- data/spec/vcr/account/create-blank/1288381447.yml +49 -0
- data/spec/vcr/account/create-duplicate/1288381369.yml +95 -0
- data/spec/vcr/account/create-duplicate/1288381447.yml +95 -0
- data/spec/vcr/account/create-min/1288381369.yml +63 -0
- data/spec/vcr/account/create-min/1288381447.yml +63 -0
- data/spec/vcr/account/create/1288381369.yml +67 -0
- data/spec/vcr/account/create/1288381447.yml +67 -0
- data/spec/vcr/account/find-all/1288381369.yml +52 -0
- data/spec/vcr/account/find-all/1288381447.yml +1383 -0
- data/spec/vcr/account/find/1288381369.yml +160 -0
- data/spec/vcr/account/find/1288381447.yml +160 -0
- data/spec/vcr/account/list/1288381369.yml +1835 -0
- data/spec/vcr/account/list/1288381447.yml +1835 -0
- data/spec/vcr/account/update/1288381369.yml +250 -0
- data/spec/vcr/account/update/1288381447.yml +250 -0
- metadata +43 -6
data/lib/recurly.rb
CHANGED
@@ -5,7 +5,12 @@ require 'cgi'
|
|
5
5
|
require 'recurly/version'
|
6
6
|
require 'recurly/formats/xml_with_pagination'
|
7
7
|
require 'recurly/config_parser'
|
8
|
-
require 'recurly/
|
8
|
+
require 'recurly/rails3/railtie' if defined?(::Rails::Railtie)
|
9
|
+
|
10
|
+
# load rails2 fixes
|
11
|
+
if defined?(::Rails::VERSION::MAJOR) and ::Rails::VERSION::MAJOR == 2
|
12
|
+
require 'recurly/rails2/compatibility'
|
13
|
+
end
|
9
14
|
|
10
15
|
# configuration
|
11
16
|
module Recurly
|
File without changes
|
data/lib/recurly/version.rb
CHANGED
@@ -0,0 +1,159 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<company-name>Recurly Ruby Gem</company-name>
|
10
|
+
<account-code>account-close-1288381369</account-code>
|
11
|
+
<last-name>Test</last-name>
|
12
|
+
<email>verena@test.com</email>
|
13
|
+
<first-name>Verena</first-name>
|
14
|
+
</account>
|
15
|
+
|
16
|
+
headers:
|
17
|
+
accept:
|
18
|
+
- "*/*"
|
19
|
+
connection:
|
20
|
+
- close
|
21
|
+
content-type:
|
22
|
+
- application/xml
|
23
|
+
authorization:
|
24
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
25
|
+
response: !ruby/struct:VCR::Response
|
26
|
+
status: !ruby/struct:VCR::ResponseStatus
|
27
|
+
code: 201
|
28
|
+
message: Created
|
29
|
+
headers:
|
30
|
+
location:
|
31
|
+
- https://recurlytest3-test.recurly.com/accounts/account-close-1288381369
|
32
|
+
connection:
|
33
|
+
- close
|
34
|
+
content-type:
|
35
|
+
- application/xml; charset=utf-8
|
36
|
+
x-runtime:
|
37
|
+
- "816"
|
38
|
+
date:
|
39
|
+
- Fri, 29 Oct 2010 19:43:32 GMT
|
40
|
+
server:
|
41
|
+
- nginx/0.7.65
|
42
|
+
content-length:
|
43
|
+
- "581"
|
44
|
+
set-cookie:
|
45
|
+
- account_credentials=3b1de9472e95b2ed92748186af948d5dbc9c8ecab1979c23079a800b9fca1ab93a8921133e58bf29dcf34b296873047d394cb15049e79ca243b19014a2dc5ec9%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
|
46
|
+
- ""
|
47
|
+
- _recurly_session=eaa0757f19e72946756bacd817f0945f; domain=.recurly.com; path=/; Secure; HttpOnly
|
48
|
+
cache-control:
|
49
|
+
- no-cache
|
50
|
+
body: |
|
51
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
52
|
+
<account>
|
53
|
+
<id>account-close-1288381369</id>
|
54
|
+
<account_code>account-close-1288381369</account_code>
|
55
|
+
<username></username>
|
56
|
+
<email>verena@test.com</email>
|
57
|
+
<first_name>Verena</first_name>
|
58
|
+
<last_name>Test</last_name>
|
59
|
+
<company_name>Recurly Ruby Gem</company_name>
|
60
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
61
|
+
<closed type="boolean">false</closed>
|
62
|
+
<hosted_login_token>a98c046b927a4c2c985997f51f9175bf</hosted_login_token>
|
63
|
+
<created_at type="datetime">2010-10-29T19:43:32Z</created_at>
|
64
|
+
<state>active</state>
|
65
|
+
</account>
|
66
|
+
|
67
|
+
http_version: "1.1"
|
68
|
+
- !ruby/struct:VCR::HTTPInteraction
|
69
|
+
request: !ruby/struct:VCR::Request
|
70
|
+
method: :delete
|
71
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1288381369.xml
|
72
|
+
body:
|
73
|
+
headers:
|
74
|
+
accept:
|
75
|
+
- application/xml
|
76
|
+
connection:
|
77
|
+
- close
|
78
|
+
authorization:
|
79
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
80
|
+
response: !ruby/struct:VCR::Response
|
81
|
+
status: !ruby/struct:VCR::ResponseStatus
|
82
|
+
code: 200
|
83
|
+
message: OK
|
84
|
+
headers:
|
85
|
+
x-ua-compatible:
|
86
|
+
- IE=Edge
|
87
|
+
connection:
|
88
|
+
- close
|
89
|
+
content-type:
|
90
|
+
- application/xml; charset=utf-8
|
91
|
+
x-runtime:
|
92
|
+
- "66"
|
93
|
+
date:
|
94
|
+
- Fri, 29 Oct 2010 19:43:33 GMT
|
95
|
+
server:
|
96
|
+
- nginx/0.7.65
|
97
|
+
content-length:
|
98
|
+
- "1"
|
99
|
+
set-cookie:
|
100
|
+
- _recurly_session=40c02985451cf5feb954ed4a931a9081; domain=.recurly.com; path=/; Secure; HttpOnly
|
101
|
+
cache-control:
|
102
|
+
- no-cache
|
103
|
+
body: " "
|
104
|
+
http_version: "1.1"
|
105
|
+
- !ruby/struct:VCR::HTTPInteraction
|
106
|
+
request: !ruby/struct:VCR::Request
|
107
|
+
method: :get
|
108
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1288381369.xml
|
109
|
+
body:
|
110
|
+
headers:
|
111
|
+
accept:
|
112
|
+
- application/xml
|
113
|
+
connection:
|
114
|
+
- close
|
115
|
+
authorization:
|
116
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
117
|
+
response: !ruby/struct:VCR::Response
|
118
|
+
status: !ruby/struct:VCR::ResponseStatus
|
119
|
+
code: 200
|
120
|
+
message: OK
|
121
|
+
headers:
|
122
|
+
x-ua-compatible:
|
123
|
+
- IE=Edge
|
124
|
+
etag:
|
125
|
+
- "\"30b915938ef599abe7787db111c3e5b2\""
|
126
|
+
connection:
|
127
|
+
- close
|
128
|
+
content-type:
|
129
|
+
- application/xml; charset=utf-8
|
130
|
+
x-runtime:
|
131
|
+
- "50"
|
132
|
+
date:
|
133
|
+
- Fri, 29 Oct 2010 19:43:33 GMT
|
134
|
+
server:
|
135
|
+
- nginx/0.7.65
|
136
|
+
content-length:
|
137
|
+
- "580"
|
138
|
+
set-cookie:
|
139
|
+
- _recurly_session=e380974c6647c862f85fab4b9a396138; domain=.recurly.com; path=/; Secure; HttpOnly
|
140
|
+
cache-control:
|
141
|
+
- private, max-age=0, must-revalidate
|
142
|
+
body: |
|
143
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
144
|
+
<account>
|
145
|
+
<id>account-close-1288381369</id>
|
146
|
+
<account_code>account-close-1288381369</account_code>
|
147
|
+
<username></username>
|
148
|
+
<email>verena@test.com</email>
|
149
|
+
<first_name>Verena</first_name>
|
150
|
+
<last_name>Test</last_name>
|
151
|
+
<company_name>Recurly Ruby Gem</company_name>
|
152
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
153
|
+
<closed type="boolean">true</closed>
|
154
|
+
<hosted_login_token>a98c046b927a4c2c985997f51f9175bf</hosted_login_token>
|
155
|
+
<created_at type="datetime">2010-10-29T19:43:32Z</created_at>
|
156
|
+
<state>closed</state>
|
157
|
+
</account>
|
158
|
+
|
159
|
+
http_version: "1.1"
|
@@ -0,0 +1,159 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<company-name>Recurly Ruby Gem</company-name>
|
10
|
+
<account-code>account-close-1288381447</account-code>
|
11
|
+
<last-name>Test</last-name>
|
12
|
+
<email>verena@test.com</email>
|
13
|
+
<first-name>Verena</first-name>
|
14
|
+
</account>
|
15
|
+
|
16
|
+
headers:
|
17
|
+
accept:
|
18
|
+
- "*/*"
|
19
|
+
connection:
|
20
|
+
- close
|
21
|
+
content-type:
|
22
|
+
- application/xml
|
23
|
+
authorization:
|
24
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
25
|
+
response: !ruby/struct:VCR::Response
|
26
|
+
status: !ruby/struct:VCR::ResponseStatus
|
27
|
+
code: 201
|
28
|
+
message: Created
|
29
|
+
headers:
|
30
|
+
location:
|
31
|
+
- https://recurlytest3-test.recurly.com/accounts/account-close-1288381447
|
32
|
+
connection:
|
33
|
+
- close
|
34
|
+
content-type:
|
35
|
+
- application/xml; charset=utf-8
|
36
|
+
x-runtime:
|
37
|
+
- "703"
|
38
|
+
date:
|
39
|
+
- Fri, 29 Oct 2010 19:44:46 GMT
|
40
|
+
server:
|
41
|
+
- nginx/0.7.65
|
42
|
+
content-length:
|
43
|
+
- "581"
|
44
|
+
set-cookie:
|
45
|
+
- account_credentials=424ff5e4f07b7e2503289c293da1326e924e7de9c2941811008a608b28fb038972745dc89a67ac41afd49415b3169f2d0750210552b450197b1a56a4973581a9%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
|
46
|
+
- ""
|
47
|
+
- _recurly_session=502bfade0cff89de9db2ccfab897967a; domain=.recurly.com; path=/; Secure; HttpOnly
|
48
|
+
cache-control:
|
49
|
+
- no-cache
|
50
|
+
body: |
|
51
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
52
|
+
<account>
|
53
|
+
<id>account-close-1288381447</id>
|
54
|
+
<account_code>account-close-1288381447</account_code>
|
55
|
+
<username></username>
|
56
|
+
<email>verena@test.com</email>
|
57
|
+
<first_name>Verena</first_name>
|
58
|
+
<last_name>Test</last_name>
|
59
|
+
<company_name>Recurly Ruby Gem</company_name>
|
60
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
61
|
+
<closed type="boolean">false</closed>
|
62
|
+
<hosted_login_token>435bb563b98545adb49028d703eea5d0</hosted_login_token>
|
63
|
+
<created_at type="datetime">2010-10-29T19:44:46Z</created_at>
|
64
|
+
<state>active</state>
|
65
|
+
</account>
|
66
|
+
|
67
|
+
http_version: "1.1"
|
68
|
+
- !ruby/struct:VCR::HTTPInteraction
|
69
|
+
request: !ruby/struct:VCR::Request
|
70
|
+
method: :delete
|
71
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1288381447.xml
|
72
|
+
body:
|
73
|
+
headers:
|
74
|
+
accept:
|
75
|
+
- application/xml
|
76
|
+
connection:
|
77
|
+
- close
|
78
|
+
authorization:
|
79
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
80
|
+
response: !ruby/struct:VCR::Response
|
81
|
+
status: !ruby/struct:VCR::ResponseStatus
|
82
|
+
code: 200
|
83
|
+
message: OK
|
84
|
+
headers:
|
85
|
+
x-ua-compatible:
|
86
|
+
- IE=Edge
|
87
|
+
connection:
|
88
|
+
- close
|
89
|
+
content-type:
|
90
|
+
- application/xml; charset=utf-8
|
91
|
+
x-runtime:
|
92
|
+
- "41"
|
93
|
+
date:
|
94
|
+
- Fri, 29 Oct 2010 19:44:46 GMT
|
95
|
+
server:
|
96
|
+
- nginx/0.7.65
|
97
|
+
content-length:
|
98
|
+
- "1"
|
99
|
+
set-cookie:
|
100
|
+
- _recurly_session=c7fada021a345f0b933a46d8f885091a; domain=.recurly.com; path=/; Secure; HttpOnly
|
101
|
+
cache-control:
|
102
|
+
- no-cache
|
103
|
+
body: " "
|
104
|
+
http_version: "1.1"
|
105
|
+
- !ruby/struct:VCR::HTTPInteraction
|
106
|
+
request: !ruby/struct:VCR::Request
|
107
|
+
method: :get
|
108
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-close-1288381447.xml
|
109
|
+
body:
|
110
|
+
headers:
|
111
|
+
accept:
|
112
|
+
- application/xml
|
113
|
+
connection:
|
114
|
+
- close
|
115
|
+
authorization:
|
116
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
117
|
+
response: !ruby/struct:VCR::Response
|
118
|
+
status: !ruby/struct:VCR::ResponseStatus
|
119
|
+
code: 200
|
120
|
+
message: OK
|
121
|
+
headers:
|
122
|
+
x-ua-compatible:
|
123
|
+
- IE=Edge
|
124
|
+
etag:
|
125
|
+
- "\"e795dc97affad34d9335b60d01f4bc43\""
|
126
|
+
connection:
|
127
|
+
- close
|
128
|
+
content-type:
|
129
|
+
- application/xml; charset=utf-8
|
130
|
+
x-runtime:
|
131
|
+
- "51"
|
132
|
+
date:
|
133
|
+
- Fri, 29 Oct 2010 19:44:47 GMT
|
134
|
+
server:
|
135
|
+
- nginx/0.7.65
|
136
|
+
content-length:
|
137
|
+
- "580"
|
138
|
+
set-cookie:
|
139
|
+
- _recurly_session=cc7282d593a13872399d56b70caeb6a8; domain=.recurly.com; path=/; Secure; HttpOnly
|
140
|
+
cache-control:
|
141
|
+
- private, max-age=0, must-revalidate
|
142
|
+
body: |
|
143
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
144
|
+
<account>
|
145
|
+
<id>account-close-1288381447</id>
|
146
|
+
<account_code>account-close-1288381447</account_code>
|
147
|
+
<username></username>
|
148
|
+
<email>verena@test.com</email>
|
149
|
+
<first_name>Verena</first_name>
|
150
|
+
<last_name>Test</last_name>
|
151
|
+
<company_name>Recurly Ruby Gem</company_name>
|
152
|
+
<balance_in_cents type="integer">0</balance_in_cents>
|
153
|
+
<closed type="boolean">true</closed>
|
154
|
+
<hosted_login_token>435bb563b98545adb49028d703eea5d0</hosted_login_token>
|
155
|
+
<created_at type="datetime">2010-10-29T19:44:46Z</created_at>
|
156
|
+
<state>closed</state>
|
157
|
+
</account>
|
158
|
+
|
159
|
+
http_version: "1.1"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<account-code></account-code>
|
10
|
+
</account>
|
11
|
+
|
12
|
+
headers:
|
13
|
+
accept:
|
14
|
+
- "*/*"
|
15
|
+
connection:
|
16
|
+
- close
|
17
|
+
content-type:
|
18
|
+
- application/xml
|
19
|
+
authorization:
|
20
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
21
|
+
response: !ruby/struct:VCR::Response
|
22
|
+
status: !ruby/struct:VCR::ResponseStatus
|
23
|
+
code: 422
|
24
|
+
message: ""
|
25
|
+
headers:
|
26
|
+
connection:
|
27
|
+
- close
|
28
|
+
content-type:
|
29
|
+
- application/xml; charset=utf-8
|
30
|
+
x-runtime:
|
31
|
+
- "18"
|
32
|
+
date:
|
33
|
+
- Fri, 29 Oct 2010 19:43:34 GMT
|
34
|
+
server:
|
35
|
+
- nginx/0.7.65
|
36
|
+
content-length:
|
37
|
+
- "186"
|
38
|
+
set-cookie:
|
39
|
+
- _recurly_session=0416beea9d315dcbc757c704c8a7ed97; domain=.recurly.com; path=/; Secure; HttpOnly
|
40
|
+
cache-control:
|
41
|
+
- no-cache
|
42
|
+
body: |
|
43
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
44
|
+
<errors>
|
45
|
+
<error field="account_code">Account code can't be blank</error>
|
46
|
+
<error field="account_code">Account code is invalid</error>
|
47
|
+
</errors>
|
48
|
+
|
49
|
+
http_version: "1.1"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts.xml
|
6
|
+
body: |
|
7
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
8
|
+
<account>
|
9
|
+
<account-code></account-code>
|
10
|
+
</account>
|
11
|
+
|
12
|
+
headers:
|
13
|
+
accept:
|
14
|
+
- "*/*"
|
15
|
+
connection:
|
16
|
+
- close
|
17
|
+
content-type:
|
18
|
+
- application/xml
|
19
|
+
authorization:
|
20
|
+
- Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
|
21
|
+
response: !ruby/struct:VCR::Response
|
22
|
+
status: !ruby/struct:VCR::ResponseStatus
|
23
|
+
code: 422
|
24
|
+
message: ""
|
25
|
+
headers:
|
26
|
+
connection:
|
27
|
+
- close
|
28
|
+
content-type:
|
29
|
+
- application/xml; charset=utf-8
|
30
|
+
x-runtime:
|
31
|
+
- "17"
|
32
|
+
date:
|
33
|
+
- Fri, 29 Oct 2010 19:44:48 GMT
|
34
|
+
server:
|
35
|
+
- nginx/0.7.65
|
36
|
+
content-length:
|
37
|
+
- "186"
|
38
|
+
set-cookie:
|
39
|
+
- _recurly_session=92e9b57b3fde44b65f09f18152cc0fca; domain=.recurly.com; path=/; Secure; HttpOnly
|
40
|
+
cache-control:
|
41
|
+
- no-cache
|
42
|
+
body: |
|
43
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
44
|
+
<errors>
|
45
|
+
<error field="account_code">Account code can't be blank</error>
|
46
|
+
<error field="account_code">Account code is invalid</error>
|
47
|
+
</errors>
|
48
|
+
|
49
|
+
http_version: "1.1"
|