recurly 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. data/lib/recurly/subscription.rb +2 -3
  2. data/lib/recurly/version.rb +1 -1
  3. data/spec/integration/account_spec.rb +0 -2
  4. data/spec/integration/invoice_spec.rb +0 -1
  5. data/spec/integration/subscription_spec.rb +49 -10
  6. data/spec/integration/transaction_spec.rb +3 -2
  7. data/spec/support/factory.rb +2 -2
  8. data/spec/vcr/account/close/{1286666929.yml → 1287167046.yml} +23 -23
  9. data/spec/vcr/account/create/{1286666929.yml → 1287167046.yml} +10 -10
  10. data/spec/vcr/account/create-blank/{1286666929.yml → 1287167046.yml} +3 -3
  11. data/spec/vcr/account/create-duplicate/{1286666929.yml → 1287167046.yml} +27 -12
  12. data/spec/vcr/account/create-min/{1286666929.yml → 1287167046.yml} +10 -10
  13. data/spec/vcr/account/find/{1286666929.yml → 1287167046.yml} +67 -29
  14. data/spec/vcr/account/list/{1286666929.yml → 1287167046.yml} +201 -228
  15. data/spec/vcr/account/update/{1286666929.yml → 1287167046.yml} +41 -41
  16. data/spec/vcr/billing/create/1286682213.yml +15 -15
  17. data/spec/vcr/billing/destroy/1286682213.yml +24 -24
  18. data/spec/vcr/billing/find/1286682213.yml +20 -20
  19. data/spec/vcr/billing/update/1286682213.yml +21 -21
  20. data/spec/vcr/charge/create/1286681273.yml +25 -25
  21. data/spec/vcr/charge/list-all/1286681273.yml +37 -37
  22. data/spec/vcr/charge/list-invoiced/1286681273.yml +62 -62
  23. data/spec/vcr/charge/list-pending/1286681273.yml +37 -37
  24. data/spec/vcr/charge/lookup/1286681273.yml +20 -20
  25. data/spec/vcr/credit/create/1286681343.yml +20 -20
  26. data/spec/vcr/credit/list/1286681343.yml +37 -37
  27. data/spec/vcr/credit/lookup/1286681343.yml +20 -20
  28. data/spec/vcr/invoice/create/{1286679184.yml → 1287167121.yml} +49 -49
  29. data/spec/vcr/{transaction/refund/1286674805.yml → invoice/create-no-charges/1287167121.yml} +32 -57
  30. data/spec/vcr/invoice/list/{1286679184.yml → 1287167121.yml} +71 -71
  31. data/spec/vcr/invoice/lookup/{1286679184.yml → 1287167121.yml} +50 -50
  32. data/spec/vcr/plan/all.yml +8 -8
  33. data/spec/vcr/plan/delete/1286677585.yml +15 -15
  34. data/spec/vcr/plan/find.yml +8 -8
  35. data/spec/vcr/plan/update.yml +9 -9
  36. data/spec/vcr/subscription/cancel/{1287037363.yml → 1287439446.yml} +62 -62
  37. data/spec/vcr/subscription/cancel/{1287037325.yml → 1287442108.yml} +60 -60
  38. data/spec/vcr/subscription/cancel/{1287036910.yml → 1287442352.yml} +60 -60
  39. data/spec/vcr/subscription/change1/{1287037363.yml → 1287439446.yml} +58 -58
  40. data/spec/vcr/subscription/change1/{1287037152.yml → 1287442108.yml} +59 -59
  41. data/spec/vcr/subscription/change1/{1287036910.yml → 1287442352.yml} +56 -56
  42. data/spec/vcr/subscription/{change1/1287037325.yml → change2/1287439446.yml} +64 -64
  43. data/spec/vcr/subscription/change2/{1287036910.yml → 1287442108.yml} +55 -55
  44. data/spec/vcr/subscription/change2/{1287037363.yml → 1287442352.yml} +58 -58
  45. data/spec/vcr/subscription/create/{1287037363.yml → 1287439446.yml} +27 -27
  46. data/spec/vcr/subscription/create/{1287037325.yml → 1287442108.yml} +28 -28
  47. data/spec/vcr/subscription/create/{1287037152.yml → 1287442352.yml} +28 -28
  48. data/spec/vcr/subscription/find/{1287036910.yml → 1287439446.yml} +36 -36
  49. data/spec/vcr/subscription/find/{1287037152.yml → 1287442108.yml} +38 -38
  50. data/spec/vcr/subscription/find/{1287037325.yml → 1287442352.yml} +38 -38
  51. data/spec/vcr/subscription/{refund/1287037325.yml → refund-full/1287439446.yml} +56 -56
  52. data/spec/vcr/subscription/{refund/1287037363.yml → refund-full/1287442108.yml} +58 -58
  53. data/spec/vcr/subscription/{refund/1287036910.yml → refund-full/1287442352.yml} +55 -55
  54. data/spec/vcr/subscription/refund-none/1287439446.yml +382 -0
  55. data/spec/vcr/subscription/refund-none/1287442108.yml +382 -0
  56. data/spec/vcr/subscription/refund-none/1287442352.yml +382 -0
  57. data/spec/vcr/subscription/refund-partial/1287439446.yml +382 -0
  58. data/spec/vcr/subscription/refund-partial/1287442108.yml +382 -0
  59. data/spec/vcr/subscription/refund-partial/1287442352.yml +382 -0
  60. data/spec/vcr/transaction/all/{1286674805.yml → 1287186411.yml} +104 -104
  61. data/spec/vcr/transaction/create-no-account/{1286674805.yml → 1287186411.yml} +11 -11
  62. data/spec/vcr/transaction/create-with-account/{1286674805.yml → 1287186411.yml} +26 -26
  63. data/spec/vcr/transaction/list-empty/{1286674805.yml → 1287186411.yml} +26 -26
  64. data/spec/vcr/transaction/list-filled/{1286674805.yml → 1287186411.yml} +59 -59
  65. data/spec/vcr/transaction/lookup/{1286674805.yml → 1287186411.yml} +66 -66
  66. data/spec/vcr/transaction/refund/1287186411.yml +282 -0
  67. data/spec/vcr/transaction/void/{1286674805.yml → 1287186411.yml} +87 -155
  68. metadata +92 -86
  69. data/spec/vcr/subscription/change2/1287037152.yml +0 -283
  70. data/spec/vcr/subscription/change2/1287037325.yml +0 -283
  71. data/spec/vcr/subscription/create/1287036910.yml +0 -224
  72. data/spec/vcr/subscription/find/1287037363.yml +0 -283
