class Tripletexer::Endpoints::Invoice
Public Instance Methods
create(body)
click to toggle source
tripletex.no/v2-docs/#!/invoice/post
# File lib/tripletexer/endpoints/invoice.rb, line 16 def create(body) create_entity('/v2/invoice', body) end
download_pdf(id)
click to toggle source
tripletex.no/v2-docs/#!/invoice/downloadPdf
# File lib/tripletexer/endpoints/invoice.rb, line 26 def download_pdf(id) get("/v2/invoice/#{id}/pdf") end
find(id, params = {})
click to toggle source
tripletex.no/v2-docs/#!/invoice/get
# File lib/tripletexer/endpoints/invoice.rb, line 21 def find(id, params = {}) find_entity("/v2/invoice/#{id}", params) end
payment_type()
click to toggle source
# File lib/tripletexer/endpoints/invoice.rb, line 40 def payment_type Tripletexer::Endpoints::Invoice::PaymentType.new(api_client) end
search(date_from, date_to, params = {})
click to toggle source
tripletex.no/v2-docs/#!/invoice/search
# File lib/tripletexer/endpoints/invoice.rb, line 7 def search(date_from, date_to, params = {}) final_params = params.merge( 'invoiceDateFrom' => ::Tripletexer::FormatHelpers.format_date(date_from), 'invoiceDateTo' => ::Tripletexer::FormatHelpers.format_date(date_to) ) find_entities('/v2/invoice', final_params) end
update_with_payment(id, payment_date, payment_type_id, paid_amount)
click to toggle source
tripletex.no/v2-docs/#!/invoice/payment
# File lib/tripletexer/endpoints/invoice.rb, line 31 def update_with_payment(id, payment_date, payment_type_id, paid_amount) final_params = { 'paymentDate' => payment_date, 'paymentTypeId' => payment_type_id, 'paidAmount' => paid_amount } api_client.put("/v2/invoice/#{id}/:payment", final_params) end