diff --git a/subscription/DTO/SubscriptionCarrierProviderData.php b/subscription/DTO/SubscriptionCarrierProviderData.php index 6d653a2e5..0b755ac74 100644 --- a/subscription/DTO/SubscriptionCarrierProviderData.php +++ b/subscription/DTO/SubscriptionCarrierProviderData.php @@ -18,9 +18,9 @@ class SubscriptionCarrierProviderData { - /** @var int */ + /** @var string */ private $mollieCustomerId; - /** @var int */ + /** @var string */ private $mollieSubscriptionId; /** @var int */ private $subscriptionCarrierId; @@ -28,8 +28,8 @@ class SubscriptionCarrierProviderData private $orderId; private function __construct( - int $mollieCustomerId, - int $mollieSubscriptionId, + string $mollieCustomerId, + string $mollieSubscriptionId, int $subscriptionCarrierId, int $orderId ) { @@ -40,17 +40,17 @@ private function __construct( } /** - * @return int + * @return string */ - public function getMollieCustomerId(): int + public function getMollieCustomerId(): string { return $this->mollieCustomerId; } /** - * @return int + * @return string */ - public function getMollieSubscriptionId(): int + public function getMollieSubscriptionId(): string { return $this->mollieSubscriptionId; } @@ -72,8 +72,8 @@ public function getOrderId(): int } public static function create( - int $mollieCustomerId, - int $mollieSubscriptionId, + string $mollieCustomerId, + string $mollieSubscriptionId, int $subscriptionCarrierId, int $orderId ): self { diff --git a/tests/Unit/Subscription/Provider/SubscriptionCarrierProviderTest.php b/tests/Unit/Subscription/Provider/SubscriptionCarrierProviderTest.php index caec266d9..3250d24cb 100644 --- a/tests/Unit/Subscription/Provider/SubscriptionCarrierProviderTest.php +++ b/tests/Unit/Subscription/Provider/SubscriptionCarrierProviderTest.php @@ -66,14 +66,14 @@ public function testItSuccessfullyProvidesData(): void ); $result = $subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create( - 1, - 2, + 'test-mollie-customer-id', + 'test-mollie-subscription-id', 3, 4 )); - $this->assertEquals(1, $result->getCustomerId()); - $this->assertEquals(2, $result->getSubscriptionId()); + $this->assertEquals('test-mollie-customer-id', $result->getCustomerId()); + $this->assertEquals('test-mollie-subscription-id', $result->getSubscriptionId()); $this->assertEquals([ 'metadata' => [ 'secure_key' => SecureKeyUtility::generateReturnKey( @@ -113,8 +113,8 @@ public function testItUnsuccessfullyProvidesDataFailedToFindOrder(): void $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_FIND_ORDER); $subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create( - 1, - 2, + 'test-mollie-customer-id', + 'test-mollie-subscription-id', 3, 4 )); @@ -152,8 +152,8 @@ public function testItUnsuccessfullyProvidesDataFailedToFindSubscriptionProduct( $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_FIND_SUBSCRIPTION_PRODUCT); $subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create( - 1, - 2, + 'test-mollie-customer-id', + 'test-mollie-subscription-id', 3, 4 )); @@ -191,8 +191,8 @@ public function testItUnsuccessfullyProvidesDataFailedToProvideSubscriptionOrder $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_PROVIDE_SUBSCRIPTION_ORDER_AMOUNT); $subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create( - 1, - 2, + 'test-mollie-customer-id', + 'test-mollie-subscription-id', 3, 4 ));