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

Extend and enhance #3

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Extend and enhance #3

wants to merge 20 commits into from

Conversation

BlackIkeEagle
Copy link

No description provided.

- Add a Freshdesk\Model interface
- Bring most functionality of toJsonData to Freshdesk\Model\Base
  - this allows us to have a dynamic number of fields to be sent to
    freshdesk.
  - allows bigger flexibility for future changes
- add mandatory functionality
  - all fields that are defined required or conditional required can be
    defined in the models now, when toJsonData is called there will be
    an exception if not all requirement are met.
- add readOnlyFields functionality
  - the freshdesk api defines some fields as read only. We will not send
    these read-only fields to the freshdesk api even if they are set in
    the models.
- extended the Ticket Model massively, most if not all fields are now
  taken into account.

Signed-off-by: BlackEagle <[email protected]>
- createNewContact
  take a Contact Model and create a new user/contact at freshdesk
- updateContact
  take a Contact Model and send it for update to freshdesk
- deleteContact
  take a Contact Model and delete it from freshdesk

Signed-off-by: BlackEagle <[email protected]>
The Ticket url generator was fairly simple, to cover the whole range of
possibilities of freshdesk api searching and such there was a fairly big
extension needed. Now all possibilities are covered and the api as
defined earlier is updated to use this new internal url generator.

Signed-off-by: BlackEagle <[email protected]>
- getTicketsByRequesterId, get all tickets using the requesterId

Signed-off-by: BlackEagle <[email protected]>
- description or descriptionHtml are mandatory for sending
- added a massive amount of missing fields that are not described in the
  api documentation but are available in the request/response from
  freshdesk.

Signed-off-by: BlackEagle <[email protected]>
- searchContacts
  This is the main method where we can search for contacts by the
  options allowed by freshdesk.

- also added some convenience wrappers
  - searchContactsByMail
  - searchContactsByMobile
  - searchContactsByPhone
  - searchContactsByState
  - searchContactsByName
  All these methods take a string or numbers as input and will return an
  array of Contact models, only when there is one result the return
  value will be a Contact model.

Signed-off-by: BlackEagle <[email protected]>
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.

1 participant