codat 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +1 -1
- data/.ruby-version +1 -0
- data/codat.gemspec +2 -2
- data/lib/codat.rb +1 -0
- data/lib/codat/models/integration.rb +23 -0
- data/lib/codat/version.rb +1 -1
- metadata +11 -11
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b359100d300f095792668b5566510b28d0c417c62884b09b82986c5e29ce050
|
4
|
+
data.tar.gz: f060ecf8c9fb2b2aab07cac48a16f76468bdcf1f650180cf041bf1873d95be7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2efbbac8dc086eaf8def830cc9abdbcdff3de04d17c4af1acd788533597c69a0c8f0b52ff3c1f46f119db2cc9aeaead363eb598786aa225ce11452d144be3f07
|
7
|
+
data.tar.gz: 6576d8cb03153ed9a409b0c95f94992a95387437a85abf7d7d4bc003f2a2c2c9f97e2914bd2be952834fafb7ef3321d526011ef7ca9a1040caba0f97861cc105
|
data/.gitlab-ci.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.4
|
data/codat.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency 'multi_json', '~> 1.13'
|
32
32
|
spec.add_dependency 'rainbow', '~> 3.0'
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler'
|
34
|
+
spec.add_development_dependency 'bundler'
|
35
35
|
spec.add_development_dependency 'dotenv', '~> 2.5'
|
36
36
|
spec.add_development_dependency 'pry-byebug', '~> 3.6'
|
37
37
|
spec.add_development_dependency 'rake', '~> 10.0'
|
@@ -40,5 +40,5 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.27'
|
41
41
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
42
42
|
spec.add_development_dependency 'vcr', '~> 4.0.0'
|
43
|
-
spec.add_development_dependency 'webmock', '~> 3.
|
43
|
+
spec.add_development_dependency 'webmock', '~> 3.7.2'
|
44
44
|
end
|
data/lib/codat.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'codat/base_model'
|
4
|
+
|
5
|
+
module Codat
|
6
|
+
module Models
|
7
|
+
class Integration < BaseModel
|
8
|
+
ENDPOINT = '/integrations'
|
9
|
+
|
10
|
+
attributes :key, :logo_url, :name, :enabled, :source_id, :integration_id, :source_type
|
11
|
+
|
12
|
+
def self.all(params = {})
|
13
|
+
result = get(ENDPOINT, params)
|
14
|
+
|
15
|
+
return [] if result.status == 404
|
16
|
+
|
17
|
+
return result.body if result.status == 400
|
18
|
+
|
19
|
+
result.body.map { |integration| new(json: integration) }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/codat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: dotenv
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,14 +212,14 @@ dependencies:
|
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 3.
|
215
|
+
version: 3.7.2
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 3.
|
222
|
+
version: 3.7.2
|
223
223
|
description: Codat API wrapper in Ruby
|
224
224
|
email:
|
225
225
|
- oterosantos@gmail.com
|
@@ -231,7 +231,7 @@ files:
|
|
231
231
|
- ".gitlab-ci.yml"
|
232
232
|
- ".rspec"
|
233
233
|
- ".rubocop.yml"
|
234
|
-
- ".
|
234
|
+
- ".ruby-version"
|
235
235
|
- Gemfile
|
236
236
|
- LICENSE.txt
|
237
237
|
- README.md
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- lib/codat/models/bank_statement_list.rb
|
254
254
|
- lib/codat/models/company.rb
|
255
255
|
- lib/codat/models/financial_sheet.rb
|
256
|
+
- lib/codat/models/integration.rb
|
256
257
|
- lib/codat/models/metadata.rb
|
257
258
|
- lib/codat/models/profit_and_loss.rb
|
258
259
|
- lib/codat/models/profit_and_loss_report.rb
|
@@ -278,8 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
279
|
- !ruby/object:Gem::Version
|
279
280
|
version: '0'
|
280
281
|
requirements: []
|
281
|
-
|
282
|
-
rubygems_version: 2.7.3
|
282
|
+
rubygems_version: 3.0.3
|
283
283
|
signing_key:
|
284
284
|
specification_version: 4
|
285
285
|
summary: Codat API wrapper in Ruby
|