Skip to content

Commit

Permalink
Merge pull request #9 from Healyhatman/development
Browse files Browse the repository at this point in the history
Regenerate 2023-11-20
  • Loading branch information
Healyhatman authored Nov 20, 2023
2 parents 66504d6 + 00e6656 commit 39b38b0
Show file tree
Hide file tree
Showing 47 changed files with 6,104 additions and 171 deletions.
497 changes: 497 additions & 0 deletions src/lib/Api/BusinessApi.php

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/lib/Api/EmployeeQualificationsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ public function employeeQualificationGetQualificationsRequest($business_id, $emp
*
* @param string $business_id business_id (required)
* @param string $employee_id employee_id (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationModel $qualification qualification (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationRequest $qualification qualification (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeQualificationPost'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
Expand All @@ -2748,7 +2748,7 @@ public function employeeQualificationPost($business_id, $employee_id, $qualifica
*
* @param string $business_id (required)
* @param string $employee_id (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationModel $qualification (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationRequest $qualification (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeQualificationPost'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
Expand Down Expand Up @@ -2810,7 +2810,7 @@ public function employeeQualificationPostWithHttpInfo($business_id, $employee_id
*
* @param string $business_id (required)
* @param string $employee_id (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationModel $qualification (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationRequest $qualification (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeQualificationPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
Expand All @@ -2833,7 +2833,7 @@ function ($response) {
*
* @param string $business_id (required)
* @param string $employee_id (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationModel $qualification (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationRequest $qualification (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeQualificationPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
Expand Down Expand Up @@ -2872,7 +2872,7 @@ function ($exception) {
*
* @param string $business_id (required)
* @param string $employee_id (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationModel $qualification (required)
* @param \OpenAPI\Client\Model\EmployeeQualificationRequest $qualification (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeQualificationPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
Expand Down
259 changes: 259 additions & 0 deletions src/lib/Api/OtherApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ class OtherApi
'text/xml',
'application/x-www-form-urlencoded',
],
'zapierWebhookPolling' => [
'application/json',
],
];

/**
Expand Down Expand Up @@ -3169,6 +3172,262 @@ public function teamCollaborationUpdateStatusRequest($service, $business_id, $mo
);
}

/**
* Operation zapierWebhookPolling
*
* Handle requests for polling data from Zapier
*
* @param string $url url (required)
* @param int $business_id business_id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['zapierWebhookPolling'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function zapierWebhookPolling($url, $business_id, string $contentType = self::contentTypes['zapierWebhookPolling'][0])
{
$this->zapierWebhookPollingWithHttpInfo($url, $business_id, $contentType);
}

/**
* Operation zapierWebhookPollingWithHttpInfo
*
* Handle requests for polling data from Zapier
*
* @param string $url (required)
* @param int $business_id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['zapierWebhookPolling'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function zapierWebhookPollingWithHttpInfo($url, $business_id, string $contentType = self::contentTypes['zapierWebhookPolling'][0])
{
$request = $this->zapierWebhookPollingRequest($url, $business_id, $contentType);

try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}

$statusCode = $response->getStatusCode();

if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
(string) $request->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}

return [null, $statusCode, $response->getHeaders()];

} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}

/**
* Operation zapierWebhookPollingAsync
*
* Handle requests for polling data from Zapier
*
* @param string $url (required)
* @param int $business_id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['zapierWebhookPolling'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function zapierWebhookPollingAsync($url, $business_id, string $contentType = self::contentTypes['zapierWebhookPolling'][0])
{
return $this->zapierWebhookPollingAsyncWithHttpInfo($url, $business_id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}

/**
* Operation zapierWebhookPollingAsyncWithHttpInfo
*
* Handle requests for polling data from Zapier
*
* @param string $url (required)
* @param int $business_id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['zapierWebhookPolling'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function zapierWebhookPollingAsyncWithHttpInfo($url, $business_id, string $contentType = self::contentTypes['zapierWebhookPolling'][0])
{
$returnType = '';
$request = $this->zapierWebhookPollingRequest($url, $business_id, $contentType);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}

/**
* Create request for operation 'zapierWebhookPolling'
*
* @param string $url (required)
* @param int $business_id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['zapierWebhookPolling'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function zapierWebhookPollingRequest($url, $business_id, string $contentType = self::contentTypes['zapierWebhookPolling'][0])
{

// verify the required parameter 'url' is set
if ($url === null || (is_array($url) && count($url) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $url when calling zapierWebhookPolling'
);
}

// verify the required parameter 'business_id' is set
if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $business_id when calling zapierWebhookPolling'
);
}


$resourcePath = '/api/v2/ZapierWebhooks/Polling';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;

// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$url,
'url', // param base name
'string', // openApiType
'', // style
false, // explode
true // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$business_id,
'businessId', // param base name
'integer', // openApiType
'', // style
false, // explode
true // required
) ?? []);




$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);

// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);

} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}

// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('apiKey');
if ($apiKey !== null) {
$headers['apiKey'] = $apiKey;
}

$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}

$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);

$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'GET',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}

/**
* Create http client option
*
Expand Down
10 changes: 10 additions & 0 deletions src/lib/Model/AuBusinessExportModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ public function getModelName()
public const SOURCE_SLACK = 'Slack';
public const SOURCE_CAXTON = 'Caxton';
public const SOURCE_QUICKBOOKS_STANDALONE_PAYROLL = 'QuickbooksStandalonePayroll';
public const SOURCE_IMPORT_EMPLOYEE_SELF_SETUP = 'ImportEmployeeSelfSetup';
public const SOURCE_XERO_IDENTITY_PAYROLL_SIGN_UP = 'XeroIdentityPayrollSignUp';
public const SOURCE_XERO_IDENTITY_HR_SIGN_UP = 'XeroIdentityHrSignUp';
public const SOURCE_SAGE_INTACCT = 'SageIntacct';
public const SOURCE_DAILY_PAY = 'DailyPay';
public const NUMBER_OF_EMPLOYEES_ONE_TO_TEN = 'OneToTen';
public const NUMBER_OF_EMPLOYEES_ELEVEN_TO_FIFTY = 'ElevenToFifty';
public const NUMBER_OF_EMPLOYEES_FIFTY_ONE_TO_TWO_FIFTY = 'FiftyOneToTwoFifty';
Expand Down Expand Up @@ -681,6 +686,11 @@ public function getSourceAllowableValues()
self::SOURCE_SLACK,
self::SOURCE_CAXTON,
self::SOURCE_QUICKBOOKS_STANDALONE_PAYROLL,
self::SOURCE_IMPORT_EMPLOYEE_SELF_SETUP,
self::SOURCE_XERO_IDENTITY_PAYROLL_SIGN_UP,
self::SOURCE_XERO_IDENTITY_HR_SIGN_UP,
self::SOURCE_SAGE_INTACCT,
self::SOURCE_DAILY_PAY,
];
}

Expand Down
Loading

0 comments on commit 39b38b0

Please sign in to comment.