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

feat: enable endpoint version selection #160

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

funder7
Copy link

@funder7 funder7 commented Oct 27, 2023

Fixes

This update allows the selection of and endpoint version, needed in cases like Segmenting contacts V2 -> Update segment

As you can see, the example code snippet in the doc, uses a syntax that is not compatible with php (calling the endpoint is in fact not possible):

  $response = $sg->client->marketing()->segments()->2.0()->_($segment_id)->patch();
                                                 // ^^^^ wrong syntax

  # working example
  $response = $sg->client->marketing()->segments()->_version('2.0')->_($segment_id)->patch();
                                                 // ^^^^^^^^^^^^^^ 

Contents

  • utility method to set version in the URL
  • unit test of the new functionality
  • improved readability with null coalescing operator

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

- add utility method to set a version in the URL
- unit test the new functionality
- improve readability with null coalescing operator
@funder7
Copy link
Author

funder7 commented Oct 30, 2023

@twilio-dx any news about this PR? Thanks

@tiwarishubham635
Copy link
Contributor

Hi @funder7! We have added this to our list and we'll be prioritising it soon. Thanks!

@funder7
Copy link
Author

funder7 commented Jun 15, 2024

Hi, do you think that this and the other PR #159 will be merged at some point? :-)

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.

2 participants