-
Notifications
You must be signed in to change notification settings - Fork 361
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
Conversation
r? @remi-stripe Will hit rebuild once we release stripe-mocks! Still working on that |
Assigning to @ob-stripe to review those instead of me as I'm OOO today + traveling tomorrow |
There was a problem hiding this 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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
9a806ec
to
f2c1f6e
Compare
f2c1f6e
to
d845954
Compare
Released as 7.0.0. |
Bindings for Terminal endpoints