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 Issuing APIs/resources #557

Merged
merged 1 commit into from
Jul 26, 2018
Merged

Conversation

remi-stripe
Copy link
Contributor

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

objectMap.put("issuing.authorization", com.stripe.model.issuing.Authorization.class);
objectMap.put("issuing.card", com.stripe.model.issuing.Card.class);
objectMap.put("issuing.cardholder", com.stripe.model.issuing.Cardholder.class);
objectMap.put("issuing.card_details", com.stripe.model.issuing.CardDetails.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

At the risk of sounding like a broken record, CardDetails after Card :)

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.

Some linting errors detected by Checkstyle, but otherwise lgtm.

import com.stripe.model.BalanceTransaction;
import com.stripe.model.ExpandableField;
import com.stripe.model.MetadataStore;
import com.stripe.model.HasId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be before MetadataStore

import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Address;
import com.stripe.model.MetadataStore;
import com.stripe.model.HasId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Address;
import com.stripe.model.MetadataStore;
import com.stripe.model.HasId;
Copy link
Contributor

Choose a reason for hiding this comment

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

And here.

import com.stripe.exception.InvalidRequestException;
import com.stripe.model.ExpandableField;
import com.stripe.model.MetadataStore;
import com.stripe.model.HasId;
Copy link
Contributor

Choose a reason for hiding this comment

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

And here.

import com.stripe.model.BalanceTransaction;
import com.stripe.model.ExpandableField;
import com.stripe.model.MetadataStore;
import com.stripe.model.HasId;
Copy link
Contributor

Choose a reason for hiding this comment

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

And here.

String city;
String country;
String name;
String network_id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be networkId.

String country;
String name;
String network_id;
String postal_code;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be postalCode.

.replaceAll("(.)([A-Z][a-z]+)", "$1_$2")
.replaceAll("([a-z0-9])([A-Z])", "$1_$2")
.toLowerCase();

// Issuing resources are in their own package. Until we can support adding OBJECT_NAME
// to all classes, we use this dirty trick to properly format the API endpoints
if(clazz.getName().contains("com.stripe.model.issuing.")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a space after if.

@remi-stripe
Copy link
Contributor Author

@ob-stripe thank you for catching those! Fixed all of them, PTAL

@stripe-ci stripe-ci assigned remi-stripe and unassigned ob-stripe Jul 26, 2018
@ob-stripe ob-stripe merged commit 31c5de4 into master Jul 26, 2018
@ob-stripe ob-stripe deleted the remi-add-issuing branch July 26, 2018 18:49
@ob-stripe
Copy link
Contributor

Released as 5.52.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.

3 participants