Skip to content

Commit

Permalink
add method campaign-beneficiary v6 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexsisukin authored Nov 11, 2024
1 parent 5f1b6e0 commit fb7f2b5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,30 @@ public function setCampaignBeneficiaryV5(
return json_decode($response->getBody()->__toString(), true);
}

public function setCampaignBeneficiaryV6(
int $campaignId,
CampaignClient $campaign_client,
CampaignContractor $campaign_contractor,
CampaignContract $campaign_contract
): array {
$body = [
'campaignId' => $campaignId,
'beneficiary' => [
'client' => $campaign_client->toArray(),
'contractor' => $campaign_contractor->toArray(),
'contract' => $campaign_contract->toArray(),
],
];

$response = $this->requestApi(
'POST',
'/priority/v6/campaign-beneficiary',
$body
);

return json_decode($response->getBody()->__toString(), true);
}

/**
* Получение данных о рекламодателе
*
Expand Down

0 comments on commit fb7f2b5

Please sign in to comment.