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
2 changes: 1 addition & 1 deletion MIGRATION-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide lists all removed classes and interfaces from V1 and how to migrate t
### [`Conversation`](https://www.javadoc.io/doc/com.sinch.sdk/sinch-sdk-java/2.0.0/com/sinch/sdk/domains/conversation/package-summary.html)

- Removed support of `SINCH_CHAT` channel.
- [channelspecific.whatsapp.payment.OrderDetailsPayment](https://www.javadoc.io/doc/com.sinch.sdk/sinch-sdk-java/latest/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.html) is now processing `OderDetailsSettings` interface for payment settings to support `boleto` and `payment_link` payment methods.
- [channelspecific.whatsapp.payment.OrderDetailsPayment](https://www.javadoc.io/doc/com.sinch.sdk/sinch-sdk-java/latest/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.html) removed support of deprecated `payment_settings` in favor of new `payment_buttons` for payment methods.
- APIs returning a list are supporting common naming: `<operation>QueyParameters` models for filtering, sorting, and pagination onto requests and `<opreation>ListResponse` models for responses.
- New APIs supporting auto-pagination for list responses:
- apps.list()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.sinch.sdk.domains.conversation.api.v1.adapters.messages.type.channelspecific.kakaotalk.buttons.KakaoTalkButtonMapper;
import com.sinch.sdk.domains.conversation.api.v1.adapters.messages.type.channelspecific.kakaotalk.commerce.KakaoTalkCommerceMapper;
import com.sinch.sdk.domains.conversation.api.v1.adapters.messages.type.channelspecific.kakaotalk.coupons.KakaoTalkCouponMapper;
import com.sinch.sdk.domains.conversation.api.v1.adapters.messages.type.channelspecific.whatsapp.payment.OrderDetailsSettingsMapper;
import com.sinch.sdk.domains.conversation.models.v1.messages.ChoiceItemMapper;
import com.sinch.sdk.domains.conversation.models.v1.messages.internal.AppMessageInternalMapper;
import com.sinch.sdk.domains.conversation.models.v1.messages.internal.ChannelSpecificMessageInternalMapper;
Expand Down Expand Up @@ -300,7 +299,6 @@ private LocalLazyInit() {
ListMessageInternalMapper.initMapper();
ListSectionMapper.initMapper();
OmniMessageOverrideMapper.initMapper();
OrderDetailsSettingsMapper.initMapper();
RecipientMapper.initMapper();
SendMessageRequestMapper.initMapper();
TemplateMessageMapper.initMapper();
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ public static String valueOf(TypeOfGoodsEnum e) {
*/
TypeOfGoodsEnum getTypeOfGoods();

/**
* Get paymentSettings
*
* @return paymentSettings
* @deprecated
*/
@Deprecated
OrderDetailsSettings getPaymentSettings();

/**
* Array of payment buttons (1 to 2 items).
*
Expand Down Expand Up @@ -174,16 +165,6 @@ interface Builder {
*/
Builder setTypeOfGoods(TypeOfGoodsEnum typeOfGoods);

/**
* see getter
*
* @param paymentSettings see getter
* @return Current builder
* @see #getPaymentSettings
*/
@Deprecated
Builder setPaymentSettings(OrderDetailsSettings paymentSettings);

/**
* see getter
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
OrderDetailsPaymentImpl.JSON_PROPERTY_TYPE,
OrderDetailsPaymentImpl.JSON_PROPERTY_REFERENCE_ID,
OrderDetailsPaymentImpl.JSON_PROPERTY_TYPE_OF_GOODS,
OrderDetailsPaymentImpl.JSON_PROPERTY_PAYMENT_SETTINGS,
OrderDetailsPaymentImpl.JSON_PROPERTY_PAYMENT_BUTTONS,
OrderDetailsPaymentImpl.JSON_PROPERTY_TOTAL_AMOUNT_VALUE,
OrderDetailsPaymentImpl.JSON_PROPERTY_ORDER
Expand All @@ -36,10 +35,6 @@ public class OrderDetailsPaymentImpl implements OrderDetailsPayment {

private OptionalValue<TypeOfGoodsEnum> typeOfGoods;

public static final String JSON_PROPERTY_PAYMENT_SETTINGS = "payment_settings";

private OptionalValue<OrderDetailsSettings> paymentSettings;

public static final String JSON_PROPERTY_PAYMENT_BUTTONS = "payment_buttons";

private OptionalValue<List<WhatsAppPaymentButton>> paymentButtons;
Expand All @@ -58,14 +53,12 @@ protected OrderDetailsPaymentImpl(
OptionalValue<TypeEnum> type,
OptionalValue<String> referenceId,
OptionalValue<TypeOfGoodsEnum> typeOfGoods,
OptionalValue<OrderDetailsSettings> paymentSettings,
OptionalValue<List<WhatsAppPaymentButton>> paymentButtons,
OptionalValue<Integer> totalAmountValue,
OptionalValue<OrderDetailsPaymentOrder> order) {
this.type = type;
this.referenceId = referenceId;
this.typeOfGoods = typeOfGoods;
this.paymentSettings = paymentSettings;
this.paymentButtons = paymentButtons;
this.totalAmountValue = totalAmountValue;
this.order = order;
Expand Down Expand Up @@ -104,17 +97,6 @@ public OptionalValue<TypeOfGoodsEnum> typeOfGoods() {
return typeOfGoods;
}

@JsonIgnore
public OrderDetailsSettings getPaymentSettings() {
return paymentSettings.orElse(null);
}

@JsonProperty(JSON_PROPERTY_PAYMENT_SETTINGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OptionalValue<OrderDetailsSettings> paymentSettings() {
return paymentSettings;
}

@JsonIgnore
public List<WhatsAppPaymentButton> getPaymentButtons() {
return paymentButtons.orElse(null);
Expand Down Expand Up @@ -167,9 +149,6 @@ public boolean equals(Object o) {
this.referenceId, whatsAppPaymentOrderDetailsChannelSpecificMessagePayment.referenceId)
&& Objects.equals(
this.typeOfGoods, whatsAppPaymentOrderDetailsChannelSpecificMessagePayment.typeOfGoods)
&& Objects.equals(
this.paymentSettings,
whatsAppPaymentOrderDetailsChannelSpecificMessagePayment.paymentSettings)
&& Objects.equals(
this.paymentButtons,
whatsAppPaymentOrderDetailsChannelSpecificMessagePayment.paymentButtons)
Expand All @@ -182,8 +161,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
type, referenceId, typeOfGoods, paymentSettings, paymentButtons, totalAmountValue, order);
return Objects.hash(type, referenceId, typeOfGoods, paymentButtons, totalAmountValue, order);
}

@Override
Expand All @@ -193,7 +171,6 @@ public String toString() {
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
sb.append(" typeOfGoods: ").append(toIndentedString(typeOfGoods)).append("\n");
sb.append(" paymentSettings: ").append(toIndentedString(paymentSettings)).append("\n");
sb.append(" paymentButtons: ").append(toIndentedString(paymentButtons)).append("\n");
sb.append(" totalAmountValue: ").append(toIndentedString(totalAmountValue)).append("\n");
sb.append(" order: ").append(toIndentedString(order)).append("\n");
Expand All @@ -216,7 +193,6 @@ static class Builder implements OrderDetailsPayment.Builder {
OptionalValue<TypeEnum> type = OptionalValue.empty();
OptionalValue<String> referenceId = OptionalValue.empty();
OptionalValue<TypeOfGoodsEnum> typeOfGoods = OptionalValue.empty();
OptionalValue<OrderDetailsSettings> paymentSettings = OptionalValue.empty();
OptionalValue<List<WhatsAppPaymentButton>> paymentButtons = OptionalValue.empty();
OptionalValue<Integer> totalAmountValue = OptionalValue.empty();
OptionalValue<OrderDetailsPaymentOrder> order = OptionalValue.empty();
Expand All @@ -239,12 +215,6 @@ public Builder setTypeOfGoods(TypeOfGoodsEnum typeOfGoods) {
return this;
}

@JsonProperty(JSON_PROPERTY_PAYMENT_SETTINGS)
public Builder setPaymentSettings(OrderDetailsSettings paymentSettings) {
this.paymentSettings = OptionalValue.of(paymentSettings);
return this;
}

@JsonProperty(JSON_PROPERTY_PAYMENT_BUTTONS)
public Builder setPaymentButtons(List<WhatsAppPaymentButton> paymentButtons) {
this.paymentButtons = OptionalValue.of(paymentButtons);
Expand All @@ -265,7 +235,7 @@ public Builder setOrder(OrderDetailsPaymentOrder order) {

public OrderDetailsPayment build() {
return new OrderDetailsPaymentImpl(
type, referenceId, typeOfGoods, paymentSettings, paymentButtons, totalAmountValue, order);
type, referenceId, typeOfGoods, paymentButtons, totalAmountValue, order);
}
}
}

This file was deleted.

Loading
Loading