recurly 0.4.8 → 0.4.10

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 (114) hide show
  1. data/README.md +2 -2
  2. data/lib/recurly.rb +2 -1
  3. data/lib/recurly/account.rb +2 -2
  4. data/lib/recurly/base.rb +30 -12
  5. data/lib/recurly/billing_info.rb +2 -2
  6. data/lib/recurly/exceptions.rb +13 -0
  7. data/lib/recurly/plan.rb +1 -1
  8. data/lib/recurly/subscription.rb +2 -2
  9. data/lib/recurly/transaction.rb +2 -2
  10. data/lib/recurly/transparent.rb +1 -1
  11. data/lib/recurly/verification.rb +77 -0
  12. data/lib/recurly/version.rb +1 -1
  13. data/spec/config/recurly.yml +4 -4
  14. data/spec/integration/account_spec.rb +12 -0
  15. data/spec/integration/billing_info_spec.rb +2 -2
  16. data/spec/integration/charge_spec.rb +0 -1
  17. data/spec/integration/plan_spec.rb +2 -2
  18. data/spec/support/vcr.rb +2 -2
  19. data/spec/unit/verification_spec.rb +76 -0
  20. data/spec/vcr/account/accept-language-account/1313708721.yml +39 -0
  21. data/spec/vcr/account/close/1313708721.yml +104 -0
  22. data/spec/vcr/account/create-blank/1313708721.yml +33 -0
  23. data/spec/vcr/account/create-duplicate/1313708721.yml +69 -0
  24. data/spec/vcr/account/create-min/1313708721.yml +38 -0
  25. data/spec/vcr/account/create/1313708721.yml +39 -0
  26. data/spec/vcr/account/find/1313708721.yml +107 -0
  27. data/spec/vcr/account/list/1313708721.yml +878 -0
  28. data/spec/vcr/account/update/1313708721.yml +158 -0
  29. data/spec/vcr/billing/create/1313708721.yml +118 -0
  30. data/spec/vcr/billing/destroy/1313708721.yml +177 -0
  31. data/spec/vcr/billing/errors/1313708721.yml +71 -0
  32. data/spec/vcr/billing/find/1313708721.yml +156 -0
  33. data/spec/vcr/billing/update/1313708721.yml +159 -0
  34. data/spec/vcr/charge/create/1313708721.yml +153 -0
  35. data/spec/vcr/charge/delete-uninvoiced/1313708721.yml +206 -0
  36. data/spec/vcr/charge/list-all/1313708721.yml +198 -0
  37. data/spec/vcr/charge/list-invoiced/1313708721.yml +294 -0
  38. data/spec/vcr/charge/list-pending/1313708721.yml +200 -0
  39. data/spec/vcr/charge/lookup/1313708721.yml +112 -0
  40. data/spec/vcr/coupon/create/1296774903.yml +96 -170
  41. data/spec/vcr/coupon/destroy/1296774903.yml +114 -190
  42. data/spec/vcr/credit/create/1313708090.yml +112 -0
  43. data/spec/vcr/credit/delete/1313708090.yml +171 -0
  44. data/spec/vcr/credit/list/1313708090.yml +198 -0
  45. data/spec/vcr/credit/lookup/1313708090.yml +112 -0
  46. data/spec/vcr/invoice/create-no-charges/1296674173.yml +100 -185
  47. data/spec/vcr/invoice/create/1296674173.yml +182 -328
  48. data/spec/vcr/invoice/list/1296674173.yml +255 -442
  49. data/spec/vcr/invoice/lookup/1296674173.yml +187 -331
  50. data/spec/vcr/plan/all.yml +210 -253
  51. data/spec/vcr/plan/find.yml +115 -187
  52. data/spec/vcr/plan/update.yml +105 -187
  53. data/spec/vcr/subscription/addons/add/1296674173.yml +269 -212
  54. data/spec/vcr/subscription/addons/create/1296674173.yml +172 -212
  55. data/spec/vcr/subscription/addons/remove/1296674173.yml +257 -212
  56. data/spec/vcr/subscription/cancel-with-code/1296674173.yml +271 -452
  57. data/spec/vcr/subscription/cancel/1296674173.yml +234 -394
  58. data/spec/vcr/subscription/change1/1296674173.yml +237 -402
  59. data/spec/vcr/subscription/change2/1296674173.yml +238 -402
  60. data/spec/vcr/subscription/create/1296674173.yml +123 -221
  61. data/spec/vcr/subscription/find/1296674173.yml +161 -279
  62. data/spec/vcr/subscription/reactivate/1296674173.yml +261 -431
  63. data/spec/vcr/subscription/refund-full/1296674173.yml +223 -373
  64. data/spec/vcr/subscription/refund-none/1296674173.yml +223 -373
  65. data/spec/vcr/subscription/refund-partial/1296674173.yml +223 -373
  66. data/spec/vcr/transaction/all/1311126815.yml +215 -0
  67. data/spec/vcr/transaction/create-no-account/1311126815.yml +51 -0
  68. data/spec/vcr/transaction/create-with-account/1311126815.yml +125 -0
  69. data/spec/vcr/transaction/list-filled/1311126815.yml +349 -0
  70. data/spec/vcr/transaction/list-initial/1311126815.yml +123 -0
  71. data/spec/vcr/transaction/lookup/1311126815.yml +335 -0
  72. data/spec/vcr/transaction/refund/1311126815.yml +163 -0
  73. data/spec/vcr/transaction/void/1311126815.yml +215 -0
  74. data/spec/vcr/transparent/post-url/1311239470.yml +76 -0
  75. metadata +207 -154
  76. data/spec/vcr/account/accept-language-account/1296674173.yml +0 -70
  77. data/spec/vcr/account/close/1296674173.yml +0 -164
  78. data/spec/vcr/account/create-blank/1296674173.yml +0 -52
  79. data/spec/vcr/account/create-duplicate/1296674173.yml +0 -116
  80. data/spec/vcr/account/create-min/1296674173.yml +0 -66
  81. data/spec/vcr/account/create/1296674173.yml +0 -70
  82. data/spec/vcr/account/find/1296674173.yml +0 -169
  83. data/spec/vcr/account/list/1296674173.yml +0 -55
  84. data/spec/vcr/account/update/1296674173.yml +0 -258
  85. data/spec/vcr/billing/create/1296690812.yml +0 -215
  86. data/spec/vcr/billing/destroy/1296690812.yml +0 -294
  87. data/spec/vcr/billing/find/1296690812.yml +0 -280
  88. data/spec/vcr/billing/update/1296690812.yml +0 -297
  89. data/spec/vcr/charge/create/1296674173.yml +0 -262
  90. data/spec/vcr/charge/delete-uninvoiced/1296674173.yml +0 -307
  91. data/spec/vcr/charge/list-all/1296674173.yml +0 -316
  92. data/spec/vcr/charge/list-invoiced/1296674173.yml +0 -468
  93. data/spec/vcr/charge/list-pending/1296674173.yml +0 -316
  94. data/spec/vcr/charge/lookup/1296674173.yml +0 -180
  95. data/spec/vcr/coupon/create/1296688818.yml +0 -183
  96. data/spec/vcr/coupon/destroy/1296688818.yml +0 -207
  97. data/spec/vcr/credit/create/1296674173.yml +0 -121
  98. data/spec/vcr/credit/delete/1296674173.yml +0 -121
  99. data/spec/vcr/credit/list/1296674173.yml +0 -121
  100. data/spec/vcr/credit/lookup/1296674173.yml +0 -121
  101. data/spec/vcr/plan/delete/1296674173.yml +0 -225
  102. data/spec/vcr/transaction/all/1296674173.yml +0 -389
  103. data/spec/vcr/transaction/create-no-account/1296674173.yml +0 -93
  104. data/spec/vcr/transaction/create-with-account/1296674173.yml +0 -225
  105. data/spec/vcr/transaction/list-filled/1296674173.yml +0 -487
  106. data/spec/vcr/transaction/list-initial/1296674173.yml +0 -217
  107. data/spec/vcr/transaction/lookup/1296674173.yml +0 -563
  108. data/spec/vcr/transaction/refund/1296674173.yml +0 -287
  109. data/spec/vcr/transaction/void/1296674173.yml +0 -352
  110. data/spec/vcr/transparent/post-url/1311127536.yml +0 -0
  111. data/spec/vcr/transparent/post-url/1311127583.yml +0 -0
  112. data/spec/vcr/transparent/post-url/1311128042.yml +0 -0
  113. data/spec/vcr/transparent/post-url/1311128073.yml +0 -0
  114. data/spec/vcr/transparent/post-url/1311128087.yml +0 -0
@@ -0,0 +1,198 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts.xml
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <account-code>credit-list-1313708090</account-code>\n
7
+ \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
8
+ \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <credit-card>\n
9
+ \ </credit-card>\n </billing-info>\n <accept-language nil=\"true\"></accept-language>\n</account>\n"
10
+ headers:
11
+ user-agent:
12
+ - Recurly Ruby Client v0.4.10
13
+ content-type:
14
+ - application/xml
15
+ response: !ruby/struct:VCR::Response
16
+ status: !ruby/struct:VCR::ResponseStatus
17
+ code: 201
18
+ message: Created
19
+ headers:
20
+ location:
21
+ - http://app.lvh.me:3000/accounts/credit-list-1313708090
22
+ content-type:
23
+ - application/xml; charset=utf-8
24
+ cache-control:
25
+ - no-cache
26
+ x-ua-compatible:
27
+ - IE=Edge
28
+ set-cookie:
29
+ - _recurly_session=d2a2162cd128aab7891ffadb785b912a; domain=.lvh.me; path=/;
30
+ HttpOnly
31
+ server:
32
+ - thin 1.2.11 codename Bat-Shit Crazy
33
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <id>credit-list-1313708090</id>\n
34
+ \ <account_code>credit-list-1313708090</account_code>\n <username></username>\n
35
+ \ <email>verena@test.com</email>\n <first_name>Verena</first_name>\n <last_name>Test</last_name>\n
36
+ \ <company_name>Recurly Ruby Gem</company_name>\n <balance_in_cents type=\"integer\">0</balance_in_cents>\n
37
+ \ <closed type=\"boolean\">false</closed>\n <hosted_login_token>34eeab2db1144020878c3a7d0e5fa953</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:01:44Z</created_at>\n <state>active</state>\n</account>\n"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
42
+ method: :post
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-list-1313708090/credits.xml
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit>\n <amount-in-cents
45
+ type=\"integer\">100</amount-in-cents>\n <description>one</description>\n</credit>\n"
46
+ headers:
47
+ user-agent:
48
+ - Recurly Ruby Client v0.4.10
49
+ content-type:
50
+ - application/xml
51
+ response: !ruby/struct:VCR::Response
52
+ status: !ruby/struct:VCR::ResponseStatus
53
+ code: 201
54
+ message: Created
55
+ headers:
56
+ content-type:
57
+ - application/xml; charset=utf-8
58
+ cache-control:
59
+ - no-cache
60
+ x-ua-compatible:
61
+ - IE=Edge
62
+ set-cookie:
63
+ - _recurly_session=58af0dbbe55790deb091b64c2a3438c5; domain=.lvh.me; path=/;
64
+ HttpOnly
65
+ server:
66
+ - thin 1.2.11 codename Bat-Shit Crazy
67
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit type=\"credit\">\n
68
+ \ <id>417eec6369334b38bad0f1a6f6fcd024</id>\n <account_code>credit-list-1313708090</account_code>\n
69
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">-100</unit_amount_in_cents>\n
70
+ \ <amount_in_cents type=\"integer\">-100</amount_in_cents>\n <currency>USD</currency>\n
71
+ \ <start_date type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date
72
+ nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
73
+ \ <description>one</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n</credit>\n"
74
+ http_version: '1.1'
75
+ - !ruby/struct:VCR::HTTPInteraction
76
+ request: !ruby/struct:VCR::Request
77
+ method: :post
78
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-list-1313708090/credits.xml
79
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit>\n <amount-in-cents
80
+ type=\"integer\">200</amount-in-cents>\n <description>two</description>\n</credit>\n"
81
+ headers:
82
+ user-agent:
83
+ - Recurly Ruby Client v0.4.10
84
+ content-type:
85
+ - application/xml
86
+ response: !ruby/struct:VCR::Response
87
+ status: !ruby/struct:VCR::ResponseStatus
88
+ code: 201
89
+ message: Created
90
+ headers:
91
+ content-type:
92
+ - application/xml; charset=utf-8
93
+ cache-control:
94
+ - no-cache
95
+ x-ua-compatible:
96
+ - IE=Edge
97
+ set-cookie:
98
+ - _recurly_session=1a6f6d8598af7c2a4f98f679d4d4d68d; domain=.lvh.me; path=/;
99
+ HttpOnly
100
+ server:
101
+ - thin 1.2.11 codename Bat-Shit Crazy
102
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit type=\"credit\">\n
103
+ \ <id>1d3f91b5576d40749bc2f1214e0be882</id>\n <account_code>credit-list-1313708090</account_code>\n
104
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">-200</unit_amount_in_cents>\n
105
+ \ <amount_in_cents type=\"integer\">-200</amount_in_cents>\n <currency>USD</currency>\n
106
+ \ <start_date type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date
107
+ nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
108
+ \ <description>two</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n</credit>\n"
109
+ http_version: '1.1'
110
+ - !ruby/struct:VCR::HTTPInteraction
111
+ request: !ruby/struct:VCR::Request
112
+ method: :post
113
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-list-1313708090/credits.xml
114
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit>\n <amount-in-cents
115
+ type=\"integer\">300</amount-in-cents>\n <description>three</description>\n</credit>\n"
116
+ headers:
117
+ user-agent:
118
+ - Recurly Ruby Client v0.4.10
119
+ content-type:
120
+ - application/xml
121
+ response: !ruby/struct:VCR::Response
122
+ status: !ruby/struct:VCR::ResponseStatus
123
+ code: 201
124
+ message: Created
125
+ headers:
126
+ content-type:
127
+ - application/xml; charset=utf-8
128
+ cache-control:
129
+ - no-cache
130
+ x-ua-compatible:
131
+ - IE=Edge
132
+ set-cookie:
133
+ - _recurly_session=8c5aa5194e3fcaac81d753f9afff9deb; domain=.lvh.me; path=/;
134
+ HttpOnly
135
+ server:
136
+ - thin 1.2.11 codename Bat-Shit Crazy
137
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit type=\"credit\">\n
138
+ \ <id>b3a613670f1e4bdcafa1233dabd991cb</id>\n <account_code>credit-list-1313708090</account_code>\n
139
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">-300</unit_amount_in_cents>\n
140
+ \ <amount_in_cents type=\"integer\">-300</amount_in_cents>\n <currency>USD</currency>\n
141
+ \ <start_date type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date
142
+ nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
143
+ \ <description>three</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n</credit>\n"
144
+ http_version: '1.1'
145
+ - !ruby/struct:VCR::HTTPInteraction
146
+ request: !ruby/struct:VCR::Request
147
+ method: :get
148
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-list-1313708090/credits.xml
149
+ body: !!null
150
+ headers:
151
+ user-agent:
152
+ - Recurly Ruby Client v0.4.10
153
+ accept:
154
+ - application/xml
155
+ accept-encoding:
156
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
157
+ response: !ruby/struct:VCR::Response
158
+ status: !ruby/struct:VCR::ResponseStatus
159
+ code: 200
160
+ message: OK
161
+ headers:
162
+ content-type:
163
+ - application/xml; charset=utf-8
164
+ etag:
165
+ - ! '"e5e7df3b547356c3e3c337ddc4dcee99"'
166
+ cache-control:
167
+ - max-age=0, private, must-revalidate
168
+ x-ua-compatible:
169
+ - IE=Edge
170
+ set-cookie:
171
+ - _recurly_session=4569ec689a06e3a53422d12e394d0243; domain=.lvh.me; path=/;
172
+ HttpOnly
173
+ server:
174
+ - thin 1.2.11 codename Bat-Shit Crazy
175
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credits type=\"array\">\n
176
+ \ <credit type=\"credit\">\n <id>b3a613670f1e4bdcafa1233dabd991cb</id>\n
177
+ \ <account_code>credit-list-1313708090</account_code>\n <quantity type=\"integer\">1</quantity>\n
178
+ \ <unit_amount_in_cents type=\"integer\">-300</unit_amount_in_cents>\n <amount_in_cents
179
+ type=\"integer\">-300</amount_in_cents>\n <currency>USD</currency>\n <start_date
180
+ type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date nil=\"true\"
181
+ type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
182
+ \ <description>three</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n
183
+ \ </credit>\n <credit type=\"credit\">\n <id>1d3f91b5576d40749bc2f1214e0be882</id>\n
184
+ \ <account_code>credit-list-1313708090</account_code>\n <quantity type=\"integer\">1</quantity>\n
185
+ \ <unit_amount_in_cents type=\"integer\">-200</unit_amount_in_cents>\n <amount_in_cents
186
+ type=\"integer\">-200</amount_in_cents>\n <currency>USD</currency>\n <start_date
187
+ type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date nil=\"true\"
188
+ type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
189
+ \ <description>two</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n
190
+ \ </credit>\n <credit type=\"credit\">\n <id>417eec6369334b38bad0f1a6f6fcd024</id>\n
191
+ \ <account_code>credit-list-1313708090</account_code>\n <quantity type=\"integer\">1</quantity>\n
192
+ \ <unit_amount_in_cents type=\"integer\">-100</unit_amount_in_cents>\n <amount_in_cents
193
+ type=\"integer\">-100</amount_in_cents>\n <currency>USD</currency>\n <start_date
194
+ type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date nil=\"true\"
195
+ type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
196
+ \ <description>one</description>\n <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n
197
+ \ </credit>\n</credits>\n"
198
+ http_version: '1.1'
@@ -0,0 +1,112 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts.xml
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <account-code>credit-lookup-1313708090</account-code>\n
7
+ \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
8
+ \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <credit-card>\n
9
+ \ </credit-card>\n </billing-info>\n <accept-language nil=\"true\"></accept-language>\n</account>\n"
10
+ headers:
11
+ user-agent:
12
+ - Recurly Ruby Client v0.4.10
13
+ content-type:
14
+ - application/xml
15
+ response: !ruby/struct:VCR::Response
16
+ status: !ruby/struct:VCR::ResponseStatus
17
+ code: 201
18
+ message: Created
19
+ headers:
20
+ location:
21
+ - http://app.lvh.me:3000/accounts/credit-lookup-1313708090
22
+ content-type:
23
+ - application/xml; charset=utf-8
24
+ cache-control:
25
+ - no-cache
26
+ x-ua-compatible:
27
+ - IE=Edge
28
+ set-cookie:
29
+ - _recurly_session=218c24b7b2899059d6170a19119fddb4; domain=.lvh.me; path=/;
30
+ HttpOnly
31
+ server:
32
+ - thin 1.2.11 codename Bat-Shit Crazy
33
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <id>credit-lookup-1313708090</id>\n
34
+ \ <account_code>credit-lookup-1313708090</account_code>\n <username></username>\n
35
+ \ <email>verena@test.com</email>\n <first_name>Verena</first_name>\n <last_name>Test</last_name>\n
36
+ \ <company_name>Recurly Ruby Gem</company_name>\n <balance_in_cents type=\"integer\">0</balance_in_cents>\n
37
+ \ <closed type=\"boolean\">false</closed>\n <hosted_login_token>3501c608b5f04789b4aae78ae733b6ba</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:01:45Z</created_at>\n <state>active</state>\n</account>\n"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
42
+ method: :post
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-lookup-1313708090/credits.xml
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit>\n <amount-in-cents
45
+ type=\"integer\">1315</amount-in-cents>\n <description>free moniez 4 u</description>\n</credit>\n"
46
+ headers:
47
+ user-agent:
48
+ - Recurly Ruby Client v0.4.10
49
+ content-type:
50
+ - application/xml
51
+ response: !ruby/struct:VCR::Response
52
+ status: !ruby/struct:VCR::ResponseStatus
53
+ code: 201
54
+ message: Created
55
+ headers:
56
+ content-type:
57
+ - application/xml; charset=utf-8
58
+ cache-control:
59
+ - no-cache
60
+ x-ua-compatible:
61
+ - IE=Edge
62
+ set-cookie:
63
+ - _recurly_session=4307cc0b2116af781c8b2696bc7bd298; domain=.lvh.me; path=/;
64
+ HttpOnly
65
+ server:
66
+ - thin 1.2.11 codename Bat-Shit Crazy
67
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit type=\"credit\">\n
68
+ \ <id>bcf8563651fb4a76bd8b8e9bd3fc06bb</id>\n <account_code>credit-lookup-1313708090</account_code>\n
69
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">-1315</unit_amount_in_cents>\n
70
+ \ <amount_in_cents type=\"integer\">-1315</amount_in_cents>\n <currency>USD</currency>\n
71
+ \ <start_date type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date
72
+ nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
73
+ \ <description>free moniez 4 u</description>\n <created_at type=\"datetime\">2011-08-19T20:01:46Z</created_at>\n</credit>\n"
74
+ http_version: '1.1'
75
+ - !ruby/struct:VCR::HTTPInteraction
76
+ request: !ruby/struct:VCR::Request
77
+ method: :get
78
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/credit-lookup-1313708090/credits/bcf8563651fb4a76bd8b8e9bd3fc06bb.xml
79
+ body: !!null
80
+ headers:
81
+ user-agent:
82
+ - Recurly Ruby Client v0.4.10
83
+ accept:
84
+ - application/xml
85
+ accept-encoding:
86
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
+ response: !ruby/struct:VCR::Response
88
+ status: !ruby/struct:VCR::ResponseStatus
89
+ code: 200
90
+ message: OK
91
+ headers:
92
+ content-type:
93
+ - application/xml; charset=utf-8
94
+ etag:
95
+ - ! '"b327d600aad76228e81145e2c8df933f"'
96
+ cache-control:
97
+ - max-age=0, private, must-revalidate
98
+ x-ua-compatible:
99
+ - IE=Edge
100
+ set-cookie:
101
+ - _recurly_session=a55de6191a8a0541153f620883c746df; domain=.lvh.me; path=/;
102
+ HttpOnly
103
+ server:
104
+ - thin 1.2.11 codename Bat-Shit Crazy
105
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<credit type=\"credit\">\n
106
+ \ <id>bcf8563651fb4a76bd8b8e9bd3fc06bb</id>\n <account_code>credit-lookup-1313708090</account_code>\n
107
+ \ <quantity type=\"integer\">1</quantity>\n <unit_amount_in_cents type=\"integer\">-1315</unit_amount_in_cents>\n
108
+ \ <amount_in_cents type=\"integer\">-1315</amount_in_cents>\n <currency>USD</currency>\n
109
+ \ <start_date type=\"datetime\">2011-08-19T20:01:45Z</start_date>\n <end_date
110
+ nil=\"true\" type=\"datetime\"></end_date>\n <invoice_number nil=\"true\" type=\"integer\"></invoice_number>\n
111
+ \ <description>free moniez 4 u</description>\n <created_at type=\"datetime\">2011-08-19T20:01:46Z</created_at>\n</credit>\n"
112
+ http_version: '1.1'
@@ -1,200 +1,115 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
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>invoice-create-no-charges-1296674173</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:
5
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts.xml
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <account-code>invoice-create-no-charges-1296674173</account-code>\n
7
+ \ <first-name>Verena</first-name>\n <last-name>Test</last-name>\n <email>verena@test.com</email>\n
8
+ \ <company-name>Recurly Ruby Gem</company-name>\n <billing-info>\n <credit-card>\n
9
+ \ </credit-card>\n </billing-info>\n <accept-language nil=\"true\"></accept-language>\n</account>\n"
10
+ headers:
11
+ user-agent:
12
+ - Recurly Ruby Client v0.4.10
13
+ content-type:
21
14
  - 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
