8000 Add transactions resource by nathanielmiller20 · Pull Request #35 · button/button-client-python · GitHub < 10000 link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
[go: up one dir, main page]

Skip to content

Conversation

@nathanielmiller20
Copy link
Contributor

Seems we don't have some python version binaries we need? About half the versions are passing and about half can't be found.

Copy link
Contributor
@griffinmyers griffinmyers left a comment

Choose a reason for hiding this comment

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

Looking great! a few comments.

Args:
account_id (str) optional: A Button account id ('acc-XXX')
Copy link
Contributor

Choose a reason for hiding this comment

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

Copypasta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Done.

print(response)
# <class pybutton.Response id: customer-1234, ...>
Transactions
Copy link
Contributor

Choose a reason for hiding this comment

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

please add description for how this differs from accounts#transactions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added, not sure if I used the right convention in the description, though.

* ``cursor`` (string): An API cursor to fetch a specific set of results.
* ``start`` (ISO-8601 datetime string): Fetch transactions after this time.
* ``end`` (ISO-8601 datetime string): Fetch transactions before this time.
* ``time_field`` (string): Which time field ``start`` and ``end`` filter on.
Copy link
Contributor

Choose a reason for hiding this comment

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

default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

README.rst Outdated
client = Client('sk-XXX')
response = client.accounts.transactions(
Copy link
Contributor

Choose a reason for hiding this comment

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

client.transactions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed! Thanks!

@griffinmyers
Copy link
Contributor

Did you want to add time_field to the accounts resource as well?

@nathanielmiller20
Copy link
Contributor Author

time_field is already in the accounts resource for this client: https://github.com/button/button-client-python/blob/master/pybutton/resources/accounts.py#L44

Copy link
Contributor
@griffinmyers griffinmyers left a comment

Choose a reason for hiding this comment

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

LGTM! I think you have one linting failure that is a consequence of a branch I merged underneath you--let's make sure the build passes and merge up!

@nathanielmiller20 nathanielmiller20 merged commit f2c2d91 into master Sep 25, 2019
@nathanielmiller20 nathanielmiller20 deleted the nm/txs branch September 25, 2019 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0