Skip to content

Latest commit

 

History

History
549 lines (365 loc) · 19.4 KB

QuotationsApi.md

File metadata and controls

549 lines (365 loc) · 19.4 KB

OpenAPI\Client\QuotationsApi

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

Method HTTP request Description
quotationsEmailDocumentPost POST /quotations/email-document Send email quotations document.
quotationsGet GET /quotations Get list all quotations documents.
quotationsIdAttachmentPost POST /quotations/{id}/attachment Add Attachment to quotations document.
quotationsIdDelete DELETE /quotations/{id} Get quotations document.
quotationsIdGet GET /quotations/{id} Get quotations document.
quotationsIdStatusKeyStatusIdPost POST /quotations/{id}/status-key/{statusId} Change status of quotations document.
quotationsInlinePost POST /quotations/inline Create quotations document with discount and tax inline.
quotationsPost POST /quotations Create quotations document.
quotationsSharedocumentPost POST /quotations/sharedocument Share link quotations document.

quotationsEmailDocumentPost

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

Send email quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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->quotationsEmailDocumentPost($authorization, $send_email_simple);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotationsApi->quotationsEmailDocumentPost: ', $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]

quotationsGet

\OpenAPI\Client\Model\InlineDocumentResponse quotationsGet($current_page, $page_size, $authorization, $sort_by, $filter)

Get list all quotations documents.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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 quotations. <br>Example Pattern: <ex>/quotations?currentPage=1 </ex><ex>/quotations?currentPage=1&pageSize=20</ex>
$page_size = 56; // int | Query document quotations list amount per page. <br>Example Pattern: <ex> /quotations?pageSize=20 </ex>
$authorization = 'Bearer accessToken'; // string | 
$sort_by = 'sort_by_example'; // string | 
$filter = 'filter_example'; // string | 

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

Parameters

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

Return type

\OpenAPI\Client\Model\InlineDocumentResponse

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]

quotationsIdAttachmentPost

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

Add Attachment to quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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 | documentId หรือ recordId ของเอกสารที่ต้องการแนบ
$file = "/path/to/file.txt"; // \SplFileObject | รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary

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

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string documentId หรือ recordId ของเอกสารที่ต้องการแนบ
file \SplFileObject**\SplFileObject** รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary [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]

quotationsIdDelete

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

Get quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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->quotationsIdDelete($authorization, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotationsApi->quotationsIdDelete: ', $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]

quotationsIdGet

\OpenAPI\Client\Model\InlineDocumentResponse quotationsIdGet($authorization, $id)

Get quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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->quotationsIdGet($authorization, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotationsApi->quotationsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\OpenAPI\Client\Model\InlineDocumentResponse

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]

quotationsIdStatusKeyStatusIdPost

\OpenAPI\Client\Model\InlineDocumentResponse quotationsIdStatusKeyStatusIdPost($authorization, $id, $status_id)

Change status of quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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 | เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> rejected = ยกเลิก

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

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string ID เอกสารใช้ recordId
status_id string เปลี่ยนสถานะเอกสารได้ 4 สถานะ <br> awaiting = รออนุมัติ <br> approved = อนุมัติ <br> approvedandprocessed = ดำเนินการแล้ว <br> rejected = ยกเลิก

Return type

\OpenAPI\Client\Model\InlineDocumentResponse

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]

quotationsInlinePost

\OpenAPI\Client\Model\InlineDocumentResponse quotationsInlinePost($authorization, $inline_document)

Create quotations document with discount and tax inline.

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

ข้อมูลการออกเอกสารใบเสนอราคา : https://flowaccount.com/blog/ใบเสนอราคา

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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 | 
$inline_document = new \OpenAPI\Client\Model\InlineDocument(); // \OpenAPI\Client\Model\InlineDocument | 

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

Parameters

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

Return type

\OpenAPI\Client\Model\InlineDocumentResponse

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]

quotationsPost

\OpenAPI\Client\Model\InlineDocumentResponse quotationsPost($authorization, $simple_document)

Create quotations document.

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

ข้อมูลการออกเอกสารใบเสนอราคา : https://flowaccount.com/blog/ใบเสนอราคา

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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 | 
$simple_document = new \OpenAPI\Client\Model\SimpleDocument(); // \OpenAPI\Client\Model\SimpleDocument | 

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

Parameters

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

Return type

\OpenAPI\Client\Model\InlineDocumentResponse

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]

quotationsSharedocumentPost

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

Share link quotations document.

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

Example

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


$apiInstance = new OpenAPI\Client\Api\QuotationsApi(
    // 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->quotationsSharedocumentPost($authorization, $share_document);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotationsApi->quotationsSharedocumentPost: ', $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]