Source code for ingenico.connect.sdk.domain.product.definitions.payment_product302_specific_data

# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/
#
from ingenico.connect.sdk.data_object import DataObject


[docs]class PaymentProduct302SpecificData(DataObject): __networks = None @property def networks(self): """ | The networks that can be used in the current payment context. The strings that represent the networks in the array are identical to the strings that Apple uses in their documentation <https://developer.apple.com/reference/passkit/pkpaymentnetwork>.For instance: "Visa". Type: list[str] """ return self.__networks @networks.setter def networks(self, value): self.__networks = value
[docs] def to_dictionary(self): dictionary = super(PaymentProduct302SpecificData, self).to_dictionary() if self.networks is not None: dictionary['networks'] = [] for element in self.networks: if element is not None: dictionary['networks'].append(element) return dictionary
[docs] def from_dictionary(self, dictionary): super(PaymentProduct302SpecificData, self).from_dictionary(dictionary) if 'networks' in dictionary: if not isinstance(dictionary['networks'], list): raise TypeError('value \'{}\' is not a list'.format(dictionary['networks'])) self.networks = [] for element in dictionary['networks']: self.networks.append(element) return self