octobat 2.0.15 → 2.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 398fb5a2fdfffa2fbf3070966ec6c80f1f90d857
4
- data.tar.gz: 3313c4fc5d1795c294e32734413e078dc3da037b
3
+ metadata.gz: 0e013958914496226335efc455f6c30cdfbf4ab7
4
+ data.tar.gz: d08aa8df42b05cfcf64d4f3f33331914aa311800
5
5
  SHA512:
6
- metadata.gz: adcf04a1cc3be3a330eae051dc5f1b5c4704989d35bc99ffb3fc7439d106acd2e1de136708416c5499fd5839f724dec8ed6675cc0cb0f3721dd1e6ee9d2b373f
7
- data.tar.gz: 9276bda438fcf9e9e1505fdaec5e9cddc8cfa2896920872b1b228d5ae697834952aa8f279419e8a30e5eb599f2384ae87b462c753e3bf04d7e2c00bf567e1eaf
6
+ metadata.gz: 4caf0367c868f74caebea54993fcc6d161aa50768eeb87c37bce1580f761177c22a89c9a5a3ffc2a740a0029c61f5b3f11dc64698c02b6023e70bd20d55b796e
7
+ data.tar.gz: 49c4cce2dd55f81b005103e51dbd0db326a5a96b499b6f30c821c35107e943220dbf4870436e526ba8b14ee98a5f7b699d0e5bd0fab93bc466c9ed9531e10a3c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octobat (2.0.15)
4
+ octobat (2.0.16)
5
5
  rest-client (>= 1.4, < 4.0)
6
6
 
7
7
  GEM
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.0.16 2020-03-20
2
+ * 1 major enhancement:
3
+ * Add TaxId resource
4
+
1
5
  === 2.0.15 2019-09-10
2
6
  * 1 minor enhancement:
3
7
  * Add Setup Intent statuses support for Orders
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.15
1
+ 2.0.16
data/lib/octobat.rb CHANGED
@@ -49,7 +49,7 @@ require 'octobat/tax_evidence_request'
49
49
  require 'octobat/document_email_template'
50
50
  require 'octobat/exports_setting'
51
51
  require 'octobat/emails_setting'
52
-
52
+ require 'octobat/tax_id'
53
53
 
54
54
  # Errors
55
55
  require 'octobat/errors/octobat_error'
@@ -0,0 +1,17 @@
1
+ module Octobat
2
+ class TaxId < APIResource
3
+ extend Octobat::APIOperations::List
4
+ include Octobat::APIOperations::Create
5
+ include Octobat::APIOperations::Update
6
+
7
+ def archive
8
+ response, api_key = Octobat.request(:patch, archive_url, @api_key)
9
+ refresh_from(response, api_key)
10
+ end
11
+
12
+ private
13
+ def archive_url
14
+ url + '/archive'
15
+ end
16
+ end
17
+ end
data/lib/octobat/util.rb CHANGED
@@ -58,6 +58,7 @@ module Octobat
58
58
  'product' => Product,
59
59
  'proforma_invoice' => ProformaInvoice,
60
60
  'tax_region_setting' => TaxRegionSetting,
61
+ 'tax_id' => TaxId,
61
62
  'transaction' => Transaction,
62
63
  'tax_evidence' => TaxEvidence,
63
64
  'tax_evidence_request' => TaxEvidenceRequest,
@@ -1,3 +1,3 @@
1
1
  module Octobat
2
- VERSION = '2.0.15'
2
+ VERSION = '2.0.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octobat
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.15
4
+ version: 2.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaultier Laperche
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2020-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -94,6 +94,7 @@ files:
94
94
  - lib/octobat/singleton_api_resource.rb
95
95
  - lib/octobat/tax_evidence.rb
96
96
  - lib/octobat/tax_evidence_request.rb
97
+ - lib/octobat/tax_id.rb
97
98
  - lib/octobat/tax_region_setting.rb
98
99
  - lib/octobat/transaction.rb
99
100
  - lib/octobat/util.rb