fakturoid 0.2.0 → 0.4.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
- SHA1:
3
- metadata.gz: 6b2689a302bc8c51aad83f0adace9767fb2b3fed
4
- data.tar.gz: 401da40fc65ad68fd261f6cc4c1be79b1e8b357f
2
+ SHA256:
3
+ metadata.gz: 3ef863bf7aae45cfbf91d5c50c8f8b28d6b50aba851fcb2a0478f04364127d60
4
+ data.tar.gz: bf9e9c5cad8973615dc48e9c76c7e3c6061ad9bef6558725740348c751a201c6
5
5
  SHA512:
6
- metadata.gz: 72dc160cbff635c30ba4037ec5152006ab1f8263a1fcbe9d9a86444995fdbf7c6e65ddb6c7e56c15cb7c11fb2d7789a199088622d4ab8c0dba4d0b8b0deabd42
7
- data.tar.gz: 5ce5f5b56d266c1be628bc24162eb8dce0f5e2e65ed03538c090b6a38e94e2cd19fc0c90b341c25ea9ef792f0b3a61d089a82478b07a5462d1cdbdf6718926f4
6
+ metadata.gz: aec705fea7250afb8fef4cd70ed1b20c472a9510d21122d9cfffaf83b3cd1e32158d55612d34492ce5cef662e07d1738dc0c577c666cb0818a108c1d2c7ef70c
7
+ data.tar.gz: 9242d93bba87c3c15f479d6c042b26cfae52831ec327105b1f1ecebd6fecadfcb4aeaea98f99c242555b944ddb1797e54ad6cc6ffcf504d7d52c76761dbd076b
@@ -0,0 +1,20 @@
1
+ # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-ruby
2
+ # https://github.com/actions/starter-workflows/blob/main/ci/ruby.yml
3
+
4
+ name: Rubocop
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+
13
+ - name: Set up Ruby
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7
17
+ bundler-cache: true
18
+
19
+ - name: Rubocop
20
+ run: bundle exec rubocop
@@ -0,0 +1,27 @@
1
+ # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-ruby
2
+ # https://github.com/actions/starter-workflows/blob/main/ci/ruby.yml
3
+
4
+ name: Tests
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ test:
9
+
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby-version: ['2.6', '2.7', '3.0']
14
+
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+
18
+ - name: Set up Ruby
19
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
20
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25
+
26
+ - name: Run tests
27
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,35 +1,77 @@
1
- Metrics/LineLength:
1
+ AllCops:
2
+ TargetRubyVersion: 2.7
3
+ SuggestExtensions: false
4
+ NewCops: disable
5
+ Exclude:
6
+ - 'Rakefile'
7
+ - 'fakturoid.gemspec'
8
+ - 'vendor/**/*'
9
+
10
+ Style/Documentation:
11
+ Enabled: false
12
+
13
+ Layout/LineLength:
2
14
  Enabled: false
3
15
 
4
16
  Metrics/ClassLength:
5
17
  Exclude:
6
18
  - 'test/**/*'
7
19
 
8
- Style/AccessModifierIndentation:
20
+ Metrics/BlockLength:
21
+ Exclude:
22
+ - 'test/**/*'
23
+
24
+ Layout/AccessModifierIndentation:
9
25
  EnforcedStyle: outdent
10
26
 
11
- Style/CaseIndentation:
27
+ Layout/CaseIndentation:
12
28
  IndentOneStep: true
13
29
 
14
30
  Style/SignalException:
15
31
  EnforcedStyle: only_raise
16
32
 
17
- Style/TrailingWhitespace:
33
+ Layout/TrailingWhitespace:
18
34
  Enabled: false
19
35
 
20
36
  Style/ClassAndModuleChildren:
21
37
  Exclude:
22
38
  - 'test/**/*'
23
39
 
24
- Style/SpaceAroundOperators:
25
- MultiSpaceAllowedForOperators:
26
- - '<'
27
- - '='
40
+ Metrics/PerceivedComplexity:
41
+ Enabled: false
28
42
 
