Skip to content

Commit

Permalink
Added merchant_advice param (#166)
Browse files Browse the repository at this point in the history
* Added merchant_advice param

* Format
  • Loading branch information
AnasNaouchi authored Feb 29, 2024
1 parent f214f4b commit 4d41e71
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/main/java/co/omise/models/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public class Charge extends Model {
@JsonProperty("captured_amount")
private long capturedAmount;
@JsonProperty("webhook_endpoints")
private List<String> webhookEndpoints;
private List<String> webhookEndpoints;
@JsonProperty("merchant_advice")
private String merchantAdvice;

public long getAmount() {
return this.amount;
Expand Down Expand Up @@ -501,6 +503,14 @@ public void setWebhookEndpoints(List<String> webhookEndpoints) {
this.webhookEndpoints = webhookEndpoints;
}

public String getMerchantAdvice() {
return merchantAdvice;
}

public void setMerchantAdvice(String merchantAdvice) {
this.merchantAdvice = merchantAdvice;
}

public static class ListRequestBuilder extends RequestBuilder<ScopedList<Charge>> {
private ScopedList.Options options;

Expand Down
1 change: 1 addition & 0 deletions src/test/java/co/omise/requests/ChargeRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void testGet() throws IOException, OmiseException {
assertEquals(100000L, charge.getAmount());
assertEquals("thb", charge.getCurrency());
assertEquals("trxn_test_4yq7duwb9jts1vxgqua", charge.getTransaction());
assertEquals("Test advice", charge.getMerchantAdvice());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@
"disputable": false,
"capturable": false,
"reversible": false,
"refundable": false
"refundable": false,
"merchant_advice": "Test advice"
}

0 comments on commit 4d41e71

Please sign in to comment.