| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 | 
							- <?php
 
- /**
 
-  * This file is part of the Klarna KP module
 
-  *
 
-  * (c) Klarna Bank AB (publ)
 
-  *
 
-  * For the full copyright and license information, please view the NOTICE
 
-  * and LICENSE files that were distributed with this source code.
 
-  */
 
- namespace Klarna\Kp\Model\Api\Request;
 
- use Klarna\Kp\Api\Data\OptionsInterface;
 
- /**
 
-  * Class Options
 
-  *
 
-  * @package Klarna\Kp\Model\Api\Request
 
-  * @SuppressWarnings(PHPMD.TooManyFields)
 
-  */
 
- class Options implements OptionsInterface
 
- {
 
-     use \Klarna\Kp\Model\Api\Export;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_button;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_button_text;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_checkbox;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_checkbox_checkmark;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_header;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_link;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_border;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_border_selected;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_text;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $radius_border;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $allow_separate_shipping_address;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $phone_mandatory;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $date_of_birth_mandatory;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $require_validate_callback_success;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $title_mandatory;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $payment_review;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_text_secondary;
 
-     /**
 
-      * @var string
 
-      */
 
-     private $color_details;
 
-     /**
 
-      * Constructor.
 
-      *
 
-      * @param array $data
 
-      */
 
-     public function __construct($data = [])
 
-     {
 
-         foreach ($data as $key => $value) {
 
-             if (property_exists($this, $key)) {
 
-                 $this->$key = $value;
 
-                 $this->addExport($key);
 
-             }
 
-         }
 
-     }
 
-     /**
 
-      * Make sure property has been added to export list
 
-      *
 
-      * @param string $key
 
-      */
 
-     private function addExport($key)
 
-     {
 
-         if (!in_array($key, $this->exports, true)) {
 
-             $this->exports[] = $key;
 
-         }
 
-     }
 
-     /**
 
-      * Allow separate shipping address from billing address
 
-      *
 
-      * @param string $allow_separate_shipping_address
 
-      */
 
-     public function setAllowSeparateShippingAddress($allow_separate_shipping_address)
 
-     {
 
-         $this->allow_separate_shipping_address = $allow_separate_shipping_address;
 
-         $this->addExport('allow_separate_shipping_address');
 
-     }
 
-     /**
 
-      * Require phone number
 
-      *
 
-      * @param string $phone_mandatory
 
-      */
 
-     public function setPhoneMandatory($phone_mandatory)
 
-     {
 
-         $this->phone_mandatory = $phone_mandatory;
 
-         $this->addExport('phone_mandatory');
 
-     }
 
-     /**
 
-      * Require DOB
 
-      *
 
-      * @param string $date_of_birth_mandatory
 
-      */
 
-     public function setDateOfBirthMandatory($date_of_birth_mandatory)
 
-     {
 
-         $this->date_of_birth_mandatory = $date_of_birth_mandatory;
 
-         $this->addExport('date_of_birth_mandatory');
 
-     }
 
-     /**
 
-      * Require that the validate callback is successful
 
-      *
 
-      * @param string $require_validate_callback_success
 
-      */
 
-     public function setRequireValidateCallbackSuccess($require_validate_callback_success)
 
-     {
 
-         $this->require_validate_callback_success = $require_validate_callback_success;
 
-         $this->addExport('require_validate_callback_success');
 
-     }
 
-     /**
 
-      * Make title (Mr, Mrs, Ms, etc..) required
 
-      *
 
-      * @param string $title_mandatory
 
-      */
 
-     public function setTitleMandatory($title_mandatory)
 
-     {
 
-         $this->title_mandatory = $title_mandatory;
 
-         $this->addExport('title_mandatory');
 
-     }
 
-     /**
 
-      * @param string $payment_review
 
-      */
 
-     public function setPaymentReview($payment_review)
 
-     {
 
-         $this->payment_review = $payment_review;
 
-         $this->addExport('payment_review');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $color_text_secondary
 
-      */
 
-     public function setColorTextSecondary($color_text_secondary)
 
-     {
 
-         $this->color_text_secondary = $color_text_secondary;
 
-         $this->addExport('color_text_secondary');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $color_details
 
-      */
 
-     public function setColorDetails($color_details)
 
-     {
 
-         $this->color_details = $color_details;
 
-         $this->addExport('color_details');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorText($colorCode)
 
-     {
 
-         $this->color_text = $colorCode;
 
-         $this->addExport('color_text');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorCheckbox($colorCode)
 
-     {
 
-         $this->color_checkbox = $colorCode;
 
-         $this->addExport('color_checkbox');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorCheckboxCheckmark($colorCode)
 
-     {
 
-         $this->color_checkbox_checkmark = $colorCode;
 
-         $this->addExport('color_checkbox_checkmark');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorButton($colorCode)
 
-     {
 
-         $this->color_button = $colorCode;
 
-         $this->addExport('color_button');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorBorder($colorCode)
 
-     {
 
-         $this->color_border = $colorCode;
 
-         $this->addExport('color_border');
 
-     }
 
-     /**
 
-      * Radius size, e.g. "5px"
 
-      *
 
-      * @param string $radiusBorder
 
-      */
 
-     public function setRadiusBorder($radiusBorder)
 
-     {
 
-         $this->radius_border = $radiusBorder;
 
-         $this->addExport('radius_border');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorHeader($colorCode)
 
-     {
 
-         $this->color_header = $colorCode;
 
-         $this->addExport('color_header');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorBorderSelected($colorCode)
 
-     {
 
-         $this->color_border_selected = $colorCode;
 
-         $this->addExport('color_border_selected');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorButtonText($colorCode)
 
-     {
 
-         $this->color_button_text = $colorCode;
 
-         $this->addExport('color_button_text');
 
-     }
 
-     /**
 
-      * CSS hex color, e.g. "#C0FFEE"
 
-      *
 
-      * @param string $colorCode
 
-      */
 
-     public function setColorLink($colorCode)
 
-     {
 
-         $this->color_link = $colorCode;
 
-         $this->addExport('color_link');
 
-     }
 
- }
 
 
  |