Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added support for linking accounts to sub-merchants #3

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

Merged
thomshutt merged 4 commits into master from link-account
Nov 2, 2016

Conversation

@thomshutt
Copy link
Contributor

@thomshutt thomshutt commented Nov 1, 2016

No description provided.

try (final CloseableHttpResponse httpResponse = httpclient.execute(httpRequest)) {
final int statusCode = httpResponse.getStatusLine().getStatusCode();

if (statusCode < 200 || statusCode >= 300) {
Copy link

@stuarthicks stuarthicks Nov 1, 2016

Choose a reason for hiding this comment

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

I'd be surprised if org.apache.http didn't have constants for these somewhere. Could we double-check?

Copy link
Contributor Author

@thomshutt thomshutt Nov 1, 2016

Choose a reason for hiding this comment

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

Switched to just checking for the 204 that Castlabs currently return on success

* Add a sub merchant account to Castlabs.
*
* @param request Request parameters to pass to Castlabs
* @param request Request parameters to pass to Castlabs
Copy link

@stuarthicks stuarthicks Nov 1, 2016

Choose a reason for hiding this comment

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

Is your IDE adding the whitespace here?

Copy link
Contributor Author

@thomshutt thomshutt Nov 1, 2016

Choose a reason for hiding this comment

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

Yep, it lines it up with the @param on the line below

}
}

private HttpPost createHttpPostRequest(final String uri, final Object body) throws JsonProcessingException, UnsupportedEncodingException {
Copy link

@stuarthicks stuarthicks Nov 1, 2016

Choose a reason for hiding this comment

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

I approve of this refactoring 👍

Copy link

@stuarthicks stuarthicks left a comment

Choose a reason for hiding this comment

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

LGTM.

@thomshutt thomshutt merged commit 333e5ae into master Nov 2, 2016
@thomshutt thomshutt deleted the link-account branch November 2, 2016 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@stuarthicks stuarthicks stuarthicks approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /