Skip to content
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

Merged
merged 3 commits into from
Jan 18, 2018
Merged

Add support of Ticket Field Options API in SDK #368

merged 3 commits into from
Jan 18, 2018

Conversation

cmourizard
Copy link
Contributor

@ocke ocke requested a review from miogalang December 18, 2017 23:08
*/
public function update($id = null, array $updateResourceFields = [])
{
print_r($id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove debug code.

Copy link
Contributor Author

@cmourizard cmourizard left a 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?

@donjose24
Copy link
Contributor

@cmourizard is there any reason you override find, create, update etc.?

@cmourizard
Copy link
Contributor Author

Hi @jmramos02 it's because the route is a specific subroute of endpoint with some specific argument by example:

  • find is under an "id" route
  • create/update need a specific argument named custom_field_option

Copy link
Contributor

@samgavinio samgavinio left a 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(
Copy link
Contributor

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(
Copy link
Contributor

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;
Copy link
Contributor

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
@cmourizard
Copy link
Contributor Author

Hello @joseconsador and @miogalang all modifications has been performed I let you review them.

Copy link
Contributor

@samgavinio samgavinio left a 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.

@cmourizard
Copy link
Contributor Author

Sounds great @samgavinio thanks!

Do you have an estimated date of merge @joseconsador?

@samgavinio samgavinio merged commit 1956a52 into zendesk:master Jan 18, 2018
@samgavinio
Copy link
Contributor

@cmourizard released as v2.2.4. Thanks!

lyrixx pushed a commit to lyrixx/zendesk_api_client_php that referenced this pull request Jun 24, 2019
…dTicketFieldOptionsSupport

Add support of Ticket Field Options API in SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants