Skip to content

Commit

Permalink
Merge 621ecce into 3733c92
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkarpetin committed Aug 28, 2023
2 parents 3733c92 + 621ecce commit fea4020
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 152 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ Security - in case of vulnerabilities.

_TBD_

## [2.24.0] 2023-08-28

### Removed

- [x] Removed `UserService` methods: `signin`, `signup`, `activate`
- [x] Removed `SessionService` service

## [2.23.1] 2023-07-20

### Fixed
Expand Down
4 changes: 1 addition & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
* @method Services\OrganizationService organizations()
* @method Services\CustomFieldService customFields()
* @method Services\GatewayAccountService gatewayAccounts()
* @method Services\SessionService sessions()
* @method Services\UserService users()
* @method Services\ApiTrackingService apiTracking()
* @method Services\ShippingRateService shippingRates()
Expand Down Expand Up @@ -105,7 +104,7 @@ final class Client
*/
public const CURRENT_VERSION = 'v2.1';

public const SDK_VERSION = '2.23.1';
public const SDK_VERSION = '2.24.0';

private static $services = [
'authenticationOptions' => Services\AuthenticationOptionsService::class,
Expand Down Expand Up @@ -136,7 +135,6 @@ final class Client
'organizations' => Services\OrganizationService::class,
'customFields' => Services\CustomFieldService::class,
'gatewayAccounts' => Services\GatewayAccountService::class,
'sessions' => Services\SessionService::class,
'users' => Services\UserService::class,
'apiTracking' => Services\ApiTrackingService::class,
'apiKeys' => Services\ApiKeyService::class,
Expand Down
74 changes: 0 additions & 74 deletions src/Services/SessionService.php

This file was deleted.

35 changes: 0 additions & 35 deletions src/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,6 @@
*/
final class UserService extends Service
{
/**
* @param array|JsonSerializable|Login $data
*
* @throws DataValidationException if input data is not valid
*
* @return Session
*/
public function signin($data)
{
return $this->client()->post($data, 'signin');
}

/**
* @param array|JsonSerializable|Signup $data
*
* @throws DataValidationException if input data is not valid
*
* @return User
*/
public function signup($data)
{
return $this->client()->post($data, 'signup');
}

/**
* @param array|JsonSerializable|ForgotPassword $data
*
Expand Down Expand Up @@ -116,17 +92,6 @@ public function create($data, $userId = null)
return $this->client()->post($data, 'users');
}

/**
* @param string $token
*
* @throws DataValidationException The token is not valid
*
* @return User
*/
public function activate($token)
{
return $this->client()->post([], 'activation/{token}', ['token' => $token]);
}

/**
* @param string $userId
Expand Down
40 changes: 0 additions & 40 deletions tests/Api/ServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,41 +755,6 @@ public function userService()
$service = $client->users();
$result = $service->load('userId');
self::assertInstanceOf(Entities\User::class, $result);

$handler = $this->createMock(CurlHandler::class);
$handler
->expects(self::any())
->method('__invoke')
->willReturn($client->createResponse()->withHeader('Location', 'users/signup'));
$client = new Client([
'apiKey' => 'QWERTY',
'httpHandler' => $handler,
]);
$service = $client->users();
$result = $service->signup([]);
self::assertInstanceOf(Entities\User::class, $result);

$handler = $this->createMock(CurlHandler::class);
$handler
->expects(self::any())
->method('__invoke')
->willReturn($client->createResponse()->withHeader('Location', 'users/signin'));
$client = new Client([
'apiKey' => 'QWERTY',
'httpHandler' => $handler,
]);
$service = $client->users();
$result = $service->signin([]);
self::assertInstanceOf(Entities\User::class, $result);

$handler = $this->createMock(CurlHandler::class);
$handler
->expects(self::any())
->method('__invoke')
->willReturn($client->createResponse()->withHeader('Location', 'users/userId'));

$result = $service->activate('token');
self::assertInstanceOf(Entities\User::class, $result);
}

/**
Expand Down Expand Up @@ -1265,11 +1230,6 @@ public function provideServiceClasses()
Services\PayPalAccountService::class,
Entities\PayPalAccount::class,
],
[
'sessions',
Services\SessionService::class,
Entities\Session::class,
],
[
'users',
Services\UserService::class,
Expand Down

0 comments on commit fea4020

Please sign in to comment.