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,97 +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>coupon-destroy-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
- <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/coupon-destroy-1296774903
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=368f85f925dda8944540df66fd128d0b; 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>coupon-destroy-1296774903</id>
47
- <account_code>coupon-destroy-1296774903</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>4e91c347401540098337f82c650371e9</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:47Z</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: :post
64
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/coupon-destroy-1296774903/coupon.xml
65
- body: |
66
- <?xml version="1.0" encoding="UTF-8"?>
67
- <coupon>
68
- <coupon-code>coupon</coupon-code>
69
- </coupon>
70
-
71
- headers:
72
- user-agent:
73
- - Recurly Ruby Client v0.4.13
74
- content-type:
75
- - application/xml
76
- response: !ruby/struct:VCR::Response
77
- status: !ruby/struct:VCR::ResponseStatus
78
- code: 404
79
- message: Not Found
80
- headers:
81
- content-type:
82
- - application/xml; charset=utf-8
83
- cache-control:
84
- - no-cache
85
- x-ua-compatible:
86
- - IE=Edge
87
- set-cookie:
88
- - _recurly_session=eacf1e397fa4e09c254a8efd30daa697; domain=.lvh.me; path=/; HttpOnly
89
- server:
90
- - thin 1.2.11 codename Bat-Shit Crazy
91
- body: |
92
- <?xml version="1.0" encoding="UTF-8"?>
93
- <errors>
94
- <error>Coupon not found</error>
95
- </errors>
96
-
97
- http_version: "1.1"
@@ -1,152 +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>credit-create-1313708090</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/credit-create-1313708090
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=039e7b84f2c7ab3e968029773d42c835; 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>credit-create-1313708090</id>
47
- <account_code>credit-create-1313708090</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>772e713027824d689739c402ed7c8396</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:47Z</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: :post
64
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/credit-create-1313708090/credits.xml
65
- body: |
66
- <?xml version="1.0" encoding="UTF-8"?>
67
- <credit>
68
- <amount-in-cents type="integer">1005</amount-in-cents>
69
- <description>free moniez</description>
70
- </credit>
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: 201
80
- message: Created
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=31815f42565a91ebaba48c369be06951; 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
- <credit type="credit">
95
- <id>74b3dd2bedbb4a17b868599ccbe0964a</id>
96
- <account_code>credit-create-1313708090</account_code>
97
- <quantity type="integer">1</quantity>
98
- <unit_amount_in_cents type="integer">-1005</unit_amount_in_cents>
99
- <amount_in_cents type="integer">-1005</amount_in_cents>
100
- <currency>USD</currency>
101
- <start_date type="datetime">2011-09-22T22:01:47Z</start_date>
102
- <end_date nil="true" type="datetime"></end_date>
103
- <invoice_number nil="true" type="integer"></invoice_number>
104
- <description>free moniez</description>
105
- <created_at type="datetime">2011-09-22T22:01:47Z</created_at>
106
- </credit>
107
-
108
- http_version: "1.1"
109
- - !ruby/struct:VCR::HTTPInteraction
110
- request: !ruby/struct:VCR::Request
111
- method: :get
112
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/credit-create-1313708090/credits/74b3dd2bedbb4a17b868599ccbe0964a.xml
113
- body:
114
- headers:
115
- user-agent:
116
- - Recurly Ruby Client v0.4.13
117
- accept:
118
- - application/xml
119
- accept-encoding:
120
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
121
- response: !ruby/struct:VCR::Response
122
- status: !ruby/struct:VCR::ResponseStatus
123
- code: 200
124
- message: OK
125
- headers:
126
- content-type:
127
- - application/xml; charset=utf-8
128
- etag:
129
- - "\"9dab87df5a4287da8e8c4e5e927ee26d\""
130
- cache-control:
131
- - max-age=0, private, must-revalidate
132
- x-ua-compatible:
133
- - IE=Edge
134
- server:
135
- - thin 1.2.11 codename Bat-Shit Crazy
136
- body: |
137
- <?xml version="1.0" encoding="UTF-8"?>
138
- <credit type="credit">
139
- <id>74b3dd2bedbb4a17b868599ccbe0964a</id>
140
- <account_code>credit-create-1313708090</account_code>
141
- <quantity type="integer">1</quantity>
142
- <unit_amount_in_cents type="integer">-1005</unit_amount_in_cents>
143
- <amount_in_cents type="integer">-1005</amount_in_cents>
144
- <currency>USD</currency>
145
- <start_date type="datetime">2011-09-22T22:01:47Z</start_date>
146
- <end_date nil="true" type="datetime"></end_date>
147
- <invoice_number nil="true" type="integer"></invoice_number>
148
- <description>free moniez</description>
149
- <created_at type="datetime">2011-09-22T22:01:47Z</created_at>
150
- </credit>
151
-
152
- http_version: "1.1"
@@ -1,211 +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>delete-uninvoiced-1313708090</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/delete-uninvoiced-1313708090
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=62116a575ee5ade0541c5adc6d4cb36d; 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>delete-uninvoiced-1313708090</id>
47
- <account_code>delete-uninvoiced-1313708090</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>3ded94c7223144b783a509bb2f769786</hosted_login_token>
56
- <created_at type="datetime">2011-09-22T22:01:48Z</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: :post
64
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/delete-uninvoiced-1313708090/credits.xml
65
- body: |
66
- <?xml version="1.0" encoding="UTF-8"?>
67
- <credit>
68
- <amount-in-cents type="integer">1315</amount-in-cents>
69
- <description>free moniez 4 u</description>
70
- </credit>
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: 201
80
- message: Created
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=0cbf283741badc2e3cfa3977e387704d; 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
- <credit type="credit">
95
- <id>f4be3e9011a044369ac5de391c6fd8fb</id>
96
- <account_code>delete-uninvoiced-1313708090</account_code>
97
- <quantity type="integer">1</quantity>
98
- <unit_amount_in_cents type="integer">-1315</unit_amount_in_cents>
99
- <amount_in_cents type="integer">-1315</amount_in_cents>
100
- <currency>USD</currency>
101
- <start_date type="datetime">2011-09-22T22:01:48Z</start_date>
102
- <end_date nil="true" type="datetime"></end_date>
103
- <invoice_number nil="true" type="integer"></invoice_number>
104
- <description>free moniez 4 u</description>
105
- <created_at type="datetime">2011-09-22T22:01:48Z</created_at>
106
- </credit>
107
-
108
- http_version: "1.1"
109
- - !ruby/struct:VCR::HTTPInteraction
110
- request: !ruby/struct:VCR::Request
111
- method: :get
112
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/delete-uninvoiced-1313708090/credits/f4be3e9011a044369ac5de391c6fd8fb.xml
113
- body:
114
- headers:
115
- user-agent:
116
- - Recurly Ruby Client v0.4.13
117
- accept:
118
- - application/xml
119
- accept-encoding:
120
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
121
- response: !ruby/struct:VCR::Response
122
- status: !ruby/struct:VCR::ResponseStatus
123
- code: 200
124
- message: OK
125
- headers:
126
- content-type:
127
- - application/xml; charset=utf-8
128
- etag:
129
- - "\"626d5556ddef0bf781d7ee5aee7b5111\""
130
- cache-control:
131
- - max-age=0, private, must-revalidate
132
- x-ua-compatible:
133
- - IE=Edge
134
- server:
135
- - thin 1.2.11 codename Bat-Shit Crazy
136
- body: |
137
- <?xml version="1.0" encoding="UTF-8"?>
138
- <credit type="credit">
139
- <id>f4be3e9011a044369ac5de391c6fd8fb</id>
140
- <account_code>delete-uninvoiced-1313708090</account_code>
141
- <quantity type="integer">1</quantity>
142
- <unit_amount_in_cents type="integer">-1315</unit_amount_in_cents>
143
- <amount_in_cents type="integer">-1315</amount_in_cents>
144
- <currency>USD</currency>
145
- <start_date type="datetime">2011-09-22T22:01:48Z</start_date>
146
- <end_date nil="true" type="datetime"></end_date>
147
- <invoice_number nil="true" type="integer"></invoice_number>
148
- <description>free moniez 4 u</description>
149
- <created_at type="datetime">2011-09-22T22:01:48Z</created_at>
150
- </credit>
151
-
152
- http_version: "1.1"
153
- - !ruby/struct:VCR::HTTPInteraction
154
- request: !ruby/struct:VCR::Request
155
- method: :delete
156
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/delete-uninvoiced-1313708090/credits/f4be3e9011a044369ac5de391c6fd8fb.xml
157
- body:
158
- headers:
159
- user-agent:
160
- - Recurly Ruby Client v0.4.13
161
- accept:
162
- - application/xml
163
- response: !ruby/struct:VCR::Response
164
- status: !ruby/struct:VCR::ResponseStatus
165
- code: 200
166
- message: OK
167
- headers:
168
- content-type:
169
- - application/xml; charset=utf-8
170
- cache-control:
171
- - no-cache
172
- x-ua-compatible:
173
- - IE=Edge
174
- set-cookie:
175
- - _recurly_session=4ccc168c65219924be05a5a52e37ed1a; domain=.lvh.me; path=/; HttpOnly
176
- server:
177
- - thin 1.2.11 codename Bat-Shit Crazy
178
- body: " "
179
- http_version: "1.1"
180
- - !ruby/struct:VCR::HTTPInteraction
181
- request: !ruby/struct:VCR::Request
182
- method: :get
183
- uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/delete-uninvoiced-1313708090/credits/f4be3e9011a044369ac5de391c6fd8fb.xml
184
- body:
185
- headers:
186
- user-agent:
187
- - Recurly Ruby Client v0.4.13
188
- accept:
189
- - application/xml
190
- accept-encoding:
191
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
192
- response: !ruby/struct:VCR::Response
193
- status: !ruby/struct:VCR::ResponseStatus
194
- code: 404
195
- message: Not Found
196
- headers:
197
- content-type:
198
- - application/xml; charset=utf-8
199
- cache-control:
200
- - no-cache
201
- x-ua-compatible:
202
- - IE=Edge
203
- server:
204
- - thin 1.2.11 codename Bat-Shit Crazy
205
- body: |
206
- <?xml version="1.0" encoding="UTF-8"?>
207
- <errors>
208
- <error>Credit not found</error>
209
- </errors>
210
-
211
- http_version: "1.1"