octobat 2.0.7 → 2.0.9

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: 9fc88722ef714acf4b5d56c0d5a4298ba0f58d49
4
- data.tar.gz: 0ad3af140cafeb268ac8636c0a8d376dab8daae9
3
+ metadata.gz: 1a193d3d3821d34dbd7f2cd8b8ef333d91b4344e
4
+ data.tar.gz: 2f0a07eae13a57037df0e24d8f56515ee7f81fe5
5
5
  SHA512:
6
- metadata.gz: 97f49f478199723cf8931ffa4094696243a09348f0c7040a09d961ada752d7192fbe461e5ada6db902a050d1d6de6fa3420660c8b18f3d30019b508b79d2c43d
7
- data.tar.gz: 4c1f3015beca9e27b01ba44d2f3d5076a0d30ceb90bf003edffba66fc6b814f05e380f31ffee7466feb5acc1557d77b31c8f0f227a29245fcec0d70fbb14ec0e
6
+ metadata.gz: 248468e87c8a929646ae7210425ed796bac0f4e364e8e3ab486d8f491384aee7a08b0f9c6e470e3d4c04eeab903c8c91a4b7d45cad76776ab7ea4d7949daffea
7
+ data.tar.gz: 9575a6021cef7b3a44791b5ba1d8bb036865a46efb3ef49c6dc08c9b6015dcf2e1412c87887c7bbcd10fc912a702b78dd219418b5ab7e79d366a148274287ec2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octobat (2.0.7)
4
+ octobat (2.0.9)
5
5
  rest-client (>= 1.4, < 4.0)
6
6
 
7
7
  GEM
@@ -1,3 +1,11 @@
1
+ === 2.0.9 2017-10-02
2
+ * 1 minor enhancement:
3
+ * Add PDF exports for credit notes
4
+
5
+ === 2.0.8 2017-06-08
6
+ * 1 minor enhancement:
7
+ * Add CSV exports for transactions
8
+
1
9
  === 2.0.7 2017-05-30
2
10
  * 1 minor enhancement:
3
11
  * Fixbug on credit notes items
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.7
1
+ 2.0.9
@@ -3,6 +3,19 @@ module Octobat
3
3
  extend Octobat::APIOperations::List
4
4
  include Octobat::APIOperations::Create
5
5
  include Octobat::APIOperations::Update
6
+
7
+
8
+ def self.pdf_export(params = {}, opts={})
9
+ api_key, headers = Util.parse_opts(opts)
10
+ api_key ||= @api_key
11
+ opts[:api_key] = api_key
12
+
13
+ instance = self.new(nil, opts)
14
+
15
+ response, api_key = Octobat.request(:post, url + '/pdf_export', api_key, params)
16
+ return true
17
+ end
18
+
6
19
 
7
20
  def send_by_email(email_data = {})
8
21
  response, api_key = Octobat.request(:post, send_url, @api_key, email_data)
@@ -7,5 +7,17 @@ module Octobat
7
7
  def items(params = {})
8
8
  Item.list(params.merge({ :transaction => id }), @api_key)
9
9
  end
10
+
11
+ def self.csv_export(params = {}, opts={})
12
+ api_key, headers = Util.parse_opts(opts)
13
+ api_key ||= @api_key
14
+ opts[:api_key] = api_key
15
+
16
+ instance = self.new(nil, opts)
17
+
18
+ response, api_key = Octobat.request(:post, url + '/csv_export', api_key, params)
19
+ return true
20
+ end
21
+
10
22
  end
11
23
  end
@@ -1,3 +1,3 @@
1
1
  module Octobat
2
- VERSION = '2.0.7'
2
+ VERSION = '2.0.9'
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.7
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaultier Laperche
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-30 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client