Skip to content

Instantly share code, notes, and snippets.

@portbury
Created March 29, 2021 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save portbury/41a02fe35b48e612857df847a7e1fe97 to your computer and use it in GitHub Desktop.
Save portbury/41a02fe35b48e612857df847a7e1fe97 to your computer and use it in GitHub Desktop.
$xeroPayrollAuApi = new XeroAPI\XeroPHP\Api\PayrollAuApi(
new GuzzleHttp\Client(),
$xeroApiConnection["config"]
);
$xero_id = "00000000-aaaa-0000-aaaa-000000000000";
$homeemail = "mark@gmail.com";
$mobile = "0427 123 456";
$employee = new XeroAPI\XeroPHP\Models\PayrollAu\Employee;
$employee->setEmail($homeemail);
$employee->setMobile($mobile);
try {
$resultPayroll = $xeroPayrollAuApi->updateEmployee($xeroApiConnection["tenantId"], $xero_id, $employee);
} catch (Exception $e) {
echo $e->getMessage();
}
@CorvoJow
Copy link

any updates? i am having a similar problem:

System.Runtime.Serialization.SerializationException: Type definitions should start with a '{', expecting serialized type 'ApiException', got string starting with: oauth_problem=signature_method_rejected&oauth_prob at Xero.Api.Infrastructure.ThirdParty.ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(Type type, String strType, EmptyCtorDelegate ctorFn, Dictionary2 typeAccessorMap) at Xero.Api.Infrastructure.ThirdParty.ServiceStack.Text.JsonSerializer.DeserializeFromString[T](String value) at Xero.Api.Infrastructure.Http.XeroHttpClient.HandleErrors(Response response) at Xero.Api.Infrastructure.Http.XeroHttpClient.Read[TResult,TResponse](Response response) at Xero.Api.Common.XeroReadEndpoint3.Get(String endpoint, String child) at Xero.Api.Core.XeroCoreApi.get_Organisation()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment