spree_avatax_official 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +7 -0
  2. data/.env-sample +4 -0
  3. data/.gitignore +22 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +77 -0
  6. data/.travis.yml +78 -0
  7. data/Appraisals +49 -0
  8. data/Gemfile +16 -0
  9. data/LICENSE +26 -0
  10. data/README.md +173 -0
  11. data/Rakefile +21 -0
  12. data/app/controllers/spree/admin/avalara_entity_use_codes_controller.rb +61 -0
  13. data/app/controllers/spree/admin/avatax_pings_controller.rb +19 -0
  14. data/app/controllers/spree/admin/avatax_settings_controller.rb +26 -0
  15. data/app/controllers/spree/admin/users_controller_decorator.rb +27 -0
  16. data/app/helpers/spree_avatax_official/http_helper.rb +17 -0
  17. data/app/helpers/spree_avatax_official/tax_adjustment_label_helper.rb +30 -0
  18. data/app/models/avatax/request_decorator.rb +34 -0
  19. data/app/models/spree_avatax_official/avatax_log.rb +57 -0
  20. data/app/models/spree_avatax_official/calculator/avatax_transaction_calculator.rb +28 -0
  21. data/app/models/spree_avatax_official/configuration.rb +20 -0
  22. data/app/models/spree_avatax_official/entity_use_code.rb +7 -0
  23. data/app/models/spree_avatax_official/has_uuid.rb +22 -0
  24. data/app/models/spree_avatax_official/spree/address_decorator.rb +31 -0
  25. data/app/models/spree_avatax_official/spree/inventory_unit_decorator.rb +11 -0
  26. data/app/models/spree_avatax_official/spree/line_item_decorator.rb +27 -0
  27. data/app/models/spree_avatax_official/spree/order_decorator.rb +91 -0
  28. data/app/models/spree_avatax_official/spree/refund_decorator.rb +22 -0
  29. data/app/models/spree_avatax_official/spree/shipment_decorator.rb +25 -0
  30. data/app/models/spree_avatax_official/spree/tax_category_decorator.rb +14 -0
  31. data/app/models/spree_avatax_official/spree/user_decorator.rb +11 -0
  32. data/app/models/spree_avatax_official/transaction.rb +27 -0
  33. data/app/overrides/spree/admin/shared/sub_menu/_configuration.rb +10 -0
  34. data/app/overrides/spree/admin/sidebar.rb +14 -0
  35. data/app/presenters/spree_avatax_official/address_presenter.rb +40 -0
  36. data/app/presenters/spree_avatax_official/item_presenter.rb +92 -0
  37. data/app/presenters/spree_avatax_official/ship_to_address_presenter.rb +22 -0
  38. data/app/presenters/spree_avatax_official/transactions/adjust_presenter.rb +31 -0
  39. data/app/presenters/spree_avatax_official/transactions/create_presenter.rb +80 -0
  40. data/app/presenters/spree_avatax_official/transactions/full_refund_presenter.rb +32 -0
  41. data/app/presenters/spree_avatax_official/transactions/partial_refund_presenter.rb +46 -0
  42. data/app/services/spree_avatax_official/address/validate.rb +27 -0
  43. data/app/services/spree_avatax_official/base.rb +71 -0
  44. data/app/services/spree_avatax_official/create_tax_adjustments_service.rb +133 -0
  45. data/app/services/spree_avatax_official/generate_transaction_cache_key_service.rb +94 -0
  46. data/app/services/spree_avatax_official/get_tax_service.rb +20 -0
  47. data/app/services/spree_avatax_official/settings/update_service.rb +36 -0
  48. data/app/services/spree_avatax_official/transactions/adjust_service.rb +36 -0
  49. data/app/services/spree_avatax_official/transactions/create_service.rb +47 -0
  50. data/app/services/spree_avatax_official/transactions/find_order_transaction_service.rb +23 -0
  51. data/app/services/spree_avatax_official/transactions/full_refund_service.rb +36 -0
  52. data/app/services/spree_avatax_official/transactions/get_by_code_service.rb +32 -0
  53. data/app/services/spree_avatax_official/transactions/partial_refund_service.rb +33 -0
  54. data/app/services/spree_avatax_official/transactions/refund_service.rb +87 -0
  55. data/app/services/spree_avatax_official/transactions/void_service.rb +28 -0
  56. data/app/services/spree_avatax_official/utilities/ping_service.rb +9 -0
  57. data/app/views/spree/admin/avalara_entity_use_codes/_form.html.erb +20 -0
  58. data/app/views/spree/admin/avalara_entity_use_codes/edit.html.erb +12 -0
  59. data/app/views/spree/admin/avalara_entity_use_codes/index.html.erb +35 -0
  60. data/app/views/spree/admin/avalara_entity_use_codes/new.html.erb +12 -0
  61. data/app/views/spree/admin/avatax_settings/edit.html.erb +99 -0
  62. data/app/views/spree/admin/users/avalara_information.html.erb +39 -0
  63. data/app/views/spree/admin/zones/_form.html.erb +58 -0
  64. data/bin/rails +8 -0
  65. data/config/initializers/spree_permitted_attributes.rb +5 -0
  66. data/config/locales/en.yml +40 -0
  67. data/config/routes.rb +15 -0
  68. data/db/migrate/20190118155953_add_exemption_number_to_spree_users.rb +7 -0
  69. data/db/migrate/20190118160653_create_spree_avalara_entity_use_codes.rb +11 -0
  70. data/db/migrate/20190118161318_add_avalara_entity_use_code_reference_to_users.rb +7 -0
  71. data/db/migrate/20190118162345_add_vat_id_to_spree_users.rb +7 -0
  72. data/db/migrate/20190122154119_create_spree_avatax_official_transactions.rb +10 -0
  73. data/db/migrate/20190201123706_add_tax_code_to_spree_tax_categories.rb +7 -0
  74. data/db/migrate/20190208130136_add_avatax_company_code_to_spree_stores.rb +8 -0
  75. data/db/migrate/20190225145808_add_uuid_to_spree_line_items_and_spree_shipments.rb +13 -0
  76. data/db/migrate/20190329071439_add_included_in_price_to_spree_zones.rb +5 -0
  77. data/db/migrate/20191001085458_remove_spree_avalara_entity_use_codes_table.rb +12 -0
  78. data/db/migrate/20191001092353_create_spree_avatax_official_entity_use_codes_table.rb +18 -0
  79. data/db/seeds.rb +1 -0
  80. data/gemfiles/spree_3_1.gemfile +16 -0
  81. data/gemfiles/spree_3_7.gemfile +13 -0
  82. data/gemfiles/spree_4_0.gemfile +14 -0
  83. data/gemfiles/spree_4_1.gemfile +14 -0
  84. data/gemfiles/spree_4_2.gemfile +14 -0
  85. data/gemfiles/spree_master.gemfile +14 -0
  86. data/lib/generators/spree_avatax_official/install/install_generator.rb +38 -0
  87. data/lib/generators/spree_avatax_official/install/templates/config/initializers/spree_avatax_official.rb +9 -0
  88. data/lib/spree_avatax_official.rb +5 -0
  89. data/lib/spree_avatax_official/engine.rb +32 -0
  90. data/lib/spree_avatax_official/factories.rb +9 -0
  91. data/lib/spree_avatax_official/seeder.rb +51 -0
  92. data/lib/spree_avatax_official/version.rb +11 -0
  93. data/lib/tasks/load_seeds.rake +6 -0
  94. data/spec/.rubocop.yml +36 -0
  95. data/spec/factories/canada_address_factory.rb +23 -0
  96. data/spec/factories/europe_address_factory.rb +22 -0
  97. data/spec/factories/spree/avatax_global_zone_factory.rb +16 -0
  98. data/spec/factories/spree/avatax_order_factory.rb +69 -0
  99. data/spec/factories/spree/avatax_shipment_factory.rb +31 -0
  100. data/spec/factories/spree/avatax_shipping_method_factory.rb +35 -0
  101. data/spec/factories/spree/avatax_tax_category_factory.rb +17 -0
  102. data/spec/factories/spree/avatax_tax_rate_factory.rb +23 -0
  103. data/spec/factories/spree/line_item_factory.rb +13 -0
  104. data/spec/factories/spree/promotion_factory.rb +35 -0
  105. data/spec/factories/spree/shipping_calculator_factory.rb +10 -0
  106. data/spec/factories/spree_avatax_official/avalara_entity_use_code_factory.rb +7 -0
  107. data/spec/factories/spree_avatax_official/calculator/avatax_transaction_calculator_factory.rb +3 -0
  108. data/spec/factories/spree_avatax_official/transaction_factory.rb +12 -0
  109. data/spec/factories/usa_address_factory.rb +34 -0
  110. data/spec/features/admin/edit_avatax_settings_spec.rb +11 -0
  111. data/spec/features/admin/update_avatax_settings_spec.rb +200 -0
  112. data/spec/features/spree/admin/avalara_entity_use_codes_controller_spec.rb +71 -0
  113. data/spec/features/spree/admin/users_controller_spec.rb +34 -0
  114. data/spec/helpers/spree_avatax_official/tax_adjustment_label_helper_spec.rb +81 -0
  115. data/spec/lib/spree_avatax_official/seeder_spec.rb +23 -0
  116. data/spec/models/spree/line_item_spec.rb +76 -0
  117. data/spec/models/spree/order_spec.rb +210 -0
  118. data/spec/models/spree/shipment_spec.rb +11 -0
  119. data/spec/models/spree_avatax_official/avatax_log_spec.rb +87 -0
  120. data/spec/models/spree_avatax_official/entity_use_code_spec.rb +9 -0
  121. data/spec/models/spree_avatax_official/has_uuid_spec.rb +21 -0
  122. data/spec/models/spree_avatax_official/spree/refund_decorator_spec.rb +31 -0
  123. data/spec/models/spree_avatax_official/transaction_spec.rb +9 -0
  124. data/spec/presenters/spree_avatax_official/address_presenter_spec.rb +53 -0
  125. data/spec/presenters/spree_avatax_official/item_presenter_spec.rb +159 -0
  126. data/spec/presenters/spree_avatax_official/ship_to_address_presenter_spec.rb +34 -0
  127. data/spec/presenters/spree_avatax_official/transactions/adjust_presenter_spec.rb +39 -0
  128. data/spec/presenters/spree_avatax_official/transactions/create_presenter_spec.rb +110 -0
  129. data/spec/presenters/spree_avatax_official/transactions/full_refund_presenter_spec.rb +30 -0
  130. data/spec/presenters/spree_avatax_official/transactions/partial_refund_presenter_spec.rb +48 -0
  131. data/spec/services/spree_avatax_official/address/validate_spec.rb +47 -0
  132. data/spec/services/spree_avatax_official/create_tax_adjustments_service_spec.rb +444 -0
  133. data/spec/services/spree_avatax_official/generate_transaction_cache_key_service_spec.rb +29 -0
  134. data/spec/services/spree_avatax_official/get_tax_service_spec.rb +33 -0
  135. data/spec/services/spree_avatax_official/settings/update_service_spec.rb +131 -0
  136. data/spec/services/spree_avatax_official/transactions/adjust_service_spec.rb +55 -0
  137. data/spec/services/spree_avatax_official/transactions/create_service_spec.rb +262 -0
  138. data/spec/services/spree_avatax_official/transactions/find_order_transaction_service_spec.rb +38 -0
  139. data/spec/services/spree_avatax_official/transactions/full_refund_service_spec.rb +24 -0
  140. data/spec/services/spree_avatax_official/transactions/get_by_code_service_spec.rb +74 -0
  141. data/spec/services/spree_avatax_official/transactions/partial_refund_service_spec.rb +33 -0
  142. data/spec/services/spree_avatax_official/transactions/refund_service_spec.rb +65 -0
  143. data/spec/services/spree_avatax_official/transactions/void_service_spec.rb +33 -0
  144. data/spec/services/spree_avatax_official/utilities/ping_service_spec.rb +35 -0
  145. data/spec/spec_helper.rb +104 -0
  146. data/spec/support/avatax.rb +15 -0
  147. data/spec/support/capybara.rb +21 -0
  148. data/spec/support/database_cleaner.rb +25 -0
  149. data/spec/support/factory_bot.rb +9 -0
  150. data/spec/support/vcr.rb +17 -0
  151. 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
  152. 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
  153. data/spec/vcr/spree_avatax_official/address/validate_failure.yml +46 -0
  154. data/spec/vcr/spree_avatax_official/address/validate_success.yml +43 -0
  155. data/spec/vcr/spree_avatax_official/address/zipcode_failure.yml +45 -0
  156. data/spec/vcr/spree_avatax_official/create_tax_adjustments/californian_stock_location.yml +60 -0
  157. data/spec/vcr/spree_avatax_official/create_tax_adjustments/completed_order_line_item_update.yml +62 -0
  158. data/spec/vcr/spree_avatax_official/create_tax_adjustments/order_adjustment_promotion.yml +61 -0
  159. data/spec/vcr/spree_avatax_official/create_tax_adjustments/shipment_adjustment_promotion.yml +60 -0
  160. data/spec/vcr/spree_avatax_official/create_tax_adjustments/simple_completed_order.yml +60 -0
  161. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/line_item_adjustment_promotion.yml +59 -0
  162. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/line_item_and_shipment.yml +60 -0
  163. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/multiple_line_items_multiple_quantity.yml +59 -0
  164. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_excluded/single_line_item.yml +55 -0
  165. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/line_item_adjustment_promotion.yml +59 -0
  166. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/line_item_and_shipment.yml +60 -0
  167. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/multiple_line_items_multiple_quantity.yml +59 -0
  168. data/spec/vcr/spree_avatax_official/create_tax_adjustments/tax_included/single_line_item.yml +55 -0
  169. data/spec/vcr/spree_avatax_official/create_tax_adjustments/with_incorrect_address.yml +97 -0
  170. data/spec/vcr/spree_avatax_official/get_tax/error.yml +49 -0
  171. data/spec/vcr/spree_avatax_official/get_tax/sucsess.yml +55 -0
  172. data/spec/vcr/spree_avatax_official/transactions/adjust/failure.yml +101 -0
  173. data/spec/vcr/spree_avatax_official/transactions/adjust/invoice_order_success.yml +117 -0
  174. data/spec/vcr/spree_avatax_official/transactions/create/complete_order_success.yml +60 -0
  175. data/spec/vcr/spree_avatax_official/transactions/create/gst/canada_to_canada.yml +55 -0
  176. data/spec/vcr/spree_avatax_official/transactions/create/gst/canada_to_us.yml +57 -0
  177. data/spec/vcr/spree_avatax_official/transactions/create/gst/us_to_canada.yml +56 -0
  178. data/spec/vcr/spree_avatax_official/transactions/create/invoice_order_success.yml +60 -0
  179. data/spec/vcr/spree_avatax_official/transactions/create/sales_order_success.yml +60 -0
  180. data/spec/vcr/spree_avatax_official/transactions/create/timeout.yml +54 -0
  181. data/spec/vcr/spree_avatax_official/transactions/create/vat/europe_to_europe.yml +57 -0
  182. data/spec/vcr/spree_avatax_official/transactions/create/vat/europe_to_us.yml +57 -0
  183. data/spec/vcr/spree_avatax_official/transactions/create/vat/us_to_europe.yml +58 -0
  184. data/spec/vcr/spree_avatax_official/transactions/get_by_code/error.yml +44 -0
  185. data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_custom_code_success.yml +49 -0
  186. data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_number_success.yml +49 -0
  187. data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_with_type_success.yml +48 -0
  188. data/spec/vcr/spree_avatax_official/transactions/get_by_code/order_without_type_success.yml +48 -0
  189. data/spec/vcr/spree_avatax_official/transactions/refund/full_refund_success.yml +114 -0
  190. data/spec/vcr/spree_avatax_official/transactions/refund/partial_refund_success.yml +58 -0
  191. data/spec/vcr/spree_avatax_official/transactions/refund/partial_refund_with_refund_success.yml +58 -0
  192. data/spec/vcr/spree_avatax_official/transactions/void/success.yml +112 -0
  193. data/spec/vcr/spree_avatax_official/utilities/ping.yml +41 -0
  194. data/spec/vcr/spree_avatax_official/utilities/ping_unauthorized.yml +42 -0
  195. data/spec/vcr/spree_line_item/update_tax_charge/decrease_quantity.yml +55 -0
  196. data/spec/vcr/spree_line_item/update_tax_charge/increase_quantity.yml +55 -0
  197. data/spec/vcr/spree_order/california_order.yml +67 -0
  198. data/spec/vcr/spree_order/complete_order.yml +60 -0
  199. data/spec/vcr/spree_order/order_transition_to_completed.yml +112 -0
  200. data/spec/vcr/spree_order/order_with_line_item_adjustment.yml +57 -0
  201. data/spec/vcr/spree_order/order_with_order_adjustment.yml +57 -0
  202. data/spec/vcr/spree_order/simple_order_with_single_line_item.yml +55 -0
  203. data/spec/vcr/spree_order/simple_order_with_single_line_item_and_shipment.yml +57 -0
  204. data/spec/vcr/spree_order/update_tax_charge/create_line_item.yml +55 -0
  205. data/spree_avatax_official.gemspec +43 -0
  206. metadata +486 -0
