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

Latest commit

 

History

History
307 lines (209 loc) · 8.08 KB

SectionsApi.md

File metadata and controls

307 lines (209 loc) · 8.08 KB

Freee\Accounting\SectionsApi

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

Method HTTP request Description
createSection() POST /api/1/sections 部門の作成
destroySection() DELETE /api/1/sections/{id} 部門の削除
getSection() GET /api/1/sections/{id} 部門の取得
getSections() GET /api/1/sections 部門一覧の取得
updateSection() PUT /api/1/sections/{id} 部門の更新

createSection()

createSection($section_params): \Freee\Accounting\Model\SectionResponse

部門の作成

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\SectionsApi(
    // 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
);
$section_params = new \Freee\Accounting\Model\SectionParams(); // \Freee\Accounting\Model\SectionParams | 部門の作成

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

Parameters

Name Type Description Notes
section_params \Freee\Accounting\Model\SectionParams 部門の作成 [optional]

Return type

\Freee\Accounting\Model\SectionResponse

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]

destroySection()

destroySection($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\SectionsApi(
    // 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
$company_id = 56; // int | 事業所ID

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

Parameters

Name Type Description Notes
id int
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]

getSection()

getSection($id, $company_id): \Freee\Accounting\Model\SectionResponse

部門の取得

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\SectionsApi(
    // 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->getSection($id, $company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SectionsApi->getSection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 部門ID
company_id int 事業所ID

Return type

\Freee\Accounting\Model\SectionResponse

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]

getSections()

getSections($company_id): \Freee\Accounting\Model\InlineResponse2006

部門一覧の取得

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\SectionsApi(
    // 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

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

Parameters

Name Type Description Notes
company_id int 事業所ID

Return type

\Freee\Accounting\Model\InlineResponse2006

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]

updateSection()

updateSection($id, $section_params): \Freee\Accounting\Model\SectionResponse

部門の更新

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\SectionsApi(
    // 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
$section_params = new \Freee\Accounting\Model\SectionParams(); // \Freee\Accounting\Model\SectionParams | 部門の更新

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

Parameters

Name Type Description Notes
id int
section_params \Freee\Accounting\Model\SectionParams 部門の更新 [optional]

Return type

\Freee\Accounting\Model\SectionResponse

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]