Exemple #1
0
        public static async Task <Transaction> GetDefaultObject()
        {
            ShippoCollection <Rate> rateCollection = await RateTest.GetDefaultObject();

            List <Rate> rateList = rateCollection.Data;

            Rate[] rateArray = rateList.ToArray();

            var parameters = new CreateTransaction
            {
                Rate     = rateArray[0].ObjectId,
                Metadata = "Customer ID 123456"
            };

            return(await GetShippoClient().CreateTransactionSync(parameters));
        }
        public async Task TestValidCreate()
        {
            ShippoCollection <Rate> testObject = await RateTest.GetDefaultObject();

            Assert.IsNotNull(testObject.Data);
        }