fatture_in_cloud_ruby 0.1.3 → 0.2.6
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/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +32 -26
- data/Rakefile +2 -1
- data/fatture_in_cloud_ruby.gemspec +21 -20
- data/lib/fatture_in_cloud_ruby.rb +7 -6
- 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 +16 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8330901398703d9c02e699743133dd8cef8e9f78f3761504e94c27996dcbbc7
|
4
|
+
data.tar.gz: 15fdccbd8ecfa1314000af81c24c9e875a7dc76b6905bf0afdd5f35aed289669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e775fc8c39185b8d5ec64e5d19010291ee8285c0279e158043393a0391796c6912db92e3bdab8ab3a420e7659388dd841a965a51051977487d1de1423e4b835b
|
7
|
+
data.tar.gz: 105e5a5befd0d6f303d4939f68e4965c808557c862328a3a8d99bf923e940629b548ccee3f27080998f2895675227f0d9c5aef2ea7d33905fe4d73117b6ab9ec
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
fatture_in_cloud_ruby
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.5
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fatture_in_cloud_ruby (0.
|
4
|
+
fatture_in_cloud_ruby (0.2.6)
|
5
5
|
api_struct (~> 1.0.5)
|
6
|
-
dry-configurable (~> 0.
|
6
|
+
dry-configurable (~> 0.11.5)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -16,69 +16,75 @@ 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)
|
24
|
-
dry-configurable (0.
|
24
|
+
dry-configurable (0.11.5)
|
25
25
|
concurrent-ruby (~> 1.0)
|
26
26
|
dry-core (~> 0.4, >= 0.4.7)
|
27
|
+
dry-equalizer (~> 0.2)
|
27
28
|
dry-core (0.4.9)
|
28
29
|
concurrent-ruby (~> 1.0)
|
29
30
|
dry-equalizer (0.3.0)
|
30
31
|
dry-inflector (0.2.0)
|
31
|
-
dry-monads (1.3.
|
32
|
+
dry-monads (1.3.5)
|
32
33
|
concurrent-ruby (~> 1.0)
|
33
34
|
dry-core (~> 0.4, >= 0.4.4)
|
34
35
|
dry-equalizer
|
35
|
-
ffi (1.
|
36
|
+
ffi (1.13.1)
|
36
37
|
ffi-compiler (1.0.1)
|
37
38
|
ffi (>= 1.0.0)
|
38
39
|
rake
|
39
|
-
hashie (4.
|
40
|
-
http (4.
|
40
|
+
hashie (4.1.0)
|
41
|
+
http (4.4.1)
|
41
42
|
addressable (~> 2.3)
|
42
43
|
http-cookie (~> 1.0)
|
43
|
-
http-form_data (~> 2.
|
44
|
+
http-form_data (~> 2.2)
|
44
45
|
http-parser (~> 1.2.0)
|
45
46
|
http-cookie (1.0.3)
|
46
47
|
domain_name (~> 0.5)
|
47
|
-
http-form_data (2.
|
48
|
+
http-form_data (2.3.0)
|
48
49
|
http-parser (1.2.1)
|
49
50
|
ffi-compiler (>= 1.0, < 2.0)
|
50
|
-
|
51
|
-
|
52
|
-
parser (2.7.0.1)
|
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
|
+
regexp_parser (1.7.1)
|
58
|
+
rexml (3.2.4)
|
57
59
|
rspec (3.9.0)
|
58
60
|
rspec-core (~> 3.9.0)
|
59
61
|
rspec-expectations (~> 3.9.0)
|
60
62
|
rspec-mocks (~> 3.9.0)
|
61
|
-
rspec-core (3.9.
|
62
|
-
rspec-support (~> 3.9.
|
63
|
-
rspec-expectations (3.9.
|
63
|
+
rspec-core (3.9.2)
|
64
|
+
rspec-support (~> 3.9.3)
|
65
|
+
rspec-expectations (3.9.2)
|
64
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
67
|
rspec-support (~> 3.9.0)
|
66
68
|
rspec-mocks (3.9.1)
|
67
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
70
|
rspec-support (~> 3.9.0)
|
69
|
-
rspec-support (3.9.
|
70
|
-
rubocop (0.
|
71
|
-
jaro_winkler (~> 1.5.1)
|
71
|
+
rspec-support (3.9.3)
|
72
|
+
rubocop (0.85.1)
|
72
73
|
parallel (~> 1.10)
|
73
|
-
parser (>= 2.
|
74
|
+
parser (>= 2.7.0.1)
|
74
75
|
rainbow (>= 2.2.2, < 4.0)
|
76
|
+
regexp_parser (>= 1.7)
|
77
|
+
rexml
|
78
|
+
rubocop-ast (>= 0.0.3)
|
75
79
|
ruby-progressbar (~> 1.7)
|
76
|
-
unicode-display_width (>= 1.4.0, <
|
80
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
81
|
+
rubocop-ast (0.0.3)
|
82
|
+
parser (>= 2.7.0.1)
|
77
83
|
ruby-progressbar (1.10.1)
|
78
84
|
unf (0.1.4)
|
79
85
|
unf_ext
|
80
|
-
unf_ext (0.0.7.
|
81
|
-
unicode-display_width (1.
|
86
|
+
unf_ext (0.0.7.7)
|
87
|
+
unicode-display_width (1.7.0)
|
82
88
|
|
83
89
|
PLATFORMS
|
84
90
|
ruby
|
@@ -88,7 +94,7 @@ DEPENDENCIES
|
|
88
94
|
fatture_in_cloud_ruby!
|
89
95
|
rake (~> 13.0)
|
90
96
|
rspec (~> 3.0)
|
91
|
-
rubocop
|
97
|
+
rubocop
|
92
98
|
|
93
99
|
BUNDLED WITH
|
94
100
|
1.17.3
|
data/Rakefile
CHANGED
@@ -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
|
-
spec.add_dependency 'dry-configurable', '~> 0.
|
39
|
+
spec.add_dependency 'dry-configurable', '~> 0.11.5'
|
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
|
-
spec.add_development_dependency 'rubocop'
|
44
|
+
spec.add_development_dependency 'rubocop'
|
44
45
|
end
|
@@ -1,13 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'api_struct'
|
2
4
|
require 'dry-configurable'
|
3
5
|
|
4
|
-
require_relative '
|
5
|
-
require_relative
|
6
|
-
require_relative
|
6
|
+
require_relative 'fatture_in_cloud_ruby/version'
|
7
|
+
require_relative 'fatture_in_cloud_ruby/settings'
|
8
|
+
require_relative 'fatture_in_cloud_ruby/api_struct_settings'
|
9
|
+
require_relative 'fatture_in_cloud_ruby/clients/corrispettivi'
|
10
|
+
require_relative 'fatture_in_cloud_ruby/corrispettivi'
|
7
11
|
|
8
12
|
module FattureInCloudRuby
|
9
|
-
extend Dry::Configurable
|
10
|
-
|
11
13
|
class Error < StandardError; end
|
12
|
-
# Your code goes here...
|
13
14
|
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.
|
4
|
+
version: 0.2.6
|
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
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.11.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.11.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
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: 0
|
96
|
+
version: '0'
|
97
97
|
description: A ruby API wrapper for FattureInCloud API
|
98
98
|
email:
|
99
99
|
- andrea.vanini@uidu.org
|
@@ -102,6 +102,8 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- ".gitignore"
|
105
|
+
- ".ruby-gemset"
|
106
|
+
- ".ruby-version"
|
105
107
|
- CODE_OF_CONDUCT.md
|
106
108
|
- Gemfile
|
107
109
|
- Gemfile.lock
|
@@ -114,6 +116,9 @@ files:
|
|
114
116
|
- lib/fatture_in_cloud_ruby.rb
|
115
117
|
- lib/fatture_in_cloud_ruby/api_struct_settings.rb
|
116
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
|
117
122
|
- lib/fatture_in_cloud_ruby/settings.rb
|
118
123
|
- lib/fatture_in_cloud_ruby/version.rb
|
119
124
|
homepage: https://github.com/uidu-org/fatture-in-cloud-ruby
|
@@ -123,7 +128,7 @@ metadata:
|
|
123
128
|
homepage_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
|
124
129
|
source_code_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
|
125
130
|
changelog_uri: https://github.com/uidu-org/fatture-in-cloud-ruby/CHANGELOG.md
|
126
|
-
post_install_message:
|
131
|
+
post_install_message:
|
127
132
|
rdoc_options: []
|
128
133
|
require_paths:
|
129
134
|
- lib
|
@@ -139,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
144
|
version: '0'
|
140
145
|
requirements: []
|
141
146
|
rubygems_version: 3.0.6
|
142
|
-
signing_key:
|
147
|
+
signing_key:
|
143
148
|
specification_version: 4
|
144
149
|
summary: A ruby API wrapper for FattureInCloud API
|
145
150
|
test_files: []
|