recurly 0.4.15 → 0.4.16

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 (65) hide show
  1. data/lib/patches/rails2/active_resource/base.rb +35 -0
  2. data/lib/patches/rails3/active_model/serializers/xml.rb +28 -0
  3. data/lib/recurly.rb +14 -4
  4. data/lib/recurly/account.rb +6 -3
  5. data/lib/recurly/base.rb +1 -2
  6. data/lib/recurly/subscription.rb +7 -0
  7. data/lib/recurly/version.rb +1 -1
  8. data/spec/config/recurly.yml +4 -4
  9. data/spec/integration/subscription_spec.rb +2 -1
  10. metadata +108 -220
  11. data/spec/vcr/account/accept-language-account/1313708721.yml +0 -60
  12. data/spec/vcr/account/close/1313708721.yml +0 -132
  13. data/spec/vcr/account/create-blank/1313708721.yml +0 -44
  14. data/spec/vcr/account/create-duplicate/1313708721.yml +0 -98
  15. data/spec/vcr/account/create-min/1313708721.yml +0 -56
  16. data/spec/vcr/account/create/1313708721.yml +0 -60
  17. data/spec/vcr/account/find/1313708721.yml +0 -137
  18. data/spec/vcr/account/list/1313708721.yml +0 -1307
  19. data/spec/vcr/account/update/1313708721.yml +0 -216
  20. data/spec/vcr/billing/create/1313708721.yml +0 -181
  21. data/spec/vcr/billing/destroy/1313708721.yml +0 -240
  22. data/spec/vcr/billing/errors/1313708721.yml +0 -106
  23. data/spec/vcr/billing/find/1313708721.yml +0 -234
  24. data/spec/vcr/billing/update/1313708721.yml +0 -251
  25. data/spec/vcr/charge/create/1313708721.yml +0 -222
  26. data/spec/vcr/charge/delete-uninvoiced/1313708721.yml +0 -247
  27. data/spec/vcr/charge/list-all/1313708721.yml +0 -276
  28. data/spec/vcr/charge/list-invoiced/1313708721.yml +0 -411
  29. data/spec/vcr/charge/list-pending/1313708721.yml +0 -276
  30. data/spec/vcr/charge/lookup/1313708721.yml +0 -152
  31. data/spec/vcr/coupon/create/1296774903.yml +0 -97
  32. data/spec/vcr/coupon/destroy/1296774903.yml +0 -97
  33. data/spec/vcr/credit/create/1313708090.yml +0 -152
  34. data/spec/vcr/credit/delete/1313708090.yml +0 -211
  35. data/spec/vcr/credit/list/1313708090.yml +0 -276
  36. data/spec/vcr/credit/lookup/1313708090.yml +0 -152
  37. data/spec/vcr/invoice/create-no-charges/1296674173.yml +0 -166
  38. data/spec/vcr/invoice/create/1296674173.yml +0 -302
  39. data/spec/vcr/invoice/list/1296674173.yml +0 -405
  40. data/spec/vcr/invoice/lookup/1296674173.yml +0 -304
  41. data/spec/vcr/plan/all.yml +0 -233
  42. data/spec/vcr/plan/find.yml +0 -136
  43. data/spec/vcr/plan/update.yml +0 -152
  44. data/spec/vcr/subscription/addons/add/1296674173.yml +0 -177
  45. data/spec/vcr/subscription/addons/create/1296674173.yml +0 -177
  46. data/spec/vcr/subscription/addons/remove/1296674173.yml +0 -177
  47. data/spec/vcr/subscription/cancel-with-code/1296674173.yml +0 -400
  48. data/spec/vcr/subscription/cancel/1296674173.yml +0 -348
  49. data/spec/vcr/subscription/change1/1296674173.yml +0 -354
  50. data/spec/vcr/subscription/change2/1296674173.yml +0 -354
  51. data/spec/vcr/subscription/create/1296674173.yml +0 -192
  52. data/spec/vcr/subscription/find/1296674173.yml +0 -244
  53. data/spec/vcr/subscription/reactivate/1296674173.yml +0 -377
  54. data/spec/vcr/subscription/refund-full/1296674173.yml +0 -328
  55. data/spec/vcr/subscription/refund-none/1296674173.yml +0 -328
  56. data/spec/vcr/subscription/refund-partial/1296674173.yml +0 -328
  57. data/spec/vcr/transaction/all/1311126815.yml +0 -397
  58. data/spec/vcr/transaction/create-no-account/1311126815.yml +0 -82
  59. data/spec/vcr/transaction/create-with-account/1311126815.yml +0 -196
  60. data/spec/vcr/transaction/list-filled/1311126815.yml +0 -544
  61. data/spec/vcr/transaction/list-initial/1311126815.yml +0 -184
  62. data/spec/vcr/transaction/lookup/1311126815.yml +0 -487
  63. data/spec/vcr/transaction/void/1311126815.yml +0 -321
  64. data/spec/vcr/transparent/post-url/1317063400.yml +0 -105
  65. data/spec/vcr/transparent/post-url/1317063474.yml +0 -105
@@ -1,60 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>account1-french-1313708721</account-code>
10
- <first-name>Verena</first-name>
11
- <last-name>Test</last-name>
12
- <email>verena@test.com</email>
13
- <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
- <accept-language>fr</accept-language>
19
- </account>
20
-
21
- headers:
22
- user-agent:
23
- - Recurly Ruby Client v0.4.13
24
- content-type:
25
- - application/xml
26
- response: !ruby/struct:VCR::Response
27
- status: !ruby/struct:VCR::ResponseStatus
28
- code: 201
29
- message: Created
30
- headers:
31
- location:
32
- - http://api.lvh.me:3000/accounts/account1-french-1313708721
33
- content-type:
34
- - application/xml; charset=utf-8
35
- cache-control:
36
- - no-cache
37
- x-ua-compatible:
38
- - IE=Edge
39
- set-cookie:
40
- - _recurly_session=5a951e8c0f5846ce78be00fd78b2e0fe; domain=.lvh.me; path=/; HttpOnly
41
- server:
42
- - thin 1.2.11 codename Bat-Shit Crazy
43
- body: |
44
- <?xml version="1.0" encoding="UTF-8"?>
45
- <account>
46
- <id>account1-french-1313708721</id>
47
- <account_code>account1-french-1313708721</account_code>
48
- <username></username>
49
- <email>verena@test.com</email>
50
- <first_name>Verena</first_name>
51
- <last_name>Test</last_name>
52
- <company_name>Recurly Ruby Gem</company_name>
53
- <balance_in_cents type="integer">0</balance_in_cents>
54
- <closed type="boolean">false</closed>
55
- <hosted_login_token>14be2aae61d54ea2a51360f4faca96f7</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:37Z</created_at>
57
- <state>active</state>
58
- </account>
59
-
60
- http_version: "1.1"
@@ -1,132 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>account-close-1313708721</account-code>
10
- <first-name>Verena</first-name>
11
- <last-name>Test</last-name>
12
- <email>verena@test.com</email>
13
- <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
- <accept-language nil="true"></accept-language>
19
- </account>
20
-
21
- headers:
22
- user-agent:
23
- - Recurly Ruby Client v0.4.13
24
- content-type:
25
- - application/xml
26
- response: !ruby/struct:VCR::Response
27
- status: !ruby/struct:VCR::ResponseStatus
28
- code: 201
29
- message: Created
30
- headers:
31
- location:
32
- - http://api.lvh.me:3000/accounts/account-close-1313708721
33
- content-type:
34
- - application/xml; charset=utf-8
35
- cache-control:
36
- - no-cache
37
- x-ua-compatible:
38
- - IE=Edge
39
- set-cookie:
40
- - _recurly_session=61e786587eb55ee69901d8e87845cd34; domain=.lvh.me; path=/; HttpOnly
41
- server:
42
- - thin 1.2.11 codename Bat-Shit Crazy
43
- body: |
44
- <?xml version="1.0" encoding="UTF-8"?>
45
- <account>
46
- <id>account-close-1313708721</id>
47
- <account_code>account-close-1313708721</account_code>
48
- <username></username>
49
- <email>verena@test.com</email>
50
- <first_name>Verena</first_name>
51
- <last_name>Test</last_name>
52
- <company_name>Recurly Ruby Gem</company_name>
53
- <balance_in_cents type="integer">0</balance_in_cents>
54
- <closed type="boolean">false</closed>
55
- <hosted_login_token>7fef3b87ea6a47bab6b5ec7c99671c6f</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
57
- <state>active</state>
58
- </account>
59
-
60
- http_version: "1.1"
61
- - !ruby/struct:VCR::HTTPInteraction
62
- request: !ruby/struct:VCR::Request
63
- method: :delete
64
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/account-close-1313708721.xml
65
- body:
66
- headers:
67
- user-agent:
68
- - Recurly Ruby Client v0.4.13
69
- accept:
70
- - application/xml
71
- response: !ruby/struct:VCR::Response
72
- status: !ruby/struct:VCR::ResponseStatus
73
- code: 200
74
- message: OK
75
- headers:
76
- content-type:
77
- - application/xml; charset=utf-8
78
- cache-control:
79
- - no-cache
80
- x-ua-compatible:
81
- - IE=Edge
82
- set-cookie:
83
- - _recurly_session=3b2a6c1a70ae9668c8bf0a703ffe6d0d; domain=.lvh.me; path=/; HttpOnly
84
- server:
85
- - thin 1.2.11 codename Bat-Shit Crazy
86
- body: " "
87
- http_version: "1.1"
88
- - !ruby/struct:VCR::HTTPInteraction
89
- request: !ruby/struct:VCR::Request
90
- method: :get
91
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/account-close-1313708721.xml
92
- body:
93
- headers:
94
- user-agent:
95
- - Recurly Ruby Client v0.4.13
96
- accept:
97
- - application/xml
98
- accept-encoding:
99
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
100
- response: !ruby/struct:VCR::Response
101
- status: !ruby/struct:VCR::ResponseStatus
102
- code: 200
103
- message: OK
104
- headers:
105
- content-type:
106
- - application/xml; charset=utf-8
107
- etag:
108
- - "\"0936478f6b589b0510ecf74c5ae7d671\""
109
- cache-control:
110
- - max-age=0, private, must-revalidate
111
- x-ua-compatible:
112
- - IE=Edge
113
- server:
114
- - thin 1.2.11 codename Bat-Shit Crazy
115
- body: |
116
- <?xml version="1.0" encoding="UTF-8"?>
117
- <account>
118
- <id>account-close-1313708721</id>
119
- <account_code>account-close-1313708721</account_code>
120
- <username></username>
121
- <email>verena@test.com</email>
122
- <first_name>Verena</first_name>
123
- <last_name>Test</last_name>
124
- <company_name>Recurly Ruby Gem</company_name>
125
- <balance_in_cents type="integer">0</balance_in_cents>
126
- <closed type="boolean">true</closed>
127
- <hosted_login_token>7fef3b87ea6a47bab6b5ec7c99671c6f</hosted_login_token>
128
- <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
129
- <state>closed</state>
130
- </account>
131
-
132
- http_version: "1.1"
@@ -1,44 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code></account-code>
10
- <billing-info>
11
- <credit-card>
12
- </credit-card>
13
- </billing-info>
14
- <accept-language nil="true"></accept-language>
15
- </account>
16
-
17
- headers:
18
- user-agent:
19
- - Recurly Ruby Client v0.4.13
20
- content-type:
21
- - application/xml
22
- response: !ruby/struct:VCR::Response
23
- status: !ruby/struct:VCR::ResponseStatus
24
- code: 422
25
- message:
26
- headers:
27
- content-type:
28
- - application/xml; charset=utf-8
29
- cache-control:
30
- - no-cache
31
- x-ua-compatible:
32
- - IE=Edge
33
- set-cookie:
34
- - _recurly_session=cd14ee2c15b9f2c4830cc4afe43f07a0; domain=.lvh.me; path=/; HttpOnly
35
- server:
36
- - thin 1.2.11 codename Bat-Shit Crazy
37
- body: |
38
- <?xml version="1.0" encoding="UTF-8"?>
39
- <errors>
40
- <error field="account_code" code="blank">account code can't be blank</error>
41
- <error field="account_code" code="invalid">account code is invalid</error>
42
- </errors>
43
-
44
- http_version: "1.1"
@@ -1,98 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>account-exists</account-code>
10
- <billing-info>
11
- <credit-card>
12
- </credit-card>
13
- </billing-info>
14
- <accept-language nil="true"></accept-language>
15
- </account>
16
-
17
- headers:
18
- user-agent:
19
- - Recurly Ruby Client v0.4.13
20
- content-type:
21
- - application/xml
22
- response: !ruby/struct:VCR::Response
23
- status: !ruby/struct:VCR::ResponseStatus
24
- code: 201
25
- message: Created
26
- headers:
27
- location:
28
- - http://api.lvh.me:3000/accounts/account-exists
29
- content-type:
30
- - application/xml; charset=utf-8
31
- cache-control:
32
- - no-cache
33
- x-ua-compatible:
34
- - IE=Edge
35
- set-cookie:
36
- - _recurly_session=9d8512db63167d91967bafafaef7c570; domain=.lvh.me; path=/; HttpOnly
37
- server:
38
- - thin 1.2.11 codename Bat-Shit Crazy
39
- body: |
40
- <?xml version="1.0" encoding="UTF-8"?>
41
- <account>
42
- <id>account-exists</id>
43
- <account_code>account-exists</account_code>
44
- <username></username>
45
- <email></email>
46
- <first_name></first_name>
47
- <last_name></last_name>
48
- <company_name></company_name>
49
- <balance_in_cents type="integer">0</balance_in_cents>
50
- <closed type="boolean">false</closed>
51
- <hosted_login_token>c6bc42feac0843498c1265548607417b</hosted_login_token>
52
- <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
53
- <state>active</state>
54
- </account>
55
-
56
- http_version: "1.1"
57
- - !ruby/struct:VCR::HTTPInteraction
58
- request: !ruby/struct:VCR::Request
59
- method: :post
60
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
61
- body: |
62
- <?xml version="1.0" encoding="UTF-8"?>
63
- <account>
64
- <account-code>account-exists</account-code>
65
- <billing-info>
66
- <credit-card>
67
- </credit-card>
68
- </billing-info>
69
- <accept-language nil="true"></accept-language>
70
- </account>
71
-
72
- headers:
73
- user-agent:
74
- - Recurly Ruby Client v0.4.13
75
- content-type:
76
- - application/xml
77
- response: !ruby/struct:VCR::Response
78
- status: !ruby/struct:VCR::ResponseStatus
79
- code: 422
80
- message:
81
- headers:
82
- content-type:
83
- - application/xml; charset=utf-8
84
- cache-control:
85
- - no-cache
86
- x-ua-compatible:
87
- - IE=Edge
88
- set-cookie:
89
- - _recurly_session=d13c81dfca86bdbe8682fd1dc36a2aeb; domain=.lvh.me; path=/; HttpOnly
90
- server:
91
- - thin 1.2.11 codename Bat-Shit Crazy
92
- body: |
93
- <?xml version="1.0" encoding="UTF-8"?>
94
- <errors>
95
- <error field="account_code" code="taken">account code has already been taken</error>
96
- </errors>
97
-
98
- http_version: "1.1"
@@ -1,56 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>d00d-1313708721</account-code>
10
- <billing-info>
11
- <credit-card>
12
- </credit-card>
13
- </billing-info>
14
- <accept-language nil="true"></accept-language>
15
- </account>
16
-
17
- headers:
18
- user-agent:
19
- - Recurly Ruby Client v0.4.13
20
- content-type:
21
- - application/xml
22
- response: !ruby/struct:VCR::Response
23
- status: !ruby/struct:VCR::ResponseStatus
24
- code: 201
25
- message: Created
26
- headers:
27
- location:
28
- - http://api.lvh.me:3000/accounts/d00d-1313708721
29
- content-type:
30
- - application/xml; charset=utf-8
31
- cache-control:
32
- - no-cache
33
- x-ua-compatible:
34
- - IE=Edge
35
- set-cookie:
36
- - _recurly_session=3fbc7cd03238c551d3728137f7c7ea80; domain=.lvh.me; path=/; HttpOnly
37
- server:
38
- - thin 1.2.11 codename Bat-Shit Crazy
39
- body: |
40
- <?xml version="1.0" encoding="UTF-8"?>
41
- <account>
42
- <id>d00d-1313708721</id>
43
- <account_code>d00d-1313708721</account_code>
44
- <username></username>
45
- <email></email>
46
- <first_name></first_name>
47
- <last_name></last_name>
48
- <company_name></company_name>
49
- <balance_in_cents type="integer">0</balance_in_cents>
50
- <closed type="boolean">false</closed>
51
- <hosted_login_token>c4aba8dc864d490b8e1a704fb9903646</hosted_login_token>
52
- <created_at type="datetime">2011-09-22T22:01:29Z</created_at>
53
- <state>active</state>
54
- </account>
55
-
56
- http_version: "1.1"
@@ -1,60 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
6
- body: |
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <account>
9
- <account-code>account-create-1313708721</account-code>
10
- <first-name>Verena</first-name>
11
- <last-name>Test</last-name>
12
- <email>verena@test.com</email>
13
- <company-name>Recurly Ruby Gem</company-name>
14
- <billing-info>
15
- <credit-card>
16
- </credit-card>
17
- </billing-info>
18
- <accept-language nil="true"></accept-language>
19
- </account>
20
-
21
- headers:
22
- user-agent:
23
- - Recurly Ruby Client v0.4.13
24
- content-type:
25
- - application/xml
26
- response: !ruby/struct:VCR::Response
27
- status: !ruby/struct:VCR::ResponseStatus
28
- code: 201
29
- message: Created
30
- headers:
31
- location:
32
- - http://api.lvh.me:3000/accounts/account-create-1313708721
33
- content-type:
34
- - application/xml; charset=utf-8
35
- cache-control:
36
- - no-cache
37
- x-ua-compatible:
38
- - IE=Edge
39
- set-cookie:
40
- - _recurly_session=67995abdf7eccd756ac771c92c93ad16; domain=.lvh.me; path=/; HttpOnly
41
- server:
42
- - thin 1.2.11 codename Bat-Shit Crazy
43
- body: |
44
- <?xml version="1.0" encoding="UTF-8"?>
45
- <account>
46
- <id>account-create-1313708721</id>
47
- <account_code>account-create-1313708721</account_code>
48
- <username></username>
49
- <email>verena@test.com</email>
50
- <first_name>Verena</first_name>
51
- <last_name>Test</last_name>
52
- <company_name>Recurly Ruby Gem</company_name>
53
- <balance_in_cents type="integer">0</balance_in_cents>
54
- <closed type="boolean">false</closed>
55
- <hosted_login_token>056da8b68c7247449414f1b2bc634168</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:29Z</created_at>
57
- <state>active</state>
58
- </account>
59
-
60
- http_version: "1.1"