Skip to content

Commit

Permalink
[Billing] Set status of subscription in subscription providert
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Jun 24, 2024
1 parent 673108f commit 896a331
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Parthenon\Billing\Entity\CustomerInterface;
use Parthenon\Billing\Entity\Price;
use Parthenon\Billing\Entity\Subscription;
use Parthenon\Billing\Enum\SubscriptionStatus;
use Parthenon\Billing\Subscription\SubscriptionProviderInterface;

class SubscriptionProvider implements SubscriptionProviderInterface
Expand Down Expand Up @@ -56,6 +57,7 @@ public function buildSubscription(\BillaBear\Model\Subscription $subscription):
$entity->setCreatedAt(new \DateTime($subscription->getCreatedAt()));
$entity->setUpdatedAt(new \DateTime($subscription->getUpdatedAt()));
$entity->setCurrency($subscription->getPrice()?->getCurrency());
$entity->setStatus(SubscriptionStatus::from($subscription->getStatus()));

if ($subscription->getPrice()) {
$price = new Price();
Expand Down

0 comments on commit 896a331

Please sign in to comment.