-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of Ticket Field Options API in SDK #368
Add support of Ticket Field Options API in SDK #368
Conversation
*/ | ||
public function update($id = null, array $updateResourceFields = []) | ||
{ | ||
print_r($id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove debug code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joseconsador the modifications has been performed. Does it fine for you?
@cmourizard is there any reason you override find, create, update etc.? |
Hi @jmramos02 it's because the route is a specific subroute of endpoint with some specific argument by example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chiming in a little late as well. Thanks for the contribution!
{ | ||
$this->addTicketFieldIdToRouteParams($params); | ||
|
||
$response = Http::send( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like doing return $this->traitCreate($params);
should be sufficient here? From the docs, the create
method looks similar to other resources. update
on the other hand, is indeed different.
|
||
$this->addTicketFieldIdToRouteParams($updateResourceFields); | ||
|
||
$response = Http::send( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using $this->client->post
method in client looks like it can be used directly here. It's a only small abstraction though but might as well.
findAll as traitFindAll; | ||
find as traitFind; | ||
create as traitCreate; | ||
update as traitUpdate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably be removed if the default update
method will not be used?
Rewamp calls to API
Hello @joseconsador and @miogalang all modifications has been performed I let you review them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, sending over to you @joseconsador so we can merge.
Sounds great @samgavinio thanks! Do you have an estimated date of merge @joseconsador? |
@cmourizard released as v2.2.4. Thanks! |
…dTicketFieldOptionsSupport Add support of Ticket Field Options API in SDK
Add support of Ticket Field Options API in SDK (https://developer.zendesk.com/rest_api/docs/core/ticket_fields#list-ticket-field-options)