quaderno 1.12.5 → 1.13.0

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: 85f545fc915c883fbf18b96eace3c07cfa16b65f
4
- data.tar.gz: 044531a1fcbed114e2595aba86ad95c8e4511d61
3
+ metadata.gz: e087f4b9e6e43cbe0d98774d54fa42648796069f
4
+ data.tar.gz: 8f6cb576611828db6214c995a989b1a3347c2a98
5
5
  SHA512:
6
- metadata.gz: d27ebfef5563dc85a5165c85acec1dc3a3a5fdaad0be00b96d5a0903648509ff1f768d42cc2cf51bbf0a769bb6ce61d7fb9cdb1fab984769c369ac26e78843c0
7
- data.tar.gz: 72735749faaad50e429f5226c7e5a7b3604a12fb8d51c98b69e49cd4a074aa37eabf1ccdaa31a427fe0f1f59278571c4e6857ed59faa93ca4e4987a308342d4c
6
+ metadata.gz: 8063c2a37f3bd1f69ac6c80e9f07dd01abef8f0d8fd7a59785d5e5989b3a777c23ad966e1fe5c4589311972aea75a7e6c2d06b1a14c51e043c74e2fa8e9f43c4
7
+ data.tar.gz: 6de94e9bd0291d0f67bcf540fb294afa9c026ae5e081bee5ca5f3b6ec09915a7dffd7c6468e5655ebad7633ee9df1927f31eea121d187a2dbb668e80513fa612
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Quaderno-ruby is a ruby wrapper for [Quaderno API] (https://github.com/quaderno/quaderno-api).
4
4
 
5
- Current version is 1.12.5 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
5
+ Current version is 1.13.0 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
6
6
 
7
7
  ## Installation & Configuration
8
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.12.5
1
+ 1.13.0
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
1
  #Changelog
2
+ ##1.13.0
3
+ * Added `Quaderno::Report`
4
+
2
5
  ##1.12.5
3
6
  * Added `create` method to `Quaderno::Income`.
4
7
  * Fix `Quaderno::Base.ping` and `Quaderno::Base.me` methods.
@@ -0,0 +1,25 @@
1
+ module Quaderno
2
+ class Report < Base
3
+ api_model Quaderno::Report
4
+ api_path 'reports'
5
+
6
+ class << self
7
+ undef :all, :find, :create, :update, :delete, :parse_nested
8
+ end
9
+
10
+ def self.journal(options = {})
11
+ authentication = get_authentication(options.merge(api_model: api_model))
12
+ filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s }
13
+
14
+ response = get("#{authentication[:url]}#{api_model.api_path}/journal.json",
15
+ query: filter,
16
+ basic_auth: authentication[:basic_auth],
17
+ headers: version_header.merge(authentication[:headers])
18
+ )
19
+
20
+ check_exception_for(response, { rate_limit: true, subdomain_or_token: true })
21
+
22
+ response.parsed_response
23
+ end
24
+ end
25
+ end
data/lib/quaderno-ruby.rb CHANGED
@@ -5,7 +5,7 @@ require 'quaderno-ruby/helpers/authentication'
5
5
  require 'quaderno-ruby/collection'
6
6
 
7
7
  %w(block crud deliver payment retrieve).each { |filename| require "quaderno-ruby/behavior/#{filename}" }
8
- %w(base contact item invoice receipt credit income estimate expense recurring document_item evidence payment webhook tax).each { |filename| require "quaderno-ruby/#{ filename }" }
8
+ %w(base contact item invoice receipt credit income estimate expense recurring document_item report evidence payment webhook tax).each { |filename| require "quaderno-ruby/#{ filename }" }
9
9
 
10
10
  module Quaderno
11
11
 
data/quaderno.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: quaderno 1.12.5 ruby lib
5
+ # stub: quaderno 1.13.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "quaderno"
9
- s.version = "1.12.5"
9
+ s.version = "1.13.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Recrea"]
14
- s.date = "2017-08-07"
14
+ s.date = "2017-09-13"
15
15
  s.description = " A ruby wrapper for Quaderno API "
16
16
  s.email = "carlos@recrea.es"
17
17
  s.extra_rdoc_files = [
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
49
49
  "lib/quaderno-ruby/payment.rb",
50
50
  "lib/quaderno-ruby/receipt.rb",
51
51
  "lib/quaderno-ruby/recurring.rb",
52
+ "lib/quaderno-ruby/report.rb",
52
53
  "lib/quaderno-ruby/tax.rb",
53
54
  "lib/quaderno-ruby/webhook.rb",
54
55
  "quaderno.gemspec",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quaderno
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.5
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recrea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -90,6 +90,7 @@ files:
90
90
  - lib/quaderno-ruby/payment.rb
91
91
  - lib/quaderno-ruby/receipt.rb
92
92
  - lib/quaderno-ruby/recurring.rb
93
+ - lib/quaderno-ruby/report.rb
93
94
  - lib/quaderno-ruby/tax.rb
94
95
  - lib/quaderno-ruby/webhook.rb
95
96
  - quaderno.gemspec