Skip to content

Instantly share code, notes, and snippets.

@sts-developer
Last active July 3, 2024 13:19
Show Gist options
  • Select an option

  • Save sts-developer/8a3791a0933c5799a56e073a133850d1 to your computer and use it in GitHub Desktop.

Select an option

Save sts-developer/8a3791a0933c5799a56e073a133850d1 to your computer and use it in GitHub Desktop.
Business Update Logics C#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://testapi.taxbandits.com/v1.7.3/Business/Update");
request.Headers.Add("Authorization", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3Rlc3RvYXV0aC5leHByZXNzYXV0aC5uZXQvdjIvIiwic3ViIjoiYTQyMWE2MWUzOWUyY2U3ZSIsImF1ZCI6ImVjMTQ1MjFiMzE0ZjQ3ZGE5Nzk4MzNiNWVmOTE0NTllIiwiaWF0IjoxNzIwMDEyNjkxLCJleHAiOjE3MjAwMTYyOTF9.MCscmYtHNgFf4emMoEOeOnCJMlAy5AP0LUWkWoNivoU");
var content = new StringContent("{\r\n \"BusinessId\": \"559fa96a-a9fd-495e-a8c1-cdf3572a2b9c\",\r\n \"BusinessNm\": \"Snowdaze LLC\",\r\n \"FirstNm\": null,\r\n \"MiddleNm\": null,\r\n \"LastNm\": null,\r\n \"Suffix\": null,\r\n \"PayerRef\": \"Pe1261456\",\r\n \"TradeNm\": \"Kodak\",\r\n \"IsEIN\": true,\r\n \"EINorSSN\": \"003313335\",\r\n \"Email\": \"john@sample.com\",\r\n \"ContactNm\": \"John\",\r\n \"Phone\": \"9876543980\",\r\n \"PhoneExtn\": \"1234\",\r\n \"Fax\": \"1234567890\",\r\n \"BusinessType\": \"ESTE\",\r\n \"SigningAuthority\": {\r\n \"Name\": \"John\",\r\n \"Phone\": \"1234567890\",\r\n \"BusinessMemberType\": \"ADMINISTRATOR\"\r\n },\r\n \"KindOfEmployer\": \"FEDERALGOVT\",\r\n \"KindOfPayer\": \"REGULAR941\",\r\n \"IsBusinessTerminated\": false,\r\n \"IsForeign\": true,\r\n \"USAddress\": {\r\n \"Address1\": null,\r\n \"Address2\": null,\r\n \"City\": null,\r\n \"State\": null,\r\n \"ZipCd\": null\r\n },\r\n \"ForeignAddress\": {\r\n \"Address1\": \"22 St\",\r\n \"Address2\": \"Clair Ave E\",\r\n \"City\": \"Toronto\",\r\n \"ProvinceOrStateNm\": \"Ontario\",\r\n \"Country\": \"CA\",\r\n \"PostalCd\": \"M1R 0E9\"\r\n }\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment