diff --git a/src/Resource/Customer.php b/src/Resource/Customer.php index e8da6c7..eeda8b7 100644 --- a/src/Resource/Customer.php +++ b/src/Resource/Customer.php @@ -140,12 +140,13 @@ public function update(array $data = []): Customer /** * @param int $subscriptionId + * @param array $attributes * @return Subscription * @throws ApiException */ - public function createSubscription(int $subscriptionId): Subscription + public function createSubscription(int $subscriptionId, array $attributes = []): Subscription { - return $this->client->subscriptions->create($this->id, $subscriptionId); + return $this->client->subscriptions->create($this->id, $subscriptionId, $attributes); } /** diff --git a/src/Resource/SubscriptionPlan.php b/src/Resource/SubscriptionPlan.php index d42444f..e35364f 100644 --- a/src/Resource/SubscriptionPlan.php +++ b/src/Resource/SubscriptionPlan.php @@ -53,11 +53,12 @@ class SubscriptionPlan extends AbstractResource /** * @param int $customerId + * @param array $attributes * @return Subscription * @throws \Marissen\eCurring\Exception\ApiException */ - public function createSubscription(int $customerId): Subscription + public function createSubscription(int $customerId, array $attributes = []): Subscription { - return $this->client->subscriptions->create($customerId, $this->id); + return $this->client->subscriptions->create($customerId, $this->id, $attributes); } }