mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Added additional tests to REPP API
This commit is contained in:
parent
b505de2f0f
commit
b502c2779e
21 changed files with 796 additions and 7 deletions
|
@ -47,7 +47,7 @@ module Repp
|
|||
.merge!(recipient: recipient) })
|
||||
end
|
||||
|
||||
api :post, '/repp/v1/invoices/:id/cancel'
|
||||
api :put, '/repp/v1/invoices/:id/cancel'
|
||||
desc 'Cancel a specific invoice'
|
||||
def cancel
|
||||
action = Actions::InvoiceCancel.new(@invoice)
|
||||
|
@ -72,7 +72,7 @@ module Repp
|
|||
serializer = Serializers::Repp::Invoice.new(invoice, simplify: true)
|
||||
render_success(data: { invoice: serializer.to_json })
|
||||
else
|
||||
handle_errors(deposit)
|
||||
handle_non_epp_errors(deposit)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -108,7 +108,7 @@ module Repp
|
|||
end
|
||||
|
||||
def serialized_invoices(invoices)
|
||||
return invoices.pluck(:number) unless index_params[:details] == 'true'
|
||||
return invoices.map(&:number) unless index_params[:details] == 'true'
|
||||
|
||||
simple = index_params[:simple] == 'true' || false
|
||||
invoices.map { |i| Serializers::Repp::Invoice.new(i, simplify: simple).to_json }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue