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

# -*- 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.domain.data_object import DataObject
from worldline.connect.sdk.v1.domain.bank_account_iban import BankAccountIban


[docs] class RedirectPaymentProduct816SpecificInput(DataObject): """ | Please find below specific input fields for payment product 816 (giropay) """ __bank_account_iban: Optional[BankAccountIban] = None @property def bank_account_iban(self) -> Optional[BankAccountIban]: """ | Object containing the bank account details of the customer Type: :class:`worldline.connect.sdk.v1.domain.bank_account_iban.BankAccountIban` """ return self.__bank_account_iban @bank_account_iban.setter def bank_account_iban(self, value: Optional[BankAccountIban]) -> None: self.__bank_account_iban = value
[docs] def to_dictionary(self) -> dict: dictionary = super(RedirectPaymentProduct816SpecificInput, self).to_dictionary() if self.bank_account_iban is not None: dictionary['bankAccountIban'] = self.bank_account_iban.to_dictionary() return dictionary
[docs] def from_dictionary(self, dictionary: dict) -> 'RedirectPaymentProduct816SpecificInput': super(RedirectPaymentProduct816SpecificInput, self).from_dictionary(dictionary) if 'bankAccountIban' in dictionary: if not isinstance(dictionary['bankAccountIban'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['bankAccountIban'])) value = BankAccountIban() self.bank_account_iban = value.from_dictionary(dictionary['bankAccountIban']) return self