spree_avatax_official 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env-sample +4 -0
- data/.gitignore +22 -0
- data/.rspec +3 -0
- data/.rubocop.yml +77 -0
- data/.travis.yml +78 -0
- data/Appraisals +49 -0
- data/Gemfile +16 -0
- data/LICENSE +26 -0
- data/README.md +173 -0
- data/Rakefile +21 -0
- data/app/controllers/spree/admin/avalara_entity_use_codes_controller.rb +61 -0
- data/app/controllers/spree/admin/avatax_pings_controller.rb +19 -0
- data/app/controllers/spree/admin/avatax_settings_controller.rb +26 -0
- data/app/controllers/spree/admin/users_controller_decorator.rb +27 -0
- data/app/helpers/spree_avatax_official/http_helper.rb +17 -0
- data/app/helpers/spree_avatax_official/tax_adjustment_label_helper.rb +30 -0
- data/app/models/avatax/request_decorator.rb +34 -0
- data/app/models/spree_avatax_official/avatax_log.rb +57 -0
- data/app/models/spree_avatax_official/calculator/avatax_transaction_calculator.rb +28 -0
- data/app/models/spree_avatax_official/configuration.rb +20 -0
- data/app/models/spree_avatax_official/entity_use_code.rb +7 -0
- data/app/models/spree_avatax_official/has_uuid.rb +22 -0
- data/app/models/spree_avatax_official/spree/address_decorator.rb +31 -0
- data/app/models/spree_avatax_official/spree/inventory_unit_decorator.rb +11 -0
- data/app/models/spree_avatax_official/spree/line_item_decorator.rb +27 -0
- data/app/models/spree_avatax_official/spree/order_decorator.rb +91 -0
- data/app/models/spree_avatax_official/spree/refund_decorator.rb +22 -0
- data/app/models/spree_avatax_official/spree/shipment_decorator.rb +25 -0
- data/app/models/spree_avatax_official/spree/tax_category_decorator.rb +14 -0
- data/app/models/spree_avatax_official/spree/user_decorator.rb +11 -0
- data/app/models/spree_avatax_official/transaction.rb +27 -0
- data/app/overrides/spree/admin/shared/sub_menu/_configuration.rb +10 -0
- data/app/overrides/spree/admin/sidebar.rb +14 -0
- data/app/presenters/spree_avatax_official/address_presenter.rb +40 -0
- data/app/presenters/spree_avatax_official/item_presenter.rb +92 -0
- data/app/presenters/spree_avatax_official/ship_to_address_presenter.rb +22 -0
- data/app/presenters/spree_avatax_official/transactions/adjust_presenter.rb +31 -0
- data/app/presenters/spree_avatax_official/transactions/create_presenter.rb +80 -0
- data/app/presenters/spree_avatax_official/transactions/full_refund_presenter.rb +32 -0
- data/app/presenters/spree_avatax_official/transactions/partial_refund_presenter.rb +46 -0
- data/app/services/spree_avatax_official/address/validate.rb +27 -0
- data/app/services/spree_avatax_official/base.rb +71 -0
- data/app/services/spree_avatax_official/create_tax_adjustments_service.rb +133 -0
- data/app/services/spree_avatax_official/generate_transaction_cache_key_service.rb +94 -0
- data/app/services/spree_avatax_official/get_tax_service.rb +20 -0
- data/app/services/spree_avatax_official/settings/update_service.rb +36 -0
- data/app/services/spree_avatax_official/transactions/adjust_service.rb +36 -0
- data/app/services/spree_avatax_official/transactions/create_service.rb +47 -0
- data/app/services/spree_avatax_official/transactions/find_order_transaction_service.rb +23 -0
- data/app/services/spree_avatax_official/transactions/full_refund_service.rb +36 -0
- data/app/services/spree_avatax_official/transactions/get_by_code_service.rb +32 -0
- data/app/services/spree_avatax_official/transactions/partial_refund_service.rb +33 -0
- data/app/services/spree_avatax_official/transactions/refund_service.rb +87 -0
- data/app/services/spree_avatax_official/transactions/void_service.rb +28 -0
- data/app/services/spree_avatax_official/utilities/ping_service.rb +9 -0
- data/app/views/spree/admin/avalara_entity_use_codes/_form.html.erb +20 -0
- data/app/views/spree/admin/avalara_entity_use_codes/edit.html.erb +12 -0
- data/app/views/spree/admin/avalara_entity_use_codes/index.html.erb +35 -0
- data/app/views/spree/admin/avalara_entity_use_codes/new.html.erb +12 -0
- data/app/views/spree/admin/avatax_settings/edit.html.erb +99 -0
- data/app/views/spree/admin/users/avalara_information.html.erb +39 -0
- data/app/views/spree/admin/zones/_form.html.erb +58 -0
- data/bin/rails +8 -0
- data/config/initializers/spree_permitted_attributes.rb +5 -0
- data/config/locales/en.yml +40 -0
- data/config/routes.rb +15 -0
- data/db/migrate/20190118155953_add_exemption_number_to_spree_users.rb +7 -0
- data/db/migrate/20190118160653_create_spree_avalara_entity_use_codes.rb +11 -0
- data/db/migrate/20190118161318_add_avalara_entity_use_code_reference_to_users.rb +7 -0
- data/db/migrate/20190118162345_add_vat_id_to_spree_users.rb +7 -0
- data/db/migrate/20190122154119_create_spree_avatax_official_transactions.rb +10 -0
- data/db/migrate/20190201123706_add_tax_code_to_spree_tax_categories.rb +7 -0
- data/db/migrate/20190208130136_add_avatax_company_code_to_spree_stores.rb +8 -0
- data/db/migrate/20190225145808_add_uuid_to_spree_line_items_and_spree_shipments.rb +13 -0
- data/db/migrate/20190329071439_add_included_in_price_to_spree_zones.rb +5 -0
- data/db/migrate/20191001085458_remove_spree_avalara_entity_use_codes_table.rb +12 -0
- data/db/migrate/20191001092353_create_spree_avatax_official_entity_use_codes_table.rb +18 -0
- data/db/seeds.rb +1 -0
- data/gemfiles/spree_3_1.gemfile +16 -0
- data/gemfiles/spree_3_7.gemfile +13 -0
- data/gemfiles/spree_4_0.gemfile +14 -0
- data/gemfiles/spree_4_1.gemfile +14 -0
- data/gemfiles/spree_4_2.gemfile +14 -0
- data/gemfiles/spree_master.gemfile +14 -0
- data/lib/generators/spree_avatax_official/install/install_generator.rb +38 -0
- data/lib/generators/spree_avatax_official/install/templates/config/initializers/spree_avatax_official.rb +9 -0
- data/lib/spree_avatax_official.rb +5 -0
- data/lib/spree_avatax_official/engine.rb +32 -0
- data/lib/spree_avatax_official/factories.rb +9 -0
- data/lib/spree_avatax_official/seeder.rb +51 -0
- data/lib/spree_avatax_official/version.rb +11 -0
- data/lib/tasks/load_seeds.rake +6 -0
- data/spec/.rubocop.yml +36 -0
- data/spec/factories/canada_address_factory.rb +23 -0
- data/spec/factories/europe_address_factory.rb +22 -0
- data/spec/factories/spree/avatax_global_zone_factory.rb +16 -0
- data/spec/factories/spree/avatax_order_factory.rb +69 -0
- data/spec/factories/spree/avatax_shipment_factory.rb +31 -0
- data/spec/factories/spree/avatax_shipping_method_factory.rb +35 -0
- data/spec/factories/spree/avatax_tax_category_factory.rb +17 -0
- data/spec/factories/spree/avatax_tax_rate_factory.rb +23 -0
- data/spec/factories/spree/line_item_factory.rb +13 -0
- data/spec/factories/spree/promotion_factory.rb +35 -0
- data/spec/factories/spree/shipping_calculator_factory.rb +10 -0
- data/spec/factories/spree_avatax_official/avalara_entity_use_code_factory.rb +7 -0
- data/spec/factories/spree_avatax_official/calculator/avatax_transaction_calculator_factory.rb +3 -0
- data/spec/factories/spree_avatax_official/transaction_factory.rb +12 -0
- data/spec/factories/usa_address_factory.rb +34 -0
- data/spec/features/admin/edit_avatax_settings_spec.rb +11 -0
- data/spec/features/admin/update_avatax_settings_spec.rb +200 -0
- data/spec/features/spree/admin/avalara_entity_use_codes_controller_spec.rb +71 -0
- data/spec/features/spree/admin/users_controller_spec.rb +34 -0
- data/spec/helpers/spree_avatax_official/tax_adjustment_label_helper_spec.rb +81 -0
- data/spec/lib/spree_avatax_official/seeder_spec.rb +23 -0
- data/spec/models/spree/line_item_spec.rb +76 -0
- data/spec/models/spree/order_spec.rb +210 -0
- data/spec/models/spree/shipment_spec.rb +11 -0
- data/spec/models/spree_avatax_official/avatax_log_spec.rb +87 -0
- data/spec/models/spree_avatax_official/entity_use_code_spec.rb +9 -0
- data/spec/models/spree_avatax_official/has_uuid_spec.rb +21 -0
- data/spec/models/spree_avatax_official/spree/refund_decorator_spec.rb +31 -0
- data/spec/models/spree_avatax_official/transaction_spec.rb +9 -0
- data/spec/presenters/spree_avatax_official/address_presenter_spec.rb +53 -0
- data/spec/presenters/spree_avatax_official/item_presenter_spec.rb +159 -0
- data/spec/presenters/spree_avatax_official/ship_to_address_presenter_spec.rb +34 -0
- data/spec/presenters/spree_avatax_official/transactions/adjust_presenter_spec.rb +39 -0
- data/spec/presenters/spree_avatax_official/transactions/create_presenter_spec.rb +110 -0
- data/spec/presenters/spree_avatax_official/transactions/full_refund_presenter_spec.rb +30 -0
- data/spec/presenters/spree_avatax_official/transactions/partial_refund_presenter_spec.rb +48 -0
- data/spec/services/spree_avatax_official/address/validate_spec.rb +47 -0
- data/spec/services/spree_avatax_official/create_tax_adjustments_service_spec.rb +444 -0
- data/spec/services/spree_avatax_official/generate_transaction_cache_key_service_spec.rb +29 -0
- data/spec/services/spree_avatax_official/get_tax_service_spec.rb +33 -0
- data/spec/services/spree_avatax_official/settings/update_service_spec.rb +131 -0
- data/spec/services/spree_avatax_official/transactions/adjust_service_spec.rb +55 -0
- data/spec/services/spree_avatax_official/transactions/create_service_spec.rb +262 -0
- data/spec/services/spree_avatax_official/transactions/find_order_transaction_service_spec.rb +38 -0
- data/spec/services/spree_avatax_official/transactions/full_refund_service_spec.rb +24 -0
- data/spec/services/spree_avatax_official/transactions/get_by_code_service_spec.rb +74 -0
- data/spec/services/spree_avatax_official/transactions/partial_refund_service_spec.rb +33 -0
- data/spec/services/spree_avatax_official/transactions/refund_service_spec.rb +65 -0
- data/spec/services/spree_avatax_official/transactions/void_service_spec.rb +33 -0
- data/spec/services/spree_avatax_official/utilities/ping_service_spec.rb +35 -0
- data/spec/spec_helper.rb +104 -0
- data/spec/support/avatax.rb +15 -0
- data/spec/support/capybara.rb +21 -0
- data/spec/support/database_cleaner.rb +25 -0
- data/spec/support/factory_bot.rb +9 -0
- data/spec/support/vcr.rb +17 -0
- data/spec/vcr/SpreeAvataxOfficial_Transactions_FindOrderTransactionService/_call/with_Spree_Order/when_order_does_NOT_have_a_SalesInvoice_transaction/when_transaction_does_NOT_exist_in_avatax/returns_failure.yml +44 -0
- data/spec/vcr/SpreeAvataxOfficial_Transactions_FindOrderTransactionService/_call/with_Spree_Order/when_order_does_NOT_have_a_SalesInvoice_transaction/when_transaction_exists_in_avatax/returns_success_and_creates_a_new_SalesInvoice_transaction.yml +48 -0
- data/spec/vcr/spree_avatax_official/address/validate_failure.yml +46 -0
- data/spec/vcr/spree_avatax_official/address/validate_success.yml +43 -0
- data/spec/vcr/spree_avatax_official/address/zipcode_failure.yml +45 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/californian_stock_location.yml +60 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/completed_order_line_item_update.yml +62 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/order_adjustment_promotion.yml +61 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/shipment_adjustment_promotion.yml +60 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/simple_completed_order.yml +60 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/line_item_adjustment_promotion.yml +59 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/line_item_and_shipment.yml +60 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/multiple_line_items_multiple_quantity.yml +59 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/single_line_item.yml +55 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/line_item_adjustment_promotion.yml +59 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/line_item_and_shipment.yml +60 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/multiple_line_items_multiple_quantity.yml +59 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/single_line_item.yml +55 -0
- data/spec/vcr/spree_avatax_official/create_tax_adjustments/with_incorrect_address.yml +97 -0
- data/spec/vcr/spree_avatax_official/get_tax/error.yml +49 -0
- data/spec/vcr/spree_avatax_official/get_tax/sucsess.yml +55 -0
- data/spec/vcr/spree_avatax_official/transactions/adjust/failure.yml +101 -0
- data/spec/vcr/spree_avatax_official/transactions/adjust/invoice_order_success.yml +117 -0
- data/spec/vcr/spree_avatax_official/transactions/create/complete_order_success.yml +60 -0
- data/spec/vcr/spree_avatax_official/transactions/create/gst/canada_to_canada.yml +55 -0
- data/spec/vcr/spree_avatax_official/transactions/create/gst/canada_to_us.yml +57 -0
- data/spec/vcr/spree_avatax_official/transactions/create/gst/us_to_canada.yml +56 -0
- data/spec/vcr/spree_avatax_official/transactions/create/invoice_order_success.yml +60 -0
- data/spec/vcr/spree_avatax_official/transactions/create/sales_order_success.yml +60 -0
- data/spec/vcr/spree_avatax_official/transactions/create/timeout.yml +54 -0
- data/spec/vcr/spree_avatax_official/transactions/create/vat/europe_to_europe.yml +57 -0
- data/spec/vcr/spree_avatax_official/transactions/create/vat/europe_to_us.yml +57 -0
- data/spec/vcr/spree_avatax_official/transactions/create/vat/us_to_europe.yml +58 -0
- data/spec/vcr/spree_avatax_official/transactions/get_by_code/error.yml +44 -0
- data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_custom_code_success.yml +49 -0
- data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_number_success.yml +49 -0
- data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_type_success.yml +48 -0
- data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_without_type_success.yml +48 -0
- data/spec/vcr/spree_avatax_official/transactions/refund/full_refund_success.yml +114 -0
- data/spec/vcr/spree_avatax_official/transactions/refund/partial_refund_success.yml +58 -0
- data/spec/vcr/spree_avatax_official/transactions/refund/partial_refund_with_refund_success.yml +58 -0
- data/spec/vcr/spree_avatax_official/transactions/void/success.yml +112 -0
- data/spec/vcr/spree_avatax_official/utilities/ping.yml +41 -0
- data/spec/vcr/spree_avatax_official/utilities/ping_unauthorized.yml +42 -0
- data/spec/vcr/spree_line_item/update_tax_charge/decrease_quantity.yml +55 -0
- data/spec/vcr/spree_line_item/update_tax_charge/increase_quantity.yml +55 -0
- data/spec/vcr/spree_order/california_order.yml +67 -0
- data/spec/vcr/spree_order/complete_order.yml +60 -0
- data/spec/vcr/spree_order/order_transition_to_completed.yml +112 -0
- data/spec/vcr/spree_order/order_with_line_item_adjustment.yml +57 -0
- data/spec/vcr/spree_order/order_with_order_adjustment.yml +57 -0
- data/spec/vcr/spree_order/simple_order_with_single_line_item.yml +55 -0
- data/spec/vcr/spree_order/simple_order_with_single_line_item_and_shipment.yml +57 -0
- data/spec/vcr/spree_order/update_tax_charge/create_line_item.yml +55 -0
- data/spree_avatax_official.gemspec +43 -0
- metadata +486 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesOrder","code":"R858256602","referenceCode":"R858256602","companyCode":"test1","date":"2019-09-20","customerCode":"catarina@johnson.name","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":2,"amount":"20.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":true,"description":"Product
|
11
|
+
#49 - 1116","itemCode":"SKU-49"},{"number":"LI-50f0c7ba-0c5f-4479-a24a-3de192354004","quantity":3,"amount":"30.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":true,"description":"Product
|
12
|
+
#50 - 4184","itemCode":"SKU-50"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R858256602"}'
|
13
|
+
headers:
|
14
|
+
Accept:
|
15
|
+
- application/json; charset=utf-8
|
16
|
+
User-Agent:
|
17
|
+
- AvaTax Ruby Gem 19.7.0
|
18
|
+
X-Avalara-Client:
|
19
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
20
|
+
Authorization:
|
21
|
+
- "<AVATAX_TOKEN>"
|
22
|
+
Content-Type:
|
23
|
+
- application/json
|
24
|
+
Accept-Encoding:
|
25
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
26
|
+
response:
|
27
|
+
status:
|
28
|
+
code: 201
|
29
|
+
message: Created
|
30
|
+
headers:
|
31
|
+
Date:
|
32
|
+
- Fri, 20 Sep 2019 09:03:46 GMT
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
Location:
|
40
|
+
- "/api/v2/companies/848107/transactions/0"
|
41
|
+
X-Content-Type-Options:
|
42
|
+
- nosniff
|
43
|
+
Serverduration:
|
44
|
+
- '00:00:00.0599263'
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"id":0,"code":"R858256602","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"catarina@johnson.name","customerCode":"catarina@johnson.name","reconciled":false,"purchaseOrderNo":"R858256602","referenceCode":"R858256602","totalAmount":46.3,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":3.7,"totalTaxable":46.3,"totalTaxCalculated":3.7,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:43.427758Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
|
48
|
+
#49 - 1116","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-49","lineAmount":18.52,"quantity":2.0,"reportingDate":"2019-09-20","tax":1.48,"taxableAmount":18.52,"taxCalculated":1.48,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxIncluded":true,"details":[{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"42","jurisName":"PENNSYLVANIA","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0,"rate":0.060000,"tax":1.11,"taxableAmount":18.52,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
49
|
+
STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.11,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"101","jurisName":"PHILADELPHIA","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0,"rate":0.020000,"tax":0.37,"taxableAmount":18.52,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
50
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.37,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"LI-50f0c7ba-0c5f-4479-a24a-3de192354004","description":"Product
|
51
|
+
#50 - 4184","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-50","lineAmount":27.78,"quantity":3.0,"reportingDate":"2019-09-20","tax":2.22,"taxableAmount":27.78,"taxCalculated":2.22,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxIncluded":true,"details":[{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"42","jurisName":"PENNSYLVANIA","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0,"rate":0.060000,"tax":1.67,"taxableAmount":27.78,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
52
|
+
STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.67,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"101","jurisName":"PHILADELPHIA","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0,"rate":0.020000,"tax":0.55,"taxableAmount":27.78,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
53
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.55,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"822
|
54
|
+
Reed St","line2":"","line3":"","city":"Philadelphia","region":"PA","postalCode":"19147","country":"US","taxRegionId":4014900,"latitude":"39.931676","longitude":"-75.159051"}],"summary":[{"country":"US","region":"PA","jurisType":"State","jurisCode":"42","jurisName":"PENNSYLVANIA","taxAuthorityType":45,"stateAssignedNo":"","taxType":"Sales","taxSubType":"S","taxName":"PA
|
55
|
+
STATE TAX","rateType":"General","taxable":46.30,"rate":0.060000,"tax":2.78,"taxCalculated":2.78,"nonTaxable":0.0,"exemption":0.0},{"country":"US","region":"PA","jurisType":"County","jurisCode":"101","jurisName":"PHILADELPHIA","taxAuthorityType":45,"stateAssignedNo":"51","taxType":"Sales","taxSubType":"S","taxName":"PA
|
56
|
+
COUNTY TAX","rateType":"General","taxable":46.30,"rate":0.020000,"tax":0.92,"taxCalculated":0.92,"nonTaxable":0.0,"exemption":0.0}]}'
|
57
|
+
http_version:
|
58
|
+
recorded_at: Fri, 20 Sep 2019 09:03:46 GMT
|
59
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesOrder","code":"R149283786","referenceCode":"R149283786","companyCode":"test1","date":"2019-09-20","customerCode":"susan@bogisich.com","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":true,"description":"Product
|
11
|
+
#47 - 9848","itemCode":"SKU-47"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R149283786"}'
|
12
|
+
headers:
|
13
|
+
Accept:
|
14
|
+
- application/json; charset=utf-8
|
15
|
+
User-Agent:
|
16
|
+
- AvaTax Ruby Gem 19.7.0
|
17
|
+
X-Avalara-Client:
|
18
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
19
|
+
Authorization:
|
20
|
+
- "<AVATAX_TOKEN>"
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Accept-Encoding:
|
24
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 201
|
28
|
+
message: Created
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Fri, 20 Sep 2019 09:03:43 GMT
|
32
|
+
Content-Type:
|
33
|
+
- application/json; charset=utf-8
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
Location:
|
39
|
+
- "/api/v2/companies/848107/transactions/0"
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
Serverduration:
|
43
|
+
- '00:00:00.0571728'
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"id":0,"code":"R149283786","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"susan@bogisich.com","customerCode":"susan@bogisich.com","reconciled":false,"purchaseOrderNo":"R149283786","referenceCode":"R149283786","totalAmount":9.26,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":0.74,"totalTaxable":9.26,"totalTaxCalculated":0.74,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:04:00.6877169Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
|
47
|
+
#47 - 9848","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-47","lineAmount":9.26,"quantity":1.0,"reportingDate":"2019-09-20","tax":0.74,"taxableAmount":9.26,"taxCalculated":0.74,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxIncluded":true,"details":[{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"42","jurisName":"PENNSYLVANIA","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0,"rate":0.060000,"tax":0.56,"taxableAmount":9.26,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
48
|
+
STATE TAX","taxAuthorityTypeId":45,"taxCalculated":0.56,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"101","jurisName":"PHILADELPHIA","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0,"rate":0.020000,"tax":0.18,"taxableAmount":9.26,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
49
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.18,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"822
|
50
|
+
Reed St","line2":"","line3":"","city":"Philadelphia","region":"PA","postalCode":"19147","country":"US","taxRegionId":4014900,"latitude":"39.931676","longitude":"-75.159051"}],"summary":[{"country":"US","region":"PA","jurisType":"State","jurisCode":"42","jurisName":"PENNSYLVANIA","taxAuthorityType":45,"stateAssignedNo":"","taxType":"Sales","taxSubType":"S","taxName":"PA
|
51
|
+
STATE TAX","rateType":"General","taxable":9.26,"rate":0.060000,"tax":0.56,"taxCalculated":0.56,"nonTaxable":0.0,"exemption":0.0},{"country":"US","region":"PA","jurisType":"County","jurisCode":"101","jurisName":"PHILADELPHIA","taxAuthorityType":45,"stateAssignedNo":"51","taxType":"Sales","taxSubType":"S","taxName":"PA
|
52
|
+
COUNTY TAX","rateType":"General","taxable":9.26,"rate":0.020000,"tax":0.18,"taxCalculated":0.18,"nonTaxable":0.0,"exemption":0.0}]}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Fri, 20 Sep 2019 09:03:43 GMT
|
55
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesOrder","code":"R822664378","referenceCode":"R822664378","companyCode":"test1","date":"2019-09-20","customerCode":"letha@cassin.info","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"Invalid
|
10
|
+
street","line2":"","city":"Invalid city","region":"PA","country":"US","postalCode":"00000"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
|
11
|
+
#55 - 8785","itemCode":"SKU-55"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R822664378"}'
|
12
|
+
headers:
|
13
|
+
Accept:
|
14
|
+
- application/json; charset=utf-8
|
15
|
+
User-Agent:
|
16
|
+
- AvaTax Ruby Gem 19.7.0
|
17
|
+
X-Avalara-Client:
|
18
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
19
|
+
Authorization:
|
20
|
+
- "<AVATAX_TOKEN>"
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Accept-Encoding:
|
24
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 400
|
28
|
+
message: Bad Request
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Fri, 20 Sep 2019 09:03:50 GMT
|
32
|
+
Content-Type:
|
33
|
+
- application/json; charset=utf-8
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
X-Content-Type-Options:
|
39
|
+
- nosniff
|
40
|
+
Serverduration:
|
41
|
+
- '00:00:00.0384727'
|
42
|
+
body:
|
43
|
+
encoding: UTF-8
|
44
|
+
string: '{"error":{"code":"GetTaxError","message":"Tax calculation cannot be
|
45
|
+
determined. Zip is not valid for the state.","target":"Unknown","details":[{"code":"GetTaxError","number":300,"message":"Tax
|
46
|
+
calculation cannot be determined. Zip is not valid for the state.","description":"Invalid
|
47
|
+
St, Invalid city, PA 00000 US (AddressLocationType: ShipTo)","faultCode":"GetTaxError","helpLink":"http://developer.avalara.com/avatax/errors/GetTaxError","refersTo":"Addresses[1]","severity":"Error"}]}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Fri, 20 Sep 2019 09:03:50 GMT
|
50
|
+
- request:
|
51
|
+
method: post
|
52
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"type":"SalesOrder","code":"R414996727","referenceCode":"R414996727","companyCode":"test1","date":"2019-09-20","customerCode":"aurea_boyer@langosh.biz","addresses":{"ShipFrom":{"line1":"822
|
56
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"Invalid
|
57
|
+
street","line2":"","city":"Invalid city","region":"PA","country":"US","postalCode":"00000"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
|
58
|
+
#1 - 1580","itemCode":"SKU-1"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R414996727"}'
|
59
|
+
headers:
|
60
|
+
Accept:
|
61
|
+
- application/json; charset=utf-8
|
62
|
+
User-Agent:
|
63
|
+
- AvaTax Ruby Gem 19.7.0
|
64
|
+
X-Avalara-Client:
|
65
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
66
|
+
Authorization:
|
67
|
+
- "<AVATAX_TOKEN>"
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
Accept-Encoding:
|
71
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
72
|
+
response:
|
73
|
+
status:
|
74
|
+
code: 400
|
75
|
+
message: Bad Request
|
76
|
+
headers:
|
77
|
+
Date:
|
78
|
+
- Fri, 20 Sep 2019 09:34:07 GMT
|
79
|
+
Content-Type:
|
80
|
+
- application/json; charset=utf-8
|
81
|
+
Transfer-Encoding:
|
82
|
+
- chunked
|
83
|
+
Connection:
|
84
|
+
- keep-alive
|
85
|
+
X-Content-Type-Options:
|
86
|
+
- nosniff
|
87
|
+
Serverduration:
|
88
|
+
- '00:00:00.0432240'
|
89
|
+
body:
|
90
|
+
encoding: UTF-8
|
91
|
+
string: '{"error":{"code":"GetTaxError","message":"Tax calculation cannot be
|
92
|
+
determined. Zip is not valid for the state.","target":"Unknown","details":[{"code":"GetTaxError","number":300,"message":"Tax
|
93
|
+
calculation cannot be determined. Zip is not valid for the state.","description":"Invalid
|
94
|
+
St, Invalid city, PA 00000 US (AddressLocationType: ShipTo)","faultCode":"GetTaxError","helpLink":"http://developer.avalara.com/avatax/errors/GetTaxError","refersTo":"Addresses[1]","severity":"Error"}]}}'
|
95
|
+
http_version:
|
96
|
+
recorded_at: Fri, 20 Sep 2019 09:34:07 GMT
|
97
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesOrder","code":"R169922295","referenceCode":"R169922295","companyCode":"test1","date":"2019-09-20","customerCode":"justin_jacobi@oconnerdenesik.biz","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R169922295"}'
|
11
|
+
headers:
|
12
|
+
Accept:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- AvaTax Ruby Gem 19.7.0
|
16
|
+
X-Avalara-Client:
|
17
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
18
|
+
Authorization:
|
19
|
+
- "<AVATAX_TOKEN>"
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
Accept-Encoding:
|
23
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 400
|
27
|
+
message: Bad Request
|
28
|
+
headers:
|
29
|
+
Date:
|
30
|
+
- Fri, 20 Sep 2019 09:03:05 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Content-Type-Options:
|
38
|
+
- nosniff
|
39
|
+
Serverduration:
|
40
|
+
- '00:00:00.0013361'
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"error":{"code":"MissingLine","message":"Transactions must have at
|
44
|
+
least one line.","target":"HttpRequestHeaders","details":[{"code":"MissingLine","number":311,"message":"Transactions
|
45
|
+
must have at least one line.","description":"The CreateTransactionModel object
|
46
|
+
must have an element called ''lines'', with at least one valid line record.","faultCode":"Client","helpLink":"http://developer.avalara.com/avatax/errors/MissingLine","severity":"Error"}]}}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Fri, 20 Sep 2019 09:03:06 GMT
|
49
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesOrder","code":"R100962117","referenceCode":"R100962117","companyCode":"test1","date":"2019-09-20","customerCode":"lashawna@schimmel.info","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
|
11
|
+
#22 - 5389","itemCode":"SKU-22"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R100962117"}'
|
12
|
+
headers:
|
13
|
+
Accept:
|
14
|
+
- application/json; charset=utf-8
|
15
|
+
User-Agent:
|
16
|
+
- AvaTax Ruby Gem 19.7.0
|
17
|
+
X-Avalara-Client:
|
18
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
19
|
+
Authorization:
|
20
|
+
- "<AVATAX_TOKEN>"
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Accept-Encoding:
|
24
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 201
|
28
|
+
message: Created
|
29
|
+
headers:
|
30
|
+
Date:
|
31
|
+
- Fri, 20 Sep 2019 09:03:07 GMT
|
32
|
+
Content-Type:
|
33
|
+
- application/json; charset=utf-8
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
Location:
|
39
|
+
- "/api/v2/companies/848107/transactions/0"
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
Serverduration:
|
43
|
+
- '00:00:00.0565728'
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"id":0,"code":"R100962117","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"lashawna@schimmel.info","customerCode":"lashawna@schimmel.info","reconciled":false,"purchaseOrderNo":"R100962117","referenceCode":"R100962117","totalAmount":10.0,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":0.8,"totalTaxable":10.0,"totalTaxCalculated":0.8,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:24.0605748Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
|
47
|
+
#22 - 5389","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-22","lineAmount":10.0,"quantity":1.0,"reportingDate":"2019-09-20","tax":0.8,"taxableAmount":10.0,"taxCalculated":0.8,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxIncluded":false,"details":[{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"42","jurisName":"PENNSYLVANIA","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0,"rate":0.060000,"tax":0.6,"taxableAmount":10.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
48
|
+
STATE TAX","taxAuthorityTypeId":45,"taxCalculated":0.6,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":0,"transactionLineId":0,"transactionId":0,"country":"US","region":"PA","exemptAmount":0.0,"jurisCode":"101","jurisName":"PHILADELPHIA","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0,"rate":0.020000,"tax":0.2,"taxableAmount":10.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
|
49
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.2,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"822
|
50
|
+
Reed St","line2":"","line3":"","city":"Philadelphia","region":"PA","postalCode":"19147","country":"US","taxRegionId":4014900,"latitude":"39.931676","longitude":"-75.159051"}],"summary":[{"country":"US","region":"PA","jurisType":"State","jurisCode":"42","jurisName":"PENNSYLVANIA","taxAuthorityType":45,"stateAssignedNo":"","taxType":"Sales","taxSubType":"S","taxName":"PA
|
51
|
+
STATE TAX","rateType":"General","taxable":10.0,"rate":0.060000,"tax":0.6,"taxCalculated":0.6,"nonTaxable":0.0,"exemption":0.0},{"country":"US","region":"PA","jurisType":"County","jurisCode":"101","jurisName":"PHILADELPHIA","taxAuthorityType":45,"stateAssignedNo":"51","taxType":"Sales","taxSubType":"S","taxName":"PA
|
52
|
+
COUNTY TAX","rateType":"General","taxable":10.0,"rate":0.020000,"tax":0.2,"taxCalculated":0.2,"nonTaxable":0.0,"exemption":0.0}]}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Fri, 20 Sep 2019 09:03:07 GMT
|
55
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesInvoice","code":"R680546408","referenceCode":"R680546408","companyCode":"test1","date":"2019-09-20","customerCode":"betsy@schneider.us","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600
|
11
|
+
Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822
|
12
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product
|
13
|
+
#23 - 6605","itemCode":"SKU-23"},{"number":"FR-bdb56466-77dd-4dfb-bf58-0cf5dfccf08b","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546408"}'
|
14
|
+
headers:
|
15
|
+
Accept:
|
16
|
+
- application/json; charset=utf-8
|
17
|
+
User-Agent:
|
18
|
+
- AvaTax Ruby Gem 19.7.0
|
19
|
+
X-Avalara-Client:
|
20
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
21
|
+
Authorization:
|
22
|
+
- "<AVATAX_TOKEN>"
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Accept-Encoding:
|
26
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
27
|
+
response:
|
28
|
+
status:
|
29
|
+
code: 400
|
30
|
+
message: Bad Request
|
31
|
+
headers:
|
32
|
+
Date:
|
33
|
+
- Fri, 20 Sep 2019 09:03:08 GMT
|
34
|
+
Content-Type:
|
35
|
+
- application/json; charset=utf-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
Serverduration:
|
43
|
+
- '00:00:00.3534326'
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"error":{"code":"GetTaxError","message":"DocStatus is invalid for
|
47
|
+
this operation.","target":"Unknown","details":[{"code":"GetTaxError","number":300,"message":"DocStatus
|
48
|
+
is invalid for this operation.","description":"Expected Saved|Posted","faultCode":"GetTaxError","helpLink":"http://developer.avalara.com/avatax/errors/GetTaxError","refersTo":"DocStatus","severity":"Error"}]}}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Fri, 20 Sep 2019 09:03:08 GMT
|
51
|
+
- request:
|
52
|
+
method: post
|
53
|
+
uri: https://sandbox-rest.avatax.com/api/v2/companies/test1/transactions/R680546408/adjust
|
54
|
+
body:
|
55
|
+
encoding: UTF-8
|
56
|
+
string: '{"adjustmentReason":"","adjustmentDescription":"","newTransaction":{"type":"SalesInvoice","code":"R680546408","referenceCode":"R680546408","companyCode":"test1","date":"2019-09-20","customerCode":"betsy@schneider.us","addresses":{"ShipFrom":{"line1":"822
|
57
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
58
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600
|
59
|
+
Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822
|
60
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product
|
61
|
+
#23 - 6605","itemCode":"SKU-23"},{"number":"FR-bdb56466-77dd-4dfb-bf58-0cf5dfccf08b","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546408"}}'
|
62
|
+
headers:
|
63
|
+
Accept:
|
64
|
+
- application/json; charset=utf-8
|
65
|
+
User-Agent:
|
66
|
+
- AvaTax Ruby Gem 19.7.0
|
67
|
+
X-Avalara-Client:
|
68
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
69
|
+
Authorization:
|
70
|
+
- "<AVATAX_TOKEN>"
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
Accept-Encoding:
|
74
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
75
|
+
response:
|
76
|
+
status:
|
77
|
+
code: 400
|
78
|
+
message: Bad Request
|
79
|
+
headers:
|
80
|
+
Date:
|
81
|
+
- Fri, 20 Sep 2019 09:03:09 GMT
|
82
|
+
Content-Type:
|
83
|
+
- application/json; charset=utf-8
|
84
|
+
Transfer-Encoding:
|
85
|
+
- chunked
|
86
|
+
Connection:
|
87
|
+
- keep-alive
|
88
|
+
X-Content-Type-Options:
|
89
|
+
- nosniff
|
90
|
+
Serverduration:
|
91
|
+
- '00:00:00.0005202'
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"error":{"code":"ModelStateInvalid","message":"The request body did
|
95
|
+
not contain valid JSON.","target":"HttpRequest","details":[{"code":"JsonFormatError","number":47,"message":"The
|
96
|
+
request body did not contain valid JSON.","description":"At line 1 position
|
97
|
+
22: Error converting value \"\" to type ''Avalara.AvaTax.Enums.AdjustmentReason''.
|
98
|
+
Path ''adjustmentReason''","faultCode":"Client","helpLink":"http://developer.avalara.com/avatax/errors/JsonFormatError","severity":"Error"}]}}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Fri, 20 Sep 2019 09:03:09 GMT
|
101
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox-rest.avatax.com/api/v2/transactions/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"SalesInvoice","code":"R680546412","referenceCode":"R680546412","companyCode":"test1","date":"2019-09-20","customerCode":"clemente_larson@wisokyhills.co.uk","addresses":{"ShipFrom":{"line1":"822
|
9
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
10
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600
|
11
|
+
Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822
|
12
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product
|
13
|
+
#1 - 3537","itemCode":"SKU-1"},{"number":"FR-762d9442-d9ff-455d-8771-4405d9693be0","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546412"}'
|
14
|
+
headers:
|
15
|
+
Accept:
|
16
|
+
- application/json; charset=utf-8
|
17
|
+
User-Agent:
|
18
|
+
- AvaTax Ruby Gem 19.7.0
|
19
|
+
X-Avalara-Client:
|
20
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
21
|
+
Authorization:
|
22
|
+
- "<AVATAX_TOKEN>"
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Accept-Encoding:
|
26
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
27
|
+
response:
|
28
|
+
status:
|
29
|
+
code: 201
|
30
|
+
message: Created
|
31
|
+
headers:
|
32
|
+
Date:
|
33
|
+
- Fri, 20 Sep 2019 09:14:42 GMT
|
34
|
+
Content-Type:
|
35
|
+
- application/json; charset=utf-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
Location:
|
41
|
+
- "/api/v2/companies/848107/transactions/4880581546"
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Serverduration:
|
45
|
+
- '00:00:00.1068983'
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"id":4880581546,"code":"R680546412","companyId":848107,"date":"2019-09-20","status":"Committed","type":"SalesInvoice","batchCode":"","currencyCode":"USD","customerUsageType":"","entityUseCode":"","customerVendorCode":"clemente_larson@wisokyhills.co.uk","customerCode":"clemente_larson@wisokyhills.co.uk","exemptNo":"","reconciled":false,"locationCode":"","reportingLocationCode":"","purchaseOrderNo":"R680546412","referenceCode":"R680546412","salespersonCode":"","taxOverrideType":"None","taxOverrideAmount":0.0000,"taxOverrideReason":"","totalAmount":110.0000,"totalExempt":0.0000,"totalDiscount":0.0000,"totalTax":8.8000,"totalTaxable":110.0000,"totalTaxCalculated":8.8000,"adjustmentReason":"NotAdjusted","adjustmentDescription":"","locked":false,"region":"PA","country":"US","version":1,"softwareVersion":"19.8.1.1","originAddressId":9504989434,"destinationAddressId":9504989434,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0000,"isSellerImporterOfRecord":true,"description":"","email":"","businessIdentificationNo":"","modifiedDate":"2019-09-20T09:13:12.48","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":5935017700,"transactionId":4880581546,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"Product
|
49
|
+
#1 - 3537","destinationAddressId":9504989434,"originAddressId":11710483037,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"SKU-1","lineAmount":10.0000,"quantity":1.0000,"ref1":"","ref2":"","reportingDate":"2019-09-20","revAccount":"","sourcing":"Destination","tax":0.8000,"taxableAmount":10.0000,"taxCalculated":0.8000,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxEngine":"","taxOverrideType":"None","businessIdentificationNo":"","taxOverrideAmount":0.0000,"taxOverrideReason":"","taxIncluded":false,"details":[{"id":11815442876,"transactionLineId":5935017700,"transactionId":4880581546,"addressId":9504989434,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":false,"jurisCode":"42","jurisName":"PENNSYLVANIA","jurisdictionId":49,"signatureCode":"BKTQ","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.060000,"rateRuleId":1457985,"rateSourceId":3,"serCode":"","sourcing":"Destination","tax":0.6000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
50
|
+
STATE TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":0.6000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":10.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":13815442876,"transactionLineId":5935017700,"transactionId":4880581546,"addressId":9504989434,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":false,"jurisCode":"101","jurisName":"PHILADELPHIA","jurisdictionId":2311,"signatureCode":"BMWV","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.020000,"rateRuleId":1458005,"rateSourceId":3,"serCode":"","sourcing":"Destination","tax":0.2000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
51
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":0.2000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":10.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"lineLocationTypes":[{"documentLineLocationTypeId":10739504351,"documentLineId":5935017700,"documentAddressId":9504989434,"locationTypeCode":"ShipTo"},{"documentLineLocationTypeId":8739504350,"documentLineId":5935017700,"documentAddressId":11710483037,"locationTypeCode":"ShipFrom"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0},{"id":7935017701,"transactionId":4880581546,"lineNumber":"FR-762d9442-d9ff-455d-8771-4405d9693be0","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"","destinationAddressId":9504989434,"originAddressId":9504989434,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"","lineAmount":100.0000,"quantity":1.0000,"ref1":"","ref2":"","reportingDate":"2019-09-20","revAccount":"","sourcing":"Origin","tax":8.0000,"taxableAmount":100.0000,"taxCalculated":8.0000,"taxCode":"FR","taxCodeId":10890,"taxDate":"2019-09-20","taxEngine":"","taxOverrideType":"None","businessIdentificationNo":"","taxOverrideAmount":0.0000,"taxOverrideReason":"","taxIncluded":false,"details":[{"id":15815442877,"transactionLineId":7935017701,"transactionId":4880581546,"addressId":9504989434,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":true,"jurisCode":"42","jurisName":"PENNSYLVANIA","jurisdictionId":49,"signatureCode":"BKTQ","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.060000,"rateRuleId":1457985,"rateSourceId":3,"serCode":"","sourcing":"Origin","tax":6.0000,"taxableAmount":100.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
52
|
+
STATE TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":6.0000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":100.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":27824987304,"transactionLineId":7935017701,"transactionId":4880581546,"addressId":9504989434,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":true,"jurisCode":"101","jurisName":"PHILADELPHIA","jurisdictionId":2311,"signatureCode":"BMWV","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.020000,"rateRuleId":1458005,"rateSourceId":3,"serCode":"","sourcing":"Origin","tax":2.0000,"taxableAmount":100.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
53
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":2.0000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":100.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"lineLocationTypes":[{"documentLineLocationTypeId":12956562492,"documentLineId":7935017701,"documentAddressId":9504989434,"locationTypeCode":"ShipFrom"},{"documentLineLocationTypeId":6739504352,"documentLineId":7935017701,"documentAddressId":9504989434,"locationTypeCode":"ShipTo"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":9504989434,"transactionId":4880581546,"boundaryLevel":"Address","line1":"822
|
54
|
+
Reed St","line2":"","line3":"","city":"Philadelphia","region":"PA","postalCode":"19147-5736","country":"US","taxRegionId":4014900,"latitude":"39.931676","longitude":"-75.159051"},{"id":11710483037,"transactionId":4880581546,"boundaryLevel":"Address","line1":"1600
|
55
|
+
Pennsylvania Ave Nw","line2":"","line3":"","city":"Washington","region":"DC","postalCode":"20500-0003","country":"US","taxRegionId":949,"latitude":"38.898664","longitude":"-77.036543"}],"locationTypes":[{"documentLocationTypeId":10942316436,"documentId":4880581546,"documentAddressId":9504989434,"locationTypeCode":"ShipTo"},{"documentLocationTypeId":8738535630,"documentId":4880581546,"documentAddressId":9504989434,"locationTypeCode":"ShipFrom"}],"summary":[{"country":"US","region":"PA","jurisType":"State","jurisCode":"42","jurisName":"PENNSYLVANIA","taxAuthorityType":45,"stateAssignedNo":"","taxType":"Sales","taxSubType":"S","taxName":"PA
|
56
|
+
STATE TAX","rateType":"General","taxable":110.00,"rate":0.060000,"tax":6.60,"taxCalculated":6.60,"nonTaxable":0.00,"exemption":0.00},{"country":"US","region":"PA","jurisType":"County","jurisCode":"101","jurisName":"PHILADELPHIA","taxAuthorityType":45,"stateAssignedNo":"51","taxType":"Sales","taxSubType":"S","taxName":"PA
|
57
|
+
COUNTY TAX","rateType":"General","taxable":110.00,"rate":0.020000,"tax":2.20,"taxCalculated":2.20,"nonTaxable":0.00,"exemption":0.00}]}'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Fri, 20 Sep 2019 09:14:42 GMT
|
60
|
+
- request:
|
61
|
+
method: post
|
62
|
+
uri: https://sandbox-rest.avatax.com/api/v2/companies/test1/transactions/R680546412/adjust
|
63
|
+
body:
|
64
|
+
encoding: UTF-8
|
65
|
+
string: '{"adjustmentReason":"PriceAdjusted","adjustmentDescription":"","newTransaction":{"type":"SalesInvoice","code":"R680546412","referenceCode":"R680546412","companyCode":"test1","date":"2019-09-20","customerCode":"clemente_larson@wisokyhills.co.uk","addresses":{"ShipFrom":{"line1":"822
|
66
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822
|
67
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600
|
68
|
+
Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822
|
69
|
+
Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product
|
70
|
+
#1 - 3537","itemCode":"SKU-1"},{"number":"FR-762d9442-d9ff-455d-8771-4405d9693be0","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546412"}}'
|
71
|
+
headers:
|
72
|
+
Accept:
|
73
|
+
- application/json; charset=utf-8
|
74
|
+
User-Agent:
|
75
|
+
- AvaTax Ruby Gem 19.7.0
|
76
|
+
X-Avalara-Client:
|
77
|
+
- a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0;
|
78
|
+
Authorization:
|
79
|
+
- "<AVATAX_TOKEN>"
|
80
|
+
Content-Type:
|
81
|
+
- application/json
|
82
|
+
Accept-Encoding:
|
83
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
84
|
+
response:
|
85
|
+
status:
|
86
|
+
code: 200
|
87
|
+
message: OK
|
88
|
+
headers:
|
89
|
+
Date:
|
90
|
+
- Fri, 20 Sep 2019 09:14:43 GMT
|
91
|
+
Content-Type:
|
92
|
+
- application/json; charset=utf-8
|
93
|
+
Transfer-Encoding:
|
94
|
+
- chunked
|
95
|
+
Connection:
|
96
|
+
- keep-alive
|
97
|
+
Location:
|
98
|
+
- "/api/v2/companies/848107/transactions/4880581553"
|
99
|
+
X-Content-Type-Options:
|
100
|
+
- nosniff
|
101
|
+
Serverduration:
|
102
|
+
- '00:00:00.1124408'
|
103
|
+
body:
|
104
|
+
encoding: UTF-8
|
105
|
+
string: '{"id":4880581553,"code":"R680546412","companyId":848107,"date":"2019-09-20","paymentDate":"1900-01-01","status":"Committed","type":"SalesInvoice","batchCode":"","currencyCode":"USD","customerUsageType":"","entityUseCode":"","customerVendorCode":"clemente_larson@wisokyhills.co.uk","customerCode":"clemente_larson@wisokyhills.co.uk","exemptNo":"","reconciled":false,"locationCode":"","reportingLocationCode":"","purchaseOrderNo":"R680546412","referenceCode":"R680546412","salespersonCode":"","taxOverrideType":"None","taxOverrideAmount":0.0000,"taxOverrideReason":"","totalAmount":110.0000,"totalExempt":0.0000,"totalDiscount":0.0000,"totalTax":8.8000,"totalTaxable":110.0000,"totalTaxCalculated":8.8000,"adjustmentReason":"PriceAdjusted","adjustmentDescription":"","locked":false,"region":"PA","country":"US","version":2,"softwareVersion":"19.8.1.1","originAddressId":7504989446,"destinationAddressId":7504989446,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0000,"isSellerImporterOfRecord":true,"description":"","email":"","businessIdentificationNo":"","modifiedDate":"2019-09-20T09:13:13.52","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":7935017713,"transactionId":4880581553,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"Product
|
106
|
+
#1 - 3537","destinationAddressId":7504989446,"originAddressId":9504989447,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"SKU-1","lineAmount":10.0000,"quantity":1.0000,"ref1":"","ref2":"","reportingDate":"2019-09-20","revAccount":"","sourcing":"Destination","tax":0.8000,"taxableAmount":10.0000,"taxCalculated":0.8000,"taxCode":"P0000000","taxCodeId":8087,"taxDate":"2019-09-20","taxEngine":"","taxOverrideType":"None","businessIdentificationNo":"","taxOverrideAmount":0.0000,"taxOverrideReason":"","taxIncluded":false,"details":[{"id":11815442897,"transactionLineId":7935017713,"transactionId":4880581553,"addressId":7504989446,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":false,"jurisCode":"42","jurisName":"PENNSYLVANIA","jurisdictionId":49,"signatureCode":"BKTQ","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.060000,"rateRuleId":1457985,"rateSourceId":3,"serCode":"","sourcing":"Destination","tax":0.6000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
107
|
+
STATE TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":0.6000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":10.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":15815442898,"transactionLineId":7935017713,"transactionId":4880581553,"addressId":7504989446,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":false,"jurisCode":"101","jurisName":"PHILADELPHIA","jurisdictionId":2311,"signatureCode":"BMWV","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.020000,"rateRuleId":1458005,"rateSourceId":3,"serCode":"","sourcing":"Destination","tax":0.2000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
108
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":0.2000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":10.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"lineLocationTypes":[{"documentLineLocationTypeId":12956562516,"documentLineId":7935017713,"documentAddressId":9504989447,"locationTypeCode":"ShipFrom"},{"documentLineLocationTypeId":6739504376,"documentLineId":7935017713,"documentAddressId":7504989446,"locationTypeCode":"ShipTo"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0},{"id":9935017713,"transactionId":4880581553,"lineNumber":"FR-762d9442-d9ff-455d-8771-4405d9693be0","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"","destinationAddressId":7504989446,"originAddressId":7504989446,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"","lineAmount":100.0000,"quantity":1.0000,"ref1":"","ref2":"","reportingDate":"2019-09-20","revAccount":"","sourcing":"Origin","tax":8.0000,"taxableAmount":100.0000,"taxCalculated":8.0000,"taxCode":"FR","taxCodeId":10890,"taxDate":"2019-09-20","taxEngine":"","taxOverrideType":"None","businessIdentificationNo":"","taxOverrideAmount":0.0000,"taxOverrideReason":"","taxIncluded":false,"details":[{"id":27824987325,"transactionLineId":9935017713,"transactionId":4880581553,"addressId":7504989446,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":true,"jurisCode":"42","jurisName":"PENNSYLVANIA","jurisdictionId":49,"signatureCode":"BKTQ","stateAssignedNo":"","jurisType":"STA","jurisdictionType":"State","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.060000,"rateRuleId":1457985,"rateSourceId":3,"serCode":"","sourcing":"Origin","tax":6.0000,"taxableAmount":100.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
109
|
+
STATE TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":6.0000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":100.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false},{"id":7815442898,"transactionLineId":9935017713,"transactionId":4880581553,"addressId":7504989446,"country":"US","region":"PA","countyFIPS":"","stateFIPS":"42","exemptAmount":0.0000,"exemptReasonId":4,"inState":true,"jurisCode":"101","jurisName":"PHILADELPHIA","jurisdictionId":2311,"signatureCode":"BMWV","stateAssignedNo":"51","jurisType":"CTY","jurisdictionType":"County","nonTaxableAmount":0.0000,"nonTaxableRuleId":0,"nonTaxableType":"RateRule","rate":0.020000,"rateRuleId":1458005,"rateSourceId":3,"serCode":"","sourcing":"Origin","tax":2.0000,"taxableAmount":100.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
|
110
|
+
COUNTY TAX","taxAuthorityTypeId":45,"taxRegionId":4014900,"taxCalculated":2.0000,"taxOverride":0.0000,"rateType":"General","rateTypeCode":"G","taxableUnits":100.0000,"nonTaxableUnits":0.0000,"exemptUnits":0.0000,"unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"lineLocationTypes":[{"documentLineLocationTypeId":10739504376,"documentLineId":9935017713,"documentAddressId":7504989446,"locationTypeCode":"ShipTo"},{"documentLineLocationTypeId":8739504375,"documentLineId":9935017713,"documentAddressId":7504989446,"locationTypeCode":"ShipFrom"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":7504989446,"transactionId":4880581553,"boundaryLevel":"Address","line1":"822
|
111
|
+
Reed St","line2":"","line3":"","city":"Philadelphia","region":"PA","postalCode":"19147-5736","country":"US","taxRegionId":4014900,"latitude":"39.931676","longitude":"-75.159051"},{"id":9504989447,"transactionId":4880581553,"boundaryLevel":"Address","line1":"1600
|
112
|
+
Pennsylvania Ave Nw","line2":"","line3":"","city":"Washington","region":"DC","postalCode":"20500-0003","country":"US","taxRegionId":949,"latitude":"38.898664","longitude":"-77.036543"}],"locationTypes":[{"documentLocationTypeId":6738535641,"documentId":4880581553,"documentAddressId":7504989446,"locationTypeCode":"ShipTo"},{"documentLocationTypeId":4738535641,"documentId":4880581553,"documentAddressId":7504989446,"locationTypeCode":"ShipFrom"}],"summary":[{"country":"US","region":"PA","jurisType":"State","jurisCode":"42","jurisName":"PENNSYLVANIA","taxAuthorityType":45,"stateAssignedNo":"","taxType":"Sales","taxSubType":"S","taxName":"PA
|
113
|
+
STATE TAX","rateType":"General","taxable":110.00,"rate":0.060000,"tax":6.60,"taxCalculated":6.60,"nonTaxable":0.00,"exemption":0.00},{"country":"US","region":"PA","jurisType":"County","jurisCode":"101","jurisName":"PHILADELPHIA","taxAuthorityType":45,"stateAssignedNo":"51","taxType":"Sales","taxSubType":"S","taxName":"PA
|
114
|
+
COUNTY TAX","rateType":"General","taxable":110.00,"rate":0.020000,"tax":2.20,"taxCalculated":2.20,"nonTaxable":0.00,"exemption":0.00}]}'
|
115
|
+
http_version:
|
116
|
+
recorded_at: Fri, 20 Sep 2019 09:14:43 GMT
|
117
|
+
recorded_with: VCR 4.0.0
|