avatax 23.6.1 → 23.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 495850eb2c0d245e185756aae4d2753b1cb2a07e18a88fc5ea9790f5323fdb9c
4
- data.tar.gz: ea3832cdc0f463452416d74ecd061ff3cb81a5bafea0e8509ac421293f6a672f
3
+ metadata.gz: cc4803df5ab046ed468223f5f52dea72fde1fe733b21e7a704b8a4771a6ebed6
4
+ data.tar.gz: 87be0672dee32b9357777eb907df5a99e3257dcf2bc69ad4d1654b30148e7f95
5
5
  SHA512:
6
- metadata.gz: acd15ea0c82cfba6b5ac8e3c202c8df7565f0e3c0fc19920ef5835ebe46e5280a58d27b98ee48fcb8c0e0cda89f99783beeae01996dc46cfc790bb27b3bb5897
7
- data.tar.gz: ee8671a5783506adaaab420c139d685db9eaf299f8128dd4da902b51355fb7744c2752105b344ab452cbd246232b1e7fa12567bc9c901867cb06a9403eabefac
6
+ metadata.gz: e0b974e2df3cc9302313f7647958b43366a76f908b4625a374da1781faa895b84cd839f3161a07f7141c9b04e7e48c0fc75469a0fc27676473b6438ba206fd64
7
+ data.tar.gz: e5f6cf5f7c731b4fe7aa52d82054584d088a3781dbbf96875ebfb25b22527f52a86d2d358ac88a796d28ba95d84934a9515920af50bc5fcd61548d19fa94ba00
data/avatax.gemspec CHANGED
@@ -5,7 +5,6 @@ Gem::Specification.new do |s|
5
5
  s.add_development_dependency('rspec', '~> 3.5.0')
6
6
  s.add_development_dependency('webmock', '>= 2.0.0')
7
7
  s.add_runtime_dependency('faraday', '>= 0.10')
8
- s.add_runtime_dependency('faraday_middleware', '>= 0.10')
9
8
  s.add_runtime_dependency('multi_json', '>= 1.0.3')
10
9
  s.add_runtime_dependency('activesupport', '>= 6.1.7')
11
10
  s.authors = ["Marcus Vorwaller"]
@@ -726,7 +726,7 @@ module AvaTax
726
726
  # This list of parameters is available for use when configuring your transaction.
727
727
  # Some parameters are only available for use if you have subscribed to certain features of AvaTax.
728
728
  # Swagger Name: AvaTaxClient
729
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* values
729
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* values, valueDescriptions
730
730
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
731
731
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
732
732
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -3,6 +3,25 @@ module AvaTax
3
3
  module TaxRules
4
4
 
5
5
 
6
+ # Create new Country Coefficients. If already exist update them.
7
+ #
8
+ # Create one or more Country Coefficients for particular country.
9
+ #
10
+ # We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease
11
+ # a calculation for a line based on the tax-subtype and Country of destination for a transaction.
12
+ #
13
+ # This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax
14
+ # Calculated by AvaTax.
15
+ #
16
+ # Make sure to use the same API to update the country coefficients that is already present in the database.
17
+ # This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable
18
+ # to the newer transactions.
19
+ # Swagger Name: AvaTaxClient
20
+ # @param model [Object] The Country Coefficients for specific country you wish to create.
21
+ # @return [CountryCoefficientsResponseModel[]]
22
+ def create_country_coefficients(model) path = "/api/v2/countryCoefficients"
23
+ put(path, model, {}, AvaTax::VERSION) end
24
+
6
25
  # Create a new tax rule
7
26
  #
8
27
  # Create one or more custom tax rules attached to this company.
@@ -81,6 +100,23 @@ module AvaTax
81
100
  def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
82
101
  get(path, {}, AvaTax::VERSION) end
83
102
 
103
+ # Retrieve country coefficients for specific country
104
+ #
105
+ # Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country.
106
+ #
107
+ # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
108
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
109
+ # Swagger Name: AvaTaxClient
110
+ # @param country [String] Country for which data need to be pulled for.
111
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId
112
+ # @param include [String] A comma separated list of additional data to retrieve.
113
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
114
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
115
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
116
+ # @return [FetchResult]
117
+ def list_country_coefficients(country, options={}) path = "/api/v2/#{country}/CountryCoefficients"
118
+ get(path, options, AvaTax::VERSION) end
119
+
84
120
  # Retrieve tax rules for this company
85
121
  #
86
122
  # List all taxrule objects attached to this company.
@@ -19,6 +19,7 @@ module AvaTax
19
19
  #
20
20
  # * Lines
21
21
  # * Details (implies lines)
22
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
22
23
  # * Summary (implies details)
23
24
  # * Addresses
24
25
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -55,6 +56,7 @@ module AvaTax
55
56
  #
56
57
  # * Lines
57
58
  # * Details (implies lines)
59
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
58
60
  # * Summary (implies details)
59
61
  # * Addresses
60
62
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -196,6 +198,7 @@ module AvaTax
196
198
  #
197
199
  # * Lines
198
200
  # * Details (implies lines)
201
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
199
202
  # * Summary (implies details)
