// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.billing.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billing.fluent.models.InvoiceProperties;

public final class InvoicePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        InvoiceProperties model =
            BinaryData
                .fromString(
                    "{\"dueDate\":\"2021-09-06T23:25:45Z\",\"invoiceDate\":\"2021-11-18T11:14:43Z\",\"status\":\"Due\",\"amountDue\":{\"currency\":\"rthzvaytdwkqbrqu\",\"value\":67.445885},\"azurePrepaymentApplied\":{\"currency\":\"exiili\",\"value\":42.678963},\"billedAmount\":{\"currency\":\"irqtdqoa\",\"value\":4.6766224},\"creditAmount\":{\"currency\":\"fgsqu\",\"value\":38.977768},\"freeAzureCreditApplied\":{\"currency\":\"xleptramx\",\"value\":16.920918},\"subTotal\":{\"currency\":\"wnwxuqlcvyd\",\"value\":76.745186},\"taxAmount\":{\"currency\":\"ooaojkniodkooebw\",\"value\":34.47978},\"totalAmount\":{\"currency\":\"mmsbvdkcrodtjin\",\"value\":99.528564},\"invoicePeriodStartDate\":\"2021-11-16T20:55:55Z\",\"invoicePeriodEndDate\":\"2021-06-24T17:33:05Z\",\"invoiceType\":\"AzureSupport\",\"isMonthlyInvoice\":true,\"billingProfileId\":\"efkdlf\",\"billingProfileDisplayName\":\"kggkfpa\",\"purchaseOrderNumber\":\"owpulpq\",\"documents\":[{\"kind\":\"Invoice\",\"url\":\"xkqjnsjervt\",\"source\":\"DRS\"},{\"kind\":\"VoidNote\",\"url\":\"sz\",\"source\":\"ENF\"},{\"kind\":\"VoidNote\",\"url\":\"zkfzbeyv\",\"source\":\"DRS\"}],\"payments\":[{\"paymentType\":\"invkjjxdxrbuu\",\"amount\":{\"currency\":\"lewyhmlwpaz\",\"value\":41.111607},\"date\":\"2021-01-30T03:38:42Z\",\"paymentMethodFamily\":\"None\",\"paymentMethodType\":\"kwyfzqwhxxbuyqax\"},{\"paymentType\":\"eqz\",\"amount\":{\"currency\":\"riolxorjalt\",\"value\":80.87304},\"date\":\"2021-02-06T08:10:47Z\",\"paymentMethodFamily\":\"CheckWire\",\"paymentMethodType\":\"bqwcsdbnwdcf\"},{\"paymentType\":\"cqdpfuv\",\"amount\":{\"currency\":\"bjj\",\"value\":36.3222},\"date\":\"2021-05-27T00:53:27Z\",\"paymentMethodFamily\":\"None\",\"paymentMethodType\":\"vudutncor\"},{\"paymentType\":\"lxqtvcofudfl\",\"amount\":{\"currency\":\"jub\",\"value\":57.222305},\"date\":\"2021-10-26T17:09:29Z\",\"paymentMethodFamily\":\"None\",\"paymentMethodType\":\"aznqntoru\"}],\"rebillDetails\":{\"aeburuvdmo\":{\"creditNoteDocumentId\":\"a\",\"invoiceDocumentId\":\"kycgrauwj\",\"rebillDetails\":{}},\"fkifr\":{\"creditNoteDocumentId\":\"mz\",\"invoiceDocumentId\":\"wabm\",\"rebillDetails\":{}},\"ujitcjedftww\":{\"creditNoteDocumentId\":\"puqujmqlgkfbtn\",\"invoiceDocumentId\":\"aongbj\",\"rebillDetails\":{}},\"oqouicybxarzgszu\":{\"creditNoteDocumentId\":\"zkoj\",\"invoiceDocumentId\":\"c\",\"rebillDetails\":{}}},\"documentType\":\"Invoice\",\"billedDocumentId\":\"iqopidoamciod\",\"creditForDocumentId\":\"haz\",\"subscriptionId\":\"hnzbonl\"}")
                .toObject(InvoiceProperties.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        InvoiceProperties model = new InvoiceProperties();
        model = BinaryData.fromObject(model).toObject(InvoiceProperties.class);
    }
}