29
- Documentation:
43
+ Metrics/MethodLength:
30
44
  Enabled: false
31
45
 
32
- AllCops:
46
+ Metrics/AbcSize:
47
+ Enabled: false
48
+
49
+ Metrics/CyclomaticComplexity:
50
+ Enabled: false
51
+
52
+ Style/NegatedIf:
33
53
  Exclude:
34
- - 'Rakefile'
35
- - 'fakturoid.gemspec'
54
+ - 'lib/fakturoid/response.rb'
55
+
56
+ Naming/MemoizedInstanceVariableName:
57
+ Exclude:
58
+ - 'lib/fakturoid/api.rb'
59
+
60
+ Layout/EmptyLineAfterGuardClause:
61
+ Enabled: false
62
+
63
+ Layout/EmptyLineBetweenDefs:
64
+ Enabled: false
65
+
66
+ Style/RescueStandardError:
67
+ Exclude:
68
+ - 'test/response_test.rb'
69
+
70
+ Style/TrivialAccessors:
71
+ Enabled: false
72
+
73
+ Style/StringLiterals:
74
+ EnforcedStyle: double_quotes
75
+
76
+ Style/SymbolArray:
77
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.4
1
+ 3.0.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,58 @@
1
+ ## 0.4.0
2
+
3
+ - Fix Faraday v1.x deprecations.
4
+ - Add support for Faraday v2.x.
5
+ - Add support form number formats endpoint
6
+
7
+ ```ruby
8
+ number_formats = Fakturoid::Client::NumberFormat.invoices
9
+ ```
10
+
11
+ - Add support for `until`, `updated_until` and `custom_id`
12
+ params to invoice index action methods
13
+
14
+ ```ruby
15
+ invoices = Fakturoid::Client::Invoice.all(since: "2022-03-01T00:00:00+01:00", until: "2022-03-31T23:59:59+01:00")
16
+ invoices = Fakturoid::Client::Invoice.regular(updated_since: "2022-03-01T00:00:00+01:00", updated_until: "2022-03-31T23:59:59+01:00")
17
+ proformas = Fakturoid::Client::Invoice.proforma(custom_id: "custom-123")
18
+ ```
19
+
20
+ - Add support for `custom_id` param to expense index action method
21
+
22
+ ```ruby
23
+ Fakturoid::Client::Expense.all(custom_id: "custom-123")
24
+ ```
25
+
26
+ - Add support for pagination to search endpoints
27
+
28
+ ```ruby
29
+ Fakturoid::Client::Invoice.search("apples", page: 3)
30
+ Fakturoid::Client::Expense.search("computers", page: 2)
31
+ Fakturoid::Client::Subject.search("apple", page: 2)
32
+ ```
33
+
34
+ ## 0.3.0
35
+
36
+ - Add support for `variable_symbol` and `bank_account_id` param in invoice `fire` method.
37
+
38
+ ```ruby
39
+ Fakturoid::Client::Invoice.fire(1234, 'pay', paid_at: '2017-07-03', paid_amount: '100.23', variable_symbol: '12345678', bank_account_id: 123)
40
+ ```
41
+
42
+ - Add support for `paid_on`, `paid_amount`, `variable_symbol` and `bank_account_id` params in expense `fire` method.
43
+
44
+ ```ruby
45
+ Fakturoid::Client::Expense.fire(1234, 'pay', paid_on: '2017-07-03', paid_amount: '100.23', variable_symbol: '12345678', bank_account_id: 123)
46
+ ```
47
+
48
+ ## 0.2.1
49
+
50
+ - Add support for `paid_amount` param in invoice `fire` method.
51
+
52
+ ```ruby
53
+ Fakturoid::Client::Invoice.fire(1234, 'pay', paid_at: '2017-07-03', paid_amount: '100.23')
54
+ ```
55
+
1
56
  ## 0.2.0
2
57
 
