easybill-api 0.7.5 → 0.8.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 +4 -4
- data/.github/workflows/ruby.yml +37 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +11 -0
- data/.rubocop_todo.yml +38 -0
- data/.ruby-version +1 -0
- data/Gemfile +11 -0
- data/README.md +4 -3
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/easybill-api.gemspec +17 -20
- data/lib/easybill/api/attachments.rb +2 -0
- data/lib/easybill/api/base.rb +23 -21
- data/lib/easybill/api/client.rb +5 -5
- data/lib/easybill/api/contacts.rb +6 -4
- data/lib/easybill/api/customer_groups.rb +2 -0
- data/lib/easybill/api/customers.rb +2 -0
- data/lib/easybill/api/document_payments.rb +4 -2
- data/lib/easybill/api/documents.rb +5 -3
- data/lib/easybill/api/position_groups.rb +2 -0
- data/lib/easybill/api/positions.rb +2 -0
- data/lib/easybill/api/post_boxes.rb +6 -5
- data/lib/easybill/api/projects.rb +2 -0
- data/lib/easybill/api/response_handler.rb +2 -1
- data/lib/easybill/api/tasks.rb +2 -0
- data/lib/easybill/api/text_templates.rb +2 -0
- data/lib/easybill/api/time_trackings.rb +2 -0
- data/lib/easybill/api/version.rb +3 -1
- data/lib/easybill/api.rb +20 -18
- data/lib/easybill/errors.rb +2 -0
- metadata +23 -56
- data/.circleci/config.yml +0 -26
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ec29f73168bfdf234aebb1ad647b507ac630e20e006b9cc444f7d9f103b14d8
|
|
4
|
+
data.tar.gz: 54821e5939228d786988613eda94dd11cd5a5e868364bb21be13f30971ce1766
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 708233f21d41751b32ebc3ba624020d0735f8e30fe7f8fffce9b2c66ab0b7ce483f1bdecb3628bae4b0662e09640238ec32cd960749b24f7f3871f3184ab1061
|
|
7
|
+
data.tar.gz: 3e856e5ae2dcb8789cc813732e7beb8582bff8c4b2ca575e841589a26f860bc1ead995797496d13fe3f67d148d1a1e2134b3e55d28a559c5b72572e97e525cf8
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [ "master" ]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [ "master" ]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
test:
|
|
21
|
+
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
ruby-version: ['3.3']
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Set up Ruby
|
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
32
|
+
uses: ruby/setup-ruby@v1
|
|
33
|
+
with:
|
|
34
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
35
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2024-05-22 19:07:54 UTC using RuboCop version 1.63.5.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
11
|
+
Metrics/MethodLength:
|
|
12
|
+
Max: 14
|
|
13
|
+
|
|
14
|
+
# Offense count: 6
|
|
15
|
+
# Configuration parameters: CountAsOne.
|
|
16
|
+
RSpec/ExampleLength:
|
|
17
|
+
Max: 10
|
|
18
|
+
|
|
19
|
+
# Offense count: 20
|
|
20
|
+
# Configuration parameters: EnforcedStyle.
|
|
21
|
+
# SupportedStyles: have_received, receive
|
|
22
|
+
RSpec/MessageSpies:
|
|
23
|
+
Exclude:
|
|
24
|
+
- 'spec/easybill/api/base_spec.rb'
|
|
25
|
+
- 'spec/easybill/api/contacts_spec.rb'
|
|
26
|
+
- 'spec/easybill/api/documents_spec.rb'
|
|
27
|
+
|
|
28
|
+
# Offense count: 11
|
|
29
|
+
RSpec/StubbedMock:
|
|
30
|
+
Exclude:
|
|
31
|
+
- 'spec/easybill/api/base_spec.rb'
|
|
32
|
+
|
|
33
|
+
# Offense count: 3
|
|
34
|
+
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
35
|
+
RSpec/VerifiedDoubles:
|
|
36
|
+
Exclude:
|
|
37
|
+
- 'spec/easybill/api/base_spec.rb'
|
|
38
|
+
- 'spec/easybill/api/response_handler_spec.rb'
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.3.0
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
gemspec
|
|
6
|
+
|
|
7
|
+
group :development, :test do
|
|
8
|
+
gem 'rake', '~> 13.0', '>= 13.0.6'
|
|
9
|
+
gem 'rspec', '~> 3.8'
|
|
10
|
+
gem 'rubocop', '~> 1.63'
|
|
11
|
+
gem 'rubocop-rake', '~> 0.6'
|
|
12
|
+
gem 'rubocop-rspec', '~> 2.29'
|
|
13
|
+
gem 'webmock', '~> 3.5'
|
|
14
|
+
end
|
data/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
[](https://codeclimate.com/github/schnika/easybill/maintainability)
|
|
2
|
+
[](https://codeclimate.com/github/schnika/easybill/test_coverage)
|
|
2
3
|
|
|
3
4
|
# Easybill::Api
|
|
4
5
|
|
|
@@ -85,6 +86,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
85
86
|
|
|
86
87
|
Bug reports and pull requests are welcome on GitHub at https://github.com/schnika/easybill-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
87
88
|
|
|
88
|
-
##
|
|
89
|
+
## Unlicense
|
|
89
90
|
|
|
90
|
-
The gem is available as open source under the terms of the [
|
|
91
|
+
The gem is available as open source under the terms of the [Unlicense](http://unlicense.org).
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'easybill/api'
|
|
5
6
|
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
|
@@ -10,5 +11,5 @@ require "easybill/api"
|
|
|
10
11
|
# require "pry"
|
|
11
12
|
# Pry.start
|
|
12
13
|
|
|
13
|
-
require
|
|
14
|
+
require 'irb'
|
|
14
15
|
IRB.start
|
data/easybill-api.gemspec
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
5
|
require 'easybill/api/version'
|
|
5
6
|
|
|
6
7
|
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name =
|
|
8
|
+
spec.name = 'easybill-api'
|
|
8
9
|
spec.version = Easybill::Api::VERSION
|
|
9
|
-
spec.authors = [
|
|
10
|
-
spec.email = [
|
|
10
|
+
spec.authors = ['Patrick Nüser']
|
|
11
|
+
spec.email = ['mail@patrick-nueser.de']
|
|
11
12
|
|
|
12
|
-
spec.summary =
|
|
13
|
-
spec.homepage =
|
|
14
|
-
spec.license =
|
|
13
|
+
spec.summary = 'Wrapper for the easybill REST api'
|
|
14
|
+
spec.homepage = 'https://www.github.com/schnika/easybill'
|
|
15
|
+
spec.license = 'MIT'
|
|
15
16
|
|
|
16
17
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
|
17
18
|
# delete this section to allow pushing this gem to any host.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
|
22
|
-
end
|
|
19
|
+
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata)
|
|
20
|
+
|
|
21
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
23
22
|
|
|
24
23
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
25
|
-
spec.bindir =
|
|
24
|
+
spec.bindir = 'exe'
|
|
26
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
|
-
spec.require_paths = [
|
|
28
|
-
|
|
29
|
-
spec.add_development_dependency "rake", "~> 12.3.2"
|
|
30
|
-
spec.add_development_dependency "rspec", "~> 3.8"
|
|
31
|
-
spec.add_development_dependency "webmock", "~> 3.5"
|
|
26
|
+
spec.require_paths = ['lib']
|
|
27
|
+
spec.required_ruby_version = '>= 3.3'
|
|
32
28
|
|
|
33
|
-
spec.add_runtime_dependency
|
|
29
|
+
spec.add_runtime_dependency 'httparty', '>= 0.16.3', '< 0.19.0'
|
|
30
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
34
31
|
end
|
data/lib/easybill/api/base.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'httparty'
|
|
2
4
|
|
|
3
5
|
module Easybill
|
|
4
6
|
module Api
|
|
5
|
-
|
|
6
7
|
##
|
|
7
8
|
# The base class for all Easybill entities.
|
|
8
9
|
# Set the authorization header before using it via `.authenticate`
|
|
@@ -19,29 +20,28 @@ module Easybill
|
|
|
19
20
|
include ResponseHandler
|
|
20
21
|
|
|
21
22
|
HEADERS = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
23
|
+
'User-Agent' => 'Ruby.Easybill.Api',
|
|
24
|
+
'Accept' => 'application/json',
|
|
25
|
+
'Content-Type' => 'application/json'
|
|
26
|
+
}.freeze
|
|
26
27
|
|
|
27
|
-
base_uri
|
|
28
|
+
base_uri 'https://api.easybill.de'
|
|
28
29
|
headers HEADERS
|
|
29
30
|
format :json
|
|
30
31
|
|
|
31
32
|
class << self
|
|
32
|
-
|
|
33
33
|
##
|
|
34
34
|
# Set the authorization header by providing your easybill +api_key+
|
|
35
35
|
|
|
36
36
|
def authenticate(api_key)
|
|
37
|
-
headers(
|
|
37
|
+
headers('authorization' => "Bearer #{api_key}")
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
##
|
|
41
41
|
# Fetches all resources. You can set custom +query+ parameters.
|
|
42
42
|
|
|
43
43
|
def list(query: {})
|
|
44
|
-
handle(get
|
|
44
|
+
handle(get(resource_path, query:))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
##
|
|
@@ -49,7 +49,7 @@ module Easybill
|
|
|
49
49
|
# api.find(id, query: {group: 1})
|
|
50
50
|
|
|
51
51
|
def find(id, query: {})
|
|
52
|
-
handle(get
|
|
52
|
+
handle(get("#{resource_path}/#{id}", query:))
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
##
|
|
@@ -63,7 +63,7 @@ module Easybill
|
|
|
63
63
|
# api.create(data)
|
|
64
64
|
|
|
65
65
|
def create(data)
|
|
66
|
-
handle(post
|
|
66
|
+
handle(post(resource_path, body: data.to_json))
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
##
|
|
@@ -78,7 +78,7 @@ module Easybill
|
|
|
78
78
|
# api.update(id, data)
|
|
79
79
|
|
|
80
80
|
def update(id, data)
|
|
81
|
-
handle(put
|
|
81
|
+
handle(put("#{resource_path}/#{id}", body: data.to_json))
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
##
|
|
@@ -86,11 +86,12 @@ module Easybill
|
|
|
86
86
|
# api.destroy(id)
|
|
87
87
|
|
|
88
88
|
def destroy(id)
|
|
89
|
-
handle(delete
|
|
89
|
+
handle(delete("#{resource_path}/#{id}"))
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
protected
|
|
93
93
|
|
|
94
|
+
# rubocop:disable Metrics/ParameterLists
|
|
94
95
|
def custom(method:, path:, query: {}, data: {}, headers: {}, format: :json)
|
|
95
96
|
request_options = {}
|
|
96
97
|
|
|
@@ -99,26 +100,27 @@ module Easybill
|
|
|
99
100
|
request_options[:headers] = headers unless headers.empty?
|
|
100
101
|
request_options[:format] = format
|
|
101
102
|
|
|
102
|
-
handle(public_send
|
|
103
|
+
handle(public_send(method, path, request_options))
|
|
103
104
|
end
|
|
105
|
+
# rubocop:enable Metrics/ParameterLists
|
|
104
106
|
|
|
105
107
|
private
|
|
106
108
|
|
|
107
109
|
def base_path
|
|
108
|
-
|
|
110
|
+
'/rest/v1'
|
|
109
111
|
end
|
|
110
112
|
|
|
111
113
|
def resource_path
|
|
112
|
-
"#{base_path}/#{dasherize(
|
|
114
|
+
"#{base_path}/#{dasherize(name.split('::').last)}"
|
|
113
115
|
end
|
|
114
116
|
|
|
115
117
|
# TODO-schnika: move this out of here Oo
|
|
116
118
|
def dasherize(camel_cased_word)
|
|
117
|
-
camel_cased_word.to_s.gsub(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
camel_cased_word.to_s.gsub('::', '/')
|
|
120
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
|
121
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
|
122
|
+
.gsub('_', '-')
|
|
123
|
+
.downcase
|
|
122
124
|
end
|
|
123
125
|
end
|
|
124
126
|
end
|
data/lib/easybill/api/client.rb
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Easybill
|
|
2
4
|
module Api
|
|
3
|
-
|
|
4
5
|
##
|
|
5
6
|
# This class represents the client object.
|
|
6
7
|
# Use this class to initialize you api client
|
|
7
8
|
|
|
8
9
|
class Client
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
ENTITIES = %i[Base Attachments Contacts Customers CustomerGroups Documents DocumentPayments
|
|
11
|
+
Positions PositionGroups PostBoxes Projects Tasks TextTemplates TimeTrackings].freeze
|
|
11
12
|
|
|
12
13
|
##
|
|
13
14
|
# Create a new client instance with an +api_key+
|
|
@@ -17,9 +18,8 @@ module Easybill
|
|
|
17
18
|
|
|
18
19
|
def initialize(api_key)
|
|
19
20
|
ENTITIES.each do |entity|
|
|
20
|
-
|
|
21
|
+
Object.const_get("Easybill::Api::#{entity}").authenticate api_key
|
|
21
22
|
end
|
|
22
|
-
self
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
##
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Easybill
|
|
2
4
|
module Api
|
|
3
5
|
class Contacts < Base
|
|
4
6
|
class << self
|
|
5
7
|
def list(customer_id, query: {})
|
|
6
|
-
custom method: :get, path: resource_path(customer_id), query:
|
|
8
|
+
custom method: :get, path: resource_path(customer_id), query:
|
|
7
9
|
end
|
|
8
10
|
|
|
9
11
|
def find(customer_id, id, query: {})
|
|
10
|
-
custom method: :get, path: "#{resource_path(customer_id)}/#{id}", query:
|
|
12
|
+
custom method: :get, path: "#{resource_path(customer_id)}/#{id}", query:
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def create(customer_id, data)
|
|
14
|
-
custom method: :post, path: resource_path(customer_id), data:
|
|
16
|
+
custom method: :post, path: resource_path(customer_id), data:
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
def update(customer_id, id, data)
|
|
18
|
-
custom method: :put, path: "#{resource_path(customer_id)}/#{id}", data:
|
|
20
|
+
custom method: :put, path: "#{resource_path(customer_id)}/#{id}", data:
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
def destroy(customer_id, id)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Easybill
|
|
2
4
|
module Api
|
|
3
5
|
class DocumentPayments < Base
|
|
4
|
-
def self.update(
|
|
5
|
-
raise Easybill::Errors::ResourceNotUpdatableError,
|
|
6
|
+
def self.update(_id, _data)
|
|
7
|
+
raise Easybill::Errors::ResourceNotUpdatableError, 'Document payments cannot get updated via api.'
|
|
6
8
|
end
|
|
7
9
|
end
|
|
8
10
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Easybill
|
|
2
4
|
module Api
|
|
3
5
|
class Documents < Base
|
|
@@ -11,7 +13,7 @@ module Easybill
|
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def deliver(id, type, data)
|
|
14
|
-
custom method: :post, path: "#{resource_path}/#{id}/send/#{type}", data:
|
|
16
|
+
custom method: :post, path: "#{resource_path}/#{id}/send/#{type}", data:
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
def pdf(id)
|
|
@@ -19,8 +21,8 @@ module Easybill
|
|
|
19
21
|
method: :get,
|
|
20
22
|
path: "#{resource_path}/#{id}/pdf",
|
|
21
23
|
headers: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
'Content-Type' => 'application/pdf',
|
|
25
|
+
'Accept' => 'application/pdf'
|
|
24
26
|
},
|
|
25
27
|
format: :pdf
|
|
26
28
|
)
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Easybill
|
|
2
4
|
module Api
|
|
3
5
|
class PostBoxes < Base
|
|
4
|
-
def self.create(
|
|
5
|
-
raise Easybill::Errors::ResourceNotCreatableError,
|
|
6
|
+
def self.create(_data)
|
|
7
|
+
raise Easybill::Errors::ResourceNotCreatableError, 'Post boxes cannot get created via api.'
|
|
6
8
|
end
|
|
7
9
|
|
|
8
|
-
def self.update(
|
|
9
|
-
raise Easybill::Errors::ResourceNotUpdatableError,
|
|
10
|
+
def self.update(_id, _data)
|
|
11
|
+
raise Easybill::Errors::ResourceNotUpdatableError, 'Post boxes cannot get updated via api.'
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
|
14
|
-
|
data/lib/easybill/api/tasks.rb
CHANGED
data/lib/easybill/api/version.rb
CHANGED
data/lib/easybill/api.rb
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
|
|
5
|
-
require
|
|
6
|
-
require
|
|
7
|
-
require
|
|
8
|
-
require
|
|
9
|
-
require
|
|
10
|
-
require
|
|
11
|
-
require
|
|
12
|
-
require
|
|
13
|
-
require
|
|
14
|
-
require
|
|
15
|
-
require
|
|
16
|
-
require
|
|
17
|
-
require
|
|
18
|
-
require
|
|
19
|
-
require
|
|
3
|
+
require 'easybill/api/version'
|
|
4
|
+
|
|
5
|
+
require 'easybill/errors'
|
|
6
|
+
require 'easybill/api/client'
|
|
7
|
+
require 'easybill/api/response_handler'
|
|
8
|
+
require 'easybill/api/base'
|
|
9
|
+
require 'easybill/api/attachments'
|
|
10
|
+
require 'easybill/api/contacts'
|
|
11
|
+
require 'easybill/api/customers'
|
|
12
|
+
require 'easybill/api/customer_groups'
|
|
13
|
+
require 'easybill/api/documents'
|
|
14
|
+
require 'easybill/api/document_payments'
|
|
15
|
+
require 'easybill/api/positions'
|
|
16
|
+
require 'easybill/api/position_groups'
|
|
17
|
+
require 'easybill/api/post_boxes'
|
|
18
|
+
require 'easybill/api/projects'
|
|
19
|
+
require 'easybill/api/tasks'
|
|
20
|
+
require 'easybill/api/text_templates'
|
|
21
|
+
require 'easybill/api/time_trackings'
|
|
20
22
|
|
|
21
23
|
module Easybill
|
|
22
24
|
module Api
|
data/lib/easybill/errors.rb
CHANGED
metadata
CHANGED
|
@@ -1,82 +1,48 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easybill-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Patrick
|
|
8
|
-
autorequire:
|
|
7
|
+
- Patrick Nüser
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: rake
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 12.3.2
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: 12.3.2
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: rspec
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '3.8'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '3.8'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: webmock
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '3.5'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '3.5'
|
|
55
13
|
- !ruby/object:Gem::Dependency
|
|
56
14
|
name: httparty
|
|
57
15
|
requirement: !ruby/object:Gem::Requirement
|
|
58
16
|
requirements:
|
|
59
|
-
- - "
|
|
17
|
+
- - ">="
|
|
60
18
|
- !ruby/object:Gem::Version
|
|
61
19
|
version: 0.16.3
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 0.19.0
|
|
62
23
|
type: :runtime
|
|
63
24
|
prerelease: false
|
|
64
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
26
|
requirements:
|
|
66
|
-
- - "
|
|
27
|
+
- - ">="
|
|
67
28
|
- !ruby/object:Gem::Version
|
|
68
29
|
version: 0.16.3
|
|
69
|
-
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 0.19.0
|
|
33
|
+
description:
|
|
70
34
|
email:
|
|
71
|
-
- mail@patrick-
|
|
35
|
+
- mail@patrick-nueser.de
|
|
72
36
|
executables: []
|
|
73
37
|
extensions: []
|
|
74
38
|
extra_rdoc_files: []
|
|
75
39
|
files:
|
|
76
|
-
- ".
|
|
40
|
+
- ".github/workflows/ruby.yml"
|
|
77
41
|
- ".gitignore"
|
|
78
42
|
- ".rspec"
|
|
79
|
-
- ".
|
|
43
|
+
- ".rubocop.yml"
|
|
44
|
+
- ".rubocop_todo.yml"
|
|
45
|
+
- ".ruby-version"
|
|
80
46
|
- CODE_OF_CONDUCT.md
|
|
81
47
|
- Gemfile
|
|
82
48
|
- LICENSE.txt
|
|
@@ -109,7 +75,8 @@ licenses:
|
|
|
109
75
|
- MIT
|
|
110
76
|
metadata:
|
|
111
77
|
allowed_push_host: https://rubygems.org
|
|
112
|
-
|
|
78
|
+
rubygems_mfa_required: 'true'
|
|
79
|
+
post_install_message:
|
|
113
80
|
rdoc_options: []
|
|
114
81
|
require_paths:
|
|
115
82
|
- lib
|
|
@@ -117,15 +84,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
117
84
|
requirements:
|
|
118
85
|
- - ">="
|
|
119
86
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '
|
|
87
|
+
version: '3.3'
|
|
121
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
89
|
requirements:
|
|
123
90
|
- - ">="
|
|
124
91
|
- !ruby/object:Gem::Version
|
|
125
92
|
version: '0'
|
|
126
93
|
requirements: []
|
|
127
|
-
rubygems_version: 3.
|
|
128
|
-
signing_key:
|
|
94
|
+
rubygems_version: 3.5.10
|
|
95
|
+
signing_key:
|
|
129
96
|
specification_version: 4
|
|
130
97
|
summary: Wrapper for the easybill REST api
|
|
131
98
|
test_files: []
|
data/.circleci/config.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
jobs:
|
|
3
|
-
build:
|
|
4
|
-
docker:
|
|
5
|
-
- image: circleci/ruby:2.5.1
|
|
6
|
-
steps:
|
|
7
|
-
- checkout
|
|
8
|
-
- run:
|
|
9
|
-
name: Which bundler?
|
|
10
|
-
command: bundle -v
|
|
11
|
-
- restore_cache:
|
|
12
|
-
keys:
|
|
13
|
-
- cache-{{ checksum "Gemfile.lock" }}
|
|
14
|
-
- cache-
|
|
15
|
-
- run:
|
|
16
|
-
name: Bundle Install
|
|
17
|
-
command: bundle check || bundle install
|
|
18
|
-
- save_cache:
|
|
19
|
-
key: cache-{{ checksum "Gemfile.lock" }}
|
|
20
|
-
paths:
|
|
21
|
-
- vendor/bundle
|
|
22
|
-
- run:
|
|
23
|
-
name: Run cop and rspec
|
|
24
|
-
command: |
|
|
25
|
-
bundle exec rake
|
|
26
|
-
|
data/.travis.yml
DELETED