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

Latest commit

 

History

History
193 lines (133 loc) · 5.75 KB

PaymentsApi.md

File metadata and controls

193 lines (133 loc) · 5.75 KB

Freee\Accounting\PaymentsApi

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

Method HTTP request Description
createDealPayment() POST /api/1/deals/{id}/payments 取引(収入・支出)の支払行の作成
destroyDealPayment() DELETE /api/1/deals/{id}/payments/{payment_id} 取引(収入・支出)の支払行の削除
updateDealPayment() PUT /api/1/deals/{id}/payments/{payment_id} 取引(収入・支出)の支払行の更新

createDealPayment()

createDealPayment($id, $payment_params): \Freee\Accounting\Model\DealResponse

取引(収入・支出)の支払行の作成

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\PaymentsApi(
    // 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
$payment_params = new \Freee\Accounting\Model\PaymentParams(); // \Freee\Accounting\Model\PaymentParams | 取引(収入・支出)の支払行の作成

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

Parameters

Name Type Description Notes
id int 取引ID
payment_params \Freee\Accounting\Model\PaymentParams 取引(収入・支出)の支払行の作成

Return type

\Freee\Accounting\Model\DealResponse

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]

destroyDealPayment()

destroyDealPayment($id, $payment_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\PaymentsApi(
    // 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
$payment_id = 56; // int | 決済ID
$company_id = 56; // int | 事業所ID

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

Parameters

Name Type Description Notes
id int 取引ID
payment_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]

updateDealPayment()

updateDealPayment($id, $payment_id, $payment_params): \Freee\Accounting\Model\DealResponse

取引(収入・支出)の支払行の更新

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\PaymentsApi(
    // 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
$payment_id = 56; // int | 決済ID
$payment_params = new \Freee\Accounting\Model\PaymentParams(); // \Freee\Accounting\Model\PaymentParams | 取引(収入・支出)の支払行の更新

try {
    $result = $apiInstance->updateDealPayment($id, $payment_id, $payment_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentsApi->updateDealPayment: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 取引ID
payment_id int 決済ID
payment_params \Freee\Accounting\Model\PaymentParams 取引(収入・支出)の支払行の更新

Return type

\Freee\Accounting\Model\DealResponse

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]