@@ -7,7 +7,7 @@
7
7
  <?xml version="1.0" encoding="UTF-8"?>
8
8
  <account>
9
9
  <company-name>Recurly Ruby Gem</company-name>
10
- <account-code>account-get-1286666929</account-code>
10
+ <account-code>account-get-1287167046</account-code>
11
11
  <last-name>Test</last-name>
12
12
  <email>verena@test.com</email>
13
13
  <first-name>Verena</first-name>
@@ -16,10 +16,10 @@
16
16
  headers:
17
17
  accept:
18
18
  - "*/*"
19
- connection:
20
- - close
21
19
  content-type:
22
20
  - application/xml
21
+ connection:
22
+ - close
23
23
  authorization:
24
24
  - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
25
25
  response: !ruby/struct:VCR::Response
@@ -28,30 +28,30 @@
28
28
  message: Created
29
29
  headers:
30
30
  location:
31
- - https://recurlytest3-test.recurly.com/accounts/account-get-1286666929
32
- connection:
33
- - close
31
+ - https://recurlytest3-test.recurly.com/accounts/account-get-1287167046
34
32
  content-type:
35
33
  - application/xml; charset=utf-8
36
- x-runtime:
37
- - "592"
38
- date:
39
- - Thu, 14 Oct 2010 06:15:18 GMT
34
+ connection:
35
+ - close
40
36
  server:
41
37
  - nginx/0.7.65
38
+ date:
39
+ - Mon, 18 Oct 2010 22:04:36 GMT
40
+ x-runtime:
41
+ - "771"
42
42
  content-length:
43
43
  - "577"
44
44
  set-cookie:
45
- - account_credentials=68a84eb10c772f861aef970165c5e0cea413db107169854be895d271605f9dff8f683d2d41af3ad64402bb210dc1df600b3099be6492113a1852a1ba1ca5f382%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
45
+ - account_credentials=03067da1ea586128db160b9849c249512be834629d537389a6dcc200d2c9f6c54af3d069ad0501882affc96a86049251c3b973b8bd4c60727523d5b0c4c5089b%3A%3A; domain=.recurly.com; path=/; secure; HttpOnly
46
46
  - ""
47
- - _recurly_session=6968f9a8fb681ad830a839be83d7bf8a; domain=.recurly.com; path=/; Secure; HttpOnly
47
+ - _recurly_session=136c52b211dfad8c3af84d1624cafd0d; domain=.recurly.com; path=/; Secure; HttpOnly
48
48
  cache-control:
49
49
  - no-cache
50
50
  body: |
51
51
  <?xml version="1.0" encoding="UTF-8"?>
52
52
  <account>
53
- <id>account-get-1286666929</id>
54
- <account_code>account-get-1286666929</account_code>
53
+ <id>account-get-1287167046</id>
54
+ <account_code>account-get-1287167046</account_code>
55
55
  <username></username>
56
56
  <email>verena@test.com</email>
57
57
  <first_name>Verena</first_name>
@@ -59,8 +59,8 @@
59
59
  <company_name>Recurly Ruby Gem</company_name>
60
60
  <balance_in_cents type="integer">0</balance_in_cents>
61
61
  <closed type="boolean">false</closed>
62
- <hosted_login_token>2ae655d430934a6781c8e949e7bc0281</hosted_login_token>
63
- <created_at type="datetime">2010-10-14T06:15:18Z</created_at>
62
+ <hosted_login_token>5cb3807e7e3244e6a2550555de6974a0</hosted_login_token>
63
+ <created_at type="datetime">2010-10-18T22:04:35Z</created_at>
64
64
  <state>active</state>
65
65
  </account>
66
66
 
@@ -68,7 +68,7 @@
68
68
  - !ruby/struct:VCR::HTTPInteraction
69
69
  request: !ruby/struct:VCR::Request
70
70
  method: :get
71
- uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-get-1286666929.xml
71
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-get-1287167046.xml
72
72
  body:
73
73
  headers:
74
74
  accept:
@@ -85,28 +85,28 @@
85
85
  x-ua-compatible:
86
86
  - IE=Edge
87
87
  etag:
88
- - "\"401fcc15f3d548154e42fc0aacbc4145\""
89
- connection:
90
- - close
88
+ - "\"02bf25581ae62e05b0d589e610a0e6fd\""
91
89
  content-type:
92
90
  - application/xml; charset=utf-8
93
- x-runtime:
94
- - "46"
95
- date:
96
- - Thu, 14 Oct 2010 06:15:18 GMT
91
+ connection:
92
+ - close
97
93
  server:
98
94
  - nginx/0.7.65
95
+ date:
96
+ - Mon, 18 Oct 2010 22:04:36 GMT
97
+ x-runtime:
98
+ - "47"
99
99
  content-length:
100
100
  - "577"
101
101
  set-cookie:
102
- - _recurly_session=e8595f038e6f6b5d9c77695f18492f0e; domain=.recurly.com; path=/; Secure; HttpOnly
102
+ - _recurly_session=a32ec880ae473edfa6f378752f5713e6; domain=.recurly.com; path=/; Secure; HttpOnly
103
103
  cache-control:
104
104
  - private, max-age=0, must-revalidate
105
105
  body: |
106
106
  <?xml version="1.0" encoding="UTF-8"?>
107
107
  <account>
108
- <id>account-get-1286666929</id>
109
- <account_code>account-get-1286666929</account_code>
108
+ <id>account-get-1287167046</id>
109
+ <account_code>account-get-1287167046</account_code>
110
110
  <username></username>
111
111
  <email>verena@test.com</email>
112
112
  <first_name>Verena</first_name>
@@ -114,9 +114,47 @@
114
114
  <company_name>Recurly Ruby Gem</company_name>
115
115
  <balance_in_cents type="integer">0</balance_in_cents>
116
116
  <closed type="boolean">false</closed>
117
- <hosted_login_token>2ae655d430934a6781c8e949e7bc0281</hosted_login_token>
118
- <created_at type="datetime">2010-10-14T06:15:18Z</created_at>
117
+ <hosted_login_token>5cb3807e7e3244e6a2550555de6974a0</hosted_login_token>
118
+ <created_at type="datetime">2010-10-18T22:04:35Z</created_at>
119
119
  <state>active</state>
120
120
  </account>
121
121
 
122
122
  http_version: "1.1"
123
+ - !ruby/struct:VCR::HTTPInteraction
124
+ request: !ruby/struct:VCR::Request
125
+ method: :get
126
+ uri: https://railsjedi%40sogetthis.com:7PCB2mZC@recurlytest3-test.recurly.com:443/accounts/account-that-doesnt-exist.xml
127
+ body:
128
+ headers:
129
+ accept:
130
+ - application/xml
131
+ connection:
132
+ - close
133
+ authorization:
134
+ - Basic cmFpbHNqZWRpQHNvZ2V0dGhpcy5jb206N1BDQjJtWkM=
135
+ response: !ruby/struct:VCR::Response
136
+ status: !ruby/struct:VCR::ResponseStatus
137
+ code: 404
138
+ message: Not Found
139
+ headers:
140
+ connection:
141
+ - close
142
+ content-type:
143
+ - application/xml; charset=utf-8
144
+ date:
145
+ - Mon, 18 Oct 2010 22:04:37 GMT
146
+ server:
147
+ - nginx/0.7.65
148
+ content-length:
149
+ - "93"
150
+ set-cookie:
151
+ - _recurly_session=874cd36188a2e90e7d2bcf6925238859; domain=.recurly.com; path=/; Secure; HttpOnly
152
+ cache-control:
153
+ - no-cache
154
+ body: |
155
+ <?xml version="1.0" encoding="UTF-8"?>
156
+ <errors>
157
+ <error>Account not found</error>
158
+ </errors>
159
+
160
+ http_version: "1.1"