fatture_in_cloud_ruby 0.2.5 → 0.2.6

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: b469002a759aa7d15ceb46038b3e0a4db14fdd75dcf7c4bc87142d006659d56d
4
- data.tar.gz: '08d9b58e6434d0c11e043224dc62914746dbf827a260f3595dc66c615f7a00e9'
3
+ metadata.gz: f8330901398703d9c02e699743133dd8cef8e9f78f3761504e94c27996dcbbc7
4
+ data.tar.gz: 15fdccbd8ecfa1314000af81c24c9e875a7dc76b6905bf0afdd5f35aed289669
5
5
  SHA512:
6
- metadata.gz: f121b02f5b6e09b8a2dea2d65583b95820b3b99e3b67664568d49d95394de753fae447c39aaf26e134eb75f21ecee9f2a07db96ca4b916d0a3fe92cd531c0b47
7
- data.tar.gz: e8909ae9d43fc89c52135bf97b7d2667b351c954402a0fc0cad74f0b49897d215acb521a1cc6c22f308c0f0879201ed875d0bc50f4f84434288f156b8ce2068a
6
+ metadata.gz: e775fc8c39185b8d5ec64e5d19010291ee8285c0279e158043393a0391796c6912db92e3bdab8ab3a420e7659388dd841a965a51051977487d1de1423e4b835b
7
+ data.tar.gz: 105e5a5befd0d6f303d4939f68e4965c808557c862328a3a8d99bf923e940629b548ccee3f27080998f2895675227f0d9c5aef2ea7d33905fe4d73117b6ab9ec
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fatture_in_cloud_ruby (0.2.4)
4
+ fatture_in_cloud_ruby (0.2.6)
5
5
  api_struct (~> 1.0.5)
6
- dry-configurable (~> 0.8.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.0)
20
- concurrent-ruby (1.1.5)
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.8.3)
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.4)
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.11.3)
36
+ ffi (1.13.1)
36
37
  ffi-compiler (1.0.1)
37
38
  ffi (>= 1.0.0)
38
39
  rake
39
- hashie (4.0.0)
40
- http (4.2.0)
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.0)
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.1.1)
48
+ http-form_data (2.3.0)
48
49
  http-parser (1.2.1)
49
50
  ffi-compiler (>= 1.0, < 2.0)
50
- jaro_winkler (1.5.4)
51
- parallel (1.19.1)
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.2)
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.1)
62
- rspec-support (~> 3.9.1)
63
- rspec-expectations (3.9.0)
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.2)
70
- rubocop (0.78.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.6)
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, < 1.7)
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.6)
81
- unicode-display_width (1.6.0)
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 (~> 0.78.0)
97
+ rubocop
92
98
 
93
99
  BUNDLED WITH
94
100
  1.17.3
@@ -1,44 +1,45 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'fatture_in_cloud_ruby/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "fatture_in_cloud_ruby"
8
+ spec.name = 'fatture_in_cloud_ruby'
8
9
  spec.version = FattureInCloudRuby::VERSION
9
- spec.authors = ["Andrea Vanini"]
10
- spec.email = ["andrea.vanini@uidu.org"]
10
+ spec.authors = ['Andrea Vanini']
11
+ spec.email = ['andrea.vanini@uidu.org']
11
12
 
12
- spec.summary = "A ruby API wrapper for FattureInCloud API"
13
- spec.description = "A ruby API wrapper for FattureInCloud API"
14
- spec.homepage = "https://github.com/uidu-org/fatture-in-cloud-ruby"
15
- spec.license = "MIT"
13
+ spec.summary = 'A ruby API wrapper for FattureInCloud API'
14
+ spec.description = 'A ruby API wrapper for FattureInCloud API'
15
+ spec.homepage = 'https://github.com/uidu-org/fatture-in-cloud-ruby'
16
+ spec.license = 'MIT'
16
17
 
17
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["homepage_uri"] = spec.homepage
21
- spec.metadata["source_code_uri"] = "https://github.com/uidu-org/fatture-in-cloud-ruby"
22
- spec.metadata["changelog_uri"] = "https://github.com/uidu-org/fatture-in-cloud-ruby/CHANGELOG.md"
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 "RubyGems 2.0 or newer is required to protect against " \
25
- "public gem pushes."
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 = Dir.chdir(File.expand_path("..", __FILE__)) do
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 = "exe"
34
+ spec.bindir = 'exe'
34
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
- spec.require_paths = ["lib"]
36
+ spec.require_paths = ['lib']
36
37
 
37
- spec.add_dependency "api_struct", "~> 1.0.5"
38
- spec.add_dependency "dry-configurable", "~> 0.8.0"
38
+ spec.add_dependency 'api_struct', '~> 1.0.5'
39
+ spec.add_dependency 'dry-configurable', '~> 0.11.5'
39
40
 
40
- spec.add_development_dependency "bundler", "~> 1.17"
41
- spec.add_development_dependency "rake", "~> 13.0"
42
- spec.add_development_dependency "rspec", "~> 3.0"
43
- spec.add_development_dependency "rubocop", "~> 0.78.0"
41
+ spec.add_development_dependency 'bundler', '~> 1.17'
42
+ spec.add_development_dependency 'rake', '~> 13.0'
43
+ spec.add_development_dependency 'rspec', '~> 3.0'
44
+ spec.add_development_dependency 'rubocop'
44
45
  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,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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module FattureInCloudRuby
2
- VERSION = "0.2.5"
4
+ VERSION = '0.2.6'
3
5
  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.5
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-01-02 00:00:00.000000000 Z
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.8.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.8.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.78.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.78.0
96
+ version: '0'
97
97
  description: A ruby API wrapper for FattureInCloud API
98
98
  email:
99
99
  - andrea.vanini@uidu.org
@@ -116,7 +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
119
120
  - lib/fatture_in_cloud_ruby/corrispettivi.rb
121
+ - lib/fatture_in_cloud_ruby/proforma.rb
120
122
  - lib/fatture_in_cloud_ruby/settings.rb
121
123
  - lib/fatture_in_cloud_ruby/version.rb
122
124
  homepage: https://github.com/uidu-org/fatture-in-cloud-ruby
@@ -126,7 +128,7 @@ metadata:
126
128
  homepage_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
127
129
  source_code_uri: https://github.com/uidu-org/fatture-in-cloud-ruby
128
130
  changelog_uri: https://github.com/uidu-org/fatture-in-cloud-ruby/CHANGELOG.md
129
- post_install_message:
131
+ post_install_message:
130
132
  rdoc_options: []
131
133
  require_paths:
132
134
  - lib
@@ -142,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
144
  version: '0'
143
145
  requirements: []
144
146
  rubygems_version: 3.0.6
145
- signing_key:
147
+ signing_key:
146
148
  specification_version: 4
147
149
  summary: A ruby API wrapper for FattureInCloud API
148
150
  test_files: []