def example(self): with self.__get_client() as client: bank_account_bban = BankAccountBban() bank_account_bban.account_number = "0532013000" bank_account_bban.bank_code = "37040044" bank_account_bban.country_code = "DE" amount_of_money = AmountOfMoney() amount_of_money.amount = 100 amount_of_money.currency_code = "EUR" billing_address = Address() billing_address.country_code = "US" customer = CustomerRiskAssessment() customer.billing_address = billing_address customer.locale = "en_US" order = OrderRiskAssessment() order.amount_of_money = amount_of_money order.customer = customer body = RiskAssessmentBankAccount() body.bank_account_bban = bank_account_bban body.order = order response = client.merchant("merchantId").riskassessments().bankaccounts(body)
def example(self): with self.__get_client() as client: bank_account_bban = BankAccountBban() bank_account_bban.account_number = "0532013000" bank_account_bban.bank_code = "37040044" bank_account_bban.country_code = "DE" body = BankDetailsRequest() body.bank_account_bban = bank_account_bban response = client.merchant("merchantId").services().bankaccount( body)
def example(self): with self.__get_client() as client: billing_address = Address() billing_address.additional_info = "Suite II" billing_address.city = "Monument Valley" billing_address.country_code = "US" billing_address.house_number = "1" billing_address.state = "Utah" billing_address.street = "Desertroad" billing_address.zip = "84536" company_information = CompanyInformation() company_information.name = "Acme Labs" name = PersonalNameToken() name.first_name = "Wile" name.surname = "Coyote" name.surname_prefix = "E." personal_information = PersonalInformationToken() personal_information.name = name customer = CustomerToken() customer.billing_address = billing_address customer.company_information = company_information customer.merchant_customer_id = "1234" customer.personal_information = personal_information bank_account_bban = BankAccountBban() bank_account_bban.account_number = "000000123456" bank_account_bban.bank_code = "05428" bank_account_bban.branch_code = "11101" bank_account_bban.check_digit = "X" bank_account_bban.country_code = "IT" payment_product705_specific_data = TokenNonSepaDirectDebitPaymentProduct705SpecificData( ) payment_product705_specific_data.authorisation_id = "123456" payment_product705_specific_data.bank_account_bban = bank_account_bban mandate = MandateNonSepaDirectDebit() mandate.payment_product705_specific_data = payment_product705_specific_data non_sepa_direct_debit = TokenNonSepaDirectDebit() non_sepa_direct_debit.customer = customer non_sepa_direct_debit.mandate = mandate body = CreateTokenRequest() body.non_sepa_direct_debit = non_sepa_direct_debit body.payment_product_id = 705 response = client.merchant("merchantId").tokens().create(body)
def test_risk_assessments(self): """Test if the risk assessments service functions""" bank_account_bban = BankAccountBban() bank_account_bban.country_code = "DE" bank_account_bban.account_number = "0532013000" bank_account_bban.bank_code = "37040044" amount_of_money = AmountOfMoney() amount_of_money.amount = 100 amount_of_money.currency_code = "EUR" customer = CustomerRiskAssessment() customer.locale = "en_GB" order = OrderRiskAssessment() order.amount_of_money = amount_of_money order.customer = customer body = RiskAssessmentBankAccount() body.order = order body.bank_account_bban = bank_account_bban with init_utils.create_client() as client: response = client.merchant( MERCHANT_ID).riskassessments().bankaccounts(body) self.assertGreater(len(response.results), 0)