Skip to content

Latest commit

 

History

History
274 lines (190 loc) · 8.79 KB

File metadata and controls

274 lines (190 loc) · 8.79 KB

Flipdish\Client\AddressApi

All URIs are relative to https://api.flipdish.co

Method HTTP request Description
addressTemplates POST /api/v1.0/address/templates
formByApp GET /api/v1.0/app/{appId}/address/form
formByCountry GET /api/v1.0/address/country/{countryCode}/form
formatGoogleAddress POST /api/v1.0/address/google
getCountries GET /api/v1.0/address/countries

addressTemplates

\Flipdish\Client\Models\RestApiStringResult addressTemplates($address)

Example

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

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

$apiInstance = new Flipdish\\Client\Api\AddressApi(
    // 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
);
$address = new \Flipdish\\Client\Models\StoreAddressForm(); // \Flipdish\\Client\Models\StoreAddressForm | 

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

Parameters

Name Type Description Notes
address \Flipdish\Client\Models\StoreAddressForm

Return type

\Flipdish\Client\Models\RestApiStringResult

Authorization

oauth2

HTTP request headers

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

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

formByApp

\Flipdish\Client\Models\RestApiResultAddressFormResponse formByApp($app_id, $language)

Example

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

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

$apiInstance = new Flipdish\\Client\Api\AddressApi(
    // 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
);
$app_id = "app_id_example"; // string | 
$language = "language_example"; // string | 

try {
    $result = $apiInstance->formByApp($app_id, $language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->formByApp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
app_id string
language string [optional]

Return type

\Flipdish\Client\Models\RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

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

formByCountry

\Flipdish\Client\Models\RestApiResultAddressFormResponse formByCountry($country_code, $language)

Example

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

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

$apiInstance = new Flipdish\\Client\Api\AddressApi(
    // 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
);
$country_code = "country_code_example"; // string | 
$language = "language_example"; // string | 

try {
    $result = $apiInstance->formByCountry($country_code, $language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->formByCountry: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
country_code string
language string [optional]

Return type

\Flipdish\Client\Models\RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

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

formatGoogleAddress

\Flipdish\Client\Models\RestApiResultAddressFormResponse formatGoogleAddress($google_address, $language)

Example

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

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

$apiInstance = new Flipdish\\Client\Api\AddressApi(
    // 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
);
$google_address = new \Flipdish\\Client\Models\GoogleAddress(); // \Flipdish\\Client\Models\GoogleAddress | 
$language = "language_example"; // string | 

try {
    $result = $apiInstance->formatGoogleAddress($google_address, $language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->formatGoogleAddress: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
google_address \Flipdish\Client\Models\GoogleAddress
language string [optional]

Return type

\Flipdish\Client\Models\RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

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

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

getCountries

\Flipdish\Client\Models\RestApiResultCountryFormResponse getCountries($language)

Example

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

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

$apiInstance = new Flipdish\\Client\Api\AddressApi(
    // 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
);
$language = "language_example"; // string | 

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

Parameters

Name Type Description Notes
language string [optional]

Return type

\Flipdish\Client\Models\RestApiResultCountryFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

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