public void TestCRUD()
        {
            CarrierAccount account = CarrierAccount.Create(new Dictionary <string, object>
            {
                {
                    "type", "DhlExpressAccount"
                },
                {
                    "description", "description"
                }
            });

            Assert.IsNotNull(account.id);
            Assert.AreEqual(account.type, "DhlExpressAccount");

            account.Update(new Dictionary <string, object>
            {
                {
                    "reference", "new-reference"
                }
            });
            Assert.AreEqual("new-reference", account.reference);

            account.Destroy();
            try
            {
                CarrierAccount.Retrieve(account.id);
                Assert.Fail();
            }
            catch (HttpException)
            {
            }
        }
        public void TestRetrieve()
        {
            CarrierAccount account = CarrierAccount.Retrieve("ca_7642d249fdcf47bcb5da9ea34c96dfcf");

            Assert.AreEqual("ca_7642d249fdcf47bcb5da9ea34c96dfcf", account.id);
        }
Exemplo n.º 3
0
        public void TestRetrieve()
        {
            CarrierAccount account = CarrierAccount.Retrieve("ca_7c7X1XzO");

            Assert.AreEqual("ca_7c7X1XzO", account.id);
        }