File tree Expand file tree Collapse file tree 5 files changed +75
-2
lines changed
cassettes/vindi/rest/invoices Expand file tree Collapse file tree 5 files changed +75
-2
lines changed Original file line number Diff line number Diff line change 11# Notas das versões
22
33
4+ ## [ v0.0.8 - 16/11/2020] ( https://github.com/vindi/vindi-ruby/releases/tag/v0.0.8 )
5+ - Adiciona endpoint para retentativa de envio de notas fiscais
6+
47## [ v0.0.7 - 14/10/2020] ( https://github.com/vindi/vindi-ruby/releases/tag/v0.0.7 )
58- Adiciona endpoint para consulta de registros de utilização associados ao período
69
Original file line number Diff line number Diff line change @@ -38,13 +38,23 @@ def create_invoice(options = {})
3838 #
3939 # @params invoice_id [Integer] ID of the invoice
4040 # @option options [Hash] :options invoice attributes
41- #
4241 # @see https://vindi.github.io/api-docs/dist/#!/invoices/DELETE_version_invoices_id_format
4342 # @example Delete invoice #108
4443 # client.delete_invoice(108)
4544 def delete_invoice ( invoice_id , options = { } )
4645 delete ( "invoices/#{ invoice_id } " , options ) [ :invoice ]
4746 end
47+
48+ # Retry a invoice from merchant vindi
49+ #
50+ # @params invoice_id [Integer] ID of the invoice
51+ # @option options [Hash] :options invoice attributes
52+ # @see https://vindi.github.io/api-docs/dist/#/invoices/postV1InvoicesIdRetry
53+ # @example Retry a invoice from merchant vindi
54+ # client.retry_invoice(108)
55+ def retry_invoice ( invoice_id , options = { } )
56+ post ( "invoices/#{ invoice_id } /retry" , options ) [ :invoice ]
57+ end
4858 end
4959 end
5060end
Original file line number Diff line number Diff line change 11module Vindi
2- VERSION = '0.0.7 '
2+ VERSION = '0.0.8 '
33end
Original file line number Diff line number Diff line change 4444 end
4545 end
4646 end
47+
48+ describe 'retry_invoice' do
49+ it 'returns the retried invoice' do
50+ VCR . use_cassette ( "rest/invoices/retry_invoice" ) do
51+ invoice_response = client . retry_invoice ( 108 )
52+ assert_requested :post , vindi_url ( "invoices/108/retry" )
53+ expect ( invoice_response [ :status ] ) . to eq ( 'processing' )
54+ end
55+ end
56+ end
4757end
You can’t perform that action at this time.
0 commit comments