+ $errorDetails + + + +
+ + + +
+ public
+ array<string|int, mixed>|null
+ $errorDetails
+
+
+
+
+
+
+
+
diff --git a/docs/html/classes/amcintosh-FreshBooks-Exception-FreshBooksException.html b/docs/html/classes/amcintosh-FreshBooks-Exception-FreshBooksException.html index dadb929..c4c279f 100644 --- a/docs/html/classes/amcintosh-FreshBooks-Exception-FreshBooksException.html +++ b/docs/html/classes/amcintosh-FreshBooks-Exception-FreshBooksException.html @@ -195,6 +195,13 @@
+ public
+ array<string|int, mixed>|null
+ $errorDetails
+
+
+
+
+
+
+
+
public
- __construct(string $message, int $statusCode[, Throwable $previous = null ][, string $rawResponse = null ][, int $errorCode = null ]) : mixed
+ __construct(string $message, int $statusCode[, Throwable $previous = null ][, string $rawResponse = null ][, int $errorCode = null ][, array<string|int, mixed> $errorDetails = null ]) : mixed
@@ -377,6 +425,14 @@
+ public
+ getErrorDetails() : array<string|int, mixed>|null
+
+
+
+
+
+
+ Parse the json response for new-style accounting endpoint errors and create a FreshBooksException from it.
+ +
+ private
+ createNewResponseError(int $statusCode, array<string|int, mixed> $responseData, string $rawRespone) : void
+
+
+ HTTP status code
+The json-parsed response
+The raw response body
+Parse the json response from the accounting endpoint and create a FreshBooksException from it.
+Parse the json response for old-style accounting endpoint errors and create a FreshBooksException from it.
private
- createResponseError(int $statusCode, array<string|int, mixed> $responseData, string $rawRespone) : void
+ createOldResponseError(int $statusCode, array<string|int, mixed> $responseData, string $rawRespone) : void
Create a FreshBooksException from the json response from the accounting endpoint.
+ +
+ private
+ handleError(int $statusCode, array<string|int, mixed> $responseData, string $rawRespone) : void
+
+
+ HTTP status code
+The json-parsed response
+The raw response body
+Parse the json response for project endpoint errors and create a FreshBooksException from it.
+ +
+ private
+ createResponseError(int $statusCode, array<string|int, mixed> $responseData, string $rawRespone) : void
+
+
+ HTTP status code
+The json-parsed response
+The raw response body
+