<?php

declare (strict_types=1);
/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */
namespace FormGent\PaypalServerSdkLib\Models\Builders;

use FormGent\Core\Utils\CoreHelper;
use FormGent\PaypalServerSdkLib\Models\ApplePayPaymentObject;
use FormGent\PaypalServerSdkLib\Models\CardResponse;
use FormGent\PaypalServerSdkLib\Models\GooglePayWalletResponse;
use FormGent\PaypalServerSdkLib\Models\OrderAuthorizeResponsePaymentSource;
use FormGent\PaypalServerSdkLib\Models\PaypalWalletResponse;
use FormGent\PaypalServerSdkLib\Models\VenmoWalletResponse;
/**
 * Builder for model OrderAuthorizeResponsePaymentSource
 *
 * @see OrderAuthorizeResponsePaymentSource
 */
class OrderAuthorizeResponsePaymentSourceBuilder
{
    /**
     * @var OrderAuthorizeResponsePaymentSource
     */
    private $instance;
    private function __construct(OrderAuthorizeResponsePaymentSource $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Order Authorize Response Payment Source Builder object.
     */
    public static function init() : self
    {
        return new self(new OrderAuthorizeResponsePaymentSource());
    }
    /**
     * Sets card field.
     *
     * @param CardResponse|null $value
     */
    public function card(?CardResponse $value) : self
    {
        $this->instance->setCard($value);
        return $this;
    }
    /**
     * Sets paypal field.
     *
     * @param PaypalWalletResponse|null $value
     */
    public function paypal(?PaypalWalletResponse $value) : self
    {
        $this->instance->setPaypal($value);
        return $this;
    }
    /**
     * Sets apple pay field.
     *
     * @param ApplePayPaymentObject|null $value
     */
    public function applePay(?ApplePayPaymentObject $value) : self
    {
        $this->instance->setApplePay($value);
        return $this;
    }
    /**
     * Sets google pay field.
     *
     * @param GooglePayWalletResponse|null $value
     */
    public function googlePay(?GooglePayWalletResponse $value) : self
    {
        $this->instance->setGooglePay($value);
        return $this;
    }
    /**
     * Sets venmo field.
     *
     * @param VenmoWalletResponse|null $value
     */
    public function venmo(?VenmoWalletResponse $value) : self
    {
        $this->instance->setVenmo($value);
        return $this;
    }
    /**
     * Initializes a new Order Authorize Response Payment Source object.
     */
    public function build() : OrderAuthorizeResponsePaymentSource
    {
        return CoreHelper::clone($this->instance);
    }
}
