public static void CreateTaxWithholdingAgreements()
{
var binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = Int32.MaxValue;
var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://endpoint/bfsapi.asmx"));
var req = new bfsapi.CreateTaxWithholdingAgreementsRequest
{
Credentials = new bfsapi.Credentials
{
UserName = "user",
Password = "password"
},
identify = "identify",
Entities = new TaxWithholdingAgreement[]
{
new TaxWithholdingAgreement
{
Person = new Guid("2cc2b4cb-b636-45f4-ab8f-a0294c967fec"),
TaxCountry = "US",
ExpirationDate = DateTime.Today.AddDays(7)
}
}
};
var resp = target.CreateTaxWithholdingAgreements(req);
}