facturapi_ruby 2.0.0 → 2.1.0
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.lock +2 -2
- data/lib/facturapi_ruby/configuration.rb +1 -1
- data/lib/facturapi_ruby/receipts.rb +27 -0
- data/lib/facturapi_ruby/v2/receipts.rb +30 -0
- data/lib/facturapi_ruby/version.rb +1 -1
- data/lib/facturapi_ruby.rb +3 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1a19d9ac7e271ccb1b75a84cd9817e1477801aa795761635eee9ce5042110ff
|
4
|
+
data.tar.gz: d1c4f38cc9f7a44c67a9e5ec9cda816673ef1e57b82a83b411570d2127240faf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfe8eda4fd596304e928d1be7f23e74ab7b2608497143c39f9161b353bc8f4336d2c696bfc0fcfd99fdf9d2a61f8a6135384c417a56abc13b7b0ab1aa65a27f8
|
7
|
+
data.tar.gz: ee2ed706e1242d366e2abd08457b09013fcb4984c3b9bcd8d579af14a172a0e253e19f5c2cc808c23c97a36fc9caf79fbc18d8e85038654b77277a5cfee6a0cc
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/facturapi_ruby.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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
|