# Path: tests/integration/init_utils.py
# MERCHANT_ID = str(os.getenv("connect.api.merchantId"))
# 
# Path: ingenico/connect/sdk/merchant/services/convert_amount_params.py
# class ConvertAmountParams(ParamRequest):
#     """
#     Query parameters for Convert amount
#     
#     See also https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/python/services/convertAmount.html
#     """
# 
#     __source = None
#     __target = None
#     __amount = None
# 
#     @property
#     def source(self):
#         """
#         | Three-letter ISO currency code representing the source currency
#         
#         Type: str
#         """
#         return self.__source
# 
#     @source.setter
#     def source(self, value):
#         self.__source = value
# 
#     @property
#     def target(self):
#         """
#         | Three-letter ISO currency code representing the target currency
#         
#         Type: str
#         """
#         return self.__target
# 
#     @target.setter
#     def target(self, value):
#         self.__target = value
# 
#     @property
#     def amount(self):
#         """
#         | Amount to be converted in cents and always having 2 decimals
#         
#         Type: int
#         """
#         return self.__amount
# 
#     @amount.setter
#     def amount(self, value):
#         self.__amount = value
# 
#     def to_request_parameters(self):
#         """
#         :return: list[RequestParam]
#         """
#         result = []
#         if self.source is not None:
#             result.append(RequestParam("source", self.source))
#         if self.target is not None:
#             result.append(RequestParam("target", self.target))
#         if self.amount is not None:
#             result.append(RequestParam("amount", str(self.amount)))
#         return result


import unittest
import tests.integration.init_utils as init_utils
from tests.integration.init_utils import MERCHANT_ID
from ingenico.connect.sdk.merchant.services.convert_amount_params import ConvertAmountParams


class ConvertAmountTest(unittest.TestCase):
    """Test if the convert amount service can connect to the server"""

    def test_convert_amount(self):
        """Test if the convert amount service can connect to the server"""
        request = ConvertAmountParams()
        request.amount = 123
        request.source = "USD"
        request.target = "EUR"

        with init_utils.create_client() as client:

# Path: tests/integration/init_utils.py
# MERCHANT_ID = str(os.getenv("connect.api.merchantId"))
# 
# Path: ingenico/connect/sdk/merchant/services/convert_amount_params.py
# class ConvertAmountParams(ParamRequest):
#     """
#     Query parameters for Convert amount
#     
#     See also https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/python/services/convertAmount.html
#     """
# 
#     __source = None
#     __target = None
#     __amount = None
# 
#     @property
#     def source(self):
#         """
#         | Three-letter ISO currency code representing the source currency
#         
#         Type: str
#         """
#         return self.__source
# 
#     @source.setter
#     def source(self, value):
#         self.__source = value
# 
#     @property
#     def target(self):
#         """
#         | Three-letter ISO currency code representing the target currency
#         
#         Type: str
#         """
#         return self.__target
# 
#     @target.setter
#     def target(self, value):
#         self.__target = value
# 
#     @property
#     def amount(self):
#         """
#         | Amount to be converted in cents and always having 2 decimals
#         
#         Type: int
#         """
#         return self.__amount
# 
#     @amount.setter
#     def amount(self, value):
#         self.__amount = value
# 
#     def to_request_parameters(self):
#         """
#         :return: list[RequestParam]
#         """
#         result = []
#         if self.source is not None:
#             result.append(RequestParam("source", self.source))
#         if self.target is not None:
#             result.append(RequestParam("target", self.target))
#         if self.amount is not None:
#             result.append(RequestParam("amount", str(self.amount)))
#         return result


# Path: tests/integration/test_convert_amount.py
import unittest
import tests.integration.init_utils as init_utils
from tests.integration.init_utils import MERCHANT_ID
from ingenico.connect.sdk.merchant.services.convert_amount_params import ConvertAmountParams



class ConvertAmountTest(unittest.TestCase):
    """Test if the convert amount service can connect to the server"""

    def test_convert_amount(self):
        """Test if the convert amount service can connect to the server"""
        request = ConvertAmountParams()
        request.amount = 123
        request.source = "USD"
        request.target = "EUR"

        with init_utils.create_client() as client:

            response = client.merchant(MERCHANT_ID).services().convert_amount(request)