Skip to content

Commit

Permalink
feat: Rename createAuthToken to generateAuthToken
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston-paddle committed Nov 18, 2024
1 parent 76184f1 commit 6ea7a42
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx
- `Client->paymentMethods->list()`
- `Client->paymentMethods->get()`
- `Client->paymentMethods->delete()`
- `Client->customers->createAuthToken()`
- `Client->customers->generateAuthToken()`

## [1.4.0] - 2024-10-17

Expand Down
2 changes: 1 addition & 1 deletion examples/customer_auth_token.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// │ Create Customer Auth Token │
// └────────────────────────────┘
try {
$authToken = $paddle->customers->createAuthToken($customerId);
$authToken = $paddle->customers->generateAuthToken($customerId);
} catch (ApiError|MalformedResponse $e) {
var_dump($e);
exit;
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Customers/CustomersClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function creditBalances(string $id, ListCreditBalances $operation = new L
* @throws ApiError\CustomerApiError On a customer specific API error
* @throws MalformedResponse If the API response was not parsable
*/
public function createAuthToken(string $id): CustomerAuthToken
public function generateAuthToken(string $id): CustomerAuthToken
{
$parser = new ResponseParser(
$this->client->postRaw("/customers/{$id}/auth-token", null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function create_auth_token_hits_expected_uri_and_parses_response(): void
$response = new Response(200, body: self::readRawJsonFixture('response/auth_token'));

$this->mockClient->addResponse($response);
$authToken = $this->client->customers->createAuthToken('ctm_01h8441jn5pcwrfhwh78jqt8hk');
$authToken = $this->client->customers->generateAuthToken('ctm_01h8441jn5pcwrfhwh78jqt8hk');
$request = $this->mockClient->getLastRequest();

self::assertInstanceOf(RequestInterface::class, $request);
Expand Down

0 comments on commit 6ea7a42

Please sign in to comment.