Skip to content

Latest commit

 

History

History
123 lines (80 loc) · 3.12 KB

UserApi.md

File metadata and controls

123 lines (80 loc) · 3.12 KB

FattureInCloud\UserApi

All URIs are relative to https://api-v2.fattureincloud.it, except if the operation defines another base path.

Method HTTP request Description
getUserInfo() GET /user/info Get User Info
listUserCompanies() GET /user/companies List User Companies

getUserInfo()

getUserInfo(): \FattureInCloud\Model\GetUserInfoResponse

Get User Info

Gets the current user's info.

Example

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


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


$apiInstance = new FattureInCloud\Api\UserApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\FattureInCloud\Model\GetUserInfoResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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

listUserCompanies()

listUserCompanies(): \FattureInCloud\Model\ListUserCompaniesResponse

List User Companies

Lists the companies controlled by the current user.

Example

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


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


$apiInstance = new FattureInCloud\Api\UserApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\FattureInCloud\Model\ListUserCompaniesResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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