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: add customer and request endpoints for service desk api #391

Merged

Conversation

iamjem
Copy link
Contributor

@iamjem iamjem commented Jul 30, 2021

Information that is useful here:

  • The What: This adds endpoints for customers and requests in the service desk api.
  • The Why: Because these endpoints are missing (and I need them in my project).
  • Type of change: New feature.
  • Breaking change: This change should be backwards compatible.
  • Related to an issue: Not that I'm aware of.
  • Jira Version + Type: Cloud

Example:

Tests exist for all new endpoints, which is probably the best source of sample code.

Checklist

@iamjem iamjem force-pushed the servicedesk-customer-request branch from 3a5e9d2 to a2daf69 Compare July 30, 2021 15:25
@iamjem iamjem changed the title add customer and request endpoints for service desk api feat: add customer and request endpoints for service desk api Jul 30, 2021
customer.go Outdated Show resolved Hide resolved
customer.go Outdated Show resolved Hide resolved
}

// Create wraps CreateWithContext using the background context.
func (c *CustomerService) Create(email, displayName string) (*Customer, *Response, error) {
Copy link

Choose a reason for hiding this comment

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

Is there a reason why we expose this method without a context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a CustomerService.CreateWithContext which is the context version of the method. I followed this pattern from other service endpoints in the package.

request.go Outdated Show resolved Hide resolved
request.go Outdated Show resolved Hide resolved
@iamjem iamjem force-pushed the servicedesk-customer-request branch from a2daf69 to 71f2d08 Compare November 19, 2021 14:41
@iamjem
Copy link
Contributor Author

iamjem commented Nov 19, 2021

Thank you for the review! I believe that I've addressed your comments, please let me know if there's any other changes needed.

servicedesk.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@benjivesterby benjivesterby left a comment

Choose a reason for hiding this comment

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

Please update as requested by @james-cast since the service desk id is supposed to be a string.

@iamjem iamjem force-pushed the servicedesk-customer-request branch from 71f2d08 to a00fdd5 Compare February 18, 2022 21:17
@iamjem
Copy link
Contributor Author

iamjem commented Feb 18, 2022

I have updated serviceDeskID int to serviceDeskID interface{} for the remaining customer methods, and added test coverage.

Copy link
Collaborator

@benjivesterby benjivesterby left a comment

Choose a reason for hiding this comment

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

LGTM

@benjivesterby benjivesterby merged commit 13da37b into andygrunwald:master Feb 20, 2022
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.

None yet

4 participants