recurly 0.4.11 → 0.4.13
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.
Potentially problematic release.
This version of recurly might be problematic. Click here for more details.
- data/README.md +4 -8
- data/lib/recurly.rb +10 -19
- data/lib/recurly/config_parser.rb +5 -2
- data/lib/recurly/plan.rb +0 -1
- data/lib/recurly/rails3/recurly.rake +10 -26
- data/lib/recurly/transparent.rb +2 -0
- data/lib/recurly/verification.rb +14 -8
- data/lib/recurly/version.rb +1 -1
- data/spec/config/recurly.yml +3 -3
- data/spec/config/test1.yml +1 -3
- data/spec/config/test2.yml +2 -6
- data/spec/unit/config_spec.rb +9 -16
- data/spec/unit/transparent_spec.rb +0 -20
- data/spec/unit/verification_spec.rb +15 -9
- data/spec/vcr/account/accept-language-account/1313708721.yml +52 -31
- data/spec/vcr/account/close/1313708721.yml +107 -79
- data/spec/vcr/account/create-blank/1313708721.yml +37 -26
- data/spec/vcr/account/create-duplicate/1313708721.yml +83 -54
- data/spec/vcr/account/create-min/1313708721.yml +48 -30
- data/spec/vcr/account/create/1313708721.yml +52 -31
- data/spec/vcr/account/find/1313708721.yml +111 -81
- data/spec/vcr/account/list/1313708721.yml +1148 -719
- data/spec/vcr/account/update/1313708721.yml +182 -124
- data/spec/vcr/billing/create/1313708721.yml +156 -93
- data/spec/vcr/billing/destroy/1313708721.yml +198 -135
- data/spec/vcr/billing/errors/1313708721.yml +91 -56
- data/spec/vcr/billing/find/1313708721.yml +200 -122
- data/spec/vcr/billing/update/1313708721.yml +218 -126
- data/spec/vcr/charge/create/1313708721.yml +189 -120
- data/spec/vcr/charge/delete-uninvoiced/1313708721.yml +195 -154
- data/spec/vcr/charge/list-all/1313708721.yml +235 -157
- data/spec/vcr/charge/list-invoiced/1313708721.yml +351 -234
- data/spec/vcr/charge/list-pending/1313708721.yml +235 -159
- data/spec/vcr/charge/lookup/1313708721.yml +127 -87
- data/spec/vcr/coupon/create/1296774903.yml +83 -95
- data/spec/vcr/coupon/destroy/1296774903.yml +81 -115
- data/spec/vcr/credit/create/1313708090.yml +127 -87
- data/spec/vcr/credit/delete/1313708090.yml +169 -129
- data/spec/vcr/credit/list/1313708090.yml +235 -157
- data/spec/vcr/credit/lookup/1313708090.yml +127 -87
- data/spec/vcr/invoice/create-no-charges/1296674173.yml +140 -89
- data/spec/vcr/invoice/create/1296674173.yml +259 -162
- data/spec/vcr/invoice/list/1296674173.yml +342 -227
- data/spec/vcr/invoice/lookup/1296674173.yml +260 -167
- data/spec/vcr/plan/all.yml +206 -198
- data/spec/vcr/plan/find.yml +109 -103
- data/spec/vcr/plan/update.yml +126 -93
- data/spec/vcr/subscription/addons/add/1296674173.yml +156 -261
- data/spec/vcr/subscription/addons/create/1296674173.yml +156 -164
- data/spec/vcr/subscription/addons/remove/1296674173.yml +156 -249
- data/spec/vcr/subscription/cancel-with-code/1296674173.yml +340 -243
- data/spec/vcr/subscription/cancel/1296674173.yml +297 -210
- data/spec/vcr/subscription/change1/1296674173.yml +303 -213
- data/spec/vcr/subscription/change2/1296674173.yml +303 -214
- data/spec/vcr/subscription/create/1296674173.yml +167 -111
- data/spec/vcr/subscription/find/1296674173.yml +210 -145
- data/spec/vcr/subscription/reactivate/1296674173.yml +318 -233
- data/spec/vcr/subscription/refund-full/1296674173.yml +277 -199
- data/spec/vcr/subscription/refund-none/1296674173.yml +277 -199
- data/spec/vcr/subscription/refund-partial/1296674173.yml +277 -199
- data/spec/vcr/transaction/all/1311126815.yml +388 -206
- data/spec/vcr/transaction/create-no-account/1311126815.yml +74 -43
- data/spec/vcr/transaction/create-with-account/1311126815.yml +172 -101
- data/spec/vcr/transaction/list-filled/1311126815.yml +486 -291
- data/spec/vcr/transaction/list-initial/1311126815.yml +159 -98
- data/spec/vcr/transaction/lookup/1311126815.yml +420 -268
- data/spec/vcr/transaction/void/1311126815.yml +280 -174
- metadata +109 -77
- data/spec/vcr/transaction/refund/1311126815.yml +0 -163
- data/spec/vcr/transparent/post-url/1311239470.yml +0 -76
| @@ -1,39 +1,60 @@ | |
| 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://api | 
| 6 | 
            -
                body:  | 
| 7 | 
            -
                   | 
| 8 | 
            -
                   | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 5 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
         | 
| 6 | 
            +
                body: |
         | 
| 7 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 8 | 
            +
                  <account>
         | 
| 9 | 
            +
                    <account-code>account1-french-1313708721</account-code>
         | 
| 10 | 
            +
                    <first-name>Verena</first-name>
         | 
| 11 | 
            +
                    <last-name>Test</last-name>
         | 
| 12 | 
            +
                    <email>verena@test.com</email>
         | 
| 13 | 
            +
                    <company-name>Recurly Ruby Gem</company-name>
         | 
| 14 | 
            +
                    <billing-info>
         | 
| 15 | 
            +
                      <credit-card>
         | 
| 16 | 
            +
                      </credit-card>
         | 
| 17 | 
            +
                    </billing-info>
         | 
| 18 | 
            +
                    <accept-language>fr</accept-language>
         | 
| 19 | 
            +
                  </account>
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                headers: 
         | 
| 22 | 
            +
                  user-agent: 
         | 
| 23 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 24 | 
            +
                  content-type: 
         | 
| 14 25 | 
             
                  - application/xml
         | 
| 15 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 16 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 26 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 27 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 17 28 | 
             
                  code: 201
         | 
| 18 29 | 
             
                  message: Created
         | 
| 19 | 
            -
                headers:
         | 
| 20 | 
            -
                  location:
         | 
| 21 | 
            -
                  - http:// | 
| 22 | 
            -
                  content-type:
         | 
| 30 | 
            +
                headers: 
         | 
| 31 | 
            +
                  location: 
         | 
| 32 | 
            +
                  - http://api.lvh.me:3000/accounts/account1-french-1313708721
         | 
| 33 | 
            +
                  content-type: 
         | 
| 23 34 | 
             
                  - application/xml; charset=utf-8
         | 
| 24 | 
            -
                  cache-control:
         | 
| 35 | 
            +
                  cache-control: 
         | 
| 25 36 | 
             
                  - no-cache
         | 
| 26 | 
            -
                  x-ua-compatible:
         | 
| 37 | 
            +
                  x-ua-compatible: 
         | 
| 27 38 | 
             
                  - IE=Edge
         | 
| 28 | 
            -
                  set-cookie:
         | 
| 29 | 
            -
                  - _recurly_session= | 
| 30 | 
            -
             | 
| 31 | 
            -
                  server:
         | 
| 39 | 
            +
                  set-cookie: 
         | 
| 40 | 
            +
                  - _recurly_session=5a951e8c0f5846ce78be00fd78b2e0fe; domain=.lvh.me; path=/; HttpOnly
         | 
| 41 | 
            +
                  server: 
         | 
| 32 42 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 33 | 
            -
                body:  | 
| 34 | 
            -
                   | 
| 35 | 
            -
                   | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 43 | 
            +
                body: |
         | 
| 44 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 45 | 
            +
                  <account>
         | 
| 46 | 
            +
                    <id>account1-french-1313708721</id>
         | 
| 47 | 
            +
                    <account_code>account1-french-1313708721</account_code>
         | 
| 48 | 
            +
                    <username></username>
         | 
| 49 | 
            +
                    <email>verena@test.com</email>
         | 
| 50 | 
            +
                    <first_name>Verena</first_name>
         | 
| 51 | 
            +
                    <last_name>Test</last_name>
         | 
| 52 | 
            +
                    <company_name>Recurly Ruby Gem</company_name>
         | 
| 53 | 
            +
                    <balance_in_cents type="integer">0</balance_in_cents>
         | 
| 54 | 
            +
                    <closed type="boolean">false</closed>
         | 
| 55 | 
            +
                    <hosted_login_token>14be2aae61d54ea2a51360f4faca96f7</hosted_login_token>
         | 
| 56 | 
            +
                    <created_at type="datetime">2011-09-22T22:01:37Z</created_at>
         | 
| 57 | 
            +
                    <state>active</state>
         | 
| 58 | 
            +
                  </account>
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                http_version: "1.1"
         | 
| @@ -1,104 +1,132 @@ | |
| 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://api | 
| 6 | 
            -
                body:  | 
| 7 | 
            -
                   | 
| 8 | 
            -
                   | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 5 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
         | 
| 6 | 
            +
                body: |
         | 
| 7 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 8 | 
            +
                  <account>
         | 
| 9 | 
            +
                    <account-code>account-close-1313708721</account-code>
         | 
| 10 | 
            +
                    <first-name>Verena</first-name>
         | 
| 11 | 
            +
                    <last-name>Test</last-name>
         | 
| 12 | 
            +
                    <email>verena@test.com</email>
         | 
| 13 | 
            +
                    <company-name>Recurly Ruby Gem</company-name>
         | 
| 14 | 
            +
                    <billing-info>
         | 
| 15 | 
            +
                      <credit-card>
         | 
| 16 | 
            +
                      </credit-card>
         | 
| 17 | 
            +
                    </billing-info>
         | 
| 18 | 
            +
                    <accept-language nil="true"></accept-language>
         | 
| 19 | 
            +
                  </account>
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                headers: 
         | 
| 22 | 
            +
                  user-agent: 
         | 
| 23 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 24 | 
            +
                  content-type: 
         | 
| 14 25 | 
             
                  - application/xml
         | 
| 15 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 16 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 26 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 27 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 17 28 | 
             
                  code: 201
         | 
| 18 29 | 
             
                  message: Created
         | 
| 19 | 
            -
                headers:
         | 
| 20 | 
            -
                  location:
         | 
| 21 | 
            -
                  - http:// | 
| 22 | 
            -
                  content-type:
         | 
| 30 | 
            +
                headers: 
         | 
| 31 | 
            +
                  location: 
         | 
| 32 | 
            +
                  - http://api.lvh.me:3000/accounts/account-close-1313708721
         | 
| 33 | 
            +
                  content-type: 
         | 
| 23 34 | 
             
                  - application/xml; charset=utf-8
         | 
| 24 | 
            -
                  cache-control:
         | 
| 35 | 
            +
                  cache-control: 
         | 
| 25 36 | 
             
                  - no-cache
         | 
| 26 | 
            -
                  x-ua-compatible:
         | 
| 37 | 
            +
                  x-ua-compatible: 
         | 
| 27 38 | 
             
                  - IE=Edge
         | 
| 28 | 
            -
                  set-cookie:
         | 
| 29 | 
            -
                  - _recurly_session= | 
| 30 | 
            -
             | 
| 31 | 
            -
                  server:
         | 
| 39 | 
            +
                  set-cookie: 
         | 
| 40 | 
            +
                  - _recurly_session=61e786587eb55ee69901d8e87845cd34; domain=.lvh.me; path=/; HttpOnly
         | 
| 41 | 
            +
                  server: 
         | 
| 32 42 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 33 | 
            -
                body:  | 
| 34 | 
            -
                   | 
| 35 | 
            -
                   | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 43 | 
            +
                body: |
         | 
| 44 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 45 | 
            +
                  <account>
         | 
| 46 | 
            +
                    <id>account-close-1313708721</id>
         | 
| 47 | 
            +
                    <account_code>account-close-1313708721</account_code>
         | 
| 48 | 
            +
                    <username></username>
         | 
| 49 | 
            +
                    <email>verena@test.com</email>
         | 
| 50 | 
            +
                    <first_name>Verena</first_name>
         | 
| 51 | 
            +
                    <last_name>Test</last_name>
         | 
| 52 | 
            +
                    <company_name>Recurly Ruby Gem</company_name>
         | 
| 53 | 
            +
                    <balance_in_cents type="integer">0</balance_in_cents>
         | 
| 54 | 
            +
                    <closed type="boolean">false</closed>
         | 
| 55 | 
            +
                    <hosted_login_token>7fef3b87ea6a47bab6b5ec7c99671c6f</hosted_login_token>
         | 
| 56 | 
            +
                    <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
         | 
| 57 | 
            +
                    <state>active</state>
         | 
| 58 | 
            +
                  </account>
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                http_version: "1.1"
         | 
| 61 | 
            +
            - !ruby/struct:VCR::HTTPInteraction 
         | 
| 62 | 
            +
              request: !ruby/struct:VCR::Request 
         | 
| 42 63 | 
             
                method: :delete
         | 
| 43 | 
            -
                uri: http://api | 
| 44 | 
            -
                body:  | 
| 45 | 
            -
                headers:
         | 
| 46 | 
            -
                  user-agent:
         | 
| 47 | 
            -
                  - Recurly Ruby Client v0.4. | 
| 48 | 
            -
                  accept:
         | 
| 64 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/account-close-1313708721.xml
         | 
| 65 | 
            +
                body: 
         | 
| 66 | 
            +
                headers: 
         | 
| 67 | 
            +
                  user-agent: 
         | 
| 68 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 69 | 
            +
                  accept: 
         | 
| 49 70 | 
             
                  - application/xml
         | 
| 50 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 51 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 71 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 72 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 52 73 | 
             
                  code: 200
         | 
| 53 74 | 
             
                  message: OK
         | 
| 54 | 
            -
                headers:
         | 
| 55 | 
            -
                  content-type:
         | 
| 75 | 
            +
                headers: 
         | 
| 76 | 
            +
                  content-type: 
         | 
| 56 77 | 
             
                  - application/xml; charset=utf-8
         | 
| 57 | 
            -
                  cache-control:
         | 
| 78 | 
            +
                  cache-control: 
         | 
| 58 79 | 
             
                  - no-cache
         | 
| 59 | 
            -
                  x-ua-compatible:
         | 
| 80 | 
            +
                  x-ua-compatible: 
         | 
| 60 81 | 
             
                  - IE=Edge
         | 
| 61 | 
            -
                  set-cookie:
         | 
| 62 | 
            -
                  - _recurly_session= | 
| 63 | 
            -
             | 
| 64 | 
            -
                  server:
         | 
| 82 | 
            +
                  set-cookie: 
         | 
| 83 | 
            +
                  - _recurly_session=3b2a6c1a70ae9668c8bf0a703ffe6d0d; domain=.lvh.me; path=/; HttpOnly
         | 
| 84 | 
            +
                  server: 
         | 
| 65 85 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 66 | 
            -
                body:  | 
| 67 | 
            -
                http_version:  | 
| 68 | 
            -
            - !ruby/struct:VCR::HTTPInteraction
         | 
| 69 | 
            -
              request: !ruby/struct:VCR::Request
         | 
| 86 | 
            +
                body: " "
         | 
| 87 | 
            +
                http_version: "1.1"
         | 
| 88 | 
            +
            - !ruby/struct:VCR::HTTPInteraction 
         | 
| 89 | 
            +
              request: !ruby/struct:VCR::Request 
         | 
| 70 90 | 
             
                method: :get
         | 
| 71 | 
            -
                uri: http://api | 
| 72 | 
            -
                body:  | 
| 73 | 
            -
                headers:
         | 
| 74 | 
            -
                  user-agent:
         | 
| 75 | 
            -
                  - Recurly Ruby Client v0.4. | 
| 76 | 
            -
                  accept:
         | 
| 91 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts/account-close-1313708721.xml
         | 
| 92 | 
            +
                body: 
         | 
| 93 | 
            +
                headers: 
         | 
| 94 | 
            +
                  user-agent: 
         | 
| 95 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 96 | 
            +
                  accept: 
         | 
| 77 97 | 
             
                  - application/xml
         | 
| 78 | 
            -
                  accept-encoding:
         | 
| 98 | 
            +
                  accept-encoding: 
         | 
| 79 99 | 
             
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 80 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 81 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 100 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 101 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 82 102 | 
             
                  code: 200
         | 
| 83 103 | 
             
                  message: OK
         | 
| 84 | 
            -
                headers:
         | 
| 85 | 
            -
                  content-type:
         | 
| 104 | 
            +
                headers: 
         | 
| 105 | 
            +
                  content-type: 
         | 
| 86 106 | 
             
                  - application/xml; charset=utf-8
         | 
| 87 | 
            -
                  etag:
         | 
| 88 | 
            -
                  -  | 
| 89 | 
            -
                  cache-control:
         | 
| 107 | 
            +
                  etag: 
         | 
| 108 | 
            +
                  - "\"0936478f6b589b0510ecf74c5ae7d671\""
         | 
| 109 | 
            +
                  cache-control: 
         | 
| 90 110 | 
             
                  - max-age=0, private, must-revalidate
         | 
| 91 | 
            -
                  x-ua-compatible:
         | 
| 111 | 
            +
                  x-ua-compatible: 
         | 
| 92 112 | 
             
                  - IE=Edge
         | 
| 93 | 
            -
                   | 
| 94 | 
            -
                  - _recurly_session=94a151583bfc8efc996c12fa3cc05c4e; domain=.lvh.me; path=/;
         | 
| 95 | 
            -
                    HttpOnly
         | 
| 96 | 
            -
                  server:
         | 
| 113 | 
            +
                  server: 
         | 
| 97 114 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 98 | 
            -
                body:  | 
| 99 | 
            -
                   | 
| 100 | 
            -
                   | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 115 | 
            +
                body: |
         | 
| 116 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 117 | 
            +
                  <account>
         | 
| 118 | 
            +
                    <id>account-close-1313708721</id>
         | 
| 119 | 
            +
                    <account_code>account-close-1313708721</account_code>
         | 
| 120 | 
            +
                    <username></username>
         | 
| 121 | 
            +
                    <email>verena@test.com</email>
         | 
| 122 | 
            +
                    <first_name>Verena</first_name>
         | 
| 123 | 
            +
                    <last_name>Test</last_name>
         | 
| 124 | 
            +
                    <company_name>Recurly Ruby Gem</company_name>
         | 
| 125 | 
            +
                    <balance_in_cents type="integer">0</balance_in_cents>
         | 
| 126 | 
            +
                    <closed type="boolean">true</closed>
         | 
| 127 | 
            +
                    <hosted_login_token>7fef3b87ea6a47bab6b5ec7c99671c6f</hosted_login_token>
         | 
| 128 | 
            +
                    <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
         | 
| 129 | 
            +
                    <state>closed</state>
         | 
| 130 | 
            +
                  </account>
         | 
| 131 | 
            +
             | 
| 132 | 
            +
                http_version: "1.1"
         | 
| @@ -1,33 +1,44 @@ | |
| 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://api | 
| 6 | 
            -
                body:  | 
| 7 | 
            -
                   | 
| 8 | 
            -
                   | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 5 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
         | 
| 6 | 
            +
                body: |
         | 
| 7 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 8 | 
            +
                  <account>
         | 
| 9 | 
            +
                    <account-code></account-code>
         | 
| 10 | 
            +
                    <billing-info>
         | 
| 11 | 
            +
                      <credit-card>
         | 
| 12 | 
            +
                      </credit-card>
         | 
| 13 | 
            +
                    </billing-info>
         | 
| 14 | 
            +
                    <accept-language nil="true"></accept-language>
         | 
| 15 | 
            +
                  </account>
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                headers: 
         | 
| 18 | 
            +
                  user-agent: 
         | 
| 19 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 20 | 
            +
                  content-type: 
         | 
| 13 21 | 
             
                  - application/xml
         | 
| 14 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 15 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 22 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 23 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 16 24 | 
             
                  code: 422
         | 
| 17 | 
            -
                  message:  | 
| 18 | 
            -
                headers:
         | 
| 19 | 
            -
                  content-type:
         | 
| 25 | 
            +
                  message: 
         | 
| 26 | 
            +
                headers: 
         | 
| 27 | 
            +
                  content-type: 
         | 
| 20 28 | 
             
                  - application/xml; charset=utf-8
         | 
| 21 | 
            -
                  cache-control:
         | 
| 29 | 
            +
                  cache-control: 
         | 
| 22 30 | 
             
                  - no-cache
         | 
| 23 | 
            -
                  x-ua-compatible:
         | 
| 31 | 
            +
                  x-ua-compatible: 
         | 
| 24 32 | 
             
                  - IE=Edge
         | 
| 25 | 
            -
                  set-cookie:
         | 
| 26 | 
            -
                  - _recurly_session= | 
| 27 | 
            -
             | 
| 28 | 
            -
                  server:
         | 
| 33 | 
            +
                  set-cookie: 
         | 
| 34 | 
            +
                  - _recurly_session=cd14ee2c15b9f2c4830cc4afe43f07a0; domain=.lvh.me; path=/; HttpOnly
         | 
| 35 | 
            +
                  server: 
         | 
| 29 36 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 30 | 
            -
                body:  | 
| 31 | 
            -
                   | 
| 32 | 
            -
                   | 
| 33 | 
            -
             | 
| 37 | 
            +
                body: |
         | 
| 38 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 39 | 
            +
                  <errors>
         | 
| 40 | 
            +
                    <error field="account_code" code="blank">account code can't be blank</error>
         | 
| 41 | 
            +
                    <error field="account_code" code="invalid">account code is invalid</error>
         | 
| 42 | 
            +
                  </errors>
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                http_version: "1.1"
         | 
| @@ -1,69 +1,98 @@ | |
| 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://api | 
| 6 | 
            -
                body:  | 
| 7 | 
            -
                   | 
| 8 | 
            -
                   | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 5 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
         | 
| 6 | 
            +
                body: |
         | 
| 7 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 8 | 
            +
                  <account>
         | 
| 9 | 
            +
                    <account-code>account-exists</account-code>
         | 
| 10 | 
            +
                    <billing-info>
         | 
| 11 | 
            +
                      <credit-card>
         | 
| 12 | 
            +
                      </credit-card>
         | 
| 13 | 
            +
                    </billing-info>
         | 
| 14 | 
            +
                    <accept-language nil="true"></accept-language>
         | 
| 15 | 
            +
                  </account>
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                headers: 
         | 
| 18 | 
            +
                  user-agent: 
         | 
| 19 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 20 | 
            +
                  content-type: 
         | 
| 13 21 | 
             
                  - application/xml
         | 
| 14 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 15 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 22 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 23 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 16 24 | 
             
                  code: 201
         | 
| 17 25 | 
             
                  message: Created
         | 
| 18 | 
            -
                headers:
         | 
| 19 | 
            -
                  location:
         | 
| 20 | 
            -
                  - http:// | 
| 21 | 
            -
                  content-type:
         | 
| 26 | 
            +
                headers: 
         | 
| 27 | 
            +
                  location: 
         | 
| 28 | 
            +
                  - http://api.lvh.me:3000/accounts/account-exists
         | 
| 29 | 
            +
                  content-type: 
         | 
| 22 30 | 
             
                  - application/xml; charset=utf-8
         | 
| 23 | 
            -
                  cache-control:
         | 
| 31 | 
            +
                  cache-control: 
         | 
| 24 32 | 
             
                  - no-cache
         | 
| 25 | 
            -
                  x-ua-compatible:
         | 
| 33 | 
            +
                  x-ua-compatible: 
         | 
| 26 34 | 
             
                  - IE=Edge
         | 
| 27 | 
            -
                  set-cookie:
         | 
| 28 | 
            -
                  - _recurly_session= | 
| 29 | 
            -
             | 
| 30 | 
            -
                  server:
         | 
| 35 | 
            +
                  set-cookie: 
         | 
| 36 | 
            +
                  - _recurly_session=9d8512db63167d91967bafafaef7c570; domain=.lvh.me; path=/; HttpOnly
         | 
| 37 | 
            +
                  server: 
         | 
| 31 38 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 32 | 
            -
                body:  | 
| 33 | 
            -
                   | 
| 34 | 
            -
                   | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 39 | 
            +
                body: |
         | 
| 40 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 41 | 
            +
                  <account>
         | 
| 42 | 
            +
                    <id>account-exists</id>
         | 
| 43 | 
            +
                    <account_code>account-exists</account_code>
         | 
| 44 | 
            +
                    <username></username>
         | 
| 45 | 
            +
                    <email></email>
         | 
| 46 | 
            +
                    <first_name></first_name>
         | 
| 47 | 
            +
                    <last_name></last_name>
         | 
| 48 | 
            +
                    <company_name></company_name>
         | 
| 49 | 
            +
                    <balance_in_cents type="integer">0</balance_in_cents>
         | 
| 50 | 
            +
                    <closed type="boolean">false</closed>
         | 
| 51 | 
            +
                    <hosted_login_token>c6bc42feac0843498c1265548607417b</hosted_login_token>
         | 
| 52 | 
            +
                    <created_at type="datetime">2011-09-22T22:01:36Z</created_at>
         | 
| 53 | 
            +
                    <state>active</state>
         | 
| 54 | 
            +
                  </account>
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                http_version: "1.1"
         | 
| 57 | 
            +
            - !ruby/struct:VCR::HTTPInteraction 
         | 
| 58 | 
            +
              request: !ruby/struct:VCR::Request 
         | 
| 41 59 | 
             
                method: :post
         | 
| 42 | 
            -
                uri: http://api | 
| 43 | 
            -
                body:  | 
| 44 | 
            -
                   | 
| 45 | 
            -
                   | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 60 | 
            +
                uri: http://2a655d41659d4ae0b37fcaec06331bf5:@api.lvh.me:3000/accounts.xml
         | 
| 61 | 
            +
                body: |
         | 
| 62 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 63 | 
            +
                  <account>
         | 
| 64 | 
            +
                    <account-code>account-exists</account-code>
         | 
| 65 | 
            +
                    <billing-info>
         | 
| 66 | 
            +
                      <credit-card>
         | 
| 67 | 
            +
                      </credit-card>
         | 
| 68 | 
            +
                    </billing-info>
         | 
| 69 | 
            +
                    <accept-language nil="true"></accept-language>
         | 
| 70 | 
            +
                  </account>
         | 
| 71 | 
            +
             | 
| 72 | 
            +
                headers: 
         | 
| 73 | 
            +
                  user-agent: 
         | 
| 74 | 
            +
                  - Recurly Ruby Client v0.4.13
         | 
| 75 | 
            +
                  content-type: 
         | 
| 50 76 | 
             
                  - application/xml
         | 
| 51 | 
            -
              response: !ruby/struct:VCR::Response
         | 
| 52 | 
            -
                status: !ruby/struct:VCR::ResponseStatus
         | 
| 77 | 
            +
              response: !ruby/struct:VCR::Response 
         | 
| 78 | 
            +
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 53 79 | 
             
                  code: 422
         | 
| 54 | 
            -
                  message:  | 
| 55 | 
            -
                headers:
         | 
| 56 | 
            -
                  content-type:
         | 
| 80 | 
            +
                  message: 
         | 
| 81 | 
            +
                headers: 
         | 
| 82 | 
            +
                  content-type: 
         | 
| 57 83 | 
             
                  - application/xml; charset=utf-8
         | 
| 58 | 
            -
                  cache-control:
         | 
| 84 | 
            +
                  cache-control: 
         | 
| 59 85 | 
             
                  - no-cache
         | 
| 60 | 
            -
                  x-ua-compatible:
         | 
| 86 | 
            +
                  x-ua-compatible: 
         | 
| 61 87 | 
             
                  - IE=Edge
         | 
| 62 | 
            -
                  set-cookie:
         | 
| 63 | 
            -
                  - _recurly_session= | 
| 64 | 
            -
             | 
| 65 | 
            -
                  server:
         | 
| 88 | 
            +
                  set-cookie: 
         | 
| 89 | 
            +
                  - _recurly_session=d13c81dfca86bdbe8682fd1dc36a2aeb; domain=.lvh.me; path=/; HttpOnly
         | 
| 90 | 
            +
                  server: 
         | 
| 66 91 | 
             
                  - thin 1.2.11 codename Bat-Shit Crazy
         | 
| 67 | 
            -
                body:  | 
| 68 | 
            -
                   | 
| 69 | 
            -
             | 
| 92 | 
            +
                body: |
         | 
| 93 | 
            +
                  <?xml version="1.0" encoding="UTF-8"?>
         | 
| 94 | 
            +
                  <errors>
         | 
| 95 | 
            +
                    <error field="account_code" code="taken">account code has already been taken</error>
         | 
| 96 | 
            +
                  </errors>
         | 
| 97 | 
            +
             | 
| 98 | 
            +
                http_version: "1.1"
         |