Skip to content

Latest commit

 

History

History
168 lines (116 loc) · 4.72 KB

CardsApi.md

File metadata and controls

168 lines (116 loc) · 4.72 KB

MarketPay\CardsApi

All URIs are relative to https://localhost

Method HTTP request Description
cardsGet GET /v2.1/Cards/{CardId}
cardsGetList GET /v2.1/Cards
cardsPut PUT /v2.1/Cards/{CardId}

cardsGet

\MarketPay\Model\CardResponse cardsGet($card_id)

Example

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

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

$apiInstance = new MarketPay\Api\CardsApi(
    // 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
);
$card_id = 789; // int | 

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

Parameters

Name Type Description Notes
card_id int

Return type

\MarketPay\Model\CardResponse

Authorization

oauth2

HTTP request headers

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

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

cardsGetList

\MarketPay\Model\CardResponseResponseList cardsGetList($page, $per_page)

Example

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

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

$apiInstance = new MarketPay\Api\CardsApi(
    // 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
);
$page = 56; // int | 
$per_page = 56; // int | 

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

Parameters

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

Return type

\MarketPay\Model\CardResponseResponseList

Authorization

oauth2

HTTP request headers

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

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

cardsPut

\MarketPay\Model\CardResponse cardsPut($card_id, $body)

Example

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

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

$apiInstance = new MarketPay\Api\CardsApi(
    // 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
);
$card_id = 789; // int | 
$body = new \MarketPay\Model\CardPut(); // \MarketPay\Model\CardPut | 

try {
    $result = $apiInstance->cardsPut($card_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CardsApi->cardsPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
card_id int
body \MarketPay\Model\CardPut [optional]

Return type

\MarketPay\Model\CardResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/_*+json
  • Accept: text/plain, application/json, text/json

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