Skip to content

Latest commit

 

History

History
724 lines (480 loc) · 24 KB

ExpensesApi.md

File metadata and controls

724 lines (480 loc) · 24 KB

OpenAPI\Client\ExpensesApi

All URIs are relative to https://openapi.flowaccount.com/v1

Method HTTP request Description
expensesCategoriesAccountingGet GET /expenses/categories/accounting Accounting categorys expenses document.
expensesCategoriesBusinessGet GET /expenses/categories/business Business categorys expenses document.
expensesEmailDocumentPost POST /expenses/email-document Send email expenses document.
expensesGet GET /expenses Get list all expenses documents.
expensesIdAttachmentPost POST /expenses/{id}/attachment Add Attachment to expenses.
expensesIdDelete DELETE /expenses/{id} Get expenses document.
expensesIdGet GET /expenses/{id} Get expenses document.
expensesIdPaymentPost POST /expenses/{id}/payment Change paid status of expenses document.
expensesIdStatusKeyStatusIdPost POST /expenses/{id}/status-key/{statusId} Change status of expenses document.
expensesInlinePost POST /expenses/inline Create expenses document with discount and tax inline.
expensesPost POST /expenses Create expenses document.
expensesSharedocumentPost POST /expenses/sharedocument Share link expenses documents.

expensesCategoriesAccountingGet

\OpenAPI\Client\Model\BusinessCategory expensesCategoriesAccountingGet($authorization)

Accounting categorys expenses document.

เรียกดูข้อมูลหมวดหมู่เอกสารค่าใช้จ่าย (สำหรับนักบัญชี)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 

try {
    $result = $apiInstance->expensesCategoriesAccountingGet($authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesCategoriesAccountingGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']

Return type

\OpenAPI\Client\Model\BusinessCategory

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesCategoriesBusinessGet

\OpenAPI\Client\Model\BusinessCategory expensesCategoriesBusinessGet($authorization)

Business categorys expenses document.

เรียกดูข้อมูลหมวดหมู่เอกสารค่าใช้จ่าย (สำหรับนักธุรกิจ)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 

try {
    $result = $apiInstance->expensesCategoriesBusinessGet($authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesCategoriesBusinessGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']

Return type

\OpenAPI\Client\Model\BusinessCategory

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesEmailDocumentPost

\OpenAPI\Client\Model\SendEmailResponse expensesEmailDocumentPost($authorization, $send_email_simple)

Send email expenses document.

ส่งเอกสารค่าใช้จ่าย ผ่านทางอีเมล ตามเลขที่เอกสารที่ต้องการ

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$send_email_simple = new \OpenAPI\Client\Model\SendEmailSimple(); // \OpenAPI\Client\Model\SendEmailSimple | 

try {
    $result = $apiInstance->expensesEmailDocumentPost($authorization, $send_email_simple);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesEmailDocumentPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
send_email_simple \OpenAPI\Client\Model\SendEmailSimple

Return type

\OpenAPI\Client\Model\SendEmailResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesGet

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse expensesGet($current_page, $page_size, $authorization, $sort_by, $filter)

Get list all expenses documents.

เรียกดูข้อมูลเอกสารค่าใช้จ่ายทั้งหมดในระบบ

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$current_page = 56; // int | Query current page document expenses. <br>Example Pattern: <ex>/expenses?currentPage=1 </ex><ex>/expenses?currentPage=1&pageSize=20</ex>
$page_size = 56; // int | Query document expenses list amount per page. <br>Example Pattern: <ex> /expenses?pageSize=20 </ex>
$authorization = 'Bearer accessToken'; // string | 
$sort_by = 'sort_by_example'; // string | 
$filter = 'filter_example'; // string | 

try {
    $result = $apiInstance->expensesGet($current_page, $page_size, $authorization, $sort_by, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
current_page int Query current page document expenses. <br>Example Pattern: <ex>/expenses?currentPage=1 </ex><ex>/expenses?currentPage=1&pageSize=20</ex>
page_size int Query document expenses list amount per page. <br>Example Pattern: <ex> /expenses?pageSize=20 </ex>
authorization string [default to 'Bearer accessToken']
sort_by string [optional]
filter string [optional]

Return type

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesIdAttachmentPost

\OpenAPI\Client\Model\AttachmentResponse expensesIdAttachmentPost($authorization, $id, $file)

Add Attachment to expenses.

แนบไฟล์ รูปภาพ หรือ เอกสารที่เกี่ยวข้อง ในเอกสารค่าใช้จ่ายตามเลขที่เอกสารที่ต้องการ

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$id = 'id_example'; // string | 
$file = "/path/to/file.txt"; // \SplFileObject | 

try {
    $result = $apiInstance->expensesIdAttachmentPost($authorization, $id, $file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesIdAttachmentPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string
file \SplFileObject**\SplFileObject** [optional]

Return type

\OpenAPI\Client\Model\AttachmentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesIdDelete

\OpenAPI\Client\Model\DeleteResponse expensesIdDelete($authorization, $id)

Get expenses document.

ลบ เอกสารค่าใช้จ่าย ตามเลขที่เอกสารที่ต้องการ
** การลบเอกสาร เอกสารต้องอยู่ในสถานะ รอดำเนินการ

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$id = 'id_example'; // string | ID เอกสารใช้ recordId

try {
    $result = $apiInstance->expensesIdDelete($authorization, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string ID เอกสารใช้ recordId

Return type

\OpenAPI\Client\Model\DeleteResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesIdGet

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse expensesIdGet($authorization, $id)

Get expenses document.

เรียกดูข้อมูลเอกสารค่าใช้จ่ายตามเลขที่เอกสารที่ต้องการ

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$id = 'id_example'; // string | 

try {
    $result = $apiInstance->expensesIdGet($authorization, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string

Return type

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesIdPaymentPost

\OpenAPI\Client\Model\ExpenseDocumentResponse expensesIdPaymentPost($authorization, $id, $payment_document)

Change paid status of expenses document.

จ่ายเงิน เอกสารพร้อมเปลี่ยนสถานะเอกสารค่าใช้จ่าย

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$id = 'id_example'; // string | ID เอกสารใช้ recordId หรือ documentId
$payment_document = new \OpenAPI\Client\Model\PaymentDocument(); // \OpenAPI\Client\Model\PaymentDocument | 

try {
    $result = $apiInstance->expensesIdPaymentPost($authorization, $id, $payment_document);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesIdPaymentPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string ID เอกสารใช้ recordId หรือ documentId
payment_document \OpenAPI\Client\Model\PaymentDocument

Return type

\OpenAPI\Client\Model\ExpenseDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesIdStatusKeyStatusIdPost

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse expensesIdStatusKeyStatusIdPost($authorization, $id, $status_id)

Change status of expenses document.

เปลี่ยนสถานะของเอกสารค่าใช้จ่าย สร้างเอกสารใหม่ครั้งแรกจะได้รับสถานะ รอดำเนินการ (awaiting)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$id = 'id_example'; // string | ID เอกสารใช้ recordId
$status_id = 'status_id_example'; // string | เปลี่ยนสถานะเอกสารได้ 3 สถานะ <br> awaiting = รอดำเนินการ <br> received = รับใบเสร็จแล้ว <br> void = ยกเลิก

try {
    $result = $apiInstance->expensesIdStatusKeyStatusIdPost($authorization, $id, $status_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesIdStatusKeyStatusIdPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string ID เอกสารใช้ recordId
status_id string เปลี่ยนสถานะเอกสารได้ 3 สถานะ <br> awaiting = รอดำเนินการ <br> received = รับใบเสร็จแล้ว <br> void = ยกเลิก

Return type

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesInlinePost

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse expensesInlinePost($authorization, $expense_inline_document)

Create expenses document with discount and tax inline.

สร้างเอกสารค่าใช้จ่าย แบบส่วนลด หรือ ภาษี แยกตามรายการสินค้า เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รอดำเนินการ (awaiting)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$expense_inline_document = new \OpenAPI\Client\Model\ExpenseInlineDocument(); // \OpenAPI\Client\Model\ExpenseInlineDocument | 

try {
    $result = $apiInstance->expensesInlinePost($authorization, $expense_inline_document);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesInlinePost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
expense_inline_document \OpenAPI\Client\Model\ExpenseInlineDocument

Return type

\OpenAPI\Client\Model\ExpenseInlineDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesPost

\OpenAPI\Client\Model\ExpenseDocumentResponse expensesPost($authorization, $expense_document)

Create expenses document.

สร้างเอกสารค่าใช้จ่าย เมื่อสร้างสำเร็จสถานะเอกสารจะอยู่ในสถานะ รอดำเนินการ (awaiting)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$expense_document = new \OpenAPI\Client\Model\ExpenseDocument(); // \OpenAPI\Client\Model\ExpenseDocument | 

try {
    $result = $apiInstance->expensesPost($authorization, $expense_document);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
expense_document \OpenAPI\Client\Model\ExpenseDocument

Return type

\OpenAPI\Client\Model\ExpenseDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expensesSharedocumentPost

\OpenAPI\Client\Model\ShareDocumentResponse expensesSharedocumentPost($authorization, $share_document)

Share link expenses documents.

แชร์ลิงค์ เอกสารค่าใช้จ่าย ที่ต้องการ จะได้รับลิงค์สำหรับแชร์และเรียกดูเอกสาร

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


$apiInstance = new OpenAPI\Client\Api\ExpensesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = 'Bearer accessToken'; // string | 
$share_document = new \OpenAPI\Client\Model\ShareDocument(); // \OpenAPI\Client\Model\ShareDocument | 

try {
    $result = $apiInstance->expensesSharedocumentPost($authorization, $share_document);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpensesApi->expensesSharedocumentPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
share_document \OpenAPI\Client\Model\ShareDocument

Return type

\OpenAPI\Client\Model\ShareDocumentResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]