15
+ response: !ruby/struct:VCR::Response
16
+ status: !ruby/struct:VCR::ResponseStatus
30
17
  code: 201
31
- message: "Created "
32
- headers:
33
- cache-control:
34
- - no-cache
35
- location:
36
- - http://litle-test.recurly.local:3000/accounts/invoice-create-no-charges-1296674173
37
- x-runtime:
38
- - "623"
39
- content-type:
18
+ message: Created
19
+ headers:
20
+ location:
21
+ - http://app.lvh.me:3000/accounts/invoice-create-no-charges-1296674173
22
+ content-type:
40
23
  - application/xml; charset=utf-8
41
- content-length:
42
- - "605"
43
- server:
44
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
45
- date:
46
- - Thu, 03 Feb 2011 22:20:05 GMT
47
- connection:
48
- - close
49
- set-cookie:
50
- - account_credentials=28be163e1f94a7ceae69999f3a3a7744c48ce3196a699a544b41e0fe0b295430413fed60c84d800ede07c5c1b9518402eec01d3ecaedaa26ff9e59759933b26b%3A%3A; domain=.recurly.local; path=/
51
- - ""
52
- - _recurly_session=cb720a4d65d1589d60dc78151587a22b; domain=.recurly.local; path=/; HttpOnly
53
- body: |
54
- <?xml version="1.0" encoding="UTF-8"?>
55
- <account>
56
- <id>invoice-create-no-charges-1296674173</id>
57
- <account_code>invoice-create-no-charges-1296674173</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>3c9caa2ce2564b09933c85b108bf366b</hosted_login_token>
66
- <created_at type="datetime">2011-02-03T22:20:05Z</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
24
+ cache-control:
25
+ - no-cache
26
+ x-ua-compatible:
27
+ - IE=Edge
28
+ set-cookie:
29
+ - _recurly_session=0a03f0eb5dd8b83a42e0c3f12e45b905; domain=.lvh.me; path=/;
30
+ HttpOnly
31
+ server:
32
+ - thin 1.2.11 codename Bat-Shit Crazy
33
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<account>\n <id>invoice-create-no-charges-1296674173</id>\n
34
+ \ <account_code>invoice-create-no-charges-1296674173</account_code>\n <username></username>\n
35
+ \ <email>verena@test.com</email>\n <first_name>Verena</first_name>\n <last_name>Test</last_name>\n
36
+ \ <company_name>Recurly Ruby Gem</company_name>\n <balance_in_cents type=\"integer\">0</balance_in_cents>\n
37
+ \ <closed type=\"boolean\">false</closed>\n <hosted_login_token>bea15adc514041fa9f0b72505c5c7cb2</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:01:50Z</created_at>\n <state>active</state>\n</account>\n"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
73
42
  method: :put
74
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/invoice-create-no-charges-1296674173/billing_info.xml
75
- body: |
76
- <?xml version="1.0" encoding="UTF-8"?>
77
- <billing-info>
78
- <address1>123 Test St</address1>
79
- <city>San Francisco</city>
80
- <state>CA</state>
81
- <zip>94115</zip>
82
- <country>US</country>
83
- <credit-card>
84
- <number>4111111111111111</number>
85
- <year type="integer">2012</year>
86
- <month type="integer">2</month>
87
- <verification-value>123</verification-value>
88
- </credit-card>
89
- <account-code>invoice-create-no-charges-1296674173</account-code>
90
- <first-name>Verena</first-name>
91
- <last-name>Test</last-name>
92
- </billing-info>
93
-
94
- headers:
95
- authorization:
96
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
97
- content-type:
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/invoice-create-no-charges-1296674173/billing_info.xml
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing-info>\n <first-name>Verena</first-name>\n
45
+ \ <last-name>Test</last-name>\n <address1>123 Test St</address1>\n <city>San
46
+ Francisco</city>\n <state>CA</state>\n <zip>94115</zip>\n <country>US</country>\n
47
+ \ <credit-card>\n <number>4111111111111111</number>\n <year type=\"integer\">2012</year>\n
48
+ \ <month type=\"integer\">8</month>\n <verification-value>123</verification-value>\n
49
+ \ </credit-card>\n <account-code>invoice-create-no-charges-1296674173</account-code>\n</billing-info>\n"
50
+ headers:
51
+ user-agent:
52
+ - Recurly Ruby Client v0.4.10
53
+ content-type:
98
54
  - application/xml
99
- accept:
100
- - "*/*"
101
- user-agent:
102
- - Ruby
103
- connection:
104
- - close
105
- response: !ruby/struct:VCR::Response
106
- status: !ruby/struct:VCR::ResponseStatus
55
+ response: !ruby/struct:VCR::Response
56
+ status: !ruby/struct:VCR::ResponseStatus
107
57
  code: 200
108
- message: "OK "
109
- headers:
110
- x-runtime:
111
- - "1491"
112
- content-type:
58
+ message: OK
59
+ headers:
60
+ content-type:
113
61
  - application/xml; charset=utf-8
114
- etag:
115
- - "\"9a4b5c014f959f4bfe74ea7f634f5bf9\""
116
- cache-control:
117
- - private, max-age=0, must-revalidate
118
- content-length:
119
- - "651"
120
- server:
121
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
122
- date:
123
- - Thu, 03 Feb 2011 22:20:08 GMT
124
- connection:
125
- - close
126
- set-cookie:
127
- - _recurly_session=af039358179357c805316807a2fdba1d; domain=.recurly.local; path=/; HttpOnly
128
- body: |
129
- <?xml version="1.0" encoding="UTF-8"?>
130
- <billing_info>
131
- <account_code>invoice-create-no-charges-1296674173</account_code>
132
- <first_name>Verena</first_name>
133
- <last_name>Test</last_name>
134
- <address1>123 Test St</address1>
135
- <address2></address2>
136
- <city>San Francisco</city>
137
- <state>CA</state>
138
- <country>US</country>
139
- <zip>94115</zip>
140
- <phone></phone>
141
- <vat_number></vat_number>
142
- <ip_address></ip_address>
143
- <credit_card>
144
- <type>visa</type>
145
- <last_four>1111</last_four>
146
- <month type="integer">2</month>
147
- <year type="integer">2012</year>
148
- </credit_card>
149
- <updated_at type="datetime">2011-02-03T22:20:08Z</updated_at>
150
- </billing_info>
151
-
152
- http_version: "1.1"
153
- - !ruby/struct:VCR::HTTPInteraction
154
- request: !ruby/struct:VCR::Request
62
+ etag:
63
+ - ! '"36f6d8150bf4c59c420207941845a597"'
64
+ cache-control:
65
+ - max-age=0, private, must-revalidate
66
+ x-ua-compatible:
67
+ - IE=Edge
68
+ set-cookie:
69
+ - _recurly_session=7d446d065ffe253fea67953485ac619c; domain=.lvh.me; path=/;
70
+ HttpOnly
71
+ server:
72
+ - thin 1.2.11 codename Bat-Shit Crazy
73
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing_info>\n <account_code>invoice-create-no-charges-1296674173</account_code>\n
74
+ \ <first_name>Verena</first_name>\n <last_name>Test</last_name>\n <address1>123
75
+ Test St</address1>\n <address2></address2>\n <city>San Francisco</city>\n
76
+ \ <state>CA</state>\n <country>US</country>\n <zip>94115</zip>\n <phone></phone>\n
77
+ \ <vat_number></vat_number>\n <ip_address></ip_address>\n <credit_card>\n
78
+ \ <type>visa</type>\n <last_four>1111</last_four>\n <month type=\"integer\">8</month>\n
79
+ \ <year type=\"integer\">2012</year>\n </credit_card>\n <updated_at type=\"datetime\">2011-08-19T20:01:53Z</updated_at>\n</billing_info>\n"
80
+ http_version: '1.1'
81
+ - !ruby/struct:VCR::HTTPInteraction
82
+ request: !ruby/struct:VCR::Request
155
83
  method: :post
156
- uri: http://isaac%40recurly.com:isaac1024@litle-test.recurly.local:3000/accounts/invoice-create-no-charges-1296674173/invoices.xml
157
- body: |
158
- <?xml version="1.0" encoding="UTF-8"?>
84
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/invoice-create-no-charges-1296674173/invoices.xml
85
+ body: ! '<?xml version="1.0" encoding="UTF-8"?>
86
+
159
87
  <invoice>
88
+
160
89
  </invoice>
161
90
 
162
- headers:
163
- authorization:
164
- - Basic aXNhYWNAcmVjdXJseS5jb206aXNhYWMxMDI0
165
- content-type:
91
+ '
92
+ headers:
93
+ user-agent:
94
+ - Recurly Ruby Client v0.4.10
95
+ content-type:
166
96
  - application/xml
167
- accept:
168
- - "*/*"
169
- user-agent:
170
- - Ruby
171
- connection:
172
- - close
173
- response: !ruby/struct:VCR::Response
174
- status: !ruby/struct:VCR::ResponseStatus
97
+ response: !ruby/struct:VCR::Response
98
+ status: !ruby/struct:VCR::ResponseStatus
175
99
  code: 422
176
- message: ""
177
- headers:
178
- cache-control:
179
- - no-cache
180
- x-runtime:
181
- - "54"
182
- content-type:
100
+ message: !!null
101
+ headers:
102
+ content-type:
183
103
  - application/xml; charset=utf-8
184
- content-length:
185
- - "98"
186
- server:
187
- - WEBrick/1.3.1 (Ruby/1.9.2/2010-08-18)
188
- date:
189
- - Thu, 03 Feb 2011 22:20:10 GMT
190
- connection:
191
- - close
192
- set-cookie:
193
- - _recurly_session=9c8403aefc985a58f956ba6534133b73; domain=.recurly.local; path=/; HttpOnly
194
- body: |
195
- <?xml version="1.0" encoding="UTF-8"?>
196
- <errors>
197
- <error>No charges to invoice.</error>
198
- </errors>
199
-
200
- http_version: "1.1"
104
+ cache-control:
105
+ - no-cache
106
+ x-ua-compatible:
107
+ - IE=Edge
108
+ set-cookie:
109
+ - _recurly_session=276ee1fb37af65038dac1fe54f8c7c05; domain=.lvh.me; path=/;
110
+ HttpOnly
111
+ server:
112
+ - thin 1.2.11 codename Bat-Shit Crazy
113
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>\n <error>No charges
114
+ to invoice.</error>\n</errors>\n"
115
+ http_version: '1.1'