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

Add support for the LineItem resource and APIs #1091

Merged
merged 1 commit into from
May 12, 2020
Merged

Conversation

remi-stripe
Copy link
Contributor

@remi-stripe remi-stripe commented May 4, 2020

r? @richardm-stripe
cc @stripe/api-libraries

@remi-stripe
Copy link
Contributor Author

remi-stripe commented May 12, 2020

golint -set_exit_status ./...
lineitem/client.go:9:6: type name will be used as lineitem.LineItemIter by other packages, and that stutters; consider calling this Iter
Found 1 lint suggestions; failing.
make: *** [lint] Error 1

@brandur-stripe Any chance you could have a look at this PR tomorrow morning? I'm struggling to understand how to represent the LineItem resource's ability to be paginated. We don't really have a pattern line this today in stripe-go and I'm not sure what the right way to approach this is.

@remi-stripe remi-stripe changed the title [WIP] Add support for the LineItem resource and APIs Add support for the LineItem resource and APIs May 12, 2020
@brandur-stripe
Copy link
Contributor

@remi-stripe Hey! Just taking a look at some of our existing conventions, it looks like we usually call the "main" iterator in any particular client package just Iter usually, with any "secondary" iterators getting an object prefix. For example:

  • In creditnote, the credit note iterator is Iter while the line item iterator is LineItemIter.
  • In invoice, the invoice iterator is Iter while the line iterator is LineIter.

I imagine for this one you just ended up copying the LineItemIter from creditnote — would suggest renaming it to just Iter.

Copy link
Contributor

@richardm-stripe richardm-stripe left a comment

Choose a reason for hiding this comment

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

LGTM

@remi-stripe remi-stripe merged commit 1936af4 into master May 12, 2020
@remi-stripe remi-stripe deleted the remi-add-lineitem branch May 12, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants