Skip to content
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
12 changes: 12 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6797,6 +6797,16 @@
"type": {
"description": "Specifies the media type of the related resource.",
"type": "string"
},
"min_amount": {
"description": "Minimum allowed amount for the refund.",
"type": "number",
"format": "float"
},
"max_amount": {
"description": "Maximum allowed amount for the refund.",
"type": "number",
"format": "float"
}
},
"title": "Link"
Expand Down Expand Up @@ -7606,6 +7616,7 @@
"apple pay",
"google pay",
"paypal",
"twint",
"na"
],
"title": "Entry Mode"
Expand Down Expand Up @@ -10382,6 +10393,7 @@
"APPLE_PAY",
"GOOGLE_PAY",
"PAYPAL",
"TWINT",
"NONE",
"CHIP",
"MANUAL_ENTRY",
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/sumup/sdk/models/EntryMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum EntryMode {
APPLE_PAY("apple pay"),
GOOGLE_PAY("google pay"),
PAYPAL("paypal"),
TWINT("twint"),
NA("na");

private final String value;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/sumup/sdk/models/EntryModeFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public enum EntryModeFilter {
APPLE_PAY("APPLE_PAY"),
GOOGLE_PAY("GOOGLE_PAY"),
PAYPAL("PAYPAL"),
TWINT("TWINT"),
NONE("NONE"),
CHIP("CHIP"),
MANUAL_ENTRY("MANUAL_ENTRY"),
Expand Down
32 changes: 31 additions & 1 deletion src/main/java/com/sumup/sdk/models/Link.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ public record Link(
/** URL for accessing the related resource. */
String href,

/** Maximum allowed amount for the refund. */
Float maxAmount,

/** Minimum allowed amount for the refund. */
Float minAmount,

/** Specifies the relation to the current resource. */
String rel,

Expand All @@ -23,6 +29,8 @@ public static Builder builder() {
/** Builder for Link instances. */
public static final class Builder {
private String href;
private Float maxAmount;
private Float minAmount;
private String rel;
private String type;

Expand All @@ -39,6 +47,28 @@ public Builder href(String href) {
return this;
}

/**
* Sets the value for {@code maxAmount}.
*
* @param maxAmount Maximum allowed amount for the refund.
* @return This builder instance.
*/
public Builder maxAmount(Float maxAmount) {
this.maxAmount = maxAmount;
return this;
}

/**
* Sets the value for {@code minAmount}.
*
* @param minAmount Minimum allowed amount for the refund.
* @return This builder instance.
*/
public Builder minAmount(Float minAmount) {
this.minAmount = minAmount;
return this;
}

/**
* Sets the value for {@code rel}.
*
Expand Down Expand Up @@ -67,7 +97,7 @@ public Builder type(String type) {
* @return Immutable Link.
*/
public Link build() {
return new Link(href, rel, type);
return new Link(href, maxAmount, minAmount, rel, type);
}
}
}
Loading