コード例 #1
0
ファイル: SalesOrderTests.cs プロジェクト: Solitea/IdokladSdk
        public void Update_SuccessfullyUpdated()
        {
            // Arrange
            var model      = GetSalesOrderPostModel();
            var result     = _client.Post(model).AssertResult();
            var patchModel = new SalesOrderPatchModel
            {
                Id = result.Id,
                DeliveryAddressId = DeliveryAddressId2,
                Description       = "updated description",
                MyAddress         = new MyDocumentAddressPatchModel
                {
                    AccountNumber = "555777",
                    Iban          = "5453187522"
                }
            };

            // Act
            var data = _client.Update(patchModel).AssertResult();

            // Assert
            Assert.AreEqual(patchModel.Description, data.Description);
            Assert.AreEqual(PartnerId, data.PartnerId);
            Assert.AreEqual(patchModel.MyAddress.AccountNumber, data.MyAddress.AccountNumber);
            Assert.AreEqual(patchModel.MyAddress.Iban, data.MyAddress.Iban);
            AssertDeliveryAddress(data.DeliveryAddress, DeliveryAddressId2);
            _client.Delete(result.Id).AssertResult();
        }
コード例 #2
0
 /// <inheritdoc />
 public Task <ApiResult <SalesOrderGetModel> > UpdateAsync(SalesOrderPatchModel model, CancellationToken cancellationToken = default)
 {
     return(PatchAsync <SalesOrderPatchModel, SalesOrderGetModel>(model, cancellationToken));
 }
コード例 #3
0
 /// <inheritdoc/>
 public ApiResult <SalesOrderGetModel> Update(SalesOrderPatchModel model)
 {
     return(Patch <SalesOrderPatchModel, SalesOrderGetModel>(model));
 }