Source code for worldline.connect.sdk.v1.domain.abstract_payment_method_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
[docs]
class AbstractPaymentMethodSpecificInput(DataObject):
__payment_product_id: Optional[int] = None
@property
def payment_product_id(self) -> Optional[int]:
"""
| Payment product identifier
| Please see payment products <https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/python/paymentproducts.html> for a full overview of possible values.
Type: int
"""
return self.__payment_product_id
@payment_product_id.setter
def payment_product_id(self, value: Optional[int]) -> None:
self.__payment_product_id = value
[docs]
def to_dictionary(self) -> dict:
dictionary = super(AbstractPaymentMethodSpecificInput, self).to_dictionary()
if self.payment_product_id is not None:
dictionary['paymentProductId'] = self.payment_product_id
return dictionary
[docs]
def from_dictionary(self, dictionary: dict) -> 'AbstractPaymentMethodSpecificInput':
super(AbstractPaymentMethodSpecificInput, self).from_dictionary(dictionary)
if 'paymentProductId' in dictionary:
self.payment_product_id = dictionary['paymentProductId']
return self