// 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.InvoiceInner;

public final class InvoiceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        InvoiceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"dueDate\":\"2021-03-11T11:23:32Z\",\"invoiceDate\":\"2021-08-15T11:45:06Z\",\"status\":\"Paid\",\"amountDue\":{\"currency\":\"zkzivgvvcnay\",\"value\":67.249825},\"azurePrepaymentApplied\":{\"currency\":\"xxmueedn\",\"value\":33.27728},\"billedAmount\":{\"currency\":\"tkwqqtchealm\",\"value\":65.58801},\"creditAmount\":{\"currency\":\"aygdvwvgpioh\",\"value\":50.264233},\"freeAzureCreditApplied\":{\"currency\":\"fudxepxgyqagvrv\",\"value\":39.926674},\"subTotal\":{\"currency\":\"kghimdblxgwimfnj\",\"value\":1.0266364},\"taxAmount\":{\"currency\":\"mszkkfo\",\"value\":56.352932},\"totalAmount\":{\"currency\":\"kzikfjawneaivxwc\",\"value\":55.13192},\"invoicePeriodStartDate\":\"2021-05-21T02:26:51Z\",\"invoicePeriodEndDate\":\"2021-02-26T20:53:26Z\",\"invoiceType\":\"AzureSupport\",\"isMonthlyInvoice\":false,\"billingProfileId\":\"aenwabf\",\"billingProfileDisplayName\":\"kl\",\"purchaseOrderNumber\":\"xbjhwuaanozjosph\",\"documents\":[{\"kind\":\"VoidNote\",\"url\":\"rvxaglrvimjwosy\",\"source\":\"DRS\"},{\"kind\":\"CreditNote\",\"url\":\"kfcktqum\",\"source\":\"ENF\"}],\"payments\":[{\"paymentType\":\"zikhl\",\"date\":\"2021-07-20T01:18:29Z\",\"paymentMethodFamily\":\"None\",\"paymentMethodType\":\"gge\"}],\"rebillDetails\":{\"mjsjqb\":{\"creditNoteDocumentId\":\"ygaeqidbqfatpxl\",\"invoiceDocumentId\":\"xcyjmoadsuvarmy\",\"rebillDetails\":{}},\"ajxq\":{\"creditNoteDocumentId\":\"hyxxrwlycoduhpk\",\"invoiceDocumentId\":\"gymare\",\"rebillDetails\":{}},\"mnjijpxacqqudf\":{\"creditNoteDocumentId\":\"jhkycub\",\"invoiceDocumentId\":\"dgssofwqmzqal\",\"rebillDetails\":{}}},\"documentType\":\"CreditNote\",\"billedDocumentId\":\"baaa\",\"creditForDocumentId\":\"yvayffimrzr\",\"subscriptionId\":\"zqogse\"},\"id\":\"nevfdnw\",\"name\":\"wmewzsyy\",\"type\":\"euzsoi\"}")
                .toObject(InvoiceInner.class);
    }

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