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

Validation error due to Company identifier is allowed to be 30 chars in the Connectwise UI #17

Open
NickSchimek opened this issue Nov 30, 2022 · 3 comments

Comments

@NickSchimek
Copy link
Contributor

Connectwise allows company identifiers to be 30 chars long in the UI.

When attempting to find the company via the name. The library is throwing a validation error when building the response, because it is validating the identifier at 25 chars long when connect wise allows 30 chars long.

Unfortunately their documentation does say 25 chars. But we have preexisting clients that have 30 char identifiers.

Screen Shot 2022-11-30 at 23 21 23

Screen Shot 2022-11-30 at 23 21 34

Expected Behavior

I would expect the response from connect wise not to be validated since connect wise already has their own validations.

Current Behavior

The response from connect wise is validated.

Possible Solution

Do not validate the response
OR Increase the validation to 30 chars

Steps to Reproduce (for bugs)

  1. Create a company in connect wise UI with an identifier that is 30 chars long
  2. Use the companies API to find the company via the name of the company

Context

Your Environment

  • Gem version used:
  • Environment name and ruby version (e.g. PHP 5.4 on nginx 1.9.1):
  • Operating System and version:
NickSchimek added a commit to Jetbuilt/connectwise-ruby-sdk that referenced this issue Nov 30, 2022
Connectwise documentation is incorrect. It allows up to 30 chars.

Fixes sowderca#17
@NickSchimek
Copy link
Contributor Author

Verified that the API on Connectwise does not allow more than 25 chars. So their documentation for the API is correct.
However, their API validation is different than their UI validation.

So either we need to contact Connectwise and see if they can match the two, or update this library not to validate the response. Not validating the response seems like it would be a much bigger change.

I will attempt to reach out to Connectwise first.

@sowderca
Copy link
Owner

@NickSchimek I am planning on re-generating the gem after which we can manually alter the limitation to increase the character count... at least till they can fix their spec.

@NickSchimek
Copy link
Contributor Author

Sounds good.

FYI: Their spec is correct. When making a POST request through the API it cannot be more than 25 chars.

However, the response from a GET request on the same endpoint can be up to 30 chars.

I'm fine with upping the limitation though. That would be the quick fix. :-)

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

No branches or pull requests

2 participants