Created
September 12, 2014 14:23
-
-
Save jtperreault/4e3964c536cb73d23772 to your computer and use it in GitHub Desktop.
taxcloud gem console interaction output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):002:0> origin = TaxCloud::Address.new(address1: '7297 E. Shore Rd.', address2: '', city: 'traverse city', state: 'michigan', zip5: '49686') | |
=> #<TaxCloud::Address:0x007fc17f6e5080 @address1="7297 E. Shore Rd.", @address2="", @city="traverse city", @state="michigan", @zip5="49686"> | |
irb(main):003:0> dest = TaxCloud::Address.new(address1: '659 Cork Pine Ln.', address2: '', city: 'Vassar', state: 'michigan', zip5: '48768') | |
=> #<TaxCloud::Address:0x007fc17dce3e48 @address1="659 Cork Pine Ln.", @address2="", @city="Vassar", @state="michigan", @zip5="48768"> | |
irb(main):004:0> transaction = TaxCloud::Transaction.new(customer_id: 1, cart_id: 1, origin: origin, destination: dest) | |
=> #<TaxCloud::Transaction:0x007fc17f7d71c8 @cart_items=[], @customer_id=1, @cart_id=1, @origin=#<TaxCloud::Address:0x007fc17f6e5080 @address1="7297 E. Shore Rd.", @add | |
irb(main):005:0> transaction.cart_items << TaxCloud::CartItem.new(index: 1, item_id: 'sku-02', tic: TaxCloud::TaxCodes::GENERAL, price: '14.00', quantity: 2) | |
=> [#<TaxCloud::CartItem:0x007fc1808739c8 @index=1, @item_id="sku-02", @tic=0, @price="14.00", @quantity=2>] | |
irb(main):006:0> lookup = transaction.lookup | |
D, [2014-09-12T10:20:56.643941 #26671] DEBUG -- : HTTPI GET request to api.taxcloud.net (excon) | |
I, [2014-09-12T10:20:57.234514 #26671] INFO -- : SOAP request: https://api.taxcloud.net/1.0/TaxCloud.asmx | |
I, [2014-09-12T10:20:57.234635 #26671] INFO -- : SOAPAction: "http://taxcloud.net/Lookup", Content-Type: text/xml;charset=UTF-8, Content-Length: 1080 | |
D, [2014-09-12T10:20:57.234688 #26671] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://ww/ | |
D, [2014-09-12T10:20:57.235277 #26671] DEBUG -- : HTTPI POST request to api.taxcloud.net (excon) | |
I, [2014-09-12T10:20:57.829430 #26671] INFO -- : SOAP response (status 200) | |
D, [2014-09-12T10:20:57.829605 #26671] DEBUG -- : <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsis | |
=> #<TaxCloud::Responses::Lookup:0x007fc17f53b7c0 @raw={:lookup_response=>{:lookup_result=>{:response_type=>"OK", :messages=>nil, :cart_id=>"1", :cart_items_response=>{ | |
irb(main):007:0> lookup.tax_amount | |
=> 0.0 | |
irb(main):008:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment