text: # coding: utf-8
  
  """
      Yapily API
  
      To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com)  # noqa: E501
  
      The version of the OpenAPI document: 1.154.0
      Generated by: https://openapi-generator.tech
  """
  
  
  from __future__ import absolute_import
  
  import unittest
  import datetime
  
  import yapily
  from yapily.models.payment_embedded_authorisation_request import PaymentEmbeddedAuthorisationRequest  # noqa: E501
  from yapily.rest import ApiException
  
  class TestPaymentEmbeddedAuthorisationRequest(unittest.TestCase):
      """PaymentEmbeddedAuthorisationRequest unit test stubs"""
  
      def setUp(self):
          pass
  
      def tearDown(self):
          pass
  
      def make_instance(self, include_optional):
          """Test PaymentEmbeddedAuthorisationRequest
              include_option is a boolean, when False only required
              params are included, when True both required and
              optional params are included """
          # model = yapily.models.payment_embedded_authorisation_request.PaymentEmbeddedAuthorisationRequest()  # noqa: E501
          if include_optional :
              return PaymentEmbeddedAuthorisationRequest(
                  user_uuid = '0', 
                  application_user_id = '0', 
                  forward_parameters = [
                      '0'
                      ], 
                  institution_id = '0', 
                  callback = '0', 
                  redirect = yapily.models.redirect_request.RedirectRequest(
                      url = '0', ), 
                  one_time_token = False, 
                  total_max_amount = 1.337, 
                  total_max_amount_frequency = 'DAILY', 
                  max_amount_per_request = 1.337, 
                  starts_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                  expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                  allow_overdraft = False, 
                  payment_request = yapily.models.payment_request.PaymentRequest(
                      payment_idempotency_id = '0', 
                      payer = yapily.models.payer.Payer(
                          name = '0', 
                          address = yapily.models.address.Address(
                              address_lines = [
                                  '0'
                                  ], 
                              street_name = '0', 
                              building_number = '0', 
                              post_code = '0', 
                              town_name = '0', 
                              county = [
                                  '0'
                                  ], 
                              address_type = 'BUSINESS', 
                              country = '0', 
                              department = '0', 
                              sub_department = '0', ), 
                          account_identifications = [
                              yapily.models.account_identification.AccountIdentification(
                                  type = 'SORT_CODE', 
                                  identification = '0', )
                              ], ), 
                      amount = yapily.models.amount.Amount(
                          amount = 1.337, 
                          currency = '0', ), 
                      reference = '0', 
                      context_type = 'BILL', 
                      type = 'DOMESTIC_PAYMENT', 
                      payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                      payee = yapily.models.payee.Payee(
                          name = '0', 
                          account_identifications = [
                              yapily.models.account_identification.AccountIdentification(
                                  type = 'SORT_CODE', 
                                  identification = '0', )
                              ], 
                          merchant_id = '0', 
                          merchant_category_code = '0', ), 
                      periodic_payment = yapily.models.periodic_payment_request.PeriodicPaymentRequest(
                          frequency = yapily.models.frequency_request.FrequencyRequest(
                              type = 'DAILY', 
                              interval_week = 56, 
                              interval_month = 56, 
                              execution_day = 56, ), 
                          number_of_payments = 56, 
                          next_payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                          next_payment_amount = yapily.models.amount.Amount(
                              amount = 1.337, 
                              currency = '0', ), 
                          final_payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                          final_payment_amount = yapily.models.amount.Amount(
                              amount = 1.337, 
                              currency = '0', ), ), 
                      international_payment = yapily.models.international_payment_request.InternationalPaymentRequest(
                          currency_of_transfer = '0', 
                          exchange_rate_information = yapily.models.exchange_rate_information.ExchangeRateInformation(
                              foreign_exchange_contract_reference = '0', 
                              rate = 1.337, 
                              rate_type = 'ACTUAL', 
                              unit_currency = '0', ), 
                          purpose = '0', 
                          priority = 'NORMAL', 
                          charge_bearer = 'DEBT', ), 
                      read_refund_account = False, ), 
                  user_credentials = yapily.models.user_credentials.UserCredentials(
                      id = '0', 
                      corporate_id = '0', 
                      password = '0', ), 
                  selected_sca_method = yapily.models.sca_method.ScaMethod(
                      id = '0', 
                      type = 'SMS_OTP', 
                      description = '0', ), 
                  sca_code = '0'
              )
          else :
              return PaymentEmbeddedAuthorisationRequest(
                  institution_id = '0',
                  callback = '0',
                  one_time_token = False,
                  payment_request = yapily.models.payment_request.PaymentRequest(
                      payment_idempotency_id = '0', 
                      payer = yapily.models.payer.Payer(
                          name = '0', 
                          address = yapily.models.address.Address(
                              address_lines = [
                                  '0'
                                  ], 
                              street_name = '0', 
                              building_number = '0', 
                              post_code = '0', 
                              town_name = '0', 
                              county = [
                                  '0'
                                  ], 
                              address_type = 'BUSINESS', 
                              country = '0', 
                              department = '0', 
                              sub_department = '0', ), 
                          account_identifications = [
                              yapily.models.account_identification.AccountIdentification(
                                  type = 'SORT_CODE', 
                                  identification = '0', )
                              ], ), 
                      amount = yapily.models.amount.Amount(
                          amount = 1.337, 
                          currency = '0', ), 
                      reference = '0', 
                      context_type = 'BILL', 
                      type = 'DOMESTIC_PAYMENT', 
                      payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                      payee = yapily.models.payee.Payee(
                          name = '0', 
                          account_identifications = [
                              yapily.models.account_identification.AccountIdentification(
                                  type = 'SORT_CODE', 
                                  identification = '0', )
                              ], 
                          merchant_id = '0', 
                          merchant_category_code = '0', ), 
                      periodic_payment = yapily.models.periodic_payment_request.PeriodicPaymentRequest(
                          frequency = yapily.models.frequency_request.FrequencyRequest(
                              type = 'DAILY', 
                              interval_week = 56, 
                              interval_month = 56, 
                              execution_day = 56, ), 
                          number_of_payments = 56, 
                          next_payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                          next_payment_amount = yapily.models.amount.Amount(
                              amount = 1.337, 
                              currency = '0', ), 
                          final_payment_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                          final_payment_amount = yapily.models.amount.Amount(
                              amount = 1.337, 
                              currency = '0', ), ), 
                      international_payment = yapily.models.international_payment_request.InternationalPaymentRequest(
                          currency_of_transfer = '0', 
                          exchange_rate_information = yapily.models.exchange_rate_information.ExchangeRateInformation(
                              foreign_exchange_contract_reference = '0', 
                              rate = 1.337, 
                              rate_type = 'ACTUAL', 
                              unit_currency = '0', ), 
                          purpose = '0', 
                          priority = 'NORMAL', 
                          charge_bearer = 'DEBT', ), 
                      read_refund_account = False, ),
          )
  
      def testPaymentEmbeddedAuthorisationRequest(self):
          """Test PaymentEmbeddedAuthorisationRequest"""
          inst_req_only = self.make_instance(include_optional=False)
          inst_req_and_optional = self.make_instance(include_optional=True)
  
  
  if __name__ == '__main__':
      unittest.main()
  