Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Inputs (UpdateTaxWithholdingAgreement[] to update)

NameTypeDescriptionMandatoryAvailable from version
BrickIdGuid This is the unique id of the TaxWithholdingAgreement that should be updated

PersonGuidId of Person for TaxWithholdingAgreement  

TaxCountrystring According to ISO-standard here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

ExpirationDateDateTimeExpirationDate for TaxWithholdingAgreement  

...

NameTypeDescriptionAvailable from version
EntitiesArrayAll TaxWithholdingAgreement in the request with BrickId and an array of Errors per TaxWithholdingAgreement

Code examples

Code Block
languagec#
themeRDark
titleC# - Update TaxWithholdingAgreements
linenumberstrue
collapsetrue
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);

        }

...