Skip to content

Commit

Permalink
Updating typos and added updateStatusLogOfInvoiceByHash
Browse files Browse the repository at this point in the history
  • Loading branch information
codedeviate committed Sep 5, 2024
1 parent f86edf4 commit e846b50
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 30 deletions.
3 changes: 3 additions & 0 deletions Writerside/hi.tree
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<toc-element topic="getOrderInfo.md"/>
<toc-element topic="getOrderByHash.md"/>
<toc-element topic="getInvoiceByHash.md"/>
<toc-element topic="updateStatusLogOfInvoiceByHash.md"/>
<toc-element topic="createInvoiceFromOrder.md"/>
<toc-element topic="getAPICredentials.md"/>
</toc-element>
Expand Down Expand Up @@ -90,6 +91,7 @@
<toc-element topic="Get-order-info.md"/>
<toc-element topic="Get-order-by-hash.md"/>
<toc-element topic="Get-invoice-by-hash.md"/>
<toc-element topic="Update-Status-Log-Of-Invoice-By-Hash.md"/>
<toc-element topic="Create-invoice-from-order.md"/>
<toc-element topic="Get-API-Credentials.md"/>
<toc-element topic="Advanced-examples.md">
Expand Down Expand Up @@ -258,6 +260,7 @@
<toc-element topic="Portal-Example-getCurrencies.md"/>
<toc-element topic="Portal-Example-getCustomers.md"/>
<toc-element topic="Portal-Example-getInvoices.md"/>
<toc-element topic="Portal-Example-getStatuslogs.md"/>
<toc-element topic="Portal-Example-getLanguages.md"/>
<toc-element topic="Portal-Example-getlogos.md"/>
<toc-element topic="Portal-Example-getMerchant.md"/>
Expand Down
2 changes: 1 addition & 1 deletion Writerside/topics/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| Platform | Verified | Complete | Description |
|------------------|-------------------------------------|-------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| %code-json% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | JSON basic example payloads. Updated 2024. |
| %code-json% | 27/%NUMBER_OF_PAYMENT_API_EXAMPLES% | 27/%NUMBER_OF_PAYMENT_API_EXAMPLES% | JSON basic example payloads. Updated 2024. |
| %code-python% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | Python3 code. Updated 2024. |
| %code-node% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | Node.JS code. Updated 2024. |
| %code-bun% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | 26/%NUMBER_OF_PAYMENT_API_EXAMPLES% | Bun code. Updated 2024. |
Expand Down
57 changes: 29 additions & 28 deletions Writerside/topics/Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@

<include from="Snippets-PaymentAPI.md" element-id="snippet-header"></include>

