Skip to content

Latest commit

 

History

History
547 lines (383 loc) · 18.1 KB

File metadata and controls

547 lines (383 loc) · 18.1 KB

Flipdish\Client\CampaignsApi

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

Method HTTP request Description
createLoyaltyCampaign POST /api/v1.0/{appId}/campaigns/loyalty
createRetentionCampaign POST /api/v1.0/{appId}/campaigns/retention
getLoyaltyCampaignsForApp GET /api/v1.0/{appId}/campaigns/loyalty
getLoyaltyCampaignsForStore GET /api/v1.0/{appId}/campaigns/loyalty/{storeId}
getRetentionCampaignsForApp GET /api/v1.0/{appId}/campaigns/retention
getRetentionCampaignsForStore GET /api/v1.0/{appId}/campaigns/retention/{storeId}
getStoreList GET /api/v1.0/{appId}/campaigns/stores
removeCampaign DELETE /api/v1.0/{appId}/campaigns/{campaignId}
updateLoyaltyCampaign POST /api/v1.0/{appId}/campaigns/loyalty/{campaignId}
updateRetentionCampaign POST /api/v1.0/{appId}/campaigns/retention/{campaignId}

createLoyaltyCampaign

\Flipdish\Client\Models\RestApiResultLoyaltyCampaign createLoyaltyCampaign($app_id, $campaign)

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\CampaignsApi(
    // 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 | 
$campaign = new \Flipdish\\Client\Models\LoyaltyCampaignBase(); // \Flipdish\\Client\Models\LoyaltyCampaignBase | 

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

Parameters

Name Type Description Notes
app_id string
campaign \Flipdish\Client\Models\LoyaltyCampaignBase

Return type

\Flipdish\Client\Models\RestApiResultLoyaltyCampaign

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]

createRetentionCampaign

\Flipdish\Client\Models\RestApiResultRetentionCampaign createRetentionCampaign($app_id, $campaign)

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\CampaignsApi(
    // 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 | 
$campaign = new \Flipdish\\Client\Models\RetentionCampaignBase(); // \Flipdish\\Client\Models\RetentionCampaignBase | 

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

Parameters

Name Type Description Notes
app_id string
campaign \Flipdish\Client\Models\RetentionCampaignBase

Return type

\Flipdish\Client\Models\RestApiResultRetentionCampaign

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]

getLoyaltyCampaignsForApp

\Flipdish\Client\Models\RestApiArrayResultLoyaltyCampaign getLoyaltyCampaignsForApp($app_id)

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

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

Parameters

Name Type Description Notes
app_id string

Return type

\Flipdish\Client\Models\RestApiArrayResultLoyaltyCampaign

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]

getLoyaltyCampaignsForStore

\Flipdish\Client\Models\RestApiArrayResultLoyaltyCampaign getLoyaltyCampaignsForStore($app_id, $store_id)

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\CampaignsApi(
    // 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 | 
$store_id = 56; // int | 

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

Parameters

Name Type Description Notes
app_id string
store_id int

Return type

\Flipdish\Client\Models\RestApiArrayResultLoyaltyCampaign

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]

getRetentionCampaignsForApp

\Flipdish\Client\Models\RestApiArrayResultRetentionCampaign getRetentionCampaignsForApp($app_id)

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

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

Parameters

Name Type Description Notes
app_id string

Return type

\Flipdish\Client\Models\RestApiArrayResultRetentionCampaign

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]

getRetentionCampaignsForStore

\Flipdish\Client\Models\RestApiArrayResultRetentionCampaign getRetentionCampaignsForStore($app_id, $store_id)

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\CampaignsApi(
    // 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 | 
$store_id = 56; // int | 

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

Parameters

Name Type Description Notes
app_id string
store_id int

Return type

\Flipdish\Client\Models\RestApiArrayResultRetentionCampaign

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]

getStoreList

\Flipdish\Client\Models\RestApiArrayResultStoreListItem getStoreList($app_id, $only_published)

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\CampaignsApi(
    // 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 | 
$only_published = true; // bool | 

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

Parameters

Name Type Description Notes
app_id string
only_published bool [optional]

Return type

\Flipdish\Client\Models\RestApiArrayResultStoreListItem

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]

removeCampaign

removeCampaign($app_id, $campaign_id)

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\CampaignsApi(
    // 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 | 
$campaign_id = 56; // int | 

try {
    $apiInstance->removeCampaign($app_id, $campaign_id);
} catch (Exception $e) {
    echo 'Exception when calling CampaignsApi->removeCampaign: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
app_id string
campaign_id int

Return type

void (empty response body)

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]

updateLoyaltyCampaign

\Flipdish\Client\Models\RestApiResultLoyaltyCampaign updateLoyaltyCampaign($app_id, $campaign_id, $campaign)

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\CampaignsApi(
    // 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 | 
$campaign_id = 56; // int | 
$campaign = new \Flipdish\\Client\Models\LoyaltyCampaignBase(); // \Flipdish\\Client\Models\LoyaltyCampaignBase | 

try {
    $result = $apiInstance->updateLoyaltyCampaign($app_id, $campaign_id, $campaign);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CampaignsApi->updateLoyaltyCampaign: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
app_id string
campaign_id int
campaign \Flipdish\Client\Models\LoyaltyCampaignBase

Return type

\Flipdish\Client\Models\RestApiResultLoyaltyCampaign

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]

updateRetentionCampaign

\Flipdish\Client\Models\RestApiResultRetentionCampaign updateRetentionCampaign($app_id, $campaign_id, $campaign)

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\CampaignsApi(
    // 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 | 
$campaign_id = 56; // int | 
$campaign = new \Flipdish\\Client\Models\RetentionCampaignBase(); // \Flipdish\\Client\Models\RetentionCampaignBase | 

try {
    $result = $apiInstance->updateRetentionCampaign($app_id, $campaign_id, $campaign);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CampaignsApi->updateRetentionCampaign: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
app_id string
campaign_id int
campaign \Flipdish\Client\Models\RetentionCampaignBase

Return type

\Flipdish\Client\Models\RestApiResultRetentionCampaign

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]