Skip to content

Conversation

theckman
Copy link
Collaborator

This also updates the new methods to not return the *http.Response, as it
doesn't seem needed.

Updates #267

@theckman theckman added this to the v1.4.0 milestone Feb 27, 2021
}

// CreateBusinessServiceWithContext creates a new business service.
func (c *Client) CreateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@stmcallister similar to #293, I'm curious of your thoughts around removing the *http.Response from these methods.

Choose a reason for hiding this comment

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

As mentioned in #293, as long as we can get the same information from somewhere--in this case, from the APIError object--we should be okay with this change.


// ListBusinessServicesPaginated lists existing business services, automatically
// handling pagination and returning the full collection.
func (c *Client) ListBusinessServicesPaginated(ctx context.Context, o ListBusinessServiceOptions) ([]*BusinessService, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This takes naming inspiration from #295.

Choose a reason for hiding this comment

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

Good call.

This also updates the new methods to not return the `*http.Response`, as it
doesn't seem needed.

Updates #267
Copy link

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

Thanks for this! 👍


// ListBusinessServicesPaginated lists existing business services, automatically
// handling pagination and returning the full collection.
func (c *Client) ListBusinessServicesPaginated(ctx context.Context, o ListBusinessServiceOptions) ([]*BusinessService, error) {

Choose a reason for hiding this comment

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

Good call.

}

// CreateBusinessServiceWithContext creates a new business service.
func (c *Client) CreateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error) {

Choose a reason for hiding this comment

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

As mentioned in #293, as long as we can get the same information from somewhere--in this case, from the APIError object--we should be okay with this change.

@stmcallister stmcallister merged commit fdccb8d into master Mar 15, 2021
@theckman theckman deleted the ctx_business_service branch April 23, 2021 07:50
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