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

Bindings for Terminal endpoints #592

Merged
merged 1 commit into from
Sep 24, 2018
Merged

Conversation

daz-stripe
Copy link
Contributor

Bindings for Terminal endpoints

  • Connection Tokens
  • Locations
  • Readers

@daz-stripe
Copy link
Contributor Author

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

Will hit rebuild once we release stripe-mocks! Still working on that

@remi-stripe
Copy link
Contributor

Assigning to @ob-stripe to review those instead of me as I'm OOO today + traveling tomorrow

@remi-stripe remi-stripe assigned ob-stripe and unassigned remi-stripe Sep 17, 2018
Copy link
Contributor

@ob-stripe ob-stripe left a comment

Choose a reason for hiding this comment

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

Left some comments. Also, would be great if you could add a model test for the ConnectionToken class. Since you cannot fetch a JSON payload using getFixture() (because there's no GET request for this resource), you'll need to have a local fixture file. Take a look at LoginLinkTest.java for an example.

import java.util.Map;

public class ConnectionToken extends ApiResource {
String connection_token;
Copy link
Contributor

Choose a reason for hiding this comment

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

Use camelCase for attribute names. (Gson will fill them using their snake_case counterpart in the JSON payload.)


public class ConnectionToken extends ApiResource {
String connection_token;
String object;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but the convention in the library is to have the id field first (if it exists), followed by the object field, followed by all other attributes in alphabetical order.

String serial_number;
String ip_address;
String label;
String paired_pos_id;
Copy link
Contributor

Choose a reason for hiding this comment

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

snake_case -> camelCase + sort attributes alphabetically.

@Getter(onMethod = @__({@Override})) String id;
String object;
String display_name;
Address address;
Copy link
Contributor

Choose a reason for hiding this comment

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

snake_case -> camelCase + sort attributes alphabetically.

@stripe-ci stripe-ci assigned daz-stripe and unassigned ob-stripe Sep 18, 2018
@daz-stripe daz-stripe assigned ob-stripe and unassigned daz-stripe Sep 18, 2018
Copy link
Contributor

@ob-stripe ob-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, assuming tests pass after stripe-mock update.

@stripe-ci stripe-ci assigned daz-stripe and unassigned ob-stripe Sep 19, 2018
@ob-stripe ob-stripe mentioned this pull request Sep 22, 2018
3 tasks
@ob-stripe ob-stripe changed the base branch from master to integration-v7 September 22, 2018 16:07
@ob-stripe ob-stripe merged commit adeed4d into integration-v7 Sep 24, 2018
@ob-stripe ob-stripe deleted the daz-terminal-bindings branch September 24, 2018 12:50
@ob-stripe
Copy link
Contributor

Released as 7.0.0.

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