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

Added support of recipientPhoneNumber field #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions src/main/java/com/qiwi/billpayments/sdk/PomInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.qiwi.billpayments.sdk;

public class PomInfo {
public static final String VERSION = "1.5.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class BillResponse {
private final ZonedDateTime expirationDateTime;
private final String payUrl;
private final CustomFields customFields;
private final String recipientPhoneNumber;

@JsonCreator
public BillResponse(
Expand All @@ -31,7 +32,8 @@ public BillResponse(
@JsonProperty("creationDateTime") ZonedDateTime creationDateTime,
@JsonProperty("expirationDateTime") ZonedDateTime expirationDateTime,
@JsonProperty("payUrl") String payUrl,
@JsonProperty("customFields") CustomFields customFields
@JsonProperty("customFields") CustomFields customFields,
@JsonProperty("recipientPhoneNumber") String recipientPhoneNumber
) {
this.siteId = siteId;
this.billId = billId;
Expand All @@ -43,6 +45,7 @@ public BillResponse(
this.expirationDateTime = expirationDateTime;
this.payUrl = payUrl;
this.customFields = customFields;
this.recipientPhoneNumber = recipientPhoneNumber;
}

public BillResponse withNewPayUrl(String payUrl) {
Expand All @@ -56,7 +59,8 @@ public BillResponse withNewPayUrl(String payUrl) {
this.creationDateTime,
this.expirationDateTime,
payUrl,
this.customFields
this.customFields,
this.recipientPhoneNumber
);
}

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

//when
Expand Down