PHP Class Yandex\Market\Partner\PartnerClient

Author: Alexander Khaylo ([email protected])
Inheritance: extends Yandex\Common\AbstractServiceClient
Afficher le fichier Open project: nixsolutions/yandex-php-library Class Usage Examples

Protected Properties

Свойство Type Description
$campaignId string Campaign Id
$clientId string Application id
$login string User login
$serviceDomain string API domain

Méthodes publiques

Méthode Description
__construct ( string $token = '' )
getAccessToken ( ) : string Get OAuth data for header request
getCampaignId ( ) : string
getCampaigns ( ) : Yandex\Market\Partner\Models\Campaigns Get User Campaigns
getClientId ( ) : string
getLogin ( ) : string
getOrder ( integer $orderId ) : Yandex\Market\Partner\Models\Order Get order info
getOrders ( array $params = [] ) : null | Yandex\Market\Partner\Models\Orders Get only orders data without pagination
getOrdersResponse ( array $params = [] ) : Yandex\Market\Partner\Models\GetOrdersResponse Get information about orders by campaign id
getServiceUrl ( string $resource = '' ) : string Get url to service resource with parameters
setCampaignId ( string $campaignId )
setClientId ( string $clientId )
setLogin ( string $login )
setOrderStatus ( integer $orderId, string $status, null | string $subStatus = null ) : Yandex\Market\Partner\Models\Order Send changed status to Yandex.Market
updateDelivery ( integer $orderId, Yandex\Market\Partner\Models\Delivery $delivery ) : Yandex\Market\Partner\Models\Order Update changed delivery parameters

Méthodes protégées

Méthode Description
sendRequest ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : Response Sends a request

Method Details

__construct() public méthode

public __construct ( string $token = '' )
$token string access token

getAccessToken() public méthode

Get OAuth data for header request
See also: http://api.yandex.ru/market/partner/doc/dg/concepts/authorization.xml
public getAccessToken ( ) : string
Résultat string

getCampaignId() public méthode

public getCampaignId ( ) : string
Résultat string

getCampaigns() public méthode

Returns the user to the list of campaigns Yandex.market. The list coincides with the list of campaigns that are displayed in the partner interface Yandex.Market on page "My shops."
See also: http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns.xml
public getCampaigns ( ) : Yandex\Market\Partner\Models\Campaigns
Résultat Yandex\Market\Partner\Models\Campaigns

getClientId() public méthode

public getClientId ( ) : string
Résultat string

getLogin() public méthode

public getLogin ( ) : string
Résultat string

getOrder() public méthode

Get order info
public getOrder ( integer $orderId ) : Yandex\Market\Partner\Models\Order
$orderId integer
Résultat Yandex\Market\Partner\Models\Order

getOrders() public méthode

Get only orders data without pagination
public getOrders ( array $params = [] ) : null | Yandex\Market\Partner\Models\Orders
$params array
Résultat null | Yandex\Market\Partner\Models\Orders

getOrdersResponse() public méthode

Get information about orders by campaign id
See also: http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-orders.xml
public getOrdersResponse ( array $params = [] ) : Yandex\Market\Partner\Models\GetOrdersResponse
$params array Returns information on the requested orders. Available filtering by date ordering and order status. The maximum range of dates in a single request for a resource - 30 days.
Résultat Yandex\Market\Partner\Models\GetOrdersResponse

getServiceUrl() public méthode

Get url to service resource with parameters
See also: http://api.yandex.ru/market/partner/doc/dg/concepts/method-call.xml
public getServiceUrl ( string $resource = '' ) : string
$resource string
Résultat string

sendRequest() protected méthode

Sends a request
protected sendRequest ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : Response
$method string HTTP method
$uri string | Psr\Http\Message\UriInterface URI object or string.
$options array Request options to apply.
Résultat GuzzleHttp\Psr7\Response

setCampaignId() public méthode

public setCampaignId ( string $campaignId )
$campaignId string

setClientId() public méthode

public setClientId ( string $clientId )
$clientId string

setLogin() public méthode

public setLogin ( string $login )
$login string

setOrderStatus() public méthode

Send changed status to Yandex.Market
public setOrderStatus ( integer $orderId, string $status, null | string $subStatus = null ) : Yandex\Market\Partner\Models\Order
$orderId integer
$status string
$subStatus null | string
Résultat Yandex\Market\Partner\Models\Order

updateDelivery() public méthode

Update changed delivery parameters
public updateDelivery ( integer $orderId, Yandex\Market\Partner\Models\Delivery $delivery ) : Yandex\Market\Partner\Models\Order
$orderId integer
$delivery Yandex\Market\Partner\Models\Delivery
Résultat Yandex\Market\Partner\Models\Order Example: PUT /v2/campaigns/10003/order/12345/delivery.json HTTP/1.1

Property Details

$campaignId protected_oe property

Campaign Id
protected string $campaignId
Résultat string

$clientId protected_oe property

Application id
protected string $clientId
Résultat string

$login protected_oe property

User login
protected string $login
Résultat string

$serviceDomain protected_oe property

API domain
protected string $serviceDomain
Résultat string