fatture_in_cloud_ruby 0.2.0 → 0.2.8
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/Gemfile +1 -1
- data/Gemfile.lock +18 -18
- data/fatture_in_cloud_ruby.gemspec +19 -18
- data/lib/fatture_in_cloud_ruby.rb +8 -7
- data/lib/fatture_in_cloud_ruby/clients/corrispettivi.rb +18 -18
- data/lib/fatture_in_cloud_ruby/clients/proforma.rb +42 -0
- data/lib/fatture_in_cloud_ruby/corrispettivi.rb +16 -0
- data/lib/fatture_in_cloud_ruby/proforma.rb +19 -0
- data/lib/fatture_in_cloud_ruby/settings.rb +1 -1
- data/lib/fatture_in_cloud_ruby/version.rb +3 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2936514977426fff74529e7775cde973d557bf845520f9feb7fd016169cf2ac
|
4
|
+
data.tar.gz: 49e46e571e10df1cf9e384c2193123677bb07d382d8cd7bc363a9ebf8f5bd7a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55ceed500561811a57c814dc360446d79c44e460c67811cb7c55dd0208a3b88c988c8560219e8142ea04dc2103efb6a844fbc256d482066d68db83db36852426
|
7
|
+
data.tar.gz: fbac76b82e5e824a0b01e9a7429d2d3d794afc7edac7d023c705f89b8055f1b977940ac9bb002474caa5a149f549b5bca83f9f6d225e7320e203b84b93621afe
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fatture_in_cloud_ruby (0.
|
4
|
+
fatture_in_cloud_ruby (0.2.7)
|
5
5
|
api_struct (~> 1.0.5)
|
6
6
|
dry-configurable (~> 0.8.0)
|
7
7
|
|
@@ -16,8 +16,8 @@ GEM
|
|
16
16
|
dry-monads (~> 1)
|
17
17
|
hashie
|
18
18
|
http
|
19
|
-
ast (2.4.
|
20
|
-
concurrent-ruby (1.1.
|
19
|
+
ast (2.4.1)
|
20
|
+
concurrent-ruby (1.1.6)
|
21
21
|
diff-lcs (1.3)
|
22
22
|
domain_name (0.5.20190701)
|
23
23
|
unf (>= 0.0.5, < 1.0.0)
|
@@ -28,45 +28,45 @@ GEM
|
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
29
|
dry-equalizer (0.3.0)
|
30
30
|
dry-inflector (0.2.0)
|
31
|
-
dry-monads (1.3.
|
31
|
+
dry-monads (1.3.5)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
33
|
dry-core (~> 0.4, >= 0.4.4)
|
34
34
|
dry-equalizer
|
35
|
-
ffi (1.
|
35
|
+
ffi (1.13.1)
|
36
36
|
ffi-compiler (1.0.1)
|
37
37
|
ffi (>= 1.0.0)
|
38
38
|
rake
|
39
|
-
hashie (4.
|
40
|
-
http (4.
|
39
|
+
hashie (4.1.0)
|
40
|
+
http (4.4.1)
|
41
41
|
addressable (~> 2.3)
|
42
42
|
http-cookie (~> 1.0)
|
43
|
-
http-form_data (~> 2.
|
43
|
+
http-form_data (~> 2.2)
|
44
44
|
http-parser (~> 1.2.0)
|
45
45
|
http-cookie (1.0.3)
|
46
46
|
domain_name (~> 0.5)
|
47
|
-
http-form_data (2.
|
47
|
+
http-form_data (2.3.0)
|
48
48
|
http-parser (1.2.1)
|
49
49
|
ffi-compiler (>= 1.0, < 2.0)
|
50
50
|
jaro_winkler (1.5.4)
|
51
|
-
parallel (1.19.
|
52
|
-
parser (2.7.
|
51
|
+
parallel (1.19.2)
|
52
|
+
parser (2.7.1.3)
|
53
53
|
ast (~> 2.4.0)
|
54
|
-
public_suffix (4.0.
|
54
|
+
public_suffix (4.0.5)
|
55
55
|
rainbow (3.0.0)
|
56
56
|
rake (13.0.1)
|
57
57
|
rspec (3.9.0)
|
58
58
|
rspec-core (~> 3.9.0)
|
59
59
|
rspec-expectations (~> 3.9.0)
|
60
60
|
rspec-mocks (~> 3.9.0)
|
61
|
-
rspec-core (3.9.
|
62
|
-
rspec-support (~> 3.9.
|
63
|
-
rspec-expectations (3.9.
|
61
|
+
rspec-core (3.9.2)
|
62
|
+
rspec-support (~> 3.9.3)
|
63
|
+
rspec-expectations (3.9.2)
|
64
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
65
|
rspec-support (~> 3.9.0)
|
66
66
|
rspec-mocks (3.9.1)
|
67
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
68
|
rspec-support (~> 3.9.0)
|
69
|
-
rspec-support (3.9.
|
69
|
+
rspec-support (3.9.3)
|
70
70
|
rubocop (0.78.0)
|
71
71
|
jaro_winkler (~> 1.5.1)
|
72
72
|
parallel (~> 1.10)
|
@@ -77,8 +77,8 @@ GEM
|
|
77
77
|
ruby-progressbar (1.10.1)
|
78
78
|
unf (0.1.4)
|
79
79
|
unf_ext
|
80
|
-
unf_ext (0.0.7.
|
81
|
-
unicode-display_width (1.6.
|
80
|
+
unf_ext (0.0.7.7)
|
81
|
+
unicode-display_width (1.6.1)
|
82
82
|
|
83
83
|
PLATFORMS
|
84
84
|
ruby
|
@@ -1,44 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'fatture_in_cloud_ruby/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'fatture_in_cloud_ruby'
|
8
9
|
spec.version = FattureInCloudRuby::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['Andrea Vanini']
|
11
|
+
spec.email = ['andrea.vanini@uidu.org']
|
11
12
|
|
12
13
|
spec.summary = 'A ruby API wrapper for FattureInCloud API'
|
13
14
|
spec.description = 'A ruby API wrapper for FattureInCloud API'
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
15
|
+
spec.homepage = 'https://github.com/uidu-org/fatture-in-cloud-ruby'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
|
17
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the
|
18
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
|
18
19
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
20
|
if spec.respond_to?(:metadata)
|
20
|
-
spec.metadata[
|
21
|
-
spec.metadata[
|
22
|
-
spec.metadata[
|
21
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
22
|
+
spec.metadata['source_code_uri'] = 'https://github.com/uidu-org/fatture-in-cloud-ruby'
|
23
|
+
spec.metadata['changelog_uri'] = 'https://github.com/uidu-org/fatture-in-cloud-ruby/CHANGELOG.md'
|
23
24
|
else
|
24
|
-
raise
|
25
|
-
|
25
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
26
|
+
'public gem pushes.'
|
26
27
|
end
|
27
28
|
|
28
29
|
# Specify which files should be added to the gem when it is released.
|
29
30
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
-
spec.files
|
31
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
31
32
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
33
|
end
|
33
|
-
spec.bindir =
|
34
|
+
spec.bindir = 'exe'
|
34
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
-
spec.require_paths = [
|
36
|
+
spec.require_paths = ['lib']
|
36
37
|
|
37
38
|
spec.add_dependency 'api_struct', '~> 1.0.5'
|
38
39
|
spec.add_dependency 'dry-configurable', '~> 0.8.0'
|
39
40
|
|
40
|
-
spec.add_development_dependency
|
41
|
-
spec.add_development_dependency
|
41
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
42
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
42
43
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
43
44
|
spec.add_development_dependency 'rubocop', '~> 0.78.0'
|
44
45
|
end
|
@@ -1,15 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'api_struct'
|
2
4
|
require 'dry-configurable'
|
3
5
|
|
4
|
-
|
6
|
+
require_relative 'fatture_in_cloud_ruby/version'
|
7
|
+
require_relative 'fatture_in_cloud_ruby/settings'
|
5
8
|
require_relative 'fatture_in_cloud_ruby/api_struct_settings'
|
6
|
-
|
7
|
-
require_relative
|
8
|
-
require_relative
|
9
|
+
require_relative 'fatture_in_cloud_ruby/clients/corrispettivi'
|
10
|
+
require_relative 'fatture_in_cloud_ruby/clients/proforma'
|
11
|
+
require_relative 'fatture_in_cloud_ruby/corrispettivi'
|
12
|
+
require_relative 'fatture_in_cloud_ruby/proforma'
|
9
13
|
|
10
14
|
module FattureInCloudRuby
|
11
|
-
extend Dry::Configurable
|
12
|
-
|
13
15
|
class Error < StandardError; end
|
14
|
-
# Your code goes here...
|
15
16
|
end
|
@@ -1,40 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module FattureInCloudRuby
|
2
4
|
module Clients
|
3
5
|
class Corrispettivi < ApiStruct::Client
|
4
6
|
fatture_in_cloud :corrispettivi
|
5
7
|
|
6
|
-
def list(
|
8
|
+
def list(**params)
|
7
9
|
post(
|
8
10
|
path: 'corrispettivi/lista',
|
9
11
|
json: {
|
10
|
-
anno: year,
|
11
12
|
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
12
13
|
api_key: FattureInCloudRuby::Settings.config.api_key
|
13
|
-
}
|
14
|
+
}.merge(params)
|
14
15
|
)
|
15
16
|
end
|
16
17
|
|
17
|
-
def retrieve(id)
|
18
|
+
def retrieve(id); end
|
19
|
+
|
20
|
+
def delete(id)
|
21
|
+
post(
|
22
|
+
path: 'corrispettivi/elimina',
|
23
|
+
json: {
|
24
|
+
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
25
|
+
api_key: FattureInCloudRuby::Settings.config.api_key
|
26
|
+
}.merge(id: id)
|
27
|
+
)
|
18
28
|
end
|
19
29
|
|
20
|
-
def create(
|
30
|
+
def create(**params)
|
31
|
+
puts params.inspect
|
21
32
|
post(
|
22
33
|
path: 'corrispettivi/nuovo',
|
23
34
|
json: {
|
24
35
|
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
25
|
-
api_key: FattureInCloudRuby::Settings.config.api_key
|
26
|
-
|
27
|
-
protocollo_auto: true,
|
28
|
-
metodo: metodo,
|
29
|
-
desc: desc,
|
30
|
-
importi_ivati: importi_ivati,
|
31
|
-
lista_righe: [
|
32
|
-
{
|
33
|
-
importo: riga[:importo],
|
34
|
-
cod_iva: riga[:cod_iva]
|
35
|
-
}
|
36
|
-
]
|
37
|
-
}
|
36
|
+
api_key: FattureInCloudRuby::Settings.config.api_key
|
37
|
+
}.merge(params)
|
38
38
|
)
|
39
39
|
end
|
40
40
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FattureInCloudRuby
|
4
|
+
module Clients
|
5
|
+
class Proforma < ApiStruct::Client
|
6
|
+
fatture_in_cloud :proforma
|
7
|
+
|
8
|
+
def list(**params)
|
9
|
+
post(
|
10
|
+
path: 'proforma/lista',
|
11
|
+
json: {
|
12
|
+
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
13
|
+
api_key: FattureInCloudRuby::Settings.config.api_key
|
14
|
+
}.merge(params)
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
def retrieve(id); end
|
19
|
+
|
20
|
+
def delete(id)
|
21
|
+
post(
|
22
|
+
path: 'proforma/elimina',
|
23
|
+
json: {
|
24
|
+
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
25
|
+
api_key: FattureInCloudRuby::Settings.config.api_key
|
26
|
+
}.merge(id: id)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def create(**params)
|
31
|
+
puts params.inspect
|
32
|
+
post(
|
33
|
+
path: 'proforma/nuovo',
|
34
|
+
json: {
|
35
|
+
api_uid: FattureInCloudRuby::Settings.config.api_uid,
|
36
|
+
api_key: FattureInCloudRuby::Settings.config.api_key
|
37
|
+
}.merge(params)
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FattureInCloudRuby
|
4
|
+
class Corrispettivi < ApiStruct::Entity
|
5
|
+
client_service FattureInCloudRuby::Clients::Corrispettivi
|
6
|
+
|
7
|
+
# client_service AuthorsClient, prefix: true, only: :index
|
8
|
+
# alias:
|
9
|
+
# client_service AuthorsClient, prefix: :prefix, except: :index
|
10
|
+
|
11
|
+
attr_entity :success, :error, :error_code,
|
12
|
+
:id, :metodo, :importi_ivati,
|
13
|
+
:desc, :riga, :protocollo_auto, :tipo, :lista_corrispettivi,
|
14
|
+
:new_id
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FattureInCloudRuby
|
4
|
+
class Proforma < ApiStruct::Entity
|
5
|
+
client_service FattureInCloudRuby::Clients::Proforma
|
6
|
+
|
7
|
+
# client_service AuthorsClient, prefix: true, only: :index
|
8
|
+
# alias:
|
9
|
+
# client_service AuthorsClient, prefix: :prefix, except: :index
|
10
|
+
|
11
|
+
attr_entity :success, :error, :error_code
|
12
|
+
attr_entity :nome, :id_cliente, :id_fornitore, :indirizzo_via, :indirizzo_cap, :indirizzo_citta, :indirizzo_provincia
|
13
|
+
attr_entity :paese, :paese_iso
|
14
|
+
attr_entity :piva, :cf
|
15
|
+
attr_entity :salva_anagrafica
|
16
|
+
attr_entity :prezzi_ivati
|
17
|
+
attr_entity :lista_articoli
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fatture_in_cloud_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Vanini
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_struct
|
@@ -116,6 +116,9 @@ files:
|
|
116
116
|
- lib/fatture_in_cloud_ruby.rb
|
117
117
|
- lib/fatture_in_cloud_ruby/api_struct_settings.rb
|
118
118
|
- lib/fatture_in_cloud_ruby/clients/corrispettivi.rb
|
119
|
+
- lib/fatture_in_cloud_ruby/clients/proforma.rb
|
120
|
+
- lib/fatture_in_cloud_ruby/corrispettivi.rb
|
121
|
+
- lib/fatture_in_cloud_ruby/proforma.rb
|
119
122
|
- lib/fatture_in_cloud_ruby/settings.rb
|
120
123
|
- lib/fatture_in_cloud_ruby/version.rb
|
121
124
|
homepage: https://github.com/uidu-org/fatture-in-cloud-ruby
|
@@ -125,7 +128,7 @@ metadata:
|
|
125
128
|
homepage_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
|
126
129
|
source_code_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
|
127
130
|
changelog_uri: https://github.com/uidu-org/fatture-in-cloud-ruby/CHANGELOG.md
|
128
|
-
post_install_message:
|
131
|
+
post_install_message:
|
129
132
|
rdoc_options: []
|
130
133
|
require_paths:
|
131
134
|
- lib
|
@@ -141,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
144
|
version: '0'
|
142
145
|
requirements: []
|
143
146
|
rubygems_version: 3.0.6
|
144
|
-
signing_key:
|
147
|
+
signing_key:
|
145
148
|
specification_version: 4
|
146
149
|
summary: A ruby API wrapper for FattureInCloud API
|
147
150
|
test_files: []
|