Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
260 lines (181 loc) · 8.25 KB

WalletTxnsApi.md

File metadata and controls

260 lines (181 loc) · 8.25 KB

Freee\Accounting\WalletTxnsApi

All URIs are relative to https://api.freee.co.jp.

Method HTTP request Description
createWalletTxn() POST /api/1/wallet_txns 口座明細の作成
destroyWalletTxn() DELETE /api/1/wallet_txns/{id} 口座明細の削除
getWalletTxn() GET /api/1/wallet_txns/{id} 口座明細の取得
getWalletTxns() GET /api/1/wallet_txns 口座明細一覧の取得

createWalletTxn()

createWalletTxn($wallet_txn_params): \Freee\Accounting\Model\WalletTxnResponse

口座明細の作成

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\WalletTxnsApi(
    // 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(),
    $config
);
$wallet_txn_params = new \Freee\Accounting\Model\WalletTxnParams(); // \Freee\Accounting\Model\WalletTxnParams | 口座明細の作成

try {
    $result = $apiInstance->createWalletTxn($wallet_txn_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WalletTxnsApi->createWalletTxn: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
wallet_txn_params \Freee\Accounting\Model\WalletTxnParams 口座明細の作成 [optional]

Return type

\Freee\Accounting\Model\WalletTxnResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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

destroyWalletTxn()

destroyWalletTxn($id, $company_id)

口座明細の削除

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\WalletTxnsApi(
    // 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(),
    $config
);
$id = 56; // int | 明細ID
$company_id = 56; // int | 事業所ID

try {
    $apiInstance->destroyWalletTxn($id, $company_id);
} catch (Exception $e) {
    echo 'Exception when calling WalletTxnsApi->destroyWalletTxn: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 明細ID
company_id int 事業所ID

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

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

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

getWalletTxn()

getWalletTxn($id, $company_id): \Freee\Accounting\Model\WalletTxnResponse

口座明細の取得

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\WalletTxnsApi(
    // 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(),
    $config
);
$id = 56; // int | 明細ID
$company_id = 56; // int | 事業所ID

try {
    $result = $apiInstance->getWalletTxn($id, $company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WalletTxnsApi->getWalletTxn: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 明細ID
company_id int 事業所ID

Return type

\Freee\Accounting\Model\WalletTxnResponse

Authorization

oauth2

HTTP request headers

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

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

getWalletTxns()

getWalletTxns($company_id, $walletable_type, $walletable_id, $start_date, $end_date, $entry_side, $offset, $limit): \Freee\Accounting\Model\InlineResponse20014

口座明細一覧の取得

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\WalletTxnsApi(
    // 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(),
    $config
);
$company_id = 56; // int | 事業所ID
$walletable_type = 'walletable_type_example'; // string | 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) walletable_type、walletable_idは同時に指定が必要です。
$walletable_id = 56; // int | 口座ID walletable_type、walletable_idは同時に指定が必要です。
$start_date = 'start_date_example'; // string | 取引日で絞込:開始日 (yyyy-mm-dd)
$end_date = 'end_date_example'; // string | 取引日で絞込:終了日 (yyyy-mm-dd)
$entry_side = 'entry_side_example'; // string | 入金/出金 (入金: income, 出金: expense)
$offset = 56; // int | 取得レコードのオフセット (デフォルト: 0)
$limit = 56; // int | 取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100)

try {
    $result = $apiInstance->getWalletTxns($company_id, $walletable_type, $walletable_id, $start_date, $end_date, $entry_side, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WalletTxnsApi->getWalletTxns: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int 事業所ID
walletable_type string 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) walletable_type、walletable_idは同時に指定が必要です。 [optional]
walletable_id int 口座ID walletable_type、walletable_idは同時に指定が必要です。 [optional]
start_date string 取引日で絞込:開始日 (yyyy-mm-dd) [optional]
end_date string 取引日で絞込:終了日 (yyyy-mm-dd) [optional]
entry_side string 入金/出金 (入金: income, 出金: expense) [optional]
offset int 取得レコードのオフセット (デフォルト: 0) [optional]
limit int 取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100) [optional]

Return type

\Freee\Accounting\Model\InlineResponse20014

Authorization

oauth2

HTTP request headers

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

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