Skip to content

Latest commit

 

History

History
1727 lines (1168 loc) · 45.5 KB

CustomersApi.md

File metadata and controls

1727 lines (1168 loc) · 45.5 KB

CustomersApi

All URIs are relative to https://api.kinow.com/api

Method HTTP request Description
attachCartToCustomer POST /customers/{customer_id}/carts
checkAuthenticationToken POST /customers/check-authentication-token
checkCustomerCredentials POST /customers/check-credentials
createCustomer POST /customers
createFacebookId POST /customers/facebook
deleteCustomer DELETE /customers/{customer_id}
generateAuthenticationToken GET /customers/{customer_id}/authentication-token
getCustomer GET /customers/{customer_id}
getCustomerAccessesSubscriptions GET /customers/{customer_id}/accesses/subscriptions
getCustomerAccessesVideos GET /customers/{customer_id}/accesses/videos
getCustomerAddress GET /customers/{customer_id}/address
getCustomerCanSeeProduct GET /customers/{customer_id}/products/{product_id}/can-see
getCustomerCarts GET /customers/{customer_id}/carts
getCustomerCurrentViews GET /customers/{customer_id}/current-views
getCustomerGroups GET /customers/{customer_id}/groups
getCustomerHasAccessToProduct GET /customers/{customer_id}/products/{product_id}/has-access
getCustomerHasAccessToProducts POST /customers/{customer_id}/products/has-access
getCustomerHasAccessToVideo GET /customers/{customer_id}/videos/{video_id}/has-access
getCustomerHasAccessToVideos POST /customers/{customer_id}/videos/has-access
getCustomerOrders GET /customers/{customer_id}/orders
getCustomerPlaylists GET /customers/{customer_id}/playlists
getCustomerPrepaymentBalances GET /customers/{customer_id}/prepayment-balance
getCustomerPrepaymentOperations GET /customers/{customer_id}/prepayment-operations
getCustomers GET /customers
getFacebookCustomer GET /customers/facebook/{facebook_id}
getPaymentMethods GET /customers/{customer_id}/payments/{payment_name}/payment-methods
getPaymentMethodsWithIp GET /customers/{customer_id}/payments/{payment_name}/payment-methods/{ip_address}
getPendingPayments GET /customers/{customer_id}/payments/{payment_name}/pending
getPendingPaymentsWithIp GET /customers/{customer_id}/payments/{payment_name}/pending/{ip_address}
getRegistrationFields GET /customer/registration-fields
loginWithFacebook POST /customers/facebook-login
passwordToken POST /customers/password-token
passwordTokenConsume POST /customers/password-token-consume
stopSubscription PUT /customers/{customer_id}/unsubscribe
updateCustomer PUT /customers/{customer_id}
updatePaymentMethod PUT /customers/{customer_id}/payments/{payment_name}/payment-method
validateCustomerCredentials POST /customers/validate-credentials

attachCartToCustomer

\Kinow\Client\Model\Cart attachCartToCustomer($customer_id, $cart_id)

Attach cart to customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$cart_id = 789; // int | Cart ID to attach

try {
    $result = $api_instance->attachCartToCustomer($customer_id, $cart_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->attachCartToCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
cart_id int Cart ID to attach

Return type

\Kinow\Client\Model\Cart

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

checkAuthenticationToken

\Kinow\Client\Model\Customer checkAuthenticationToken($token)

Check authentication token

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$token = "token_example"; // string | Authentication token

try {
    $result = $api_instance->checkAuthenticationToken($token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->checkAuthenticationToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token string Authentication token

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

checkCustomerCredentials

\Kinow\Client\Model\Customer checkCustomerCredentials($email, $password)

Check customer credentials

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$email = "email_example"; // string | Email of the customer to check
$password = "password_example"; // string | Password of the customer to check

try {
    $result = $api_instance->checkCustomerCredentials($email, $password);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->checkCustomerCredentials: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string Email of the customer to check
password string Password of the customer to check

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

createCustomer

\Kinow\Client\Model\Customer createCustomer($body)

Create new Customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$body = new \Kinow\Client\Model\CustomerCreateRequest(); // \Kinow\Client\Model\CustomerCreateRequest | Customer settings

try {
    $result = $api_instance->createCustomer($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Kinow\Client\Model\CustomerCreateRequest Customer settings

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

createFacebookId

createFacebookId($customer_id, $facebook_id)

Link a Facebook account ID to a Customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID
$facebook_id = "facebook_id_example"; // string | Facebook ID

try {
    $api_instance->createFacebookId($customer_id, $facebook_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->createFacebookId: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID
facebook_id string Facebook ID

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteCustomer

deleteCustomer($customer_id)

Delete customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to delete

try {
    $api_instance->deleteCustomer($customer_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->deleteCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to delete

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

generateAuthenticationToken

generateAuthenticationToken($customer_id)

Create authentication token for customer. You can use it to auto login customer using an iframe or a redirection to the user Example url: https://YOUR_PLATFORM.kinow.tv/?authentication_token=AUTHENTICATION_TOKEN

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to authenticate

try {
    $api_instance->generateAuthenticationToken($customer_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->generateAuthenticationToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to authenticate

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomer

\Kinow\Client\Model\Customer getCustomer($customer_id)

Get Customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch

try {
    $result = $api_instance->getCustomer($customer_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerAccessesSubscriptions

\Kinow\Client\Model\SubscriptionAccesses getCustomerAccessesSubscriptions($customer_id, $page, $per_page, $filters)

Get customer accesses for subscription

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 
$filters = "filters_example"; // string | ```     type[value]=string&type[operator]=strict&cancel[value]=string&cancel[operator]=contains     _______________      {     \"type\": {     \"value\": \"string\",     \"operator\": \"strict\"     },     \"cancel\": {     \"value\": \"string\",     \"operator\": \"contains\"     }     } ```Operator can be: strict, contains, between, in, gt (greater than), lt (lower than).

try {
    $result = $api_instance->getCustomerAccessesSubscriptions($customer_id, $page, $per_page, $filters);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerAccessesSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]
filters string ``` type[value]=string&type[operator]=strict&cancel[value]=string&cancel[operator]=contains _______________ { &quot;type&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;strict&quot; }, &quot;cancel&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;contains&quot; } } ```Operator can be: strict, contains, between, in, gt (greater than), lt (lower than). [optional]

Return type

\Kinow\Client\Model\SubscriptionAccesses

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerAccessesVideos

\Kinow\Client\Model\SubscriptionAccesses getCustomerAccessesVideos($customer_id, $page, $per_page)

Get customer access for videos

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getCustomerAccessesVideos($customer_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerAccessesVideos: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\SubscriptionAccesses

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerAddress

\Kinow\Client\Model\Address getCustomerAddress($customer_id)

Get customer address

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch

try {
    $result = $api_instance->getCustomerAddress($customer_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerAddress: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch

Return type

\Kinow\Client\Model\Address

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerCanSeeProduct

getCustomerCanSeeProduct($customer_id, $product_id)

Check if the customer can see this product (restriction by group)

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$product_id = 789; // int | Product ID to fetch

try {
    $api_instance->getCustomerCanSeeProduct($customer_id, $product_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerCanSeeProduct: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
product_id int Product ID to fetch

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerCarts

\Kinow\Client\Model\Carts getCustomerCarts($customer_id, $page, $per_page, $filters, $sort_by, $sort_direction)

Get customer carts

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 
$filters = "filters_example"; // string | ```     date_add[value]=string&date_add[operator]=lt     _______________      {     \"date_add\": {     \"value\": \"string\",     \"operator\": \"lt\"     }     } ```     Operator can be: strict, contains, between, in, gt (greater than), lt (lower than).
$sort_by = "sort_by_example"; // string | Sort by this attribute (id by default)
$sort_direction = "sort_direction_example"; // string | Sorting direction (asc by default)

try {
    $result = $api_instance->getCustomerCarts($customer_id, $page, $per_page, $filters, $sort_by, $sort_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerCarts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]
filters string ``` date_add[value]=string&date_add[operator]=lt _______________ { &quot;date_add&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;lt&quot; } } ``` Operator can be: strict, contains, between, in, gt (greater than), lt (lower than). [optional]
sort_by string Sort by this attribute (id by default) [optional]
sort_direction string Sorting direction (asc by default) [optional]

Return type

\Kinow\Client\Model\Carts

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerCurrentViews

\Kinow\Client\Model\CustomerCurrentViews getCustomerCurrentViews($customer_id)

Get customer current number of views

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch

try {
    $result = $api_instance->getCustomerCurrentViews($customer_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerCurrentViews: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch

Return type

\Kinow\Client\Model\CustomerCurrentViews

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerGroups

\Kinow\Client\Model\Groups getCustomerGroups($customer_id, $page, $per_page)

Get groups attached to this customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getCustomerGroups($customer_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerGroups: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\Groups

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerHasAccessToProduct

getCustomerHasAccessToProduct($customer_id, $product_id)

Get customer access to video

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$product_id = 789; // int | Product ID to fetch

try {
    $api_instance->getCustomerHasAccessToProduct($customer_id, $product_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerHasAccessToProduct: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
product_id int Product ID to fetch

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerHasAccessToProducts

\Kinow\Client\Model\ProductAccessInfo[] getCustomerHasAccessToProducts($customer_id, $body)

Get customer access to Products

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$body = new \Kinow\Client\Model\ProductIDList(); // \Kinow\Client\Model\ProductIDList | List of Product IDs separated by comma, eg. '42,21,84'

try {
    $result = $api_instance->getCustomerHasAccessToProducts($customer_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerHasAccessToProducts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
body \Kinow\Client\Model\ProductIDList List of Product IDs separated by comma, eg. '42,21,84'

Return type

\Kinow\Client\Model\ProductAccessInfo[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerHasAccessToVideo

getCustomerHasAccessToVideo($customer_id, $video_id)

Get customer access to video

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$video_id = 789; // int | Video ID to fetch

try {
    $api_instance->getCustomerHasAccessToVideo($customer_id, $video_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerHasAccessToVideo: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
video_id int Video ID to fetch

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerHasAccessToVideos

\Kinow\Client\Model\VideoAccessInfo[] getCustomerHasAccessToVideos($customer_id, $body)

Get customer access to Videos

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$body = new \Kinow\Client\Model\VideoIDList(); // \Kinow\Client\Model\VideoIDList | List of Video IDs separated by comma, eg. '42,21,84'

try {
    $result = $api_instance->getCustomerHasAccessToVideos($customer_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerHasAccessToVideos: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
body \Kinow\Client\Model\VideoIDList List of Video IDs separated by comma, eg. '42,21,84'

Return type

\Kinow\Client\Model\VideoAccessInfo[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerOrders

\Kinow\Client\Model\Orders getCustomerOrders($customer_id, $page, $per_page)

Get customer orders

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getCustomerOrders($customer_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerOrders: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\Orders

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerPlaylists

\Kinow\Client\Model\Playlists getCustomerPlaylists($customer_id, $page, $per_page, $sort_by, $sort_direction)

Get customer playlists

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | 
$page = 789; // int | 
$per_page = 789; // int | 
$sort_by = "sort_by_example"; // string | Sort by this attribute (id by default)
$sort_direction = "sort_direction_example"; // string | Sorting direction (asc by default)

try {
    $result = $api_instance->getCustomerPlaylists($customer_id, $page, $per_page, $sort_by, $sort_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerPlaylists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int
page int [optional]
per_page int [optional]
sort_by string Sort by this attribute (id by default) [optional]
sort_direction string Sorting direction (asc by default) [optional]

Return type

\Kinow\Client\Model\Playlists

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerPrepaymentBalances

\Kinow\Client\Model\PrepaymentBalance[] getCustomerPrepaymentBalances($customer_id)

Get PrepaymentBalances list

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch

try {
    $result = $api_instance->getCustomerPrepaymentBalances($customer_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerPrepaymentBalances: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch

Return type

\Kinow\Client\Model\PrepaymentBalance[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerPrepaymentOperations

\Kinow\Client\Model\PrepaymentOperations getCustomerPrepaymentOperations($customer_id, $type, $page, $per_page)

Get PrepaymentOperations list

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$type = "type_example"; // string | 
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getCustomerPrepaymentOperations($customer_id, $type, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomerPrepaymentOperations: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
type string [optional]
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\PrepaymentOperations

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomers

\Kinow\Client\Model\Customers getCustomers($page, $per_page, $filters, $sort_by, $sort_direction)

Get customer list

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$page = 789; // int | 
$per_page = 789; // int | 
$filters = "filters_example"; // string | ```     email[value]=string&email[operator]=strict&firstname[value]=string&firstname[operator]=contains     _______________      {     \"email\": {     \"value\": \"string\",     \"operator\": \"strict\"     },     \"firstname\": {     \"value\": \"string\",     \"operator\": \"contains\"     }     } ```Operator can be: strict, contains, between, in, gt (greater than), lt (lower than).
$sort_by = "sort_by_example"; // string | Sort by this attribute (id by default)
$sort_direction = "sort_direction_example"; // string | Sorting direction (asc by default)

try {
    $result = $api_instance->getCustomers($page, $per_page, $filters, $sort_by, $sort_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int [optional]
per_page int [optional]
filters string ``` email[value]=string&email[operator]=strict&firstname[value]=string&firstname[operator]=contains _______________ { &quot;email&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;strict&quot; }, &quot;firstname&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;contains&quot; } } ```Operator can be: strict, contains, between, in, gt (greater than), lt (lower than). [optional]
sort_by string Sort by this attribute (id by default) [optional]
sort_direction string Sorting direction (asc by default) [optional]

Return type

\Kinow\Client\Model\Customers

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getFacebookCustomer

\Kinow\Client\Model\CustomerId getFacebookCustomer($facebook_id)

Get Customer ID linked to a Facebook ID

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$facebook_id = 789; // int | Facebook ID to fetch

try {
    $result = $api_instance->getFacebookCustomer($facebook_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getFacebookCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
facebook_id int Facebook ID to fetch

Return type

\Kinow\Client\Model\CustomerId

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getPaymentMethods

\Kinow\Client\Model\PaymentMethods[] getPaymentMethods($customer_id, $payment_name)

Get payment methods saved for a Customer on a payment gateway

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | 
$payment_name = "payment_name_example"; // string | 

try {
    $result = $api_instance->getPaymentMethods($customer_id, $payment_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getPaymentMethods: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int
payment_name string

Return type

\Kinow\Client\Model\PaymentMethods[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getPaymentMethodsWithIp

\Kinow\Client\Model\PaymentMethods[] getPaymentMethodsWithIp($customer_id, $payment_name, $ip_address)

Get payment methods saved for a Customer on a payment gateway

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | 
$payment_name = "payment_name_example"; // string | 
$ip_address = "ip_address_example"; // string | Filter by user IP

try {
    $result = $api_instance->getPaymentMethodsWithIp($customer_id, $payment_name, $ip_address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getPaymentMethodsWithIp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int
payment_name string
ip_address string Filter by user IP

Return type

\Kinow\Client\Model\PaymentMethods[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getPendingPayments

\Kinow\Client\Model\PaymentDetails[] getPendingPayments($payment_name, $customer_id)

Get pending payments for a Customer on a payment gateway

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$payment_name = "payment_name_example"; // string | 
$customer_id = 789; // int | 

try {
    $result = $api_instance->getPendingPayments($payment_name, $customer_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getPendingPayments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
payment_name string
customer_id int

Return type

\Kinow\Client\Model\PaymentDetails[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getPendingPaymentsWithIp

\Kinow\Client\Model\PaymentDetails[] getPendingPaymentsWithIp($payment_name, $customer_id, $ip_address)

Get pending payments for a Customer on a payment gateway

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$payment_name = "payment_name_example"; // string | 
$customer_id = 789; // int | 
$ip_address = "ip_address_example"; // string | Filter by user IP

try {
    $result = $api_instance->getPendingPaymentsWithIp($payment_name, $customer_id, $ip_address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getPendingPaymentsWithIp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
payment_name string
customer_id int
ip_address string Filter by user IP

Return type

\Kinow\Client\Model\PaymentDetails[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getRegistrationFields

\Kinow\Client\Model\RegistrationFields getRegistrationFields($page, $per_page)

Get registration fields

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getRegistrationFields($page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getRegistrationFields: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\RegistrationFields

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

loginWithFacebook

\Kinow\Client\Model\Customer loginWithFacebook($token_type, $token, $redirect_uri)

Create or retrieve existing Customer account using Facebook authorization token

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$token_type = "token_type_example"; // string | Can be 'oauth2' or 'authorization'
$token = "token_example"; // string | oAuth2 token or authorization code given by Facebook
$redirect_uri = "redirect_uri_example"; // string | Redirect URI is required if you're using authorization code method

try {
    $result = $api_instance->loginWithFacebook($token_type, $token, $redirect_uri);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->loginWithFacebook: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token_type string Can be 'oauth2' or 'authorization'
token string oAuth2 token or authorization code given by Facebook
redirect_uri string Redirect URI is required if you're using authorization code method [optional]

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

passwordToken

\Kinow\Client\Model\Token passwordToken($email, $send_notification)

Create temporary token to update password

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$email = "email_example"; // string | Email of the Customer
$send_notification = false; // bool | Send notification email

try {
    $result = $api_instance->passwordToken($email, $send_notification);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->passwordToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string Email of the Customer
send_notification bool Send notification email [optional] [default to false]

Return type

\Kinow\Client\Model\Token

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

passwordTokenConsume

passwordTokenConsume($token, $password)

Consume password token and update password

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$token = "token_example"; // string | Temporary token to consume
$password = "password_example"; // string | Password to set on Customer account

try {
    $api_instance->passwordTokenConsume($token, $password);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->passwordTokenConsume: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token string Temporary token to consume
password string Password to set on Customer account

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

stopSubscription

stopSubscription($customer_id, $product_access_id)

Unsubcribe an Access recurring payment

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to unsubscribe
$product_access_id = "product_access_id_example"; // string | Product access ID to unsubscribe from

try {
    $api_instance->stopSubscription($customer_id, $product_access_id);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->stopSubscription: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to unsubscribe
product_access_id string Product access ID to unsubscribe from

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

updateCustomer

\Kinow\Client\Model\Customer updateCustomer($customer_id, $body)

Update customer

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | Customer ID to fetch
$body = new \Kinow\Client\Model\Customer(); // \Kinow\Client\Model\Customer | Body of the customer

try {
    $result = $api_instance->updateCustomer($customer_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->updateCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
body \Kinow\Client\Model\Customer Body of the customer

Return type

\Kinow\Client\Model\Customer

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

updatePaymentMethod

updatePaymentMethod($customer_id, $payment_name, $payment_arguments, $ip_address)

Update payment method for a Customer on a payment gateway

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$customer_id = 789; // int | 
$payment_name = "payment_name_example"; // string | 
$payment_arguments = new \Kinow\Client\Model\PaymentArguments(); // \Kinow\Client\Model\PaymentArguments | Payment arguments
$ip_address = "ip_address_example"; // string | Filter by user IP

try {
    $api_instance->updatePaymentMethod($customer_id, $payment_name, $payment_arguments, $ip_address);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->updatePaymentMethod: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int
payment_name string
payment_arguments \Kinow\Client\Model\PaymentArguments Payment arguments
ip_address string Filter by user IP [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

validateCustomerCredentials

\Kinow\Client\Model\CredentialsValidation validateCustomerCredentials($email, $password)

Validate Customer credentials

Example

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

$api_instance = new Kinow\Client\Api\CustomersApi();
$email = "email_example"; // string | Customer email to validate
$password = "password_example"; // string | Customer password to check

try {
    $result = $api_instance->validateCustomerCredentials($email, $password);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->validateCustomerCredentials: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string Customer email to validate
password string Customer password to check

Return type

\Kinow\Client\Model\CredentialsValidation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined