Source code for worldline.connect.sdk.v1.domain.card_payment_method_specific_input_base

# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://apireference.connect.worldline-solutions.com/
#
from typing import Optional

from worldline.connect.sdk.v1.domain.abstract_card_payment_method_specific_input import AbstractCardPaymentMethodSpecificInput
from worldline.connect.sdk.v1.domain.three_d_secure_base import ThreeDSecureBase


[docs] class CardPaymentMethodSpecificInputBase(AbstractCardPaymentMethodSpecificInput): __three_d_secure: Optional[ThreeDSecureBase] = None @property def three_d_secure(self) -> Optional[ThreeDSecureBase]: """ | Object containing specific data regarding 3-D Secure Type: :class:`worldline.connect.sdk.v1.domain.three_d_secure_base.ThreeDSecureBase` """ return self.__three_d_secure @three_d_secure.setter def three_d_secure(self, value: Optional[ThreeDSecureBase]) -> None: self.__three_d_secure = value
[docs] def to_dictionary(self) -> dict: dictionary = super(CardPaymentMethodSpecificInputBase, self).to_dictionary() if self.three_d_secure is not None: dictionary['threeDSecure'] = self.three_d_secure.to_dictionary() return dictionary
[docs] def from_dictionary(self, dictionary: dict) -> 'CardPaymentMethodSpecificInputBase': super(CardPaymentMethodSpecificInputBase, self).from_dictionary(dictionary) if 'threeDSecure' in dictionary: if not isinstance(dictionary['threeDSecure'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['threeDSecure'])) value = ThreeDSecureBase() self.three_d_secure = value.from_dictionary(dictionary['threeDSecure']) return self