solidus_avatax 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +15 -0
- data/LICENSE +26 -0
- data/README.md +71 -0
- data/Rakefile +21 -0
- data/app/assets/javascripts/spree/frontend/solidus_avatax.js +1 -0
- data/app/assets/stylesheets/spree/frontend/solidus_avatax.css +1 -0
- data/app/models/spree/adjustment_decorator.rb +21 -0
- data/app/models/spree/order_contents_decorator.rb +26 -0
- data/app/models/spree/order_decorator.rb +43 -0
- data/app/models/spree/promotion_handler/coupon_decorator.rb +11 -0
- data/app/models/spree/reimbursement_decorator.rb +1 -0
- data/app/models/spree/tax_rate_decorator.rb +45 -0
- data/app/models/spree_avatax/calculator.rb +26 -0
- data/app/models/spree_avatax/return_invoice.rb +197 -0
- data/app/models/spree_avatax/sales_invoice.rb +157 -0
- data/app/models/spree_avatax/sales_shared.rb +211 -0
- data/app/models/spree_avatax/shared.rb +53 -0
- data/app/models/spree_avatax/short_ship_return_invoice.rb +133 -0
- data/app/models/spree_avatax/short_ship_return_invoice_inventory_unit.rb +11 -0
- data/bin/rails +7 -0
- data/circle.yml +6 -0
- data/config/locales/en.yml +5 -0
- data/db/migrate/20140122165618_add_avatax_response_at_to_orders.rb +5 -0
- data/db/migrate/20140214153139_add_avatax_invoice_at_to_orders.rb +5 -0
- data/db/migrate/20140617222244_close_all_tax_adjustments.rb +5 -0
- data/db/migrate/20140701144237_update_avatax_calculator_type.rb +17 -0
- data/db/migrate/20140801132302_create_spree_avatax_return_invoices.rb +19 -0
- data/db/migrate/20140903135132_create_spree_avatax_sales_orders.rb +15 -0
- data/db/migrate/20140903135357_create_spree_avatax_sales_invoices.rb +19 -0
- data/db/migrate/20140904171341_generate_uncommitted_sales_invoices.rb +31 -0
- data/db/migrate/20140911214414_add_transaction_id_to_sales_orders_and_sales_invoices.rb +6 -0
- data/db/migrate/20140911215422_add_canceled_at_and_cancel_transaction_id_to_sales_invoices.rb +6 -0
- data/db/migrate/20150427154942_create_spree_avatax_short_ship_return_invoices.rb +44 -0
- data/db/migrate/20150518172627_fix_avatax_short_ship_index.rb +30 -0
- data/lib/generators/solidus_avatax/install/install_generator.rb +31 -0
- data/lib/generators/solidus_avatax/install/templates/config/initializers/avatax.rb +18 -0
- data/lib/solidus_avatax.rb +4 -0
- data/lib/spree_avatax/config.rb +16 -0
- data/lib/spree_avatax/engine.rb +29 -0
- data/lib/spree_avatax/factories.rb +25 -0
- data/lib/tasks/commit_backfill.rake +119 -0
- data/lib/tasks/sales_invoice_backfill.rake +43 -0
- data/solidus_avatax.gemspec +34 -0
- data/spec/features/store_credits_spec.rb +92 -0
- data/spec/features/tax_calculation_spec.rb +75 -0
- data/spec/fixtures/vcr_cassettes/sales_invoice_gettax_with_discounts.yml +136 -0
- data/spec/fixtures/vcr_cassettes/sales_invoice_gettax_without_discounts.yml +136 -0
- data/spec/fixtures/vcr_cassettes/taxes_with_store_credits.yml +113 -0
- data/spec/models/spree/adjustment_spec.rb +23 -0
- data/spec/models/spree/order_contents_spec.rb +35 -0
- data/spec/models/spree/order_spec.rb +111 -0
- data/spec/models/spree/shipping_rate_spec.rb +23 -0
- data/spec/models/spree/tax_rate_spec.rb +40 -0
- data/spec/models/spree_avatax/calculator.rb +20 -0
- data/spec/models/spree_avatax/return_invoice_spec.rb +193 -0
- data/spec/models/spree_avatax/sales_invoice_spec.rb +491 -0
- data/spec/models/spree_avatax/sales_shared_spec.rb +47 -0
- data/spec/models/spree_avatax/shared_spec.rb +89 -0
- data/spec/models/spree_avatax/short_ship_return_invoice_spec.rb +181 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/return_invoice_soap_responses.rb +117 -0
- data/spec/support/sales_invoice_soap_responses.rb +259 -0
- data/spec/support/short_ship_return_invoice_soap_responses.rb +178 -0
- data/spec/support/zone_support.rb +6 -0
- metadata +320 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
namespace :spree_avatax do
|
2
|
+
|
3
|
+
desc <<-DESC
|
4
|
+
Generate SalesInvoice records for all orders that have an avatax_invoice_at value.
|
5
|
+
i.e. orders that were processed under the old REST system that used that field.
|
6
|
+
Nullify the order's avatax_invoice_at field after generating the SalesInvoice record.
|
7
|
+
DESC
|
8
|
+
|
9
|
+
task backfill_sales_invoices: :environment do
|
10
|
+
|
11
|
+
scope = Spree::Order.where.not(avatax_invoice_at: nil)
|
12
|
+
|
13
|
+
# batch size of one to avoid stale data since these are slow iterations
|
14
|
+
scope.find_each(batch_size: 1) do |order|
|
15
|
+
puts "Processing order id=#{order.id} number=#{order.number} avatax_invoice_at=#{order.avatax_invoice_at.inspect}"
|
16
|
+
|
17
|
+
history_request = {
|
18
|
+
companycode: SpreeAvatax::Config.company_code,
|
19
|
+
doctype: 'SalesInvoice',
|
20
|
+
doccode: order.number,
|
21
|
+
detaillevel: 'Tax',
|
22
|
+
}
|
23
|
+
|
24
|
+
response = SpreeAvatax::Shared.tax_svc.gettaxhistory(history_request)
|
25
|
+
|
26
|
+
if response[:result_code] != 'Success'
|
27
|
+
raise "History request error on order id=#{order.id}: #{response[:messages]}"
|
28
|
+
end
|
29
|
+
|
30
|
+
get_tax_result = response[:get_tax_result]
|
31
|
+
|
32
|
+
order.create_avatax_sales_invoice!({
|
33
|
+
doc_id: get_tax_result[:doc_id],
|
34
|
+
doc_code: get_tax_result[:doc_code],
|
35
|
+
doc_date: get_tax_result[:doc_date],
|
36
|
+
pre_tax_total: get_tax_result[:total_amount],
|
37
|
+
additional_tax_total: get_tax_result[:total_tax],
|
38
|
+
})
|
39
|
+
|
40
|
+
order.update_columns(avatax_invoice_at: nil)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.platform = Gem::Platform::RUBY
|
4
|
+
s.name = "solidus_avatax"
|
5
|
+
s.version = "0.2.0"
|
6
|
+
s.summary = "Avatax extension for Solidus"
|
7
|
+
s.description = "Solidus extension to retrieve tax rates via Avalara's SOAP API."
|
8
|
+
s.required_ruby_version = ">= 2.1"
|
9
|
+
|
10
|
+
s.author = "Solidus Team"
|
11
|
+
s.email = "contact@solidus.io"
|
12
|
+
s.homepage = "https://solidus.io"
|
13
|
+
s.license = %q{BSD-3}
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.require_path = "lib"
|
18
|
+
s.requirements << "none"
|
19
|
+
|
20
|
+
s.add_dependency "solidus_core", [">= 1.1.0.pre", "< 2"]
|
21
|
+
s.add_dependency "hashie", "~> 2.l.5"
|
22
|
+
s.add_dependency "multi_json"
|
23
|
+
s.add_dependency "Avatax_TaxService", "~> 2.0.0"
|
24
|
+
|
25
|
+
s.add_development_dependency "rspec-rails","~> 3.2"
|
26
|
+
s.add_development_dependency "simplecov"
|
27
|
+
s.add_development_dependency "sqlite3"
|
28
|
+
s.add_development_dependency "sass-rails"
|
29
|
+
s.add_development_dependency "coffee-rails"
|
30
|
+
s.add_development_dependency "factory_girl", "~> 4.2"
|
31
|
+
s.add_development_dependency "capybara", "~> 2.1"
|
32
|
+
s.add_development_dependency "database_cleaner"
|
33
|
+
s.add_development_dependency "ffaker"
|
34
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "Taxes with Store Credits" do
|
4
|
+
let(:user) { FactoryGirl.create(:user, password: "Alderaan") }
|
5
|
+
|
6
|
+
before do
|
7
|
+
# Set up Avatax (just in case we don't have a cassette)
|
8
|
+
SpreeAvatax::Config.password = ENV["AVATAX_PASSWORD"]
|
9
|
+
SpreeAvatax::Config.username = ENV["AVATAX_USERNAME"]
|
10
|
+
SpreeAvatax::Config.service_url = "https://development.avalara.net"
|
11
|
+
SpreeAvatax::Config.company_code = ENV["AVATAX_COMPANY_CODE"]
|
12
|
+
|
13
|
+
# Set up a zone
|
14
|
+
zone = FactoryGirl.create(:zone)
|
15
|
+
country = FactoryGirl.create(:country, name: "Tatooine")
|
16
|
+
zone.members << Spree::ZoneMember.create(zoneable: country)
|
17
|
+
|
18
|
+
# Product, payment method and shipping method
|
19
|
+
FactoryGirl.create(:credit_card_payment_method)
|
20
|
+
FactoryGirl.create(:store_credit_payment_method)
|
21
|
+
FactoryGirl.create(:free_shipping_method)
|
22
|
+
FactoryGirl.create(:product, name: "DL-44", price: 19.99)
|
23
|
+
|
24
|
+
# Login
|
25
|
+
visit spree.login_path
|
26
|
+
fill_in "Email", with: user.email
|
27
|
+
fill_in "Password", with: "Alderaan"
|
28
|
+
click_button "Login"
|
29
|
+
|
30
|
+
# Add product to our cart
|
31
|
+
visit spree.root_path
|
32
|
+
click_link "DL-44"
|
33
|
+
click_button "Add To Cart"
|
34
|
+
end
|
35
|
+
|
36
|
+
context "when there are enough credits to cover everything" do
|
37
|
+
before do
|
38
|
+
# Add enough credit to cover the order.
|
39
|
+
FactoryGirl.create(
|
40
|
+
:store_credit, user: user, amount: 1000.00
|
41
|
+
)
|
42
|
+
|
43
|
+
click_button "Checkout"
|
44
|
+
|
45
|
+
# Address
|
46
|
+
within("#billing") do
|
47
|
+
fill_in "First Name", with: "Han"
|
48
|
+
fill_in "Last Name", with: "Solo"
|
49
|
+
fill_in "Street Address", with: "YT-1300"
|
50
|
+
fill_in "City", with: "Mos Eisley"
|
51
|
+
select "United States of America", from: "Country"
|
52
|
+
fill_in "order_bill_address_attributes_state_name", with: "Tatooine"
|
53
|
+
fill_in "Zip", with: "12010"
|
54
|
+
fill_in "Phone", with: "(555) 555-5555"
|
55
|
+
end
|
56
|
+
click_on "Save and Continue"
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
it "adjusts the credits to cover taxes" do
|
61
|
+
# Use a cassette so that we don't hit the Avatax API all of the time.
|
62
|
+
VCR.use_cassette("taxes_with_store_credits") do
|
63
|
+
click_on "Save and Continue"
|
64
|
+
end
|
65
|
+
|
66
|
+
# Enter credit card details. Won't let us continue without it.
|
67
|
+
fill_in "Name on card", with: "Han Solo"
|
68
|
+
fill_in "Card Number", with: "4111111111111111"
|
69
|
+
fill_in "card_expiry", with: "04 / 20"
|
70
|
+
fill_in "Card Code", with: "123"
|
71
|
+
|
72
|
+
click_button "Save and Continue"
|
73
|
+
|
74
|
+
# Should have $1.60 in tax.
|
75
|
+
within("#tax-adjustments") do
|
76
|
+
expect(page).to have_content("$1.60")
|
77
|
+
end
|
78
|
+
|
79
|
+
# Store credit should cover everything.
|
80
|
+
# Product + Tax = Total
|
81
|
+
# $19.99 + $1.60 = $21.59
|
82
|
+
within("#store-credit") do
|
83
|
+
expect(page).to have_content("-$21.59")
|
84
|
+
end
|
85
|
+
|
86
|
+
# Order total should be $0.00
|
87
|
+
within("#order-total") do
|
88
|
+
expect(page).to have_content("$0.00")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Tax Calculation" do
|
4
|
+
let(:order) { create(:order_with_line_items, ship_address: address, line_items_count: 2) }
|
5
|
+
let(:address) { create(:address, address1: "35 Crosby St", city: "New York", zipcode: 10013) }
|
6
|
+
let(:line_item_1) { order.line_items.first }
|
7
|
+
let(:line_item_2) { order.line_items.last }
|
8
|
+
|
9
|
+
before do
|
10
|
+
# Set up Avatax (just in case we don't have a cassette)
|
11
|
+
SpreeAvatax::Config.password = ENV["AVATAX_PASSWORD"]
|
12
|
+
SpreeAvatax::Config.username = ENV["AVATAX_USERNAME"]
|
13
|
+
SpreeAvatax::Config.service_url = "https://development.avalara.net"
|
14
|
+
SpreeAvatax::Config.company_code = ENV["AVATAX_COMPANY_CODE"]
|
15
|
+
|
16
|
+
order.line_items.first.product.tax_category.tax_rates << Spree::TaxRate.first
|
17
|
+
end
|
18
|
+
|
19
|
+
context "without discounts" do
|
20
|
+
subject do
|
21
|
+
VCR.use_cassette('sales_invoice_gettax_without_discounts') do
|
22
|
+
SpreeAvatax::SalesInvoice.generate(order)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "computes taxes for a line item" do
|
27
|
+
expect {
|
28
|
+
subject
|
29
|
+
}.to change { order.line_items.first.additional_tax_total }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "with discounts" do
|
34
|
+
subject do
|
35
|
+
VCR.use_cassette('sales_invoice_gettax_with_discounts') do
|
36
|
+
SpreeAvatax::SalesInvoice.generate(order)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
let(:promotion) do
|
41
|
+
FactoryGirl.create(
|
42
|
+
:promotion,
|
43
|
+
code: "order_promotion",
|
44
|
+
promotion_actions: [
|
45
|
+
Spree::Promotion::Actions::CreateAdjustment.new(
|
46
|
+
calculator: Spree::Calculator::FlatRate.new(preferred_amount: 10),
|
47
|
+
),
|
48
|
+
],
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
let(:line_item_promotion) do
|
53
|
+
FactoryGirl.create(
|
54
|
+
:promotion_with_item_total_rule,
|
55
|
+
code: 'line_item_promotion'
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
before do
|
60
|
+
order.line_items.each { |li| li.update_attributes!(price: 50.0) }
|
61
|
+
|
62
|
+
order.coupon_code = promotion.codes.first.value
|
63
|
+
Spree::PromotionHandler::Coupon.new(order).apply
|
64
|
+
|
65
|
+
order.coupon_code = line_item_promotion.codes.first.value
|
66
|
+
Spree::PromotionHandler::Coupon.new(order).apply
|
67
|
+
end
|
68
|
+
|
69
|
+
it "computes taxes for a line item" do
|
70
|
+
expect do
|
71
|
+
subject
|
72
|
+
end.to change { order.line_items.first.reload.additional_tax_total }
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://development.avalara.net/Tax/TaxSvc.asmx
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
9
|
+
xmlns:ser=\"http://avatax.avalara.com/services\">\n <soapenv:Header>\n <wsse:Security
|
10
|
+
xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n
|
11
|
+
\ <wsse:UsernameToken wsu:Id=\"UsernameToken-7\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n
|
12
|
+
\ <wsse:Username>[Username]</wsse:Username>\n <wsse:Password
|
13
|
+
Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">[Password]</wsse:Password>\n
|
14
|
+
\ <wsu:Created>2012-03-02T23:41:44.511Z</wsu:Created>\n </wsse:UsernameToken>\n
|
15
|
+
\ </wsse:Security>\n <ser:Profile>\n <ser:Name></ser:Name>\n
|
16
|
+
\ <ser:Client>Spree::Avatax</ser:Client>\n <ser:Adapter>Avatax
|
17
|
+
SDK for Ruby2.0.2</ser:Adapter>\n <ser:Machine></ser:Machine>\n </ser:Profile>\n
|
18
|
+
\ </soapenv:Header>\n <soapenv:Body>\n <ser:GetTax>\n <ser:GetTaxRequest>\n
|
19
|
+
\ <ser:CompanyCode>[Company]</ser:CompanyCode>\n <ser:DocType>SalesInvoice</ser:DocType>\n
|
20
|
+
\ <ser:DocCode>R148795268</ser:DocCode>\n <ser:DocDate>2015-07-24</ser:DocDate>\n
|
21
|
+
\ <ser:SalespersonCode></ser:SalespersonCode>\n <ser:CustomerCode>jasmin.kshlerin@tillmanmcglynn.co.uk</ser:CustomerCode>\n
|
22
|
+
\ <ser:CustomerUsageType></ser:CustomerUsageType>\n <ser:Discount>10.0</ser:Discount>\n
|
23
|
+
\ <ser:PurchaseOrderNo></ser:PurchaseOrderNo>\n <ser:ExemptionNo></ser:ExemptionNo>\n
|
24
|
+
\ <ser:OriginCode></ser:OriginCode>\n <ser:DestinationCode></ser:DestinationCode>\n
|
25
|
+
\ <ser:Addresses>\n <ser:BaseAddress>\n <ser:AddressCode>1</ser:AddressCode>\n
|
26
|
+
\ <ser:Line1>35 Crosby St</ser:Line1>\n <ser:Line2>Northwest</ser:Line2>\n
|
27
|
+
\ <ser:Line3></ser:Line3>\n <ser:City>New York</ser:City>\n
|
28
|
+
\ <ser:Region></ser:Region>\n <ser:PostalCode>10013</ser:PostalCode>\n
|
29
|
+
\ <ser:Country></ser:Country>\n <ser:TaxRegionId>0</ser:TaxRegionId>\n
|
30
|
+
\ <ser:Latitude></ser:Latitude>\n <ser:Longitude></ser:Longitude>\n
|
31
|
+
\ </ser:BaseAddress> \n </ser:Addresses>\n <ser:Lines>\n
|
32
|
+
\ <ser:Line>\n <ser:No>Spree::LineItem-1</ser:No>\n <ser:OriginCode>1</ser:OriginCode>\n
|
33
|
+
\ <ser:DestinationCode>1</ser:DestinationCode>\n <ser:ItemCode>SKU-26</ser:ItemCode>\n
|
34
|
+
\ <ser:TaxCode>TaxCode - 632432</ser:TaxCode>\n <ser:Qty>1</ser:Qty>\n
|
35
|
+
\ <ser:Amount>50.0</ser:Amount>\n <ser:Discounted>true</ser:Discounted>\n
|
36
|
+
\ <ser:RevAcct></ser:RevAcct>\n <ser:Ref1></ser:Ref1>
|
37
|
+
\ \n <ser:Ref2></ser:Ref2>\n <ser:ExemptionNo></ser:ExemptionNo>\n
|
38
|
+
\ <ser:CustomerUsageType></ser:CustomerUsageType>\n <ser:Description>Voluptatem
|
39
|
+
est saepe aut inventore unde odio eveniet enim. Quis laboriosam ad in doloremque
|
40
|
+
qui n...</ser:Description>\n <ser:TaxOverride>\n <ser:TaxOverrideType>None</ser:TaxOverrideType>\n
|
41
|
+
\ <ser:TaxAmount>0</ser:TaxAmount>\n <ser:TaxDate>1900-01-01</ser:TaxDate>\n
|
42
|
+
\ <ser:Reason></ser:Reason>\n </ser:TaxOverride>\n
|
43
|
+
\ <ser:TaxIncluded>false</ser:TaxIncluded>\n <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
44
|
+
\ </ser:Line>\n <ser:Line>\n <ser:No>Spree::LineItem-2</ser:No>\n
|
45
|
+
\ <ser:OriginCode>1</ser:OriginCode>\n <ser:DestinationCode>1</ser:DestinationCode>\n
|
46
|
+
\ <ser:ItemCode>SKU-27</ser:ItemCode>\n <ser:TaxCode>TaxCode
|
47
|
+
- 632432</ser:TaxCode>\n <ser:Qty>1</ser:Qty>\n <ser:Amount>50.0</ser:Amount>\n
|
48
|
+
\ <ser:Discounted>true</ser:Discounted>\n <ser:RevAcct></ser:RevAcct>\n
|
49
|
+
\ <ser:Ref1></ser:Ref1> \n <ser:Ref2></ser:Ref2>\n
|
50
|
+
\ <ser:ExemptionNo></ser:ExemptionNo>\n <ser:CustomerUsageType></ser:CustomerUsageType>\n
|
51
|
+
\ <ser:Description>Provident recusandae omnis ex odit nostrum porro
|
52
|
+
reprehenderit quis. Dicta enim praesentium illo ...</ser:Description>\n <ser:TaxOverride>\n
|
53
|
+
\ <ser:TaxOverrideType>None</ser:TaxOverrideType>\n <ser:TaxAmount>0</ser:TaxAmount>\n
|
54
|
+
\ <ser:TaxDate>1900-01-01</ser:TaxDate>\n <ser:Reason></ser:Reason>\n
|
55
|
+
\ </ser:TaxOverride>\n <ser:TaxIncluded>false</ser:TaxIncluded>\n
|
56
|
+
\ <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
57
|
+
\ </ser:Line>\n <ser:Line>\n <ser:No>Spree::Shipment-1</ser:No>\n
|
58
|
+
\ <ser:OriginCode>1</ser:OriginCode>\n <ser:DestinationCode>1</ser:DestinationCode>\n
|
59
|
+
\ <ser:ItemCode></ser:ItemCode>\n <ser:TaxCode>FR020100</ser:TaxCode>\n
|
60
|
+
\ <ser:Qty>1</ser:Qty>\n <ser:Amount>100.0</ser:Amount>\n
|
61
|
+
\ <ser:Discounted>false</ser:Discounted>\n <ser:RevAcct></ser:RevAcct>\n
|
62
|
+
\ <ser:Ref1></ser:Ref1> \n <ser:Ref2></ser:Ref2>\n
|
63
|
+
\ <ser:ExemptionNo></ser:ExemptionNo>\n <ser:CustomerUsageType></ser:CustomerUsageType>\n
|
64
|
+
\ <ser:Description>Shipping Charge</ser:Description>\n <ser:TaxOverride>\n
|
65
|
+
\ <ser:TaxOverrideType>None</ser:TaxOverrideType>\n <ser:TaxAmount>0</ser:TaxAmount>\n
|
66
|
+
\ <ser:TaxDate>1900-01-01</ser:TaxDate>\n <ser:Reason></ser:Reason>\n
|
67
|
+
\ </ser:TaxOverride>\n <ser:TaxIncluded>false</ser:TaxIncluded>\n
|
68
|
+
\ <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
69
|
+
\ </ser:Line> \n </ser:Lines>\n <ser:DetailLevel>Tax</ser:DetailLevel>\n
|
70
|
+
\ <ser:ReferenceCode></ser:ReferenceCode>\n <ser:HashCode>0</ser:HashCode>\n
|
71
|
+
\ <ser:LocationCode></ser:LocationCode>\n <ser:Commit>false</ser:Commit>\n
|
72
|
+
\ <ser:BatchCode></ser:BatchCode>\n <ser:TaxOverride>\n <ser:TaxOverrideType>None</ser:TaxOverrideType>\n
|
73
|
+
\ <ser:TaxAmount>0</ser:TaxAmount>\n <ser:TaxDate>1900-01-01</ser:TaxDate>\n
|
74
|
+
\ <ser:Reason></ser:Reason>\n </ser:TaxOverride>\n <ser:CurrencyCode></ser:CurrencyCode>\n
|
75
|
+
\ <ser:ServiceMode>Remote</ser:ServiceMode>\n <ser:PaymentDate>1900-01-01</ser:PaymentDate>\n
|
76
|
+
\ <ser:ExchangeRate>0</ser:ExchangeRate>\n <ser:ExchangeRateEffDate>1900-01-01</ser:ExchangeRateEffDate>\n
|
77
|
+
\ <ser:PosLaneCode></ser:PosLaneCode>\n <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
78
|
+
\ </ser:GetTaxRequest>\n </ser:GetTax>\n </soapenv:Body>\n</soapenv:Envelope>"
|
79
|
+
headers:
|
80
|
+
Soapaction:
|
81
|
+
- '"http://avatax.avalara.com/services/GetTax"'
|
82
|
+
Content-Type:
|
83
|
+
- text/xml;charset=UTF-8
|
84
|
+
Content-Length:
|
85
|
+
- '6943'
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
88
|
+
Accept:
|
89
|
+
- "*/*"
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: OK
|
96
|
+
headers:
|
97
|
+
Content-Type:
|
98
|
+
- text/xml; charset=utf-8
|
99
|
+
Vary:
|
100
|
+
- Accept-Encoding
|
101
|
+
X-Powered-By:
|
102
|
+
- ASP.NET
|
103
|
+
Date:
|
104
|
+
- Fri, 24 Jul 2015 22:56:41 GMT
|
105
|
+
Content-Length:
|
106
|
+
- '1754'
|
107
|
+
Set-Cookie:
|
108
|
+
- TS017f1821=01256c426e6cb973ff066b8aca7e9832dfb4f1e2a54d325b251663836c806b9d456585403f;
|
109
|
+
Path=/
|
110
|
+
- TS017f1821_28=0167927a87e9364e9867625bae102beffbc56ea0f0338292c5e31dea951e3b326ba27cfe564763440125ba19eabe1ce50527f11d12;
|
111
|
+
Path=/
|
112
|
+
body:
|
113
|
+
encoding: UTF-8
|
114
|
+
string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body
|
115
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetTaxResponse
|
116
|
+
xmlns="http://avatax.avalara.com/services"><GetTaxResult><TransactionId>1211170640</TransactionId><ResultCode>Success</ResultCode><DocId>102166987</DocId><DocType>SalesInvoice</DocType><DocCode>R148795268</DocCode><DocDate>2015-07-24</DocDate><DocStatus>Saved</DocStatus><Reconciled>false</Reconciled><Timestamp>2015-07-24T22:56:41.68</Timestamp><TotalAmount>200</TotalAmount><TotalDiscount>10</TotalDiscount><TotalExemption>0</TotalExemption><TotalTaxable>190</TotalTaxable><TotalTax>16.88</TotalTax><TotalTaxCalculated>16.88</TotalTaxCalculated><HashCode>0</HashCode><TaxLines><TaxLine><No>Spree::LineItem-1</No><TaxCode>P0000000</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>5</Discount><Taxable>45</Taxable><Rate>0.088750</Rate><Tax>4</Tax><TaxCalculated>4</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.040000</Rate><Tax>1.8</Tax><TaxCalculated>1.8</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
117
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.045000</Rate><Tax>2.03</Tax><TaxCalculated>2.03</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
118
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
119
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.003750</Rate><Tax>0.17</Tax><TaxCalculated>0.17</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
120
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
121
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine><TaxLine><No>Spree::LineItem-2</No><TaxCode>P0000000</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>5</Discount><Taxable>45</Taxable><Rate>0.088750</Rate><Tax>4</Tax><TaxCalculated>4</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.040000</Rate><Tax>1.8</Tax><TaxCalculated>1.8</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
122
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.045000</Rate><Tax>2.03</Tax><TaxCalculated>2.03</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
123
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
124
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>45</Base><Taxable>45</Taxable><Rate>0.003750</Rate><Tax>0.17</Tax><TaxCalculated>0.17</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
125
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
126
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine><TaxLine><No>Spree::Shipment-1</No><TaxCode>FR020100</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>0</Discount><Taxable>100</Taxable><Rate>0.088750</Rate><Tax>8.88</Tax><TaxCalculated>8.88</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.040000</Rate><Tax>4</Tax><TaxCalculated>4</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
127
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.045000</Rate><Tax>4.5</Tax><TaxCalculated>4.5</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
128
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
129
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.003750</Rate><Tax>0.38</Tax><TaxCalculated>0.38</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
130
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
131
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine></TaxLines><TaxAddresses><TaxAddress><Address>35
|
132
|
+
Crosby St</Address><AddressCode>1</AddressCode><BoundaryLevel>0</BoundaryLevel><City>New
|
133
|
+
York</City><Country>US</Country><PostalCode>10013</PostalCode><Region>NY</Region><TaxRegionId>2088629</TaxRegionId><JurisCode>3600051000</JurisCode><Latitude/><Longitude/><GeocodeType>StreetLevel</GeocodeType><ValidateStatus>NormalHit</ValidateStatus><DistanceToBoundary>0</DistanceToBoundary></TaxAddress></TaxAddresses><Locked>false</Locked><AdjustmentReason>0</AdjustmentReason><AdjustmentDescription/><Version>1</Version><TaxDate>2015-07-24</TaxDate><TaxSummary/><VolatileTaxRates>false</VolatileTaxRates></GetTaxResult></GetTaxResponse></s:Body></s:Envelope>
|
134
|
+
http_version:
|
135
|
+
recorded_at: Fri, 24 Jul 2015 22:56:53 GMT
|
136
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,136 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://development.avalara.net/Tax/TaxSvc.asmx
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
|
9
|
+
xmlns:ser=\"http://avatax.avalara.com/services\">\n <soapenv:Header>\n <wsse:Security
|
10
|
+
xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n
|
11
|
+
\ <wsse:UsernameToken wsu:Id=\"UsernameToken-7\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n
|
12
|
+
\ <wsse:Username>[Username]</wsse:Username>\n <wsse:Password
|
13
|
+
Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">[Password]</wsse:Password>\n
|
14
|
+
\ <wsu:Created>2012-03-02T23:41:44.511Z</wsu:Created>\n </wsse:UsernameToken>\n
|
15
|
+
\ </wsse:Security>\n <ser:Profile>\n <ser:Name></ser:Name>\n
|
16
|
+
\ <ser:Client>Spree::Avatax</ser:Client>\n <ser:Adapter>Avatax
|
17
|
+
SDK for Ruby2.0.2</ser:Adapter>\n <ser:Machine></ser:Machine>\n </ser:Profile>\n
|
18
|
+
\ </soapenv:Header>\n <soapenv:Body>\n <ser:GetTax>\n <ser:GetTaxRequest>\n
|
19
|
+
\ <ser:CompanyCode>[Company]</ser:CompanyCode>\n <ser:DocType>SalesInvoice</ser:DocType>\n
|
20
|
+
\ <ser:DocCode>R383509579</ser:DocCode>\n <ser:DocDate>2015-07-24</ser:DocDate>\n
|
21
|
+
\ <ser:SalespersonCode></ser:SalespersonCode>\n <ser:CustomerCode>clovis@runolfsdottirvon.com</ser:CustomerCode>\n
|
22
|
+
\ <ser:CustomerUsageType></ser:CustomerUsageType>\n <ser:Discount>-0.0</ser:Discount>\n
|
23
|
+
\ <ser:PurchaseOrderNo></ser:PurchaseOrderNo>\n <ser:ExemptionNo></ser:ExemptionNo>\n
|
24
|
+
\ <ser:OriginCode></ser:OriginCode>\n <ser:DestinationCode></ser:DestinationCode>\n
|
25
|
+
\ <ser:Addresses>\n <ser:BaseAddress>\n <ser:AddressCode>1</ser:AddressCode>\n
|
26
|
+
\ <ser:Line1>35 Crosby St</ser:Line1>\n <ser:Line2>Northwest</ser:Line2>\n
|
27
|
+
\ <ser:Line3></ser:Line3>\n <ser:City>New York</ser:City>\n
|
28
|
+
\ <ser:Region></ser:Region>\n <ser:PostalCode>10013</ser:PostalCode>\n
|
29
|
+
\ <ser:Country></ser:Country>\n <ser:TaxRegionId>0</ser:TaxRegionId>\n
|
30
|
+
\ <ser:Latitude></ser:Latitude>\n <ser:Longitude></ser:Longitude>\n
|
31
|
+
\ </ser:BaseAddress> \n </ser:Addresses>\n <ser:Lines>\n
|
32
|
+
\ <ser:Line>\n <ser:No>Spree::LineItem-1</ser:No>\n <ser:OriginCode>1</ser:OriginCode>\n
|
33
|
+
\ <ser:DestinationCode>1</ser:DestinationCode>\n <ser:ItemCode>SKU-28</ser:ItemCode>\n
|
34
|
+
\ <ser:TaxCode>TaxCode - 843504</ser:TaxCode>\n <ser:Qty>1</ser:Qty>\n
|
35
|
+
\ <ser:Amount>10.0</ser:Amount>\n <ser:Discounted>true</ser:Discounted>\n
|
36
|
+
\ <ser:RevAcct></ser:RevAcct>\n <ser:Ref1></ser:Ref1>
|
37
|
+
\ \n <ser:Ref2></ser:Ref2>\n <ser:ExemptionNo></ser:ExemptionNo>\n
|
38
|
+
\ <ser:CustomerUsageType></ser:CustomerUsageType>\n <ser:Description>Natus
|
39
|
+
amet eius eum excepturi rerum molestias. Et sunt autem laborum eum reprehenderit
|
40
|
+
aperiam re...</ser:Description>\n <ser:TaxOverride>\n <ser:TaxOverrideType>None</ser:TaxOverrideType>\n
|
41
|
+
\ <ser:TaxAmount>0</ser:TaxAmount>\n <ser:TaxDate>1900-01-01</ser:TaxDate>\n
|
42
|
+
\ <ser:Reason></ser:Reason>\n </ser:TaxOverride>\n
|
43
|
+
\ <ser:TaxIncluded>false</ser:TaxIncluded>\n <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
44
|
+
\ </ser:Line>\n <ser:Line>\n <ser:No>Spree::LineItem-2</ser:No>\n
|
45
|
+
\ <ser:OriginCode>1</ser:OriginCode>\n <ser:DestinationCode>1</ser:DestinationCode>\n
|
46
|
+
\ <ser:ItemCode>SKU-29</ser:ItemCode>\n <ser:TaxCode>TaxCode
|
47
|
+
- 843504</ser:TaxCode>\n <ser:Qty>1</ser:Qty>\n <ser:Amount>10.0</ser:Amount>\n
|
48
|
+
\ <ser:Discounted>true</ser:Discounted>\n <ser:RevAcct></ser:RevAcct>\n
|
49
|
+
\ <ser:Ref1></ser:Ref1> \n <ser:Ref2></ser:Ref2>\n
|
50
|
+
\ <ser:ExemptionNo></ser:ExemptionNo>\n <ser:CustomerUsageType></ser:CustomerUsageType>\n
|
51
|
+
\ <ser:Description>Facere excepturi sapiente voluptates aut. Voluptatem
|
52
|
+
qui nam eius in fuga officiis illum cupidita...</ser:Description>\n <ser:TaxOverride>\n
|
53
|
+
\ <ser:TaxOverrideType>None</ser:TaxOverrideType>\n <ser:TaxAmount>0</ser:TaxAmount>\n
|
54
|
+
\ <ser:TaxDate>1900-01-01</ser:TaxDate>\n <ser:Reason></ser:Reason>\n
|
55
|
+
\ </ser:TaxOverride>\n <ser:TaxIncluded>false</ser:TaxIncluded>\n
|
56
|
+
\ <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
57
|
+
\ </ser:Line>\n <ser:Line>\n <ser:No>Spree::Shipment-1</ser:No>\n
|
58
|
+
\ <ser:OriginCode>1</ser:OriginCode>\n <ser:DestinationCode>1</ser:DestinationCode>\n
|
59
|
+
\ <ser:ItemCode></ser:ItemCode>\n <ser:TaxCode>FR020100</ser:TaxCode>\n
|
60
|
+
\ <ser:Qty>1</ser:Qty>\n <ser:Amount>100.0</ser:Amount>\n
|
61
|
+
\ <ser:Discounted>false</ser:Discounted>\n <ser:RevAcct></ser:RevAcct>\n
|
62
|
+
\ <ser:Ref1></ser:Ref1> \n <ser:Ref2></ser:Ref2>\n
|
63
|
+
\ <ser:ExemptionNo></ser:ExemptionNo>\n <ser:CustomerUsageType></ser:CustomerUsageType>\n
|
64
|
+
\ <ser:Description>Shipping Charge</ser:Description>\n <ser:TaxOverride>\n
|
65
|
+
\ <ser:TaxOverrideType>None</ser:TaxOverrideType>\n <ser:TaxAmount>0</ser:TaxAmount>\n
|
66
|
+
\ <ser:TaxDate>1900-01-01</ser:TaxDate>\n <ser:Reason></ser:Reason>\n
|
67
|
+
\ </ser:TaxOverride>\n <ser:TaxIncluded>false</ser:TaxIncluded>\n
|
68
|
+
\ <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
69
|
+
\ </ser:Line> \n </ser:Lines>\n <ser:DetailLevel>Tax</ser:DetailLevel>\n
|
70
|
+
\ <ser:ReferenceCode></ser:ReferenceCode>\n <ser:HashCode>0</ser:HashCode>\n
|
71
|
+
\ <ser:LocationCode></ser:LocationCode>\n <ser:Commit>false</ser:Commit>\n
|
72
|
+
\ <ser:BatchCode></ser:BatchCode>\n <ser:TaxOverride>\n <ser:TaxOverrideType>None</ser:TaxOverrideType>\n
|
73
|
+
\ <ser:TaxAmount>0</ser:TaxAmount>\n <ser:TaxDate>1900-01-01</ser:TaxDate>\n
|
74
|
+
\ <ser:Reason></ser:Reason>\n </ser:TaxOverride>\n <ser:CurrencyCode></ser:CurrencyCode>\n
|
75
|
+
\ <ser:ServiceMode>Remote</ser:ServiceMode>\n <ser:PaymentDate>1900-01-01</ser:PaymentDate>\n
|
76
|
+
\ <ser:ExchangeRate>0</ser:ExchangeRate>\n <ser:ExchangeRateEffDate>1900-01-01</ser:ExchangeRateEffDate>\n
|
77
|
+
\ <ser:PosLaneCode></ser:PosLaneCode>\n <ser:BusinessIdentificationNo></ser:BusinessIdentificationNo>\n
|
78
|
+
\ </ser:GetTaxRequest>\n </ser:GetTax>\n </soapenv:Body>\n</soapenv:Envelope>"
|
79
|
+
headers:
|
80
|
+
Soapaction:
|
81
|
+
- '"http://avatax.avalara.com/services/GetTax"'
|
82
|
+
Content-Type:
|
83
|
+
- text/xml;charset=UTF-8
|
84
|
+
Content-Length:
|
85
|
+
- '6934'
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
88
|
+
Accept:
|
89
|
+
- "*/*"
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: OK
|
96
|
+
headers:
|
97
|
+
Content-Type:
|
98
|
+
- text/xml; charset=utf-8
|
99
|
+
Vary:
|
100
|
+
- Accept-Encoding
|
101
|
+
X-Powered-By:
|
102
|
+
- ASP.NET
|
103
|
+
Date:
|
104
|
+
- Fri, 24 Jul 2015 22:56:42 GMT
|
105
|
+
Content-Length:
|
106
|
+
- '1747'
|
107
|
+
Set-Cookie:
|
108
|
+
- TS017f1821=01256c426e4190f29f505c865753c29bb1f26213cfd2ca13335061518362bc42dcdda7cd96;
|
109
|
+
Path=/
|
110
|
+
- TS017f1821_28=0167927a87b56f4c7f5271d248ccbdfd205026eeca5681ede04db87575971055083e96ce658d631799963f1cefbbceec9c01db7ff7;
|
111
|
+
Path=/
|
112
|
+
body:
|
113
|
+
encoding: UTF-8
|
114
|
+
string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body
|
115
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetTaxResponse
|
116
|
+
xmlns="http://avatax.avalara.com/services"><GetTaxResult><TransactionId>1211170648</TransactionId><ResultCode>Success</ResultCode><DocId>102166988</DocId><DocType>SalesInvoice</DocType><DocCode>R383509579</DocCode><DocDate>2015-07-24</DocDate><DocStatus>Saved</DocStatus><Reconciled>false</Reconciled><Timestamp>2015-07-24T22:56:42.167</Timestamp><TotalAmount>120</TotalAmount><TotalDiscount>0</TotalDiscount><TotalExemption>0</TotalExemption><TotalTaxable>120</TotalTaxable><TotalTax>10.66</TotalTax><TotalTaxCalculated>10.66</TotalTaxCalculated><HashCode>0</HashCode><TaxLines><TaxLine><No>Spree::LineItem-1</No><TaxCode>P0000000</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>0</Discount><Taxable>10</Taxable><Rate>0.088750</Rate><Tax>0.89</Tax><TaxCalculated>0.89</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.040000</Rate><Tax>0.4</Tax><TaxCalculated>0.4</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
117
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.045000</Rate><Tax>0.45</Tax><TaxCalculated>0.45</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
118
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
119
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.003750</Rate><Tax>0.04</Tax><TaxCalculated>0.04</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
120
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
121
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine><TaxLine><No>Spree::LineItem-2</No><TaxCode>P0000000</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>0</Discount><Taxable>10</Taxable><Rate>0.088750</Rate><Tax>0.89</Tax><TaxCalculated>0.89</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.040000</Rate><Tax>0.4</Tax><TaxCalculated>0.4</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
122
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.045000</Rate><Tax>0.45</Tax><TaxCalculated>0.45</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
123
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
124
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>10</Base><Taxable>10</Taxable><Rate>0.003750</Rate><Tax>0.04</Tax><TaxCalculated>0.04</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
125
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
126
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine><TaxLine><No>Spree::Shipment-1</No><TaxCode>FR020100</TaxCode><Taxability>true</Taxability><BoundaryLevel>Address</BoundaryLevel><Exemption>0</Exemption><Discount>0</Discount><Taxable>100</Taxable><Rate>0.088750</Rate><Tax>8.88</Tax><TaxCalculated>8.88</TaxCalculated><TaxIncluded>false</TaxIncluded><TaxDetails><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>State</JurisType><JurisCode>36</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.040000</Rate><Tax>4</Tax><TaxCalculated>4</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
127
|
+
YORK</JurisName><TaxName>NY STATE TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo/></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>City</JurisType><JurisCode>51000</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.045000</Rate><Tax>4.5</Tax><TaxCalculated>4.5</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>NEW
|
128
|
+
YORK CITY</JurisName><TaxName>NY CITY TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
129
|
+
8081</StateAssignedNo></TaxDetail><TaxDetail><Country>US</Country><Region>NY</Region><JurisType>Special</JurisType><JurisCode>359071</JurisCode><TaxType>Sales</TaxType><Base>100</Base><Taxable>100</Taxable><Rate>0.003750</Rate><Tax>0.38</Tax><TaxCalculated>0.38</TaxCalculated><NonTaxable>0</NonTaxable><Exemption>0</Exemption><JurisName>METROPOLITAN
|
130
|
+
COMMUTER TRANSPORTATION DISTRICT</JurisName><TaxName>NY SPECIAL TAX</TaxName><TaxAuthorityType>45</TaxAuthorityType><TaxGroup/><RateType>G</RateType><StateAssignedNo>NE
|
131
|
+
8081</StateAssignedNo></TaxDetail></TaxDetails><ExemptCertId>0</ExemptCertId><TaxDate>2015-07-24</TaxDate><ReportingDate>2015-07-24</ReportingDate><AccountingMethod>Accrual</AccountingMethod></TaxLine></TaxLines><TaxAddresses><TaxAddress><Address>35
|
132
|
+
Crosby St</Address><AddressCode>1</AddressCode><BoundaryLevel>0</BoundaryLevel><City>New
|
133
|
+
York</City><Country>US</Country><PostalCode>10013</PostalCode><Region>NY</Region><TaxRegionId>2088629</TaxRegionId><JurisCode>3600051000</JurisCode><Latitude/><Longitude/><GeocodeType>StreetLevel</GeocodeType><ValidateStatus>NormalHit</ValidateStatus><DistanceToBoundary>0</DistanceToBoundary></TaxAddress></TaxAddresses><Locked>false</Locked><AdjustmentReason>0</AdjustmentReason><AdjustmentDescription/><Version>1</Version><TaxDate>2015-07-24</TaxDate><TaxSummary/><VolatileTaxRates>false</VolatileTaxRates></GetTaxResult></GetTaxResponse></s:Body></s:Envelope>
|
134
|
+
http_version:
|
135
|
+
recorded_at: Fri, 24 Jul 2015 22:56:54 GMT
|
136
|
+
recorded_with: VCR 2.9.3
|