Skip to content

Commit

Permalink
fix!: Use correct naming for AdjusmentCollection (#16)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The AdjustmentsAdjustmentCollection class is now AdjustmentCollection
  • Loading branch information
mikeymike authored Feb 2, 2024
1 parent 92af891 commit 534f485
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Paddle\SDK\Entities\Adjustment;

class AdjustmentsAdjustmentCollection extends Collection
class AdjustmentCollection extends Collection
{
public static function from(array $itemsData, Paginator $paginator = null): self
{
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/Adjustments/AdjustmentsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Paddle\SDK\Client;
use Paddle\SDK\Entities\Adjustment;
use Paddle\SDK\Entities\Collections\AdjustmentsAdjustmentCollection;
use Paddle\SDK\Entities\Collections\AdjustmentCollection;
use Paddle\SDK\Entities\Collections\Paginator;
use Paddle\SDK\Exceptions\ApiError;
use Paddle\SDK\Exceptions\SdkExceptions\MalformedResponse;
Expand All @@ -32,15 +32,15 @@ public function __construct(
* @throws ApiError On a generic API error
* @throws MalformedResponse If the API response was not parsable
*/
public function list(ListAdjustments $listOperation = new ListAdjustments()): AdjustmentsAdjustmentCollection
public function list(ListAdjustments $listOperation = new ListAdjustments()): AdjustmentCollection
{
$parser = new ResponseParser(
$this->client->getRaw('/adjustments', $listOperation),
);

return AdjustmentsAdjustmentCollection::from(
return AdjustmentCollection::from(
$parser->getData(),
new Paginator($this->client, $parser->getPagination(), AdjustmentsAdjustmentCollection::class),
new Paginator($this->client, $parser->getPagination(), AdjustmentCollection::class),
);
}

Expand Down

0 comments on commit 534f485

Please sign in to comment.