public static void UpdateTaxWithholdingAgreement()
{
var binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = Int32.MaxValue;
var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
var req = new bfsapi.UpdateTaxWithholdingAgreementsRequest()
{
Credentials = new bfsapi.Credentials
{
UserName = "user",
Password = "password"
},
identify = "identify",
Fields = new bfsapi.UpdateTaxWithholdingAgreementFields()
{
TaxCountry = true,
ExpirationDate = true
},
Entities = new bfsapi.UpdateTaxWithholdingAgreement[]
{
new bfsapi.UpdateTaxWithholdingAgreement
{
BrickId = new Guid("eef95a05-d151-4f37-8f24-d1b5e319e497"),
TaxCountry = "SE",
ExpirationDate = DateTime.Today
}
}
};
var resp = target.UpdateTaxWithholdingAgreements(req);
}