@@ -6,6 +6,12 @@ public record Link(
66 /** URL for accessing the related resource. */
77 String href ,
88
9+ /** Maximum allowed amount for the refund. */
10+ Float maxAmount ,
11+
12+ /** Minimum allowed amount for the refund. */
13+ Float minAmount ,
14+
915 /** Specifies the relation to the current resource. */
1016 String rel ,
1117
@@ -23,6 +29,8 @@ public static Builder builder() {
2329 /** Builder for Link instances. */
2430 public static final class Builder {
2531 private String href ;
32+ private Float maxAmount ;
33+ private Float minAmount ;
2634 private String rel ;
2735 private String type ;
2836
@@ -39,6 +47,28 @@ public Builder href(String href) {
3947 return this ;
4048 }
4149
50+ /**
51+ * Sets the value for {@code maxAmount}.
52+ *
53+ * @param maxAmount Maximum allowed amount for the refund.
54+ * @return This builder instance.
55+ */
56+ public Builder maxAmount (Float maxAmount ) {
57+ this .maxAmount = maxAmount ;
58+ return this ;
59+ }
60+
61+ /**
62+ * Sets the value for {@code minAmount}.
63+ *
64+ * @param minAmount Minimum allowed amount for the refund.
65+ * @return This builder instance.
66+ */
67+ public Builder minAmount (Float minAmount ) {
68+ this .minAmount = minAmount ;
69+ return this ;
70+ }
71+
4272 /**
4373 * Sets the value for {@code rel}.
4474 *
@@ -67,7 +97,7 @@ public Builder type(String type) {
6797 * @return Immutable Link.
6898 */
6999 public Link build () {
70- return new Link (href , rel , type );
100+ return new Link (href , maxAmount , minAmount , rel , type );
71101 }
72102 }
73103}
0 commit comments