| Function | Description |
|-----------------------------------------------------------|--------------------------------------------------------------------------|
| [getAddress](getAddress.md) | getAddress is used for getting address. |
| [addPayment](addPayment.md) | addPayment is used for creating payments. |
| [activatePayment](activatePayment.md) | activatePayment is used for activating payments. |
| [updatePayment](updatePayment.md) | updatePayment is used for updating payments. |
| [cancelPayment](cancelPayment.md) | cancelPayment is used for cancelling payments. |
| [creditPayment](creditPayment.md) | creditPayment is used for crediting payments. |
| [getAccountinfo](getAccountinfo.md) | getAccountinfo is used for getting account information. |
| [getTerms](getTerms.md) | getTerms is used for getting terms. |
| [getPaymentplans](getPaymentplans.md) | getPaymentplans is used for getting payment plans. |
| [getPaymentinfo](getPaymentinfo.md) | getPaymentinfo is used for getting payment information. |
| [getDuePayments](getDuePayments.md) | getDuePayments is used for getting due payments. |
| [getSettlements](getSettlements.md) | getSettlements is used for getting settlements. |
| [getSettlementsWithDetails](getSettlementsWithDetails.md) | getSettlementsWithDetails is used for getting settlements with details. |
| [getCustomersByName](getCustomersByName.md) | getCustomersByName is used for getting customers by name. |
| [getMerchantByOrgnum](getMerchantByOrgnum.md) | getMerchantByOrgnum is used for getting merchant by organization number. |
| [getInvoicesByPno](getInvoicesByPno.md) | getInvoicesByPno is used for getting invoices by personal number. |
| [getInvoicesByCustomer](getInvoicesByCustomer.md) | getInvoicesByCustomer is used for getting invoices by customer. |
| [getExchangeRate](getExchangeRate.md) | getExchangeRate is used for getting exchange rate. |
| [getVatrate](getVatrate.md) | getVatrate is used for getting VAT rate. |
| [getFees](getFees.md) | getFees is used for getting fees. |
| [crediflowSearchParty](crediflowSearchParty.md) | crediflowSearchParty is used for searching for a party. |
| [getOrderInfo](getOrderInfo.md) | getOrderInfo is used for getting order by hash. |
| [getOrderByHash](getOrderByHash.md) | getOrderByHash is used for getting order by hash. |
| [getInvoiceByHash](getInvoiceByHash.md) | getInvoiceByHash is used for getting invoice by hash. |
| [createInvoiceFromOrder](createInvoiceFromOrder.md) | createInvoiceFromOrder is used for creating invoice from order. |
| [getAPICredentials](getAPICredentials.md) | getAPICredentials is used for getting API credentials. |
| Function | Description |
|---------------------------------------------------------------------|------------------------------------------------------------------------------------------|
| [getAddress](getAddress.md) | getAddress is used for getting address. |
| [addPayment](addPayment.md) | addPayment is used for creating payments. |
| [activatePayment](activatePayment.md) | activatePayment is used for activating payments. |
| [updatePayment](updatePayment.md) | updatePayment is used for updating payments. |
| [cancelPayment](cancelPayment.md) | cancelPayment is used for cancelling payments. |
| [creditPayment](creditPayment.md) | creditPayment is used for crediting payments. |
| [getAccountinfo](getAccountinfo.md) | getAccountinfo is used for getting account information. |
| [getTerms](getTerms.md) | getTerms is used for getting terms. |
| [getPaymentplans](getPaymentplans.md) | getPaymentplans is used for getting payment plans. |
| [getPaymentinfo](getPaymentinfo.md) | getPaymentinfo is used for getting payment information. |
| [getDuePayments](getDuePayments.md) | getDuePayments is used for getting due payments. |
| [getSettlements](getSettlements.md) | getSettlements is used for getting settlements. |
| [getSettlementsWithDetails](getSettlementsWithDetails.md) | getSettlementsWithDetails is used for getting settlements with details. |
| [getCustomersByName](getCustomersByName.md) | getCustomersByName is used for getting customers by name. |
| [getMerchantByOrgnum](getMerchantByOrgnum.md) | getMerchantByOrgnum is used for getting merchant by organization number. |
| [getInvoicesByPno](getInvoicesByPno.md) | getInvoicesByPno is used for getting invoices by personal number. |
| [getInvoicesByCustomer](getInvoicesByCustomer.md) | getInvoicesByCustomer is used for getting invoices by customer. |
| [getExchangeRate](getExchangeRate.md) | getExchangeRate is used for getting exchange rate. |
| [getVatrate](getVatrate.md) | getVatrate is used for getting VAT rate. |
| [getFees](getFees.md) | getFees is used for getting fees. |
| [crediflowSearchParty](crediflowSearchParty.md) | crediflowSearchParty is used for searching for a party. |
| [getOrderInfo](getOrderInfo.md) | getOrderInfo is used for getting order by hash. |
| [getOrderByHash](getOrderByHash.md) | getOrderByHash is used for getting order by hash. |
| [updateStatusLogOfInvoiceByHash](updateStatusLogOfInvoiceByHash.md) | updateStatusLogOfInvoiceByHash is used for adding text to the status log for an invoice. |
| [getInvoiceByHash](getInvoiceByHash.md) | getInvoiceByHash is used for getting invoice by hash. |
| [createInvoiceFromOrder](createInvoiceFromOrder.md) | createInvoiceFromOrder is used for creating invoice from order. |
| [getAPICredentials](getAPICredentials.md) | getAPICredentials is used for getting API credentials. |
48 changes: 48 additions & 0 deletions Writerside/topics/Portal-Example-getStatuslogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# getStatuslogs

<include from="Snippets-PortalAPI.md" element-id="snippet-header" />

Get the statuslogs for an invoice from the portal.

<tabs>
<tab title="%code-php%">
<code-block lang="php">
<![CDATA[
<?php
declare(strict_types=1);
use Qvickly\Api\Portal\PortalAPI;
require __DIR__ . '/../../vendor/autoload.php';
use Dotenv\Dotenv;
$dotenv = Dotenv::createImmutable(__DIR__ . '/../..');
$dotenv->load();

$portalAPI = new PortalAPI($_ENV['TOKEN'], testMode: true);
$invoices = $portalAPI->get('invoices', params: ['filter' => 'search', 'search' => 'Testperson']);
if(is_array($invoices) && array_key_exists('error', $invoices)) {
echo "Code: " . $invoices['code'] . "\n";
echo "Error: " . $invoices['error'] . "\n";
exit;
}
echo "Found " . count($invoices) . " invoices\n";
if(count($invoices) > 0) {
$oneInvoice = array_pop($invoices);
$oneInvoiceId = $oneInvoice['invoiceid_real'];
$statusLog = $portalAPI->get('invoices/' . $oneInvoiceId . '/statuslog');
echo "And the statuslog for the last invoice is:\n";
echo json_encode($statusLog, JSON_PRETTY_PRINT);
}



]]>
</code-block>

<include from="Snippets-PHP-Module.md" element-id="snippet-composer-require" />

</tab>

</tabs>
33 changes: 33 additions & 0 deletions Writerside/topics/PortalAPI-Invoices-Filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,39 @@ The search filter includes these fields in a fragment search:
- phonenumber
- ocr

If the query parameter search contains a space, the search will be split into multiple words and the search will be performed on each word separately. The search will return all invoices that contain all the words in the search query.

## searchPhrase

Search for an invoice by its invoice ID, customer name, customer number, street, postal code, city, your reference, our reference, project name, organization number, address 2, email, phone number, or OCR number.

| Property | Required | Default value | Description |
|---------------|----------|---------------|--------------------|
| searchPhrase | Yes | | Text to search for |

```
/invoices/?filter=searchPhrase&searchPhrase=test+test
```

The search filter includes these fields in a fragment search:
- invoiceid_real
- yourorder
- customername
- customerno
- street
- postalcode
- city
- yourreference
- ourreference
- projectname
- orgnum
- address2
- email
- phonenumber
- ocr

The search will return all invoices that contain the exact phrase in the search query.

## rangeByDate

Search for invoices by the date they were last updated.
Expand Down
Loading

0 comments on commit e846b50

Please sign in to comment.