From a368f6690b027726550066173af216ebe5a18755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recai=20Furkan=20Bostanc=C4=B1?= <30552187+recaifurkan@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:21:05 +0300 Subject: [PATCH] DEV-30204 adds withholdingTax parameter dor basket items (#163) --- src/main/java/com/iyzipay/model/BasketItem.java | 10 ++++++++++ src/main/java/com/iyzipay/model/PaymentItem.java | 9 +++++++++ .../com/iyzipay/request/UpdatePaymentItemRequest.java | 10 ++++++++++ 3 files changed, 29 insertions(+) diff --git a/src/main/java/com/iyzipay/model/BasketItem.java b/src/main/java/com/iyzipay/model/BasketItem.java index 70aa3ab..03c8c1e 100644 --- a/src/main/java/com/iyzipay/model/BasketItem.java +++ b/src/main/java/com/iyzipay/model/BasketItem.java @@ -19,6 +19,8 @@ public class BasketItem { private boolean chargedFromMerchant; private BigDecimal chargedPriceFromMerchant; + private BigDecimal withholdingTax; + public String getId() { return id; @@ -108,6 +110,14 @@ public void setChargedPriceFromMerchant(BigDecimal chargedPriceFromMerchant) { this.chargedPriceFromMerchant = chargedPriceFromMerchant; } + public BigDecimal getWithholdingTax() { + return withholdingTax; + } + + public void setWithholdingTax(BigDecimal withholdingTax) { + this.withholdingTax = withholdingTax; + } + @Override public String toString() { return new ToStringRequestBuilder(this) diff --git a/src/main/java/com/iyzipay/model/PaymentItem.java b/src/main/java/com/iyzipay/model/PaymentItem.java index 89b85dc..3dde3b8 100644 --- a/src/main/java/com/iyzipay/model/PaymentItem.java +++ b/src/main/java/com/iyzipay/model/PaymentItem.java @@ -31,6 +31,7 @@ public class PaymentItem extends IyzipayResource { private BigDecimal subMerchantPayoutAmount; private BigDecimal merchantPayoutAmount; private ConvertedPayout convertedPayout; + private BigDecimal withholdingTax; public static PaymentItem update(UpdatePaymentItemRequest request, Options options) { String path = "/payment/item"; @@ -193,6 +194,14 @@ public void setConvertedPayout(ConvertedPayout convertedPayout) { this.convertedPayout = convertedPayout; } + public BigDecimal getWithholdingTax() { + return withholdingTax; + } + + public void setWithholdingTax(BigDecimal withholdingTax) { + this.withholdingTax = withholdingTax; + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); diff --git a/src/main/java/com/iyzipay/request/UpdatePaymentItemRequest.java b/src/main/java/com/iyzipay/request/UpdatePaymentItemRequest.java index 1fefca1..be7b1dd 100644 --- a/src/main/java/com/iyzipay/request/UpdatePaymentItemRequest.java +++ b/src/main/java/com/iyzipay/request/UpdatePaymentItemRequest.java @@ -15,6 +15,8 @@ public class UpdatePaymentItemRequest extends Request { private boolean crossBookingOperation; private BigDecimal chargedPriceFromMerchant; + private BigDecimal withholdingTax; + public String getSubMerchantKey() { return subMerchantKey; } @@ -63,6 +65,14 @@ public void setChargedPriceFromMerchant(BigDecimal chargedPriceFromMerchant) { this.chargedPriceFromMerchant = chargedPriceFromMerchant; } + public BigDecimal getWithholdingTax() { + return withholdingTax; + } + + public void setWithholdingTax(BigDecimal withholdingTax) { + this.withholdingTax = withholdingTax; + } + @Override public String toString() { return new ToStringRequestBuilder(this)