diff --git a/Resources/harvest-openapi.yaml b/Resources/harvest-openapi.yaml index d83c3f3..ad4da4c 100644 --- a/Resources/harvest-openapi.yaml +++ b/Resources/harvest-openapi.yaml @@ -448,6 +448,42 @@ paths: description: 'error payload' schema: $ref: '#/definitions/Error' + patch: + summary: 'Update a company' + operationId: updateCompany + description: 'Updates the company setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a company object and a 200 OK response code if the call succeeded.' + externalDocs: + description: 'Update a company' + url: 'https://help.getharvest.com/api-v2/company-api/company/company/#update-a-company' + security: + - + BearerAuth: [] + AccountAuth: [] + parameters: + - + name: payload + description: 'json payload' + required: true + in: body + schema: + type: object + properties: + wants_timestamp_timers: + type: boolean + description: 'Whether time is tracked via duration or start and end times.' + weekly_capacity: + type: integer + description: 'The weekly capacity in seconds.' + format: int32 + responses: + 200: + description: 'Update a company' + schema: + $ref: '#/definitions/Company' + default: + description: 'error payload' + schema: + $ref: '#/definitions/Error' '/invoices/{invoiceId}/messages': get: summary: 'List all messages for an invoice' @@ -821,11 +857,11 @@ paths: format: date due_date: type: string - description: 'Date the invoice is due. Defaults to the issue_date if no payment_term is specified.' + description: 'Date the invoice is due. Defaults to the issue_date if no payment_term is specified. To set a custom due_date the payment_term must also be set to custom, otherwise the value supplied in the request for due_date will be ignored and the due_date will be calucated using the issue_date and the payment_term.' format: date payment_term: type: string - description: 'The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, or net 60.' + description: 'The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, net 60, or custom.' line_items_import: type: object description: 'An line items import object' @@ -2940,7 +2976,7 @@ paths: description: 'Whether the user assignment is active or archived. Defaults to true.' is_project_manager: type: boolean - description: 'Determines if the user has project manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions.' + description: 'Determines if the user has Project Manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions.' use_default_rates: type: boolean description: 'Determines which billable rate(s) will be used on the project for this user when bill_by is People. When true, the project will use the user’s default billable rates. When false, the project will use the custom rate defined on this user assignment. Defaults to true.' @@ -3030,7 +3066,7 @@ paths: description: 'Whether the user assignment is active or archived.' is_project_manager: type: boolean - description: 'Determines if the user has project manager permissions for the project.' + description: 'Determines if the user has Project Manager permissions for the project.' use_default_rates: type: boolean description: 'Determines which billable rate(s) will be used on the project for this user when bill_by is People. When true, the project will use the user’s default billable rates. When false, the project will use the custom rate defined on this user assignment.' @@ -3455,7 +3491,7 @@ paths: description: 'Option to have the budget reset every month. Defaults to false.' notify_when_over_budget: type: boolean - description: 'Whether project managers should be notified when the project goes over budget. Defaults to false.' + description: 'Whether Project Managers should be notified when the project goes over budget. Defaults to false.' over_budget_notification_percentage: type: number description: 'Percentage value used to trigger over budget email alerts. Example: use 10.0 for 10.0%.' @@ -3590,7 +3626,7 @@ paths: description: 'Option to have the budget reset every month. Defaults to false.' notify_when_over_budget: type: boolean - description: 'Whether project managers should be notified when the project goes over budget. Defaults to false.' + description: 'Whether Project Managers should be notified when the project goes over budget. Defaults to false.' over_budget_notification_percentage: type: number description: 'Percentage value used to trigger over budget email alerts. Example: use 10.0 for 10.0%.' @@ -3863,7 +3899,7 @@ paths: post: summary: 'Create a billable rate' operationId: createBillableRate - description: "Creates a new billable rate object. Returns a billable rate object and a 201 Created response code if the call succeeded.\n\nCreating a billable rate with no start_date will replace a user’s existing rate(s).\n Creating a billable rate with a start_date that is before a user’s existing rate(s) will replace those billable rates with the new one.\n" + description: "Creates a new billable rate object. Returns a billable rate object and a 201 Created response code if the call succeeded.\n\n\n Creating a billable rate with no start_date will replace a user’s existing rate(s).\n Creating a billable rate with a start_date that is before a user’s existing rate(s) will replace those billable rates with the new one.\n" externalDocs: description: 'Create a billable rate' url: 'https://help.getharvest.com/api-v2/users-api/users/billable-rates/#create-a-billable-rate' @@ -3978,7 +4014,7 @@ paths: post: summary: 'Create a cost rate' operationId: createCostRate - description: "Creates a new cost rate object. Returns a cost rate object and a 201 Created response code if the call succeeded.\n\nCreating a cost rate with no start_date will replace a user’s existing rate(s).\n Creating a cost rate with a start_date that is before a user’s existing rate(s) will replace those cost rates with the new one.\n" + description: "Creates a new cost rate object. Returns a cost rate object and a 201 Created response code if the call succeeded.\n\n\n Creating a cost rate with no start_date will replace a user’s existing rate(s).\n Creating a cost rate with a start_date that is before a user’s existing rate(s) will replace those cost rates with the new one.\n" externalDocs: description: 'Create a cost rate' url: 'https://help.getharvest.com/api-v2/users-api/users/cost-rates/#create-a-cost-rate' @@ -4217,19 +4253,19 @@ paths: description: 'Whether the user is a contractor or an employee. Defaults to false.' is_admin: type: boolean - description: 'Whether the user has admin permissions. Defaults to false.' + description: 'Whether the user has Admin permissions. Defaults to false.' is_project_manager: type: boolean - description: 'Whether the user has project manager permissions. Defaults to false.' + description: 'Whether the user has Project Manager permissions. Defaults to false.' can_see_rates: type: boolean - description: 'Whether the user can see billable rates on projects. Only applicable to project managers. Defaults to false.' + description: 'Whether the user can see billable rates on projects. Only applicable to Project Managers. Defaults to false.' can_create_projects: type: boolean - description: 'Whether the user can create projects. Only applicable to project managers. Defaults to false.' + description: 'Whether the user can create projects. Only applicable to Project Managers. Defaults to false.' can_create_invoices: type: boolean - description: 'Whether the user can create invoices. Only applicable to project managers. Defaults to false.' + description: 'Whether the user can create invoices. Only applicable to Project Managers. Defaults to false.' is_active: type: boolean description: 'Whether the user is active or archived. Defaults to true.' @@ -4356,19 +4392,19 @@ paths: description: 'Whether the user is a contractor or an employee.' is_admin: type: boolean - description: 'Whether the user has admin permissions.' + description: 'Whether the user has Admin permissions.' is_project_manager: type: boolean - description: 'Whether the user has project manager permissions.' + description: 'Whether the user has Project Manager permissions.' can_see_rates: type: boolean - description: 'Whether the user can see billable rates on projects. Only applicable to project managers.' + description: 'Whether the user can see billable rates on projects. Only applicable to Project Managers.' can_create_projects: type: boolean - description: 'Whether the user can create projects. Only applicable to project managers.' + description: 'Whether the user can create projects. Only applicable to Project Managers.' can_create_invoices: type: boolean - description: 'Whether the user can create invoices. Only applicable to project managers.' + description: 'Whether the user can create invoices. Only applicable to Project Managers.' is_active: type: boolean description: 'Whether the user is active or archived.' @@ -4546,6 +4582,10 @@ definitions: color_scheme: type: string description: 'The color scheme being used in the Harvest web client.' + weekly_capacity: + type: integer + description: 'The weekly capacity in seconds.' + format: int32 expense_feature: type: boolean description: 'Whether the expense module is enabled.' @@ -4815,6 +4855,10 @@ definitions: type: string description: 'Date and time the invoice was closed.' format: date-time + recurring_invoice_id: + type: integer + description: 'Unique ID of the associated recurring invoice.' + format: int32 created_at: type: string description: 'Date and time the invoice was created.' @@ -5441,7 +5485,7 @@ definitions: description: 'Whether the user assignment is active or archived.' is_project_manager: type: boolean - description: 'Determines if the user has project manager permissions for the project.' + description: 'Determines if the user has Project Manager permissions for the project.' use_default_rates: type: boolean description: 'Determines which billable rate(s) will be used on the project for this user when bill_by is People. When true, the project will use the user’s default billable rates. When false, the project will use the custom rate defined on this user assignment.' @@ -5565,7 +5609,7 @@ definitions: description: 'Option to have the budget reset every month.' notify_when_over_budget: type: boolean - description: 'Whether project managers should be notified when the project goes over budget.' + description: 'Whether Project Managers should be notified when the project goes over budget.' over_budget_notification_percentage: type: number description: 'Percentage value used to trigger over budget email alerts.' @@ -5708,7 +5752,7 @@ definitions: description: 'Whether the project assignment is active or archived.' is_project_manager: type: boolean - description: 'Determines if the user has project manager permissions for the project.' + description: 'Determines if the user has Project Manager permissions for the project.' use_default_rates: type: boolean description: 'Determines which billable rate(s) will be used on the project for this user when bill_by is People. When true, the project will use the user’s default billable rates. When false, the project will use the custom rate defined on this user assignment.' @@ -5782,19 +5826,19 @@ definitions: description: 'Whether the user is a contractor or an employee.' is_admin: type: boolean - description: 'Whether the user has admin permissions.' + description: 'Whether the user has Admin permissions.' is_project_manager: type: boolean - description: 'Whether the user has project manager permissions.' + description: 'Whether the user has Project Manager permissions.' can_see_rates: type: boolean - description: 'Whether the user can see billable rates on projects. Only applicable to project managers.' + description: 'Whether the user can see billable rates on projects. Only applicable to Project Managers.' can_create_projects: type: boolean - description: 'Whether the user can create projects. Only applicable to project managers.' + description: 'Whether the user can create projects. Only applicable to Project Managers.' can_create_invoices: type: boolean - description: 'Whether the user can create invoices. Only applicable to project managers.' + description: 'Whether the user can create invoices. Only applicable to Project Managers.' is_active: type: boolean description: 'Whether the user is active or archived.' diff --git a/generated/Client.php b/generated/Client.php index c0e1e2d..f2c9540 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -172,6 +172,19 @@ public function retrieveCompany(string $fetch = self::FETCH_OBJECT) return $this->executePsr7Endpoint(new \JoliCode\Harvest\Api\Endpoint\RetrieveCompany(), $fetch); } + /** + * Updates the company setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a company object and a 200 OK response code if the call succeeded. + * + * @param \JoliCode\Harvest\Api\Model\CompanyPatchBody $payload json payload + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @return \JoliCode\Harvest\Api\Model\Company|\JoliCode\Harvest\Api\Model\Error|\Psr\Http\Message\ResponseInterface|null + */ + public function updateCompany(\JoliCode\Harvest\Api\Model\CompanyPatchBody $payload, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \JoliCode\Harvest\Api\Endpoint\UpdateCompany($payload), $fetch); + } + /** * Returns a list of messages associated with a given invoice. The invoice messages are returned sorted by creation date, with the most recently created messages appearing first. @@ -1360,7 +1373,8 @@ public function listBillableRatesForSpecificUser(string $userId, array $queryPar /** * Creates a new billable rate object. Returns a billable rate object and a 201 Created response code if the call succeeded. - Creating a billable rate with no start_date will replace a user’s existing rate(s). + + Creating a billable rate with no start_date will replace a user’s existing rate(s). Creating a billable rate with a start_date that is before a user’s existing rate(s) will replace those billable rates with the new one. * @@ -1413,7 +1427,8 @@ public function listCostRatesForSpecificUser(string $userId, array $queryParamet /** * Creates a new cost rate object. Returns a cost rate object and a 201 Created response code if the call succeeded. - Creating a cost rate with no start_date will replace a user’s existing rate(s). + + Creating a cost rate with no start_date will replace a user’s existing rate(s). Creating a cost rate with a start_date that is before a user’s existing rate(s) will replace those cost rates with the new one. * diff --git a/generated/Endpoint/CreateBillableRate.php b/generated/Endpoint/CreateBillableRate.php index 2a475c2..78223d5 100644 --- a/generated/Endpoint/CreateBillableRate.php +++ b/generated/Endpoint/CreateBillableRate.php @@ -17,7 +17,8 @@ class CreateBillableRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem /** * Creates a new billable rate object. Returns a billable rate object and a 201 Created response code if the call succeeded. - Creating a billable rate with no start_date will replace a user’s existing rate(s). + + Creating a billable rate with no start_date will replace a user’s existing rate(s). Creating a billable rate with a start_date that is before a user’s existing rate(s) will replace those billable rates with the new one. * diff --git a/generated/Endpoint/CreateCostRate.php b/generated/Endpoint/CreateCostRate.php index 875eb89..11477d8 100644 --- a/generated/Endpoint/CreateCostRate.php +++ b/generated/Endpoint/CreateCostRate.php @@ -17,7 +17,8 @@ class CreateCostRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements /** * Creates a new cost rate object. Returns a cost rate object and a 201 Created response code if the call succeeded. - Creating a cost rate with no start_date will replace a user’s existing rate(s). + + Creating a cost rate with no start_date will replace a user’s existing rate(s). Creating a cost rate with a start_date that is before a user’s existing rate(s) will replace those cost rates with the new one. * diff --git a/generated/Endpoint/UpdateCompany.php b/generated/Endpoint/UpdateCompany.php new file mode 100644 index 0000000..000756b --- /dev/null +++ b/generated/Endpoint/UpdateCompany.php @@ -0,0 +1,56 @@ +body = $payload; + } + + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + + public function getMethod(): string + { + return 'PATCH'; + } + + public function getUri(): string + { + return '/company'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + + /** + * {@inheritdoc} + * + * + * @return \JoliCode\Harvest\Api\Model\Company|\JoliCode\Harvest\Api\Model\Error|null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType) + { + if (200 === $status) { + return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Company', 'json'); + } + + return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Error', 'json'); + } +} diff --git a/generated/Model/Company.php b/generated/Model/Company.php index f501f84..3f416c7 100644 --- a/generated/Model/Company.php +++ b/generated/Model/Company.php @@ -84,6 +84,12 @@ class Company * @var string */ protected $colorScheme; + /** + * The weekly capacity in seconds. + * + * @var int + */ + protected $weeklyCapacity; /** * Whether the expense module is enabled. * @@ -397,6 +403,30 @@ public function setColorScheme(?string $colorScheme): self return $this; } + /** + * The weekly capacity in seconds. + * + * @return int|null + */ + public function getWeeklyCapacity(): ?int + { + return $this->weeklyCapacity; + } + + /** + * The weekly capacity in seconds. + * + * @param int|null $weeklyCapacity + * + * @return self + */ + public function setWeeklyCapacity(?int $weeklyCapacity): self + { + $this->weeklyCapacity = $weeklyCapacity; + + return $this; + } + /** * Whether the expense module is enabled. * diff --git a/generated/Model/CompanyPatchBody.php b/generated/Model/CompanyPatchBody.php new file mode 100644 index 0000000..adcd6a8 --- /dev/null +++ b/generated/Model/CompanyPatchBody.php @@ -0,0 +1,75 @@ +wantsTimestampTimers; + } + + /** + * Whether time is tracked via duration or start and end times. + * + * @param bool|null $wantsTimestampTimers + * + * @return self + */ + public function setWantsTimestampTimers(?bool $wantsTimestampTimers): self + { + $this->wantsTimestampTimers = $wantsTimestampTimers; + + return $this; + } + + /** + * The weekly capacity in seconds. + * + * @return int|null + */ + public function getWeeklyCapacity(): ?int + { + return $this->weeklyCapacity; + } + + /** + * The weekly capacity in seconds. + * + * @param int|null $weeklyCapacity + * + * @return self + */ + public function setWeeklyCapacity(?int $weeklyCapacity): self + { + $this->weeklyCapacity = $weeklyCapacity; + + return $this; + } +} diff --git a/generated/Model/Invoice.php b/generated/Model/Invoice.php index 669be2a..b8f3fc2 100644 --- a/generated/Model/Invoice.php +++ b/generated/Model/Invoice.php @@ -192,6 +192,12 @@ class Invoice * @var \DateTime */ protected $closedAt; + /** + * Unique ID of the associated recurring invoice. + * + * @var int + */ + protected $recurringInvoiceId; /** * Date and time the invoice was created. * @@ -925,6 +931,30 @@ public function setClosedAt(?\DateTime $closedAt): self return $this; } + /** + * Unique ID of the associated recurring invoice. + * + * @return int|null + */ + public function getRecurringInvoiceId(): ?int + { + return $this->recurringInvoiceId; + } + + /** + * Unique ID of the associated recurring invoice. + * + * @param int|null $recurringInvoiceId + * + * @return self + */ + public function setRecurringInvoiceId(?int $recurringInvoiceId): self + { + $this->recurringInvoiceId = $recurringInvoiceId; + + return $this; + } + /** * Date and time the invoice was created. * diff --git a/generated/Model/InvoicesPostBody.php b/generated/Model/InvoicesPostBody.php index e899c8b..94dfa48 100644 --- a/generated/Model/InvoicesPostBody.php +++ b/generated/Model/InvoicesPostBody.php @@ -85,13 +85,13 @@ class InvoicesPostBody */ protected $issueDate; /** - * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. + * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. To set a custom due_date the payment_term must also be set to custom, otherwise the value supplied in the request for due_date will be ignored and the due_date will be calucated using the issue_date and the payment_term. * * @var string */ protected $dueDate; /** - * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, or net 60. + * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, net 60, or custom. * * @var string */ @@ -392,7 +392,7 @@ public function setIssueDate(?string $issueDate): self } /** - * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. + * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. To set a custom due_date the payment_term must also be set to custom, otherwise the value supplied in the request for due_date will be ignored and the due_date will be calucated using the issue_date and the payment_term. * * @return string|null */ @@ -402,7 +402,7 @@ public function getDueDate(): ?string } /** - * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. + * Date the invoice is due. Defaults to the issue_date if no payment_term is specified. To set a custom due_date the payment_term must also be set to custom, otherwise the value supplied in the request for due_date will be ignored and the due_date will be calucated using the issue_date and the payment_term. * * @param string|null $dueDate * @@ -416,7 +416,7 @@ public function setDueDate(?string $dueDate): self } /** - * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, or net 60. + * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, net 60, or custom. * * @return string|null */ @@ -426,7 +426,7 @@ public function getPaymentTerm(): ?string } /** - * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, or net 60. + * The timeframe in which the invoice should be paid. Defaults to custom. Options: upon receipt, net 15, net 30, net 45, net 60, or custom. * * @param string|null $paymentTerm * diff --git a/generated/Model/Project.php b/generated/Model/Project.php index 872005e..74a4165 100644 --- a/generated/Model/Project.php +++ b/generated/Model/Project.php @@ -85,7 +85,7 @@ class Project */ protected $budgetIsMonthly; /** - * Whether project managers should be notified when the project goes over budget. + * Whether Project Managers should be notified when the project goes over budget. * * @var bool */ @@ -446,7 +446,7 @@ public function setBudgetIsMonthly(?bool $budgetIsMonthly): self } /** - * Whether project managers should be notified when the project goes over budget. + * Whether Project Managers should be notified when the project goes over budget. * * @return bool|null */ @@ -456,7 +456,7 @@ public function getNotifyWhenOverBudget(): ?bool } /** - * Whether project managers should be notified when the project goes over budget. + * Whether Project Managers should be notified when the project goes over budget. * * @param bool|null $notifyWhenOverBudget * diff --git a/generated/Model/ProjectAssignment.php b/generated/Model/ProjectAssignment.php index 1b85894..11e5bbe 100644 --- a/generated/Model/ProjectAssignment.php +++ b/generated/Model/ProjectAssignment.php @@ -25,7 +25,7 @@ class ProjectAssignment */ protected $isActive; /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @var bool */ @@ -128,7 +128,7 @@ public function setIsActive(?bool $isActive): self } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @return bool|null */ @@ -138,7 +138,7 @@ public function getIsProjectManager(): ?bool } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @param bool|null $isProjectManager * diff --git a/generated/Model/ProjectsPostBody.php b/generated/Model/ProjectsPostBody.php index ee507e6..cfaea49 100644 --- a/generated/Model/ProjectsPostBody.php +++ b/generated/Model/ProjectsPostBody.php @@ -79,7 +79,7 @@ class ProjectsPostBody */ protected $budgetIsMonthly; /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @var bool */ @@ -398,7 +398,7 @@ public function setBudgetIsMonthly(?bool $budgetIsMonthly): self } /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @return bool|null */ @@ -408,7 +408,7 @@ public function getNotifyWhenOverBudget(): ?bool } /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @param bool|null $notifyWhenOverBudget * diff --git a/generated/Model/ProjectsProjectIdPatchBody.php b/generated/Model/ProjectsProjectIdPatchBody.php index 966c224..d85c7d4 100644 --- a/generated/Model/ProjectsProjectIdPatchBody.php +++ b/generated/Model/ProjectsProjectIdPatchBody.php @@ -79,7 +79,7 @@ class ProjectsProjectIdPatchBody */ protected $budgetIsMonthly; /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @var bool */ @@ -398,7 +398,7 @@ public function setBudgetIsMonthly(?bool $budgetIsMonthly): self } /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @return bool|null */ @@ -408,7 +408,7 @@ public function getNotifyWhenOverBudget(): ?bool } /** - * Whether project managers should be notified when the project goes over budget. Defaults to false. + * Whether Project Managers should be notified when the project goes over budget. Defaults to false. * * @param bool|null $notifyWhenOverBudget * diff --git a/generated/Model/ProjectsProjectIdUserAssignmentsPostBody.php b/generated/Model/ProjectsProjectIdUserAssignmentsPostBody.php index 835f72c..e1f07a1 100644 --- a/generated/Model/ProjectsProjectIdUserAssignmentsPostBody.php +++ b/generated/Model/ProjectsProjectIdUserAssignmentsPostBody.php @@ -25,7 +25,7 @@ class ProjectsProjectIdUserAssignmentsPostBody */ protected $isActive; /** - * Determines if the user has project manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. + * Determines if the user has Project Manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. * * @var bool */ @@ -98,7 +98,7 @@ public function setIsActive(?bool $isActive): self } /** - * Determines if the user has project manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. + * Determines if the user has Project Manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. * * @return bool|null */ @@ -108,7 +108,7 @@ public function getIsProjectManager(): ?bool } /** - * Determines if the user has project manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. + * Determines if the user has Project Manager permissions for the project. Defaults to false for users with Regular User permissions and true for those with Project Managers or Administrator permissions. * * @param bool|null $isProjectManager * diff --git a/generated/Model/ProjectsProjectIdUserAssignmentsUserAssignmentIdPatchBody.php b/generated/Model/ProjectsProjectIdUserAssignmentsUserAssignmentIdPatchBody.php index 998f4c3..c3de442 100644 --- a/generated/Model/ProjectsProjectIdUserAssignmentsUserAssignmentIdPatchBody.php +++ b/generated/Model/ProjectsProjectIdUserAssignmentsUserAssignmentIdPatchBody.php @@ -19,7 +19,7 @@ class ProjectsProjectIdUserAssignmentsUserAssignmentIdPatchBody */ protected $isActive; /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @var bool */ @@ -68,7 +68,7 @@ public function setIsActive(?bool $isActive): self } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @return bool|null */ @@ -78,7 +78,7 @@ public function getIsProjectManager(): ?bool } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @param bool|null $isProjectManager * diff --git a/generated/Model/User.php b/generated/Model/User.php index 96f3309..403e624 100644 --- a/generated/Model/User.php +++ b/generated/Model/User.php @@ -55,31 +55,31 @@ class User */ protected $isContractor; /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @var bool */ protected $isAdmin; /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @var bool */ protected $isProjectManager; /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @var bool */ protected $canSeeRates; /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @var bool */ protected $canCreateProjects; /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @var bool */ @@ -302,7 +302,7 @@ public function setIsContractor(?bool $isContractor): self } /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @return bool|null */ @@ -312,7 +312,7 @@ public function getIsAdmin(): ?bool } /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @param bool|null $isAdmin * @@ -326,7 +326,7 @@ public function setIsAdmin(?bool $isAdmin): self } /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @return bool|null */ @@ -336,7 +336,7 @@ public function getIsProjectManager(): ?bool } /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @param bool|null $isProjectManager * @@ -350,7 +350,7 @@ public function setIsProjectManager(?bool $isProjectManager): self } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @return bool|null */ @@ -360,7 +360,7 @@ public function getCanSeeRates(): ?bool } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @param bool|null $canSeeRates * @@ -374,7 +374,7 @@ public function setCanSeeRates(?bool $canSeeRates): self } /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @return bool|null */ @@ -384,7 +384,7 @@ public function getCanCreateProjects(): ?bool } /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @param bool|null $canCreateProjects * @@ -398,7 +398,7 @@ public function setCanCreateProjects(?bool $canCreateProjects): self } /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @return bool|null */ @@ -408,7 +408,7 @@ public function getCanCreateInvoices(): ?bool } /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @param bool|null $canCreateInvoices * diff --git a/generated/Model/UserAssignment.php b/generated/Model/UserAssignment.php index 0d309cb..6ed0f60 100644 --- a/generated/Model/UserAssignment.php +++ b/generated/Model/UserAssignment.php @@ -37,7 +37,7 @@ class UserAssignment */ protected $isActive; /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @var bool */ @@ -170,7 +170,7 @@ public function setIsActive(?bool $isActive): self } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @return bool|null */ @@ -180,7 +180,7 @@ public function getIsProjectManager(): ?bool } /** - * Determines if the user has project manager permissions for the project. + * Determines if the user has Project Manager permissions for the project. * * @param bool|null $isProjectManager * diff --git a/generated/Model/UsersPostBody.php b/generated/Model/UsersPostBody.php index 840674b..0d000d1 100644 --- a/generated/Model/UsersPostBody.php +++ b/generated/Model/UsersPostBody.php @@ -49,31 +49,31 @@ class UsersPostBody */ protected $isContractor; /** - * Whether the user has admin permissions. Defaults to false. + * Whether the user has Admin permissions. Defaults to false. * * @var bool */ protected $isAdmin; /** - * Whether the user has project manager permissions. Defaults to false. + * Whether the user has Project Manager permissions. Defaults to false. * * @var bool */ protected $isProjectManager; /** - * Whether the user can see billable rates on projects. Only applicable to project managers. Defaults to false. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. Defaults to false. * * @var bool */ protected $canSeeRates; /** - * Whether the user can create projects. Only applicable to project managers. Defaults to false. + * Whether the user can create projects. Only applicable to Project Managers. Defaults to false. * * @var bool */ protected $canCreateProjects; /** - * Whether the user can create invoices. Only applicable to project managers. Defaults to false. + * Whether the user can create invoices. Only applicable to Project Managers. Defaults to false. * * @var bool */ @@ -254,7 +254,7 @@ public function setIsContractor(?bool $isContractor): self } /** - * Whether the user has admin permissions. Defaults to false. + * Whether the user has Admin permissions. Defaults to false. * * @return bool|null */ @@ -264,7 +264,7 @@ public function getIsAdmin(): ?bool } /** - * Whether the user has admin permissions. Defaults to false. + * Whether the user has Admin permissions. Defaults to false. * * @param bool|null $isAdmin * @@ -278,7 +278,7 @@ public function setIsAdmin(?bool $isAdmin): self } /** - * Whether the user has project manager permissions. Defaults to false. + * Whether the user has Project Manager permissions. Defaults to false. * * @return bool|null */ @@ -288,7 +288,7 @@ public function getIsProjectManager(): ?bool } /** - * Whether the user has project manager permissions. Defaults to false. + * Whether the user has Project Manager permissions. Defaults to false. * * @param bool|null $isProjectManager * @@ -302,7 +302,7 @@ public function setIsProjectManager(?bool $isProjectManager): self } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. Defaults to false. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. Defaults to false. * * @return bool|null */ @@ -312,7 +312,7 @@ public function getCanSeeRates(): ?bool } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. Defaults to false. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. Defaults to false. * * @param bool|null $canSeeRates * @@ -326,7 +326,7 @@ public function setCanSeeRates(?bool $canSeeRates): self } /** - * Whether the user can create projects. Only applicable to project managers. Defaults to false. + * Whether the user can create projects. Only applicable to Project Managers. Defaults to false. * * @return bool|null */ @@ -336,7 +336,7 @@ public function getCanCreateProjects(): ?bool } /** - * Whether the user can create projects. Only applicable to project managers. Defaults to false. + * Whether the user can create projects. Only applicable to Project Managers. Defaults to false. * * @param bool|null $canCreateProjects * @@ -350,7 +350,7 @@ public function setCanCreateProjects(?bool $canCreateProjects): self } /** - * Whether the user can create invoices. Only applicable to project managers. Defaults to false. + * Whether the user can create invoices. Only applicable to Project Managers. Defaults to false. * * @return bool|null */ @@ -360,7 +360,7 @@ public function getCanCreateInvoices(): ?bool } /** - * Whether the user can create invoices. Only applicable to project managers. Defaults to false. + * Whether the user can create invoices. Only applicable to Project Managers. Defaults to false. * * @param bool|null $canCreateInvoices * diff --git a/generated/Model/UsersUserIdPatchBody.php b/generated/Model/UsersUserIdPatchBody.php index 7ddf332..55947fe 100644 --- a/generated/Model/UsersUserIdPatchBody.php +++ b/generated/Model/UsersUserIdPatchBody.php @@ -49,31 +49,31 @@ class UsersUserIdPatchBody */ protected $isContractor; /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @var bool */ protected $isAdmin; /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @var bool */ protected $isProjectManager; /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @var bool */ protected $canSeeRates; /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @var bool */ protected $canCreateProjects; /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @var bool */ @@ -254,7 +254,7 @@ public function setIsContractor(?bool $isContractor): self } /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @return bool|null */ @@ -264,7 +264,7 @@ public function getIsAdmin(): ?bool } /** - * Whether the user has admin permissions. + * Whether the user has Admin permissions. * * @param bool|null $isAdmin * @@ -278,7 +278,7 @@ public function setIsAdmin(?bool $isAdmin): self } /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @return bool|null */ @@ -288,7 +288,7 @@ public function getIsProjectManager(): ?bool } /** - * Whether the user has project manager permissions. + * Whether the user has Project Manager permissions. * * @param bool|null $isProjectManager * @@ -302,7 +302,7 @@ public function setIsProjectManager(?bool $isProjectManager): self } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @return bool|null */ @@ -312,7 +312,7 @@ public function getCanSeeRates(): ?bool } /** - * Whether the user can see billable rates on projects. Only applicable to project managers. + * Whether the user can see billable rates on projects. Only applicable to Project Managers. * * @param bool|null $canSeeRates * @@ -326,7 +326,7 @@ public function setCanSeeRates(?bool $canSeeRates): self } /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @return bool|null */ @@ -336,7 +336,7 @@ public function getCanCreateProjects(): ?bool } /** - * Whether the user can create projects. Only applicable to project managers. + * Whether the user can create projects. Only applicable to Project Managers. * * @param bool|null $canCreateProjects * @@ -350,7 +350,7 @@ public function setCanCreateProjects(?bool $canCreateProjects): self } /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @return bool|null */ @@ -360,7 +360,7 @@ public function getCanCreateInvoices(): ?bool } /** - * Whether the user can create invoices. Only applicable to project managers. + * Whether the user can create invoices. Only applicable to Project Managers. * * @param bool|null $canCreateInvoices * diff --git a/generated/Normalizer/CompanyNormalizer.php b/generated/Normalizer/CompanyNormalizer.php index 4b6d591..9db8cbd 100644 --- a/generated/Normalizer/CompanyNormalizer.php +++ b/generated/Normalizer/CompanyNormalizer.php @@ -78,6 +78,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'color_scheme') && $data->{'color_scheme'} !== null) { $object->setColorScheme($data->{'color_scheme'}); } + if (property_exists($data, 'weekly_capacity') && $data->{'weekly_capacity'} !== null) { + $object->setWeeklyCapacity($data->{'weekly_capacity'}); + } if (property_exists($data, 'expense_feature') && $data->{'expense_feature'} !== null) { $object->setExpenseFeature($data->{'expense_feature'}); } @@ -133,6 +136,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getColorScheme()) { $data->{'color_scheme'} = $object->getColorScheme(); } + if (null !== $object->getWeeklyCapacity()) { + $data->{'weekly_capacity'} = $object->getWeeklyCapacity(); + } if (null !== $object->getExpenseFeature()) { $data->{'expense_feature'} = $object->getExpenseFeature(); } diff --git a/generated/Normalizer/CompanyPatchBodyNormalizer.php b/generated/Normalizer/CompanyPatchBodyNormalizer.php new file mode 100644 index 0000000..01e229e --- /dev/null +++ b/generated/Normalizer/CompanyPatchBodyNormalizer.php @@ -0,0 +1,67 @@ +{'$ref'})) { + return new Reference($data->{'$ref'}, $context['document-origin']); + } + $object = new \JoliCode\Harvest\Api\Model\CompanyPatchBody(); + if (property_exists($data, 'wants_timestamp_timers') && $data->{'wants_timestamp_timers'} !== null) { + $object->setWantsTimestampTimers($data->{'wants_timestamp_timers'}); + } + if (property_exists($data, 'weekly_capacity') && $data->{'weekly_capacity'} !== null) { + $object->setWeeklyCapacity($data->{'weekly_capacity'}); + } + + return $object; + } + + public function normalize($object, $format = null, array $context = []) + { + $data = new \stdClass(); + if (null !== $object->getWantsTimestampTimers()) { + $data->{'wants_timestamp_timers'} = $object->getWantsTimestampTimers(); + } + if (null !== $object->getWeeklyCapacity()) { + $data->{'weekly_capacity'} = $object->getWeeklyCapacity(); + } + + return $data; + } +} diff --git a/generated/Normalizer/InvoiceNormalizer.php b/generated/Normalizer/InvoiceNormalizer.php index b8e4b83..f7bdf3a 100644 --- a/generated/Normalizer/InvoiceNormalizer.php +++ b/generated/Normalizer/InvoiceNormalizer.php @@ -136,6 +136,9 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'closed_at') && $data->{'closed_at'} !== null) { $object->setClosedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'closed_at'})); } + if (property_exists($data, 'recurring_invoice_id') && $data->{'recurring_invoice_id'} !== null) { + $object->setRecurringInvoiceId($data->{'recurring_invoice_id'}); + } if (property_exists($data, 'created_at') && $data->{'created_at'} !== null) { $object->setCreatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'created_at'})); } @@ -243,6 +246,9 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getClosedAt()) { $data->{'closed_at'} = $object->getClosedAt()->format("Y-m-d\TH:i:sP"); } + if (null !== $object->getRecurringInvoiceId()) { + $data->{'recurring_invoice_id'} = $object->getRecurringInvoiceId(); + } if (null !== $object->getCreatedAt()) { $data->{'created_at'} = $object->getCreatedAt()->format("Y-m-d\TH:i:sP"); } diff --git a/generated/Normalizer/NormalizerFactory.php b/generated/Normalizer/NormalizerFactory.php index cfe8fd8..f350ef2 100644 --- a/generated/Normalizer/NormalizerFactory.php +++ b/generated/Normalizer/NormalizerFactory.php @@ -103,6 +103,7 @@ public static function create() $normalizers[] = new ContactsContactIdPatchBodyNormalizer(); $normalizers[] = new ClientsPostBodyNormalizer(); $normalizers[] = new ClientsClientIdPatchBodyNormalizer(); + $normalizers[] = new CompanyPatchBodyNormalizer(); $normalizers[] = new InvoicesInvoiceIdMessagesPostBodyNormalizer(); $normalizers[] = new InvoicesInvoiceIdPaymentsPostBodyNormalizer(); $normalizers[] = new InvoicesPostBodyNormalizer();