# coding: utf-8

"""
    MONEI API v1

    The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import MONEI PYTHON SDK
from MONEI PYTHON SDK.models.payment import Payment  # noqa: E501
from MONEI PYTHON SDK.rest import ApiException

class TestPayment(unittest.TestCase):
    """Payment unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test Payment
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = MONEI PYTHON SDK.models.payment.Payment()  # noqa: E501
        if include_optional :
            return Payment(
                id = 'af6029f80f5fc73a8ad2753eea0b1be0',
                amount = 110,
                currency = 'EUR',
                order_id = '14379133960355',
                description = 'Test Shop - #84370745531439',
                account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242',
                authorization_code = '475816',
                livemode = False,
                status = 'PENDING',
                status_code = '0',
                status_message = '0',
                customer = MONEI PYTHON SDK.models.payment_customer.Payment-Customer(
                    email = 'john.doe@microapps.com',
                    name = 'John Doe',
                    phone = '0', ),
                payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b',
                payment_method = MONEI PYTHON SDK.models.payment_payment_method.Payment-PaymentMethod(
                    method = 'card',
                    card = MONEI PYTHON SDK.models.payment_payment_method_card.Payment-PaymentMethodCard(
                        country = 'ES',
                        brand = 'visa',
                        type = 'credit',
                        three_d_secure = False,
                        three_d_secure_version = '2.1.0',
                        last4 = '0004', ),
                    bizum = MONEI PYTHON SDK.models.payment_payment_method_bizum.Payment-PaymentMethodBizum(
                        phone_number = '0', ),
                    paypal = MONEI PYTHON SDK.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal(
                        order_id = '0', ), ),
                shop = MONEI PYTHON SDK.models.payment_shop.Payment-Shop(
                    name = 'Test Shop',
                    country = 'ES', ),
                billing_details = MONEI PYTHON SDK.models.payment_billing_details.Payment-BillingDetails(
                    name = 'John Doe',
                    email = 'john.doe@microapps.com',
                    phone = '0',
                    company = '0',
                    address = MONEI PYTHON SDK.models.address.Address(
                        country = 'ES',
                        city = 'Málaga',
                        line1 = 'Fake Street 123',
                        line2 = '0',
                        zip = '1234',
                        state = 'Málaga', ), ),
                shipping_details = MONEI PYTHON SDK.models.payment_shipping_details.Payment-ShippingDetails(
                    name = 'John Doe',
                    email = 'john.doe@microapps.com',
                    phone = '0',
                    company = '0',
                    address = MONEI PYTHON SDK.models.address.Address(
                        country = 'ES',
                        city = 'Málaga',
                        line1 = 'Fake Street 123',
                        line2 = '0',
                        zip = '1234',
                        state = 'Málaga', ), ),
                refunded_amount = 56,
                last_refund_amount = 56,
                last_refund_reason = 'duplicated',
                cancellation_reason = 'duplicated',
                session_details = MONEI PYTHON SDK.models.payment_session_details.Payment-SessionDetails(
                    ip = '100.100.200.100',
                    country_code = 'ES',
                    lang = 'es',
                    device_type = 'desktop',
                    device_model = '0',
                    browser = 'Chrome',
                    browser_version = '83.0.4103.116',
                    os = 'Mac OS',
                    os_version = '10.15.4',
                    source = 'MONEI/PHP',
                    source_version = '0.1.2',
                    user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', ),
                trace_details = MONEI PYTHON SDK.models.payment_trace_details.Payment-TraceDetails(
                    ip = '100.100.200.100',
                    country_code = 'ES',
                    lang = 'es',
                    device_type = 'desktop',
                    device_model = '0',
                    browser = 'Chrome',
                    browser_version = '83.0.4103.116',
                    os = 'Mac OS',
                    os_version = '10.15.4',
                    source = 'MONEI/PHP',
                    source_version = '0.1.2',
                    user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...',
                    user_id = '0',
                    user_email = 'user@example.com', ),
                next_action = MONEI PYTHON SDK.models.payment_next_action.Payment-NextAction(
                    type = 'CONFIRM',
                    must_redirect = False,
                    redirect_url = 'https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0', ),
                created_at = 56,
                updated_at = 56
            )
        else :
            return Payment(
        )

    def testPayment(self):
        """Test Payment"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == '__main__':
    unittest.main()
