facturapi_ruby 2.0.0 → 2.1.0

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: 1722b0098ee0ef6f187c3b3cb441513a415b388297ef4536ae4635d851254a39
4
- data.tar.gz: 2ad3ee1d392a64bdade337461b896dd990339ed001af02afc0e7cf9ddb4151b9
3
+ metadata.gz: b1a19d9ac7e271ccb1b75a84cd9817e1477801aa795761635eee9ce5042110ff
4
+ data.tar.gz: d1c4f38cc9f7a44c67a9e5ec9cda816673ef1e57b82a83b411570d2127240faf
5
5
  SHA512:
6
- metadata.gz: f9b1155dd14026c3aaece114fda81239aa156c5f8ff5c3cf7a2637ab3b5db620ae24c3f0fb7f429e9a89d31a92c588b1ce956e5344a68e35f22fc3af8c76402a
7
- data.tar.gz: 208890f3f4a05ea90f494e35bfcb3a505788510e8e365dcb84d0b09e56419900ba6b6fb08f54bf2ed6b3d3ab524771c00b230c4fc841a8f2ef50abdb8e75b212
6
+ metadata.gz: cfe8eda4fd596304e928d1be7f23e74ab7b2608497143c39f9161b353bc8f4336d2c696bfc0fcfd99fdf9d2a61f8a6135384c417a56abc13b7b0ab1aa65a27f8
7
+ data.tar.gz: ee2ed706e1242d366e2abd08457b09013fcb4984c3b9bcd8d579af14a172a0e253e19f5c2cc808c23c97a36fc9caf79fbc18d8e85038654b77277a5cfee6a0cc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- facturapi_ruby (1.1.0)
4
+ facturapi_ruby (2.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 1.16.1
35
+ 1.17.3
@@ -1,4 +1,4 @@
1
- module FacturapiRuby
1
+ module FacturapiRuby
2
2
  class Configuration
3
3
  attr_accessor :api_key, :debug_output
4
4
 
@@ -0,0 +1,27 @@
1
+ require 'facturapi_ruby/http_client'
2
+
3
+ module FacturapiRuby
4
+ module Receipts
5
+ class << self
6
+ def get(receipt_id)
7
+ HttpClient.post(
8
+ endpoint: "/v1/receipts/#{receipt_id}"
9
+ )
10
+ end
11
+
12
+ def create(options)
13
+ HttpClient.post(
14
+ endpoint: '/v1/receipts',
15
+ api_options: options
16
+ )
17
+ end
18
+
19
+ def invoice(receipt_id, options={})
20
+ HttpClient.post(
21
+ endpoint: "/v1/receipts/#{receipt_id}/invoice",
22
+ api_options: options
23
+ )
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,30 @@
1
+ require 'facturapi_ruby/http_client'
2
+
3
+ module FacturapiRuby
4
+ module V2
5
+ module Receipts
6
+ class << self
7
+
8
+ def get(receipt_id)
9
+ HttpClient.post(
10
+ endpoint: "/v2/receipts/#{receipt_id}"
11
+ )
12
+ end
13
+
14
+ def create(options)
15
+ HttpClient.post(
16
+ endpoint: '/v2/receipts',
17
+ api_options: options
18
+ )
19
+ end
20
+
21
+ def invoice(receipt_id, options={})
22
+ HttpClient.post(
23
+ endpoint: "/v2/receipts/#{receipt_id}/invoice",
24
+ api_options: options
25
+ )
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FacturapiRuby
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
@@ -4,9 +4,11 @@ require 'facturapi_ruby/customers'
4
4
  require 'facturapi_ruby/files'
5
5
  require 'facturapi_ruby/invoices'
6
6
  require 'facturapi_ruby/version'
7
+ require 'facturapi_ruby/receipts'
7
8
  require 'facturapi_ruby/v2/customers'
8
9
  require 'facturapi_ruby/v2/files'
9
10
  require 'facturapi_ruby/v2/invoices'
11
+ require 'facturapi_ruby/v2/receipts'
10
12
 
11
13
 
12
14
  module FacturapiRuby
@@ -17,5 +19,5 @@ module FacturapiRuby
17
19
  self.configuration ||= Configuration.new
18
20
  yield(configuration)
19
21
  end
20
- end
22
+ end
21
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facturapi_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Llamas Velasco
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-17 00:00:00.000000000 Z
11
+ date: 2022-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,9 +78,11 @@ files:
78
78
  - lib/facturapi_ruby/files.rb
79
79
  - lib/facturapi_ruby/http_client.rb
80
80
  - lib/facturapi_ruby/invoices.rb
81
+ - lib/facturapi_ruby/receipts.rb
81
82
  - lib/facturapi_ruby/v2/customers.rb
82
83
  - lib/facturapi_ruby/v2/files.rb
83
84
  - lib/facturapi_ruby/v2/invoices.rb
85
+ - lib/facturapi_ruby/v2/receipts.rb
84
86
  - lib/facturapi_ruby/version.rb
85
87
  homepage: https://github.com/diegollams/facturapi_ruby
86
88
  licenses:
@@ -101,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
103
  - !ruby/object:Gem::Version
102
104
  version: '0'
103
105
  requirements: []
104
- rubygems_version: 3.1.2
106
+ rubygems_version: 3.0.9
105
107
  signing_key:
106
108
  specification_version: 4
107
109
  summary: Crea Facturas Electrónicas válidas lo más fácil posible (CFDI) https://facturapi.io