3
58
  - Add support for `paid_at` param in invoice `fire` method.
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in fakturoid.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -1,17 +1,18 @@
1
1
  # Fakturoid
2
2
 
3
3
  The Fakturoid gem is ruby library for API communication with web based invoicing service [www.fakturoid.cz](https://fakturoid.cz).
4
- Fakturoid [API documentation](http://docs.fakturoid.apiary.io).
4
+ Fakturoid [API documentation](https://fakturoid.docs.apiary.io/).
5
5
 
6
6
  [![Gem Version](https://badge.fury.io/rb/fakturoid.svg)](http://badge.fury.io/rb/fakturoid)
7
- [![Circle CI](https://circleci.com/gh/fakturoid/fakturoid-ruby.svg?style=svg)](https://circleci.com/gh/fakturoid/fakturoid-ruby)
7
+ [![Tests](https://github.com/fakturoid/fakturoid-ruby/actions/workflows/tests.yml/badge.svg)](https://github.com/fakturoid/fakturoid-ruby/actions/workflows/tests.yml)
8
+ [![Rubocop](https://github.com/fakturoid/fakturoid-ruby/actions/workflows/rubocop.yml/badge.svg)](https://github.com/fakturoid/fakturoid-ruby/actions/workflows/rubocop.yml)
8
9
 
9
10
  ## Installation
10
11
 
11
12
  Add this line to your application's Gemfile:
12
13
 
13
14
  ```ruby
14
- gem 'fakturoid'
15
+ gem "fakturoid"
15
16
  ```
16
17
 
17
18
  And then run:
@@ -24,10 +25,10 @@ Fakturoid gem is configured within config block placed in `config/initializers/f
24
25
 
25
26
  ```ruby
26
27
  Fakturoid.configure do |config|
27
- config.email = 'yourfakturoid@email.com'
28
- config.api_key = 'fasdff823fdasWRFKW843ladfjklasdf834'
29
- config.account = 'applecorp' # former subdomain (first part of URL)
30
- config.user_agent = 'Name of your app (your@email.com)'
28
+ config.email = "yourfakturoid@email.com"
29
+ config.api_key = "fasdff823fdasWRFKW843ladfjklasdf834"
30
+ config.account = "applecorp" # former subdomain (first part of URL)
31
+ config.user_agent = "Name of your app (your@email.com)"
31
32
  end
32
33
  ```
33
34
 
@@ -35,7 +36,7 @@ end
35
36
 
36
37
  ### Account resource
37
38
 
38
- To get informations about your account in Fakturoid run following code:
39
+ To get information about your account in Fakturoid run following code:
39
40
 
40
41
  ```ruby
41
42
  response = Fakturoid::Client::Account.current
@@ -46,11 +47,11 @@ response.body # contains hash with returned body
46
47
  Accessing content of returned body:
47
48
 
48
49
  ```ruby
49
- response.body['name'] # return name of your company
50
+ response.body["name"] # return name of your company
50
51
  response.name # alternative way of getting the name of your company
51
52
  ```
52
53
 
53
- For the list of all returned account fields see the [Account API documentation](http://docs.fakturoid.apiary.io/#account)
54
+ For the list of all returned account fields see the [Account API documentation](https://fakturoid.docs.apiary.io/#reference/account)
54
55
 
55
56
  ### User resource
56
57
 
@@ -72,38 +73,48 @@ If you want to get information about one user which belongs to account use:
72
73
  response = Fakturoid::Client::User.find(user_id)
73
74
  ```
74
75
 
75
- For the list of all returned user fields see the [Users API documentation](http://docs.fakturoid.apiary.io/#users)
76
+ For the list of all returned user fields see the [Users API documentation](https://fakturoid.docs.apiary.io/#reference/users)
77
+
78
+ ### Number Format resource
79
+
80
+ For the list of invoice number formats which belong to the current account:
81
+
82
+ ```ruby
83
+ response = Fakturoid::Client::NumberFormat.invoices
84
+ ```
85
+
86
+ For the list of all returned user fields see the [Number formats API documentation](https://fakturoid.docs.apiary.io/#reference/number-formats)
76
87
 
77
88
  ### Subject resource
78
89
 
79
90
  To get all subjects run (Subjects are paginated by 20 per page):
80
91
 
81
92
  ```ruby
82
- response = Fakturoid::Client::Subject.all page: 2
93
+ response = Fakturoid::Client::Subject.all(page: 2)
83
94
  ```
84
95
 
85
96
  Fulltext search subjects:
86
97
 
87
98
  ```ruby
88
- response = Fakturoid::Client::Subject.search 'Client name'
99
+ response = Fakturoid::Client::Subject.search("Client name")
89
100
  ```
90
101
 
91
102
  To find one subject use:
92
103
 
93
104
  ```ruby
94
- response = Fakturoid::Client::Subject.find subject_id
105
+ response = Fakturoid::Client::Subject.find(subject_id)
95
106
  ```
96
107
 
97
108
  You can create new subject with:
98
109
 
99
110
  ```ruby
100
- response = Fakturoid::Client::Subject.create name: 'New client'
111
+ response = Fakturoid::Client::Subject.create(name: "New client")
101
112
  ```
102
113
 
103
114
  To update subject use following code:
104
115
 
105
116
  ```ruby
106
- response = Fakturoid::Client::Subject.update subject_id, name: 'Updated client'
117
+ response = Fakturoid::Client::Subject.update(subject_id, name: "Updated client")
107
118
  ```
108
119
 
109
120
  Delete subject:
@@ -112,35 +123,35 @@ Delete subject:
112
123
  Fakturoid::Client::Subject.delete subject_id
113
124
  ```
114
125
 
115
- For the list of all subject fields and options see the [Subjects API documentation](http://docs.fakturoid.apiary.io/#subjects)
126
+ For the list of all subject fields and options see the [Subjects API documentation](https://fakturoid.docs.apiary.io/#reference/subjects)
116
127
 
117
128
  ### Invoice resource
118
129
 
119
130
  To get all invoices run (Invoices are paginated by 20 per page):
120
131
 
121
132
  ```ruby
122
- response = Fakturoid::Client::Invoice.all page: 2
133
+ response = Fakturoid::Client::Invoice.all(page: 2)
123
134
  ```
124
135
 
125
136
  Fulltext search invoices:
126
137
 
127
138
  ```ruby
128
- response = Fakturoid::Client::Invoice.search 'Client name'
139
+ response = Fakturoid::Client::Invoice.search("Client name")
129
140
  ```
130
141
 
131
142
  To find one invoice use:
132
143
 
133
144
  ```ruby
134
- response = Fakturoid::Client::Invoice.find invoice_id
145
+ response = Fakturoid::Client::Invoice.find(invoice_id)
135
146
  ```
136
147
 
137
148
  To download invoice in PDF format you can use following code:
138
149
 
139
150
  ```ruby
140
- response = Fakturoid::Client::Invoice.download_pdf invoice_id
151
+ response = Fakturoid::Client::Invoice.download_pdf(invoice_id)
141
152
 
142
- File.open '/path/to/file.pdf', 'w' do |f|
143
- f.write response.body
153
+ File.open("/path/to/file.pdf", "wb") do |f|
154
+ f.write(response.body)
144
155
  end
145
156
  ```
146
157
 
@@ -152,29 +163,29 @@ invoice = {
152
163
  lines: [
153
164
  {
154
165
  quantity: 5,
155
- unit_name: 'kg',
156
- name: 'Sand',
157
- unit_price: '100',
166
+ unit_name: "kg",
167
+ name: "Sand",
168
+ unit_price: "100",
158
169
  vat_rate: 21
159
170
  }
160
171
  ]
161
172
  }
162
- response = Fakturoid::Client::Invoice.create invoice
173
+ response = Fakturoid::Client::Invoice.create(invoice)
163
174
  ```
164
175
 
165
176
  Invoice actions (eg. pay invoice):
166
177
 
167
178
  ```ruby
168
- response = Fakturoid::Client::Invoice.fire invoice_id, 'pay'
179
+ response = Fakturoid::Client::Invoice.fire(invoice_id, "pay")
169
180
  ```
170
181
 
171
- Send invoice with customized message (for more information see [the API Documentation](http://docs.fakturoid.apiary.io/#messages)):
182
+ Send invoice with customized message (for more information see [the API Documentation](https://fakturoid.docs.apiary.io/#reference/messages)):
172
183
 
173
184
  ```ruby
174
185
  message = {
175
- email: 'testemail@testemail.cz',
176
- email_copy: 'some@emailcopy.cz',
177
- subject: 'I have an invoice for you',
186
+ email: "testemail@testemail.cz",
187
+ email_copy: "some@emailcopy.cz",
188
+ subject: "I have an invoice for you",
178
189
  message: "Hi,\n\nyou can find invoice no. #no# on the following page #link#\n\nHave a nice day"
179
190
  }
180
191
 
@@ -185,16 +196,16 @@ response.status_code # => 201
185
196
  To update invoice use following code:
186
197
 
187
198
  ```ruby
188
- response = Fakturoid::Client::Invoice.update invoice_id, number: '2015-0015'
199
+ response = Fakturoid::Client::Invoice.update(invoice_id, number: "2015-0015")
189
200
  ```
190
201
 
191
202
  Delete invoice:
192
203
 
193
204
  ```ruby
194
- response = Fakturoid::Client::Invoice.delete invoice_id
205
+ response = Fakturoid::Client::Invoice.delete(invoice_id)
195
206
  ```
196
207
 
197
- For the list of all invoice fields and options see the [Invoices API documentation](http://docs.fakturoid.apiary.io/#invoices)
208
+ For the list of all invoice fields and options see the [Invoices API documentation](https://fakturoid.docs.apiary.io/#reference/invoices)
198
209
 
199
210
  ## Handling error responses
200
211
 
@@ -258,6 +269,3 @@ The Fakturoid gem raises exceptions if error response is returned from the serve
258
269
  </tr>
259
270
  </tbody>
260
271
  </table>
261
-
262
- ## Thanks
263
- Development was supported by [eBallance Creative s.r.o.](http://www.eballance.cz)
data/fakturoid.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'fakturoid/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fakturoid"
8
8
  s.version = Fakturoid::VERSION
9
- s.authors = ["Eda Riedl", "Lukáš Konarovský"]
9
+ s.authors = ["Eda Riedl", "Lukáš Konarovský", "Oldřich Vetešník"]
10
10
  s.email = ["podpora@fakturoid.cz"]
11
11
  s.summary = %q{Ruby client for web based invoicing service www.fakturoid.cz}
12
12
  s.description = %q{Ruby client for web based invoicing service www.fakturoid.cz}
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  class Api
3
5
  module Arguments
@@ -11,7 +13,7 @@ module Fakturoid
11
13
  end
12
14
 
13
15
  def validate_search_query(query)
14
- raise ArgumentError, 'Query parameter is required' if query.nil? || query.empty?
16
+ raise ArgumentError, "Query parameter is required" if query.nil? || query.empty?
15
17
  true
16
18
  end
17
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  class Api
3
5
  module HttpMethods
data/lib/fakturoid/api.rb CHANGED
@@ -1,5 +1,7 @@
1
- require 'fakturoid/api/arguments'
2
- require 'fakturoid/api/http_methods'
1
+ # frozen_string_literal: true
2
+
3
+ require "fakturoid/api/arguments"
4
+ require "fakturoid/api/http_methods"
3
5
 
4
6
  module Fakturoid
5
7
  class Api
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  module Client
3
5
  class Account < Fakturoid::Api
4
6
  def self.current
5
- get_request('account.json')
7
+ get_request("account.json")
6
8
  end
7
9
  end
8
10
  end
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  module Client
3
5
  class BankAccount < Fakturoid::Api
4
6
  def self.all
5
- get_request('bank_accounts.json')
7
+ get_request("bank_accounts.json")
6
8
  end
7
9
  end
8
10
  end
@@ -1,16 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  module Client
3
5
  class Event < Fakturoid::Api
4
6
  def self.all(params = {})
5
7
  request_params = permit_params(params, :page, :since, :subject_id) || {}
6
8
 
7
- get_request('events.json', request_params: request_params)
9
+ get_request("events.json", request_params: request_params)
8
10
  end
9
11
 
10
12
  def self.paid(params = {})
11
13
  request_params = permit_params(params, :page, :since, :subject_id) || {}
12
14
 
13
- get_request('events/paid.json', request_params: request_params)
15
+ get_request("events/paid.json", request_params: request_params)
14
16
  end
15
17
  end
16
18
  end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  module Client
3
5
  class Expense < Fakturoid::Api
4
6
  def self.all(params = {})
5
- request_params = permit_params(params, :page, :since, :updated_since, :number, :variable_symbol, :status, :subject_id) || {}
7
+ request_params = permit_params(params, :page, :since, :updated_since, :number, :variable_symbol, :status, :subject_id, :custom_id) || {}
6
8
 
7
- get_request('expenses.json', request_params: request_params)
9
+ get_request("expenses.json", request_params: request_params)
8
10
  end
9
11
 
10
12
  def self.find(id)
@@ -12,18 +14,25 @@ module Fakturoid
12
14
  get_request("expenses/#{id}.json")
13
15
  end
14
16
 
15
- def self.search(query)
17
+ def self.search(query, params = {})
16
18
  validate_search_query(query)
17
- get_request('expenses/search.json', request_params: { query: query })
19
+
20
+ request_params = permit_params(params, :page)
21
+ request_params[:query] = query
22
+
23
+ get_request("expenses/search.json", request_params: request_params)
18
24
  end
19
25
 
20
- def self.fire(id, event)
26
+ def self.fire(id, event, params = {})
27
+ request_params = permit_params(params, :paid_on, :paid_amount, :variable_symbol, :bank_account_id) || {}
28
+ request_params[:event] = event
29
+
21
30
  validate_numerical_id(id)
22
- post_request("expenses/#{id}/fire.json", request_params: { event: event })
31
+ post_request("expenses/#{id}/fire.json", request_params: request_params)
23
32
  end
24
33
 
25
34
  def self.create(payload = {})
26
- post_request('expenses.json', payload: payload)
35
+ post_request("expenses.json", payload: payload)
27
36
  end
28
37
 
29
38
  def self.update(id, payload = {})
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fakturoid
2
4
  module Client
3
5
  class Generator < Fakturoid::Api
4
6
  def self.all(params = {})
5
7
  request_params = permit_params(params, :page, :since, :updated_since, :subject_id) || {}
6
8
 
7
- get_request('generators.json', request_params: request_params)
9
+ get_request("generators.json", request_params: request_params)
8
10
  end
9
11
 
10
12
  def self.recurring(params = {})
11
13
  request_params = permit_params(params, :page, :since, :updated_since, :subject_id) || {}
12
14
 
13
- get_request('generators/recurring.json', request_params: request_params)
15
+ get_request("generators/recurring.json", request_params: request_params)
14
16
  end
15
17
 
16
18
  def self.template(params = {})
17
19
  request_params = permit_params(params, :page, :since, :updated_since, :subject_id) || {}
18
20
 
19
- get_request('generators/template.json', request_params: request_params)
21
+ get_request("generators/template.json", request_params: request_params)
20
22
  end
21
23
 
22
24
  def self.find(id)
@@ -25,7 +27,7 @@ module Fakturoid
25
27
  end
26
28
 
27
29
  def self.create(payload = {})
28
- post_request('generators.json', payload: payload)
30
+ post_request("generators.json", payload: payload)
29
31
  end
30
32
 
31
33
  def self.update(id, payload = {})