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

Фикс для BadResponseException в 1.4.0 #12

Merged
merged 3 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static BillResponse appendSuccessUrl(BillResponse response, String successUrl) t
private CreateBillRequest appendCustomFields(CreateBillInfo info) {
return CreateBillRequest.create(
info,
new CustomFields(CLIENT_NAME, appVersion)
new CustomFields(CLIENT_NAME, appVersion, null)
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package com.qiwi.billpayments.sdk.model.in;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class CustomFields {
private final String apiClient;
private final String apiClientVersion;
private final String checkoutReferer;

@JsonCreator
public CustomFields(
@JsonProperty("apiClient") String apiClient,
@JsonProperty("apiClientVersion") String apiClientVersion
@JsonProperty("apiClientVersion") String apiClientVersion,
@JsonProperty("CHECKOUT_REFERER") String checkoutReferer
) {
this.apiClient = apiClient;
this.apiClientVersion = apiClientVersion;
this.checkoutReferer = checkoutReferer;
}

public String getApiClient() {
Expand All @@ -24,11 +29,17 @@ public String getApiClientVersion() {
return apiClientVersion;
}

public String getCheckoutReferer() {
return checkoutReferer;
}

@Override
public String toString() {
return "CustomFields{" +
"apiClient='" + apiClient + '\'' +
", apiClientVersion='" + apiClientVersion + '\'' +
", checkoutReferer='" + checkoutReferer + '\'' +
'}';
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void testAppendSuccessUrl() throws Exception {
ZonedDateTime.now(),
ZonedDateTime.now(),
"http://test.ru/",
new CustomFields("client", "version")
new CustomFields("client", "version", null)
);

//when
Expand Down