200
203
  # * Addresses
201
204
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -241,6 +244,7 @@ module AvaTax
241
244
  #
242
245
  # * Lines
243
246
  # * Details (implies lines)
247
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
244
248
  # * Summary (implies details)
245
249
  # * Addresses
246
250
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -293,6 +297,7 @@ module AvaTax
293
297
  #
294
298
  # * Lines
295
299
  # * Details (implies lines)
300
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
296
301
  # * Summary (implies details)
297
302
  # * Addresses
298
303
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -348,6 +353,7 @@ module AvaTax
348
353
  #
349
354
  # * Lines
350
355
  # * Details (implies lines)
356
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
351
357
  # * Summary (implies details)
352
358
  # * Addresses
353
359
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -386,6 +392,7 @@ module AvaTax
386
392
  #
387
393
  # * Lines
388
394
  # * Details (implies lines)
395
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
389
396
  # * Summary (implies details)
390
397
  # * Addresses
391
398
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -432,6 +439,7 @@ module AvaTax
432
439
  #
433
440
  # * Lines
434
441
  # * Details (implies lines)
442
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
435
443
  # * Summary (implies details)
436
444
  # * Addresses
437
445
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -496,6 +504,7 @@ module AvaTax
496
504
  #
497
505
  # * Lines
498
506
  # * Details (implies lines)
507
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
499
508
  # * Summary (implies details)
500
509
  # * Addresses
501
510
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -545,6 +554,7 @@ module AvaTax
545
554
  #
546
555
  # * Lines
547
556
  # * Details (implies lines)
557
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
548
558
  # * Summary (implies details)
549
559
  # * Addresses
550
560
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -592,6 +602,7 @@ module AvaTax
592
602
  #
593
603
  # * Lines
594
604
  # * Details (implies lines)
605
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
595
606
  # * Summary (implies details)
596
607
  # * Addresses
597
608
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -647,6 +658,7 @@ module AvaTax
647
658
  #
648
659
  # * Lines
649
660
  # * Details (implies lines)
661
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
650
662
  # * Summary (implies details)
651
663
  # * Addresses
652
664
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -694,6 +706,7 @@ module AvaTax
694
706
  #
695
707
  # * Lines
696
708
  # * Details (implies lines)
709
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
697
710
  # * Summary (implies details)
698
711
  # * Addresses
699
712
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -732,6 +745,7 @@ module AvaTax
732
745
  #
733
746
  # * Lines
734
747
  # * Details (implies lines)
748
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
735
749
  # * Summary (implies details)
736
750
  # * Addresses
737
751
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -767,6 +781,7 @@ module AvaTax
767
781
  #
768
782
  # * Lines
769
783
  # * Details (implies lines)
784
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
770
785
  # * Summary (implies details)
771
786
  # * Addresses
772
787
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -822,6 +837,7 @@ module AvaTax
822
837
  #
823
838
  # * Lines
824
839
  # * Details (implies lines)
840
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
825
841
  # * Summary (implies details)
826
842
  # * Addresses
827
843
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -867,6 +883,7 @@ module AvaTax
867
883
  #
868
884
  # * Lines
869
885
  # * Details (implies lines)
886
+ # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
870
887
  # * Summary (implies details)
871
888
  # * Addresses
872
889
  # * SummaryOnly (omit lines and details - reduces API response size)
@@ -1,4 +1,4 @@
1
- require 'faraday_middleware'
1
+ require 'faraday'
2
2
 
3
3
  module AvaTax
4
4
 
@@ -27,12 +27,13 @@ module AvaTax
27
27
  }
28
28
  end
29
29
  faraday.request :instrumentation
30
- faraday.response :json, content_type: /\bjson$/
31
- faraday.request :basic_auth, username, password
32
-
33
- # TODO: use the following after upgrading to faraday 2.0
34
- # see https://github.com/lostisland/faraday/blob/main/docs/middleware/request/authentication.md
35
- # faraday.request :authorization, :basic, username, password
30
+ if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0.0')
31
+ # Use the following after upgrading to faraday 2.0
32
+ # see https://github.com/lostisland/faraday/blob/main/docs/middleware/request/authentication.md
33
+ faraday.request :authorization, :basic, username, password
34
+ else
35
+ faraday.request :basic_auth, username, password
36
+ end
36
37
 
37
38
  default_logger_options = { headers: true, bodies: log_request_and_response_info }
38
39
  if logger
@@ -48,6 +49,9 @@ module AvaTax
48
49
  end
49
50
 
50
51
  faraday.adapter Faraday.default_adapter
52
+
53
+ # Use Faraday's built-in response parser
54
+ faraday.response :json, parser_options: { symbolize_names: false }
51
55
  end
52
56
  end
53
57
  end
@@ -1,3 +1,3 @@
1
1
  module AvaTax
2
- VERSION = '23.6.1'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '23.7.1'.freeze unless defined?(::AvaTax::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatax
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.6.1
4
+ version: 23.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Vorwaller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.10'
69
- - !ruby/object:Gem::Dependency
70
- name: faraday_middleware
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0.10'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0.10'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: multi_json
85
71
  requirement: !ruby/object:Gem::Requirement