@@ -21,7 +21,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
2121 // Configure OAuth2 access token for authorization: OAuth2
2222 $config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
2323
24- $payrollUkApi = new XeroAPI\XeroPHP\Api\PayrollUkApi (
24+ $payrollNzApi = new XeroAPI\XeroPHP\Api\PayrollNzApi (
2525 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
2626 // This is optional, `GuzzleHttp\Client` will be used as default.
2727 new GuzzleHttp\Client(),
@@ -31,14 +31,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
3131 $xeroTenantId = 'xero_tenant_id_example'; // string | Xero identifier for Tenant
3232
3333 // \XeroAPI\XeroPHP\Models\Accounting\Employee | Request of type Employee
34- $employee = new XeroAPI\XeroPHP\Models\PayrollUk \Employee;
34+ $employee = new XeroAPI\XeroPHP\Models\PayrollNz \Employee;
3535 $employee->setFirstName("Fred");
3636 $employee->setLastName("Potter");
3737 $employee->setEmail("albus@hogwarts.edu");
3838 $dateOfBirth = DateTime::createFromFormat('m/d/Y', '05/29/2000');
3939 $employee->setDateOfBirthAsDate($dateOfBirth);
4040
41- $address = new XeroAPI\XeroPHP\Models\PayrollUk \HomeAddress;
41+ $address = new XeroAPI\XeroPHP\Models\PayrollNz \HomeAddress;
4242 $address->setAddressLine1("101 Green St");
4343 $address->setCity("London");
4444 $address->setCountry("United Kingdom");
@@ -49,10 +49,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
4949 array_push($newEmployees, $employee);
5050
5151 try {
52- $result = $payrollUkApi ->createEmployee($xero_tenant_id, $newEmployees);
52+ $result = $payrollNzApi ->createEmployee($xero_tenant_id, $newEmployees);
5353 print_r($result);
5454 } catch (Exception $e) {
55- echo 'Exception when calling payrollUkApi ->createEmployee: ', $e->getMessage(), PHP_EOL;
55+ echo 'Exception when calling payrollNzApi ->createEmployee: ', $e->getMessage(), PHP_EOL;
5656 }
5757
5858?>
0 commit comments