public void TestValidCreate()
        {
            CustomsDeclaration testObject = CustomsDeclarationTest.getDefaultObject();
            Hashtable          parameters = CustomsDeclarationTest.getDefaultParameters();

            Assert.AreEqual("VALID", testObject.ObjectState);
            Assert.AreEqual(parameters["exporter_reference"], testObject.ExporterReference);
            Assert.AreEqual(parameters["importer_reference"], testObject.ImporterReference);
            Assert.AreEqual(parameters["contents_type"], testObject.ContentsType);
            Assert.AreEqual(parameters["contents_explanation"], testObject.ContentsExplanation);
            Assert.AreEqual(parameters["invoice"], testObject.Invoice);
            Assert.AreEqual(parameters["license"], testObject.License);
            Assert.AreEqual(parameters["certificate"], testObject.Certificate);
            Assert.AreEqual(parameters["notes"], testObject.Notes);
            Assert.AreEqual(parameters["eel_pfc"], testObject.EelPfc);
            Assert.AreEqual(parameters["aes_itn"], testObject.AesItn);
            Assert.AreEqual(parameters["non_delivery_option"], testObject.NonDeliveryOption);
            Assert.AreEqual(parameters["certify"], testObject.Certify);
            Assert.AreEqual(parameters["certify_signer"], testObject.CertifySigner);
            Assert.AreEqual(parameters["incoterm"], testObject.Incoterm);
            Assert.AreEqual(parameters["b13a_filing_option"], testObject.B13aFilingOption);
            Assert.AreEqual(parameters["b13a_number"], testObject.B13aNumber);

            var invoicedChargesParameters = (Dictionary <String, String>)parameters["invoiced_charges"];

            Assert.AreEqual(invoicedChargesParameters["total_shipping"], testObject.InvoicedCharges.TotalShipping);
            Assert.AreEqual(invoicedChargesParameters["total_taxes"], testObject.InvoicedCharges.TotalTaxes);
            Assert.AreEqual(invoicedChargesParameters["total_duties"], testObject.InvoicedCharges.TotalDuties);
            Assert.AreEqual(invoicedChargesParameters["other_fees"], testObject.InvoicedCharges.OtherFees);
            Assert.AreEqual(invoicedChargesParameters["currency"], testObject.InvoicedCharges.Currency);
        }
        public void testValidRetrieveWithAddressImporter()
        {
            CustomsDeclaration testObject = CustomsDeclarationTest.getDefaultObject_2();
            CustomsDeclaration retrievedObject;

            retrievedObject = apiResource.RetrieveCustomsDeclaration((string)testObject.ObjectId);
            Console.Write(retrievedObject.AddressImporter.IsComplete);
            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
            Assert.IsNotNull(retrievedObject.AddressImporter);
            Assert.AreEqual(testObject.AddressImporter.ObjectId, retrievedObject.AddressImporter.ObjectId);
            Assert.AreEqual(true, retrievedObject.AddressImporter.IsComplete);
            Assert.AreEqual("Undefault New Wu", retrievedObject.AddressImporter.Name);
            Assert.AreEqual("Shippo", retrievedObject.AddressImporter.Company);
            Assert.AreEqual("", retrievedObject.AddressImporter.StreetNo);
            Assert.AreEqual("215 Clayton St", retrievedObject.AddressImporter.Street1);
            Assert.AreEqual("", retrievedObject.AddressImporter.Street2);
            Assert.AreEqual("", retrievedObject.AddressImporter.Street3);
            Assert.AreEqual("San Francisco", retrievedObject.AddressImporter.City);
            Assert.AreEqual("CA", retrievedObject.AddressImporter.State);
            Assert.AreEqual("94117-1913", retrievedObject.AddressImporter.Zip);
            Assert.AreEqual("US", retrievedObject.AddressImporter.Country);
            Assert.AreEqual("0015553419393", retrievedObject.AddressImporter.Phone);
            Assert.AreEqual("*****@*****.**", retrievedObject.AddressImporter.Email);
            Assert.AreEqual(true, retrievedObject.AddressImporter.IsResidential);
            Assert.AreEqual(true, retrievedObject.AddressImporter.Test);
        }
        public void testValidRetrieve()
        {
            CustomsDeclaration testObject = CustomsDeclarationTest.getDefaultObject();
            CustomsDeclaration retrievedObject;

            retrievedObject = apiResource.RetrieveCustomsDeclaration((string)testObject.ObjectId);
            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
        }
        public void testValidRetrieveWithAddressImporter()
        {
            CustomsDeclaration testObject = CustomsDeclarationTest.getDefaultObject_2();
            CustomsDeclaration retrievedObject;

            retrievedObject = apiResource.RetrieveCustomsDeclaration((string)testObject.ObjectId);
            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
            Assert.IsNotNull(retrievedObject.AddressImporter);
            Assert.AreEqual(testObject.AddressImporter, retrievedObject.AddressImporter);
        }
        public async Task TestValidRetrieve()
        {
            CustomsDeclaration testObject = await CustomsDeclarationTest.GetDefaultObject();

            CustomsDeclaration retrievedObject;

            retrievedObject = await shippoClient.RetrieveCustomsDeclaration(testObject.ObjectId);

            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
        }
        public async Task TestValidCreate()
        {
            CustomsDeclaration testObject = await CustomsDeclarationTest.GetDefaultObject();

            Assert.AreEqual(ShippoEnums.ObjectStates.VALID, testObject.ObjectState);
        }
        public void TestValidCreate()
        {
            CustomsDeclaration testObject = CustomsDeclarationTest.getDefaultObject();

            Assert.AreEqual("VALID", testObject.ObjectState);
        }