public static async Task <CustomsDeclaration> GetDefaultObject()
        {
            var parameters = new CreateCustomsDeclaration
            {
                ExporterReference   = "",
                ImporterReference   = "",
                ContentsType        = ShippoEnums.ContentsTypes.MERCHANDISE,
                ContentsExplanation = "T-Shirt purchase",
                Invoice             = "#123123",
                License             = "",
                Certificate         = "",
                Notes             = "",
                EelPfc            = ShippoEnums.EelPfcs.NOEEI_30_37_a,
                AesItn            = "",
                NonDeliveryOption = ShippoEnums.NonDeliveryOptions.ABANDON,
                Certify           = true,
                CertifySigner     = "Laura Behrens Wu",
                Disclaimer        = "",
                Incoterm          = null,
                Metadata          = "Order ID #123123"
            };

            CustomsItem customsItem = await CustomsItemTest.GetDefaultObject();

            parameters.Items.Add(customsItem.ObjectId);

            return(await GetShippoClient().CreateCustomsDeclaration(parameters));
        }
Exemplo n.º 2
0
        public async Task TestValidRetrieve()
        {
            CustomsItem testObject = await CustomsItemTest.GetDefaultObject();

            CustomsItem retrievedObject;

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

            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
        }
Exemplo n.º 3
0
        public async Task TestValidCreate()
        {
            CustomsItem testObject = await CustomsItemTest.GetDefaultObject();

            Assert.AreEqual(ShippoEnums.ObjectStates.VALID, testObject.ObjectState);
        }