-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathBillResponse.java
More file actions
122 lines (106 loc) · 3.66 KB
/
BillResponse.java
File metadata and controls
122 lines (106 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package com.qiwi.billpayments.sdk.model.out;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.qiwi.billpayments.sdk.model.MoneyAmount;
import com.qiwi.billpayments.sdk.model.in.CustomFields;
import com.qiwi.billpayments.sdk.model.in.Customer;
import java.time.ZonedDateTime;
public class BillResponse {
private final String siteId;
private final String billId;
private final MoneyAmount amount;
private final ResponseStatus status;
private final String comment;
private final Customer customer;
private final ZonedDateTime creationDateTime;
private final ZonedDateTime expirationDateTime;
private final String payUrl;
private final CustomFields customFields;
private final String recipientPhoneNumber;
@JsonCreator
public BillResponse(
@JsonProperty("siteId") String siteId,
@JsonProperty("billId") String billId,
@JsonProperty("amount") MoneyAmount amount,
@JsonProperty("status") ResponseStatus status,
@JsonProperty("comment") String comment,
@JsonProperty("customer") Customer customer,
@JsonProperty("creationDateTime") ZonedDateTime creationDateTime,
@JsonProperty("expirationDateTime") ZonedDateTime expirationDateTime,
@JsonProperty("payUrl") String payUrl,
@JsonProperty("customFields") CustomFields customFields,
@JsonProperty("recipientPhoneNumber") String recipientPhoneNumber
) {
this.siteId = siteId;
this.billId = billId;
this.amount = amount;
this.status = status;
this.comment = comment;
this.customer = customer;
this.creationDateTime = creationDateTime;
this.expirationDateTime = expirationDateTime;
this.payUrl = payUrl;
this.customFields = customFields;
this.recipientPhoneNumber = recipientPhoneNumber;
}
public BillResponse withNewPayUrl(String payUrl) {
return new BillResponse(
this.siteId,
this.billId,
this.amount,
this.status,
this.comment,
this.customer,
this.creationDateTime,
this.expirationDateTime,
payUrl,
this.customFields,
this.recipientPhoneNumber
);
}
public String getSiteId() {
return siteId;
}
public String getBillId() {
return billId;
}
public MoneyAmount getAmount() {
return amount;
}
public ResponseStatus getStatus() {
return status;
}
public String getComment() {
return comment;
}
public ZonedDateTime getCreationDateTime() {
return creationDateTime;
}
public ZonedDateTime getExpirationDateTime() {
return expirationDateTime;
}
public String getPayUrl() {
return payUrl;
}
public Customer getCustomer() {
return customer;
}
public CustomFields getCustomFields() {
return customFields;
}
@Override
public String toString() {
return "BillResponse{" +
"siteId='" + siteId + '\'' +
", billId='" + billId + '\'' +
", amount=" + amount +
", status=" + status +
", comment='" + comment + '\'' +
", customer=" + customer +
", creationDateTime=" + creationDateTime +
", expirationDateTime=" + expirationDateTime +
", payUrl='" + payUrl + '\'' +
", customFields=" + customFields +
'}';
}
}