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,123 @@
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>transaction-list-initial-1311126815</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/transaction-list-initial-1311126815
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=023cbc49c64f2209ac7920604b721b5e; 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>transaction-list-initial-1311126815</id>\n
34
+ \ <account_code>transaction-list-initial-1311126815</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>8239ee2bba784b5684e179887c971bf1</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:02:51Z</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: :put
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/transaction-list-initial-1311126815/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>transaction-list-initial-1311126815</account-code>\n</billing-info>\n"
50
+ headers:
51
+ user-agent:
52
+ - Recurly Ruby Client v0.4.10
53
+ content-type:
54
+ - application/xml
55
+ response: !ruby/struct:VCR::Response
56
+ status: !ruby/struct:VCR::ResponseStatus
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ content-type:
61
+ - application/xml; charset=utf-8
62
+ etag:
63
+ - ! '"2b6e6529ce132cc8d48cfd75f7bfaba1"'
64
+ cache-control:
65
+ - max-age=0, private, must-revalidate
66
+ x-ua-compatible:
67
+ - IE=Edge
68
+ set-cookie:
69
+ - _recurly_session=9148a6bbcbdc2fc3b39cd179ef456ee2; 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>transaction-list-initial-1311126815</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:02:56Z</updated_at>\n</billing_info>\n"
80
+ http_version: '1.1'
81
+ - !ruby/struct:VCR::HTTPInteraction
82
+ request: !ruby/struct:VCR::Request
83
+ method: :get
84
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/transaction-list-initial-1311126815/transactions
85
+ body: !!null
86
+ headers:
87
+ user-agent:
88
+ - Recurly Ruby Client v0.4.10
89
+ accept:
90
+ - application/xml
91
+ accept-encoding:
92
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
93
+ response: !ruby/struct:VCR::Response
94
+ status: !ruby/struct:VCR::ResponseStatus
95
+ code: 200
96
+ message: OK
97
+ headers:
98
+ content-type:
99
+ - application/xml; charset=utf-8
100
+ etag:
101
+ - ! '"487672e67a639a21b87d29fe053f7c26"'
102
+ cache-control:
103
+ - max-age=0, private, must-revalidate
104
+ x-ua-compatible:
105
+ - IE=Edge
106
+ set-cookie:
107
+ - _recurly_session=b685c5816b85a03abaf99a09bc1e4adb; domain=.lvh.me; path=/;
108
+ HttpOnly
109
+ server:
110
+ - thin 1.2.11 codename Bat-Shit Crazy
111
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transactions type=\"collection\">\n
112
+ \ <current_page type=\"integer\">1</current_page>\n <per_page type=\"integer\">50</per_page>\n
113
+ \ <total_entries type=\"integer\">1</total_entries>\n <transaction type=\"Payment\">\n
114
+ \ <id>abaebdec622e4b249fe039c9bfee9c45</id>\n <account_code>transaction-list-initial-1311126815</account_code>\n
115
+ \ <action>authorization</action>\n <date type=\"datetime\">2011-08-19T20:02:54Z</date>\n
116
+ \ <amount_in_cents type=\"integer\">0</amount_in_cents>\n <currency>USD</currency>\n
117
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
118
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
119
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
120
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
121
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">false</voidable>\n
122
+ \ <refundable type=\"boolean\">false</refundable>\n </transaction>\n</transactions>\n"
123
+ http_version: '1.1'
@@ -0,0 +1,335 @@
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>transaction-lookup-1311126815</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/transaction-lookup-1311126815
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=3c7eca876e4b920bdcff04dd172fde2a; 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>transaction-lookup-1311126815</id>\n
34
+ \ <account_code>transaction-lookup-1311126815</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>2dda3156121d496088e0ecd049d68621</hosted_login_token>\n
38
+ \ <created_at type=\"datetime\">2011-08-19T20:03:05Z</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: :put
43
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/accounts/transaction-lookup-1311126815/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>transaction-lookup-1311126815</account-code>\n</billing-info>\n"
50
+ headers:
51
+ user-agent:
52
+ - Recurly Ruby Client v0.4.10
53
+ content-type:
54
+ - application/xml
55
+ response: !ruby/struct:VCR::Response
56
+ status: !ruby/struct:VCR::ResponseStatus
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ content-type:
61
+ - application/xml; charset=utf-8
62
+ etag:
63
+ - ! '"0eeb193d8cc4352f5959980091279cf3"'
64
+ cache-control:
65
+ - max-age=0, private, must-revalidate
66
+ x-ua-compatible:
67
+ - IE=Edge
68
+ set-cookie:
69
+ - _recurly_session=9b97147fd5124c731e63781c79509239; 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>transaction-lookup-1311126815</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:03:09Z</updated_at>\n</billing_info>\n"
80
+ http_version: '1.1'
81
+ - !ruby/struct:VCR::HTTPInteraction
82
+ request: !ruby/struct:VCR::Request
83
+ method: :post
84
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions.xml
85
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction>\n <account>\n
86
+ \ <account-code>transaction-lookup-1311126815</account-code>\n <billing-info>\n
87
+ \ <credit-card>\n </credit-card>\n </billing-info>\n </account>\n
88
+ \ <amount-in-cents type=\"integer\">100</amount-in-cents>\n <description>one</description>\n</transaction>\n"
89
+ headers:
90
+ user-agent:
91
+ - Recurly Ruby Client v0.4.10
92
+ content-type:
93
+ - application/xml
94
+ response: !ruby/struct:VCR::Response
95
+ status: !ruby/struct:VCR::ResponseStatus
96
+ code: 201
97
+ message: Created
98
+ headers:
99
+ location:
100
+ - http://app.lvh.me:3000/transactions/a16eacf349f84d7fa15f99c00f78328c
101
+ content-type:
102
+ - application/xml; charset=utf-8
103
+ cache-control:
104
+ - no-cache
105
+ x-ua-compatible:
106
+ - IE=Edge
107
+ set-cookie:
108
+ - _recurly_session=54cbe2bb4c1e988835e5541f940371d5; domain=.lvh.me; path=/;
109
+ HttpOnly
110
+ server:
111
+ - thin 1.2.11 codename Bat-Shit Crazy
112
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
113
+ \ <id>a16eacf349f84d7fa15f99c00f78328c</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
114
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:10Z</date>\n
115
+ \ <amount_in_cents type=\"integer\">100</amount_in_cents>\n <currency>USD</currency>\n
116
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
117
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
118
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
119
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
120
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
121
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
122
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
123
+ http_version: '1.1'
124
+ - !ruby/struct:VCR::HTTPInteraction
125
+ request: !ruby/struct:VCR::Request
126
+ method: :post
127
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions.xml
128
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction>\n <account>\n
129
+ \ <account-code>transaction-lookup-1311126815</account-code>\n <billing-info>\n
130
+ \ <credit-card>\n </credit-card>\n </billing-info>\n </account>\n
131
+ \ <amount-in-cents type=\"integer\">200</amount-in-cents>\n <description>two</description>\n</transaction>\n"
132
+ headers:
133
+ user-agent:
134
+ - Recurly Ruby Client v0.4.10
135
+ content-type:
136
+ - application/xml
137
+ response: !ruby/struct:VCR::Response
138
+ status: !ruby/struct:VCR::ResponseStatus
139
+ code: 201
140
+ message: Created
141
+ headers:
142
+ location:
143
+ - http://app.lvh.me:3000/transactions/a8069a0dec084019960a19a4e25b5b1d
144
+ content-type:
145
+ - application/xml; charset=utf-8
146
+ cache-control:
147
+ - no-cache
148
+ x-ua-compatible:
149
+ - IE=Edge
150
+ set-cookie:
151
+ - _recurly_session=fab17cca7b9ce234e0c7b6dba3f135d4; domain=.lvh.me; path=/;
152
+ HttpOnly
153
+ server:
154
+ - thin 1.2.11 codename Bat-Shit Crazy
155
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
156
+ \ <id>a8069a0dec084019960a19a4e25b5b1d</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
157
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:12Z</date>\n
158
+ \ <amount_in_cents type=\"integer\">200</amount_in_cents>\n <currency>USD</currency>\n
159
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
160
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
161
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
162
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
163
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
164
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
165
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
166
+ http_version: '1.1'
167
+ - !ruby/struct:VCR::HTTPInteraction
168
+ request: !ruby/struct:VCR::Request
169
+ method: :post
170
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions.xml
171
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction>\n <account>\n
172
+ \ <account-code>transaction-lookup-1311126815</account-code>\n <billing-info>\n
173
+ \ <credit-card>\n </credit-card>\n </billing-info>\n </account>\n
174
+ \ <amount-in-cents type=\"integer\">300</amount-in-cents>\n <description>three</description>\n</transaction>\n"
175
+ headers:
176
+ user-agent:
177
+ - Recurly Ruby Client v0.4.10
178
+ content-type:
179
+ - application/xml
180
+ response: !ruby/struct:VCR::Response
181
+ status: !ruby/struct:VCR::ResponseStatus
182
+ code: 201
183
+ message: Created
184
+ headers:
185
+ location:
186
+ - http://app.lvh.me:3000/transactions/ad487efd93b24ca9b9db55b68f8bb1a6
187
+ content-type:
188
+ - application/xml; charset=utf-8
189
+ cache-control:
190
+ - no-cache
191
+ x-ua-compatible:
192
+ - IE=Edge
193
+ set-cookie:
194
+ - _recurly_session=becc0654869472d345d53a6ece133be0; domain=.lvh.me; path=/;
195
+ HttpOnly
196
+ server:
197
+ - thin 1.2.11 codename Bat-Shit Crazy
198
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
199
+ \ <id>ad487efd93b24ca9b9db55b68f8bb1a6</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
200
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:13Z</date>\n
201
+ \ <amount_in_cents type=\"integer\">300</amount_in_cents>\n <currency>USD</currency>\n
202
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
203
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
204
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
205
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
206
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
207
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
208
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
209
+ http_version: '1.1'
210
+ - !ruby/struct:VCR::HTTPInteraction
211
+ request: !ruby/struct:VCR::Request
212
+ method: :get
213
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions/a16eacf349f84d7fa15f99c00f78328c.xml?account_code=transaction-lookup-1311126815
214
+ body: !!null
215
+ headers:
216
+ user-agent:
217
+ - Recurly Ruby Client v0.4.10
218
+ accept:
219
+ - application/xml
220
+ accept-encoding:
221
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
222
+ response: !ruby/struct:VCR::Response
223
+ status: !ruby/struct:VCR::ResponseStatus
224
+ code: 200
225
+ message: OK
226
+ headers:
227
+ content-type:
228
+ - application/xml; charset=utf-8
229
+ etag:
230
+ - ! '"9ca5248b36d4e293ed7166262129a759"'
231
+ cache-control:
232
+ - max-age=0, private, must-revalidate
233
+ x-ua-compatible:
234
+ - IE=Edge
235
+ set-cookie:
236
+ - _recurly_session=ed5a99d68b3d821931eac702461552d4; domain=.lvh.me; path=/;
237
+ HttpOnly
238
+ server:
239
+ - thin 1.2.11 codename Bat-Shit Crazy
240
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
241
+ \ <id>a16eacf349f84d7fa15f99c00f78328c</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
242
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:10Z</date>\n
243
+ \ <amount_in_cents type=\"integer\">100</amount_in_cents>\n <currency>USD</currency>\n
244
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
245
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
246
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
247
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
248
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
249
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
250
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
251
+ http_version: '1.1'
252
+ - !ruby/struct:VCR::HTTPInteraction
253
+ request: !ruby/struct:VCR::Request
254
+ method: :get
255
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions/a8069a0dec084019960a19a4e25b5b1d.xml?account_code=transaction-lookup-1311126815
256
+ body: !!null
257
+ headers:
258
+ user-agent:
259
+ - Recurly Ruby Client v0.4.10
260
+ accept:
261
+ - application/xml
262
+ accept-encoding:
263
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
264
+ response: !ruby/struct:VCR::Response
265
+ status: !ruby/struct:VCR::ResponseStatus
266
+ code: 200
267
+ message: OK
268
+ headers:
269
+ content-type:
270
+ - application/xml; charset=utf-8
271
+ etag:
272
+ - ! '"d20753acc490191a8ba228ca2afa2ab9"'
273
+ cache-control:
274
+ - max-age=0, private, must-revalidate
275
+ x-ua-compatible:
276
+ - IE=Edge
277
+ set-cookie:
278
+ - _recurly_session=91780e00b69e7d468637795b31f340c5; domain=.lvh.me; path=/;
279
+ HttpOnly
280
+ server:
281
+ - thin 1.2.11 codename Bat-Shit Crazy
282
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
283
+ \ <id>a8069a0dec084019960a19a4e25b5b1d</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
284
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:12Z</date>\n
285
+ \ <amount_in_cents type=\"integer\">200</amount_in_cents>\n <currency>USD</currency>\n
286
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
287
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
288
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
289
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
290
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
291
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
292
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
293
+ http_version: '1.1'
294
+ - !ruby/struct:VCR::HTTPInteraction
295
+ request: !ruby/struct:VCR::Request
296
+ method: :get
297
+ uri: http://api-test%40facebook-test.com:69d95a9768c745ecb5ac6864032ec970@app.lvh.me:3000/transactions/ad487efd93b24ca9b9db55b68f8bb1a6.xml?account_code=transaction-lookup-1311126815
298
+ body: !!null
299
+ headers:
300
+ user-agent:
301
+ - Recurly Ruby Client v0.4.10
302
+ accept:
303
+ - application/xml
304
+ accept-encoding:
305
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
306
+ response: !ruby/struct:VCR::Response
307
+ status: !ruby/struct:VCR::ResponseStatus
308
+ code: 200
309
+ message: OK
310
+ headers:
311
+ content-type:
312
+ - application/xml; charset=utf-8
313
+ etag:
314
+ - ! '"43c9f1bec33ca6d4898252a53ce68904"'
315
+ cache-control:
316
+ - max-age=0, private, must-revalidate
317
+ x-ua-compatible:
318
+ - IE=Edge
319
+ set-cookie:
320
+ - _recurly_session=a8dee3109964a20af75996e2d89e2855; domain=.lvh.me; path=/;
321
+ HttpOnly
322
+ server:
323
+ - thin 1.2.11 codename Bat-Shit Crazy
324
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<transaction type=\"Payment\">\n
325
+ \ <id>ad487efd93b24ca9b9db55b68f8bb1a6</id>\n <account_code>transaction-lookup-1311126815</account_code>\n
326
+ \ <action>purchase</action>\n <date type=\"datetime\">2011-08-19T20:03:13Z</date>\n
327
+ \ <amount_in_cents type=\"integer\">300</amount_in_cents>\n <currency>USD</currency>\n
328
+ \ <status>success</status>\n <message>Test Gateway: Successful test transaction</message>\n
329
+ \ <reference>12345</reference>\n <cvv_result code=\"M\">Match</cvv_result>\n
330
+ \ <avs_result code=\"D\">Street address and postal code match.</avs_result>\n
331
+ \ <avs_result_street>Y</avs_result_street>\n <avs_result_postal>Y</avs_result_postal>\n
332
+ \ <test type=\"boolean\">true</test>\n <voidable type=\"boolean\">true</voidable>\n
333
+ \ <refundable type=\"boolean\">true</refundable>\n <credit_card>\n <type>visa</type>\n
334
+ \ <last_four>1111</last_four>\n </credit_card>\n</transaction>\n"
335
+ http_version: '1.1'