superfaktura 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 473f54ead212b9d9d660a1c2beb650d3ce4f0176ce3214203e124bedd041eccd
4
- data.tar.gz: 411d7b07b54b6d236c220ab9d4c76a0ad26d85484de9630781a005761eddba57
3
+ metadata.gz: 98f14939657dd3c7ddb4d39714b8b0b39e101e988d84a9d011e6931f25ae122f
4
+ data.tar.gz: cea7cf5b52c8092f862b391f3bbb9dc818f673bc3693fe6d2901165ebf85d4ed
5
5
  SHA512:
6
- metadata.gz: 30da1ba5bd8607d811e7717ccce13702239d8f725ad0546cbdf59f69db16c384c4e1cfc94f215b4c2129fbd03bba03068c86ba774953f849d08aea0e41b60f70
7
- data.tar.gz: 3efed501e76fe59adf8a510b6a2a3e52d1dccb6ccb880a5bd24c8f93d3b20b3e1420191afe787a7cb6016d229c88d83a2241132ef372190bc250aabdd8dc2277
6
+ metadata.gz: 463af4001e8d10bd019dc0e92b33f9aec0e4863485ad0e720df8b3ad7a886caabe134415b4908e7952f0bc51c782d4a40483dc23b2691644982b81284502e4be
7
+ data.tar.gz: a8a1d0c3b20573366c1919cb5719ecb6a1042e18132e8e4f0e747b1e934709f8b9b7ef227b2c157514f26815a4f7d39c3a015f021f4661d0f8d8d0e2b06a1c68
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superfaktura (0.9.0)
4
+ superfaktura (0.9.1)
5
5
  faraday (~> 1)
6
6
  faraday_middleware (~> 1)
7
7
 
data/README.md CHANGED
@@ -18,9 +18,26 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install superfaktura
20
20
 
21
- ## Usage
21
+ ## Configuration
22
+
23
+ ```
24
+ Superfaktura.configure do |config|
25
+ config.email = Rails.application.config_for(:superfaktura)[:email]
26
+ config.token = Rails.application.config_for(:superfaktura)[:token]
27
+ end
28
+ ```
22
29
 
30
+ Initialize `exponea.rb` with this settings:
31
+ - **email**: login email to superfaktura
32
+ - **token**: token generated from superfaktura
23
33
 
34
+ ## Usage
35
+
36
+ ### Create invoice
37
+ ```
38
+ Superfaktura::CreateInvoice.call(attributes)
39
+ ```
40
+ - **attributes**: hash for adding invoice. More info here: https://github.com/superfaktura/docs/blob/master/invoice.md#add-invoice
24
41
 
25
42
  ## Development
26
43
 
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1
4
+ Adds api status check
5
+
3
6
  ## 0.9
4
7
  Basic api created
data/lib/superfaktura.rb CHANGED
@@ -6,6 +6,7 @@ require 'superfaktura/version'
6
6
  require 'superfaktura/configuration'
7
7
  require 'superfaktura/base_api'
8
8
  require 'superfaktura/create_invoice'
9
+ require 'superfaktura/check_connection'
9
10
 
10
11
  module Superfaktura
11
12
  @configuration = Configuration.new
@@ -27,5 +27,9 @@ module Superfaktura
27
27
  def self.post(path, payload)
28
28
  request(path, 'POST', payload)
29
29
  end
30
+
31
+ def self.get(path, payload)
32
+ request(path, 'GET', payload)
33
+ end
30
34
  end
31
35
  end
@@ -0,0 +1,7 @@
1
+ module Superfaktura
2
+ class CheckConnection < BaseApi
3
+ def self.call
4
+ Faraday.get('https://moja.superfaktura.sk/countries').status == 200
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Superfaktura
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '0.9.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superfaktura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lubomir Vnenk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-12 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -146,6 +146,7 @@ files:
146
146
  - changelog.md
147
147
  - lib/superfaktura.rb
148
148
  - lib/superfaktura/base_api.rb
149
+ - lib/superfaktura/check_connection.rb
149
150
  - lib/superfaktura/configuration.rb
150
151
  - lib/superfaktura/create_invoice.rb
151
152
  - lib/superfaktura/version.rb