diff --git a/src/Obol/Model/Price.php b/src/Obol/Model/Price.php index 12a10ca0..bc0d50fc 100644 --- a/src/Obol/Model/Price.php +++ b/src/Obol/Model/Price.php @@ -56,6 +56,8 @@ class Price private ?Metric $metric = null; + private ?int $packageAmount = null; + public function isIncludingTax(): bool { return $this->includingTax; @@ -195,4 +197,14 @@ public function setMetric(?Metric $metric): void { $this->metric = $metric; } + + public function getPackageAmount(): ?int + { + return $this->packageAmount; + } + + public function setPackageAmount(?int $packageAmount): void + { + $this->packageAmount = $packageAmount; + } } diff --git a/src/Obol/Provider/Stripe/PriceService.php b/src/Obol/Provider/Stripe/PriceService.php index 4c610021..c89fc9e9 100644 --- a/src/Obol/Provider/Stripe/PriceService.php +++ b/src/Obol/Provider/Stripe/PriceService.php @@ -134,6 +134,7 @@ public function populatePrice(\Stripe\Price $stripePrice): Price $price->setTierMode(TierMode::fromString($stripePrice->tiers_mode)); $price->setBillingType(BillingType::fromStripe($stripePrice->billing_scheme)); $price->setUsageType(UsageType::fromStripe($stripePrice->recurring?->usage_type)); + $price->setPackageAmount($stripePrice->transform_quantity?->divide_by); if ($stripePrice->recurring?->meter) { /** @var Meter $stripeMeter */