-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nVuln
committed
Jun 6, 2024
1 parent
9585fe5
commit 19ee527
Showing
4 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/* | ||
* This file is part of tiktokshop-client. | ||
* | ||
* Copyright (c) 2024 Jin <[email protected]> All rights reserved. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace EcomPHP\TiktokShop\Resources; | ||
|
||
use EcomPHP\TiktokShop\Resource; | ||
use GuzzleHttp\RequestOptions; | ||
|
||
class AffiliateSeller extends Resource | ||
{ | ||
protected $category = 'affiliate_seller'; | ||
protected $minimum_version = 202405; | ||
|
||
public function editOpenCollaborationSettings($body) | ||
{ | ||
return $this->call('POST', 'open_collaboration_settings', [ | ||
RequestOptions::JSON => $body, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/* | ||
* This file is part of tiktokshop-client. | ||
* | ||
* Copyright (c) 2024 Jin <[email protected]> All rights reserved. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace EcomPHP\TiktokShop\Tests\Resources; | ||
|
||
use EcomPHP\TiktokShop\Tests\TestResource; | ||
|
||
class AffiliateSellerTest extends TestResource | ||
{ | ||
public const TEST_API_VERSION = 202405; | ||
|
||
protected function tiktokShopClientForTest() | ||
{ | ||
$client = parent::tiktokShopClientForTest(); | ||
$client->useVersion(self::TEST_API_VERSION); | ||
|
||
return $client; | ||
} | ||
|
||
public function testEditOpenCollaborationSettings() | ||
{ | ||
$this->caller->editOpenCollaborationSettings([]); | ||
$this->assertPreviousRequest('POST', 'affiliate_seller/'.self::TEST_API_VERSION.'/open_collaboration_settings'); | ||
} | ||
} |