@@ -0,0 +1,60 @@
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":"R732713364","referenceCode":"R732713364","companyCode":"test1","date":"2019-09-20","customerCode":"roxana@crooks.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
+ #46 - 5579","itemCode":"SKU-46"},{"number":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","quantity":1,"amount":"0.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R732713364"}'
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:03: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/0"
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Serverduration:
45
+ - '00:00:00.0802926'
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"id":0,"code":"R732713364","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"roxana@crooks.co.uk","customerCode":"roxana@crooks.co.uk","reconciled":false,"purchaseOrderNo":"R732713364","referenceCode":"R732713364","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:59.364968Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
49
+ #46 - 5579","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-46","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
50
+ 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
51
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.2,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":false,"lineAmount":0.0,"quantity":1.0,"reportingDate":"2019-09-20","tax":0.0,"taxableAmount":0.0,"taxCalculated":0.0,"taxCode":"FR","taxCodeId":10890,"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.0,"taxableAmount":0.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
52
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":0.0,"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.0,"taxableAmount":0.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.0,"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"},{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"1600
55
+ Pennsylvania Ave NW","line2":"","line3":"","city":"Washington","region":"PA","postalCode":"20500","country":"US","taxRegionId":949,"latitude":"38.898664","longitude":"-77.036543"}],"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":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
57
+ COUNTY TAX","rateType":"General","taxable":10.0,"rate":0.020000,"tax":0.2,"taxCalculated":0.2,"nonTaxable":0.0,"exemption":0.0}]}'
58
+ http_version:
59
+ recorded_at: Fri, 20 Sep 2019 09:03:42 GMT
60
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,60 @@
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":"R966011343","referenceCode":"R966011343","companyCode":"test1","date":"2019-09-20","customerCode":"arden_medhurst@oconnellgutmann.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":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
+ #22 - 831","itemCode":"SKU-22"},{"number":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","quantity":1,"amount":"10.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R966011343"}'
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 10:07:12 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/8880602847"
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Serverduration:
45
+ - '00:00:00.1119499'
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"id":8880602847,"code":"R966011343","companyId":848107,"date":"2019-09-20","status":"Committed","type":"SalesInvoice","batchCode":"","currencyCode":"USD","customerUsageType":"","entityUseCode":"","customerVendorCode":"arden_medhurst@oconnellgutmann.name","customerCode":"arden_medhurst@oconnellgutmann.name","exemptNo":"","reconciled":false,"locationCode":"","reportingLocationCode":"","purchaseOrderNo":"R966011343","referenceCode":"R966011343","salespersonCode":"","taxOverrideType":"None","taxOverrideAmount":0.0000,"taxOverrideReason":"","totalAmount":20.0000,"totalExempt":0.0000,"totalDiscount":0.0000,"totalTax":1.6000,"totalTaxable":20.0000,"totalTaxCalculated":1.6000,"adjustmentReason":"NotAdjusted","adjustmentDescription":"","locked":false,"region":"PA","country":"US","version":1,"softwareVersion":"19.8.1.1","originAddressId":5505026005,"destinationAddressId":5505026005,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0000,"isSellerImporterOfRecord":true,"description":"","email":"","businessIdentificationNo":"","modifiedDate":"2019-09-20T10:05:42.017","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":5935059374,"transactionId":8880602847,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"Product
49
+ #22 - 831","destinationAddressId":5505026005,"originAddressId":7505026005,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"SKU-22","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":15815510611,"transactionLineId":5935059374,"transactionId":8880602847,"addressId":5505026005,"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":27825055038,"transactionLineId":5935059374,"transactionId":8880602847,"addressId":5505026005,"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":8739589821,"documentLineId":5935059374,"documentAddressId":5505026005,"locationTypeCode":"ShipTo"},{"documentLineLocationTypeId":6739589822,"documentLineId":5935059374,"documentAddressId":7505026005,"locationTypeCode":"ShipFrom"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0},{"id":7935059375,"transactionId":8880602847,"lineNumber":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","boundaryOverrideId":0,"customerUsageType":"","entityUseCode":"","description":"","destinationAddressId":5505026005,"originAddressId":5505026005,"discountAmount":0.0000,"discountTypeId":0,"exemptAmount":0.0000,"exemptCertId":0,"exemptNo":"","isItemTaxable":true,"isSSTP":true,"itemCode":"","lineAmount":10.0000,"quantity":1.0000,"ref1":"","ref2":"","reportingDate":"2019-09-20","revAccount":"","sourcing":"Origin","tax":0.8000,"taxableAmount":10.0000,"taxCalculated":0.8000,"taxCode":"FR","taxCodeId":10890,"taxDate":"2019-09-20","taxEngine":"","taxOverrideType":"None","businessIdentificationNo":"","taxOverrideAmount":0.0000,"taxOverrideReason":"","taxIncluded":false,"details":[{"id":7815510611,"transactionLineId":7935059375,"transactionId":8880602847,"addressId":5505026005,"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":0.6000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
52
+ 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":9815510610,"transactionLineId":7935059375,"transactionId":8880602847,"addressId":5505026005,"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":0.2000,"taxableAmount":10.0000,"taxType":"Sales","taxSubTypeId":"S","taxTypeGroupId":"SalesAndUse","taxName":"PA
53
+ 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":12956647963,"documentLineId":7935059375,"documentAddressId":5505026005,"locationTypeCode":"ShipTo"},{"documentLineLocationTypeId":10739589822,"documentLineId":7935059375,"documentAddressId":5505026005,"locationTypeCode":"ShipFrom"}],"hsCode":"","costInsuranceFreight":0.0000,"vatCode":"","vatNumberTypeId":0}],"addresses":[{"id":5505026005,"transactionId":8880602847,"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":7505026005,"transactionId":8880602847,"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":10942350797,"documentId":8880602847,"documentAddressId":5505026005,"locationTypeCode":"ShipTo"},{"documentLocationTypeId":8738569991,"documentId":8880602847,"documentAddressId":5505026005,"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":20.00,"rate":0.060000,"tax":1.20,"taxCalculated":1.20,"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":20.00,"rate":0.020000,"tax":0.40,"taxCalculated":0.40,"nonTaxable":0.00,"exemption":0.00}]}'
58
+ http_version:
59
+ recorded_at: Fri, 20 Sep 2019 10:07:12 GMT
60
+ recorded_with: VCR 4.0.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":"R015994840","referenceCode":"R015994840","companyCode":"test1","date":"2019-09-20","customerCode":"pok_funk@stiedemannlegros.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":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":4,"amount":"30.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
11
+ #42 - 5996","itemCode":"SKU-42"},{"number":"LI-bf57f52a-2ab3-44bc-8be3-8f99ecccd196","quantity":3,"amount":"20.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
12
+ #43 - 7113","itemCode":"SKU-43"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R015994840"}'
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:39 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.0643289'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"id":0,"code":"R015994840","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"pok_funk@stiedemannlegros.biz","customerCode":"pok_funk@stiedemannlegros.biz","reconciled":false,"purchaseOrderNo":"R015994840","referenceCode":"R015994840","totalAmount":50.0,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":4.0,"totalTaxable":50.0,"totalTaxCalculated":4.0,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:40.7053673Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
48
+ #42 - 5996","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-42","lineAmount":30.0,"quantity":4.0,"reportingDate":"2019-09-20","tax":2.4,"taxableAmount":30.0,"taxCalculated":2.4,"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":1.8,"taxableAmount":30.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
49
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.8,"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.6,"taxableAmount":30.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
50
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.6,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"LI-bf57f52a-2ab3-44bc-8be3-8f99ecccd196","description":"Product
51
+ #43 - 7113","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-43","lineAmount":20.0,"quantity":3.0,"reportingDate":"2019-09-20","tax":1.6,"taxableAmount":20.0,"taxCalculated":1.6,"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":1.2,"taxableAmount":20.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
52
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.2,"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.4,"taxableAmount":20.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.4,"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":50.0,"rate":0.060000,"tax":3.0,"taxCalculated":3.0,"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":50.0,"rate":0.020000,"tax":1.0,"taxCalculated":1.0,"nonTaxable":0.0,"exemption":0.0}]}'
57
+ http_version:
58
+ recorded_at: Fri, 20 Sep 2019 09:03:39 GMT
59
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,60 @@
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":"R086587270","referenceCode":"R086587270","companyCode":"test1","date":"2019-09-20","customerCode":"zoe.daugherty@daniel.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":[{"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
+ #35 - 4360","itemCode":"SKU-35"},{"number":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","quantity":1,"amount":"5.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R086587270"}'
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:03:30 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/0"
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Serverduration:
45
+ - '00:00:00.0828752'
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"id":0,"code":"R086587270","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"zoe.daugherty@daniel.biz","customerCode":"zoe.daugherty@daniel.biz","reconciled":false,"purchaseOrderNo":"R086587270","referenceCode":"R086587270","totalAmount":15.0,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":1.2,"totalTaxable":15.0,"totalTaxCalculated":1.2,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:47.797996Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
49
+ #35 - 4360","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-35","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
50
+ 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
51
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.2,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"lineAmount":5.0,"quantity":1.0,"reportingDate":"2019-09-20","tax":0.4,"taxableAmount":5.0,"taxCalculated":0.4,"taxCode":"FR","taxCodeId":10890,"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.3,"taxableAmount":5.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
52
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":0.3,"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.1,"taxableAmount":5.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.1,"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"},{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"1600
55
+ Pennsylvania Ave NW","line2":"","line3":"","city":"Washington","region":"PA","postalCode":"20500","country":"US","taxRegionId":949,"latitude":"38.898664","longitude":"-77.036543"}],"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":15.0,"rate":0.060000,"tax":0.9,"taxCalculated":0.9,"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
57
+ COUNTY TAX","rateType":"General","taxable":15.0,"rate":0.020000,"tax":0.3,"taxCalculated":0.3,"nonTaxable":0.0,"exemption":0.0}]}'
58
+ http_version:
59
+ recorded_at: Fri, 20 Sep 2019 09:03:30 GMT
60
+ recorded_with: VCR 4.0.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":"R764723253","referenceCode":"R764723253","companyCode":"test1","date":"2019-09-20","customerCode":"asha.von@schmitt.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":2,"amount":"20.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
11
+ #51 - 496","itemCode":"SKU-51"},{"number":"LI-50f0c7ba-0c5f-4479-a24a-3de192354004","quantity":3,"amount":"30.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":false,"description":"Product
12
+ #52 - 5504","itemCode":"SKU-52"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R764723253"}'
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:48 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.0619305'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"id":0,"code":"R764723253","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"asha.von@schmitt.com","customerCode":"asha.von@schmitt.com","reconciled":false,"purchaseOrderNo":"R764723253","referenceCode":"R764723253","totalAmount":50.0,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":4.0,"totalTaxable":50.0,"totalTaxCalculated":4.0,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:45.0704497Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
48
+ #51 - 496","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-51","lineAmount":20.0,"quantity":2.0,"reportingDate":"2019-09-20","tax":1.6,"taxableAmount":20.0,"taxCalculated":1.6,"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":1.2,"taxableAmount":20.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
49
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.2,"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.4,"taxableAmount":20.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
50
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.4,"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
+ #52 - 5504","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-52","lineAmount":30.0,"quantity":3.0,"reportingDate":"2019-09-20","tax":2.4,"taxableAmount":30.0,"taxCalculated":2.4,"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":1.8,"taxableAmount":30.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
52
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":1.8,"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.6,"taxableAmount":30.0,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.6,"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":50.0,"rate":0.060000,"tax":3.0,"taxCalculated":3.0,"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":50.0,"rate":0.020000,"tax":1.0,"taxCalculated":1.0,"nonTaxable":0.0,"exemption":0.0}]}'
57
+ http_version:
58
+ recorded_at: Fri, 20 Sep 2019 09:03:48 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":"R547925177","referenceCode":"R547925177","companyCode":"test1","date":"2019-09-20","customerCode":"janey@sawayn.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":{},"taxIncluded":false,"description":"Product
11
+ #48 - 1652","itemCode":"SKU-48"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R547925177"}'
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:44 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.0626461'
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"id":0,"code":"R547925177","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"janey@sawayn.co.uk","customerCode":"janey@sawayn.co.uk","reconciled":false,"purchaseOrderNo":"R547925177","referenceCode":"R547925177","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:04:01.9071852Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
47
+ #48 - 1652","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-48","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:45 GMT
55
+ recorded_with: VCR 4.0.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":"R906837033","referenceCode":"R906837033","companyCode":"test1","date":"2019-09-20","customerCode":"frankie@keebler.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":4,"amount":"30.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":true,"description":"Product
11
+ #40 - 971","itemCode":"SKU-40"},{"number":"LI-bf57f52a-2ab3-44bc-8be3-8f99ecccd196","quantity":3,"amount":"20.0","taxCode":"P0000000","discounted":false,"addresses":{},"taxIncluded":true,"description":"Product
12
+ #41 - 4208","itemCode":"SKU-41"}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R906837033"}'
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:37 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.0595910'
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"id":0,"code":"R906837033","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"frankie@keebler.co.uk","customerCode":"frankie@keebler.co.uk","reconciled":false,"purchaseOrderNo":"R906837033","referenceCode":"R906837033","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:39.0269817Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
48
+ #40 - 971","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-40","lineAmount":27.78,"quantity":4.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
49
+ 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
50
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.55,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"LI-bf57f52a-2ab3-44bc-8be3-8f99ecccd196","description":"Product
51
+ #41 - 4208","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-41","lineAmount":18.52,"quantity":3.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
52
+ 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
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.37,"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:37 GMT
59
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,60 @@
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":"R967088543","referenceCode":"R967088543","companyCode":"test1","date":"2019-09-20","customerCode":"stacia@sanfordreinger.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":{"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":true,"description":"Product
13
+ #36 - 5913","itemCode":"SKU-36"},{"number":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","quantity":1,"amount":"5.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":true}],"commit":false,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R967088543"}'
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:03:32 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/0"
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ Serverduration:
45
+ - '00:00:00.0844776'
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"id":0,"code":"R967088543","companyId":848107,"date":"2019-09-20","paymentDate":"2019-09-20","status":"Temporary","type":"SalesOrder","currencyCode":"USD","customerVendorCode":"stacia@sanfordreinger.info","customerCode":"stacia@sanfordreinger.info","reconciled":false,"purchaseOrderNo":"R967088543","referenceCode":"R967088543","totalAmount":13.89,"totalExempt":0.0,"totalDiscount":0.0,"totalTax":1.11,"totalTaxable":13.89,"totalTaxCalculated":1.11,"adjustmentReason":"NotAdjusted","locked":false,"version":1,"exchangeRateEffectiveDate":"2019-09-20","exchangeRate":1.0,"modifiedDate":"2019-09-20T09:03:33.7582101Z","modifiedUserId":356147,"taxDate":"2019-09-20T00:00:00","lines":[{"id":0,"transactionId":0,"lineNumber":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","description":"Product
49
+ #36 - 5913","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"itemCode":"SKU-36","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
50
+ 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
51
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.18,"rateType":"General","rateTypeCode":"G","unitOfBasis":"PerCurrencyUnit","isNonPassThru":false}],"nonPassthroughDetails":[],"hsCode":"","costInsuranceFreight":0.0,"vatCode":"","vatNumberTypeId":0},{"id":0,"transactionId":0,"lineNumber":"FR-6a9efefa-0c6c-4e63-ab43-f43f1d7b2e22","discountAmount":0.0,"exemptAmount":0.0,"exemptCertId":0,"isItemTaxable":true,"lineAmount":4.63,"quantity":1.0,"reportingDate":"2019-09-20","tax":0.37,"taxableAmount":4.63,"taxCalculated":0.37,"taxCode":"FR","taxCodeId":10890,"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.28,"taxableAmount":4.63,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
52
+ STATE TAX","taxAuthorityTypeId":45,"taxCalculated":0.28,"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.09,"taxableAmount":4.63,"taxType":"Sales","taxSubTypeId":"S","taxName":"PA
53
+ COUNTY TAX","taxAuthorityTypeId":45,"taxCalculated":0.09,"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"},{"id":0,"transactionId":0,"boundaryLevel":"Address","line1":"1600
55
+ Pennsylvania Ave NW","line2":"","line3":"","city":"Washington","region":"PA","postalCode":"20500","country":"US","taxRegionId":949,"latitude":"38.898664","longitude":"-77.036543"}],"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":13.89,"rate":0.060000,"tax":0.84,"taxCalculated":0.84,"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
57
+ COUNTY TAX","rateType":"General","taxable":13.89,"rate":0.020000,"tax":0.27,"taxCalculated":0.27,"nonTaxable":0.0,"exemption":0.0}]}'
58
+ http_version:
59
+ recorded_at: Fri, 20 Sep 2019 09:03:32 GMT
60
+ recorded_with: VCR 4.0.0