objectManager = $objectManager; } /** * Creates new instance. * * @param PaymentTokenInterface|null $paymentToken * @param Address|null $shippingAddress * @param Address|null $billingAddress * @param ShippingMethodInterface|null $shippingMethod * @return InstantPurchaseOption * @since 100.2.0 */ public function create( PaymentTokenInterface $paymentToken = null, Address $shippingAddress = null, Address $billingAddress = null, ShippingMethodInterface $shippingMethod = null ): InstantPurchaseOption { return $this->objectManager->create(InstantPurchaseOption::class, [ 'paymentToken' => $paymentToken, 'shippingAddress' => $shippingAddress, 'billingAddress' => $billingAddress, 'shippingMethod' => $shippingMethod, ]); } /** * Creates new empty instance (no option available). * * @return InstantPurchaseOption * @since 100.2.0 */ public function createDisabledOption(): InstantPurchaseOption { return $this->create(null, null, null, null); } }