diff --git a/MIGRATION-GUIDE.md b/MIGRATION-GUIDE.md index 4b54e97f3..a9cf836af 100644 --- a/MIGRATION-GUIDE.md +++ b/MIGRATION-GUIDE.md @@ -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: `QueyParameters` models for filtering, sorting, and pagination onto requests and `ListResponse` models for responses. - New APIs supporting auto-pagination for list responses: - apps.list() diff --git a/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/ConversationService.java b/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/ConversationService.java index c699d245e..2360014a0 100644 --- a/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/ConversationService.java +++ b/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/ConversationService.java @@ -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; @@ -300,7 +299,6 @@ private LocalLazyInit() { ListMessageInternalMapper.initMapper(); ListSectionMapper.initMapper(); OmniMessageOverrideMapper.initMapper(); - OrderDetailsSettingsMapper.initMapper(); RecipientMapper.initMapper(); SendMessageRequestMapper.initMapper(); TemplateMessageMapper.initMapper(); diff --git a/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/messages/type/channelspecific/whatsapp/payment/OrderDetailsSettingsMapper.java b/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/messages/type/channelspecific/whatsapp/payment/OrderDetailsSettingsMapper.java deleted file mode 100644 index 7e2c698eb..000000000 --- a/client/src/main/com/sinch/sdk/domains/conversation/api/v1/adapters/messages/type/channelspecific/whatsapp/payment/OrderDetailsSettingsMapper.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.sinch.sdk.domains.conversation.api.v1.adapters.messages.type.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import com.sinch.sdk.core.utils.databind.Mapper; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.carousel.CarouselMessageImpl; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.OrderDetailsSettings; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl; -import java.io.IOException; - -public class OrderDetailsSettingsMapper { - - public static void initMapper() { - Mapper.getInstance() - .registerModule( - new SimpleModule().addDeserializer(OrderDetailsSettings.class, new Deserializer())); - } - - static class Deserializer extends StdDeserializer { - - public Deserializer() { - this(null); - } - - public Deserializer(Class vc) { - super(vc); - } - - @Override - public OrderDetailsSettings deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException { - - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl deserialized = - jp.readValueAs( - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.class); - - return (OrderDetailsSettings) deserialized.getActualInstance(); - } - } -} diff --git a/client/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettings.java b/client/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettings.java deleted file mode 100644 index c094e3cae..000000000 --- a/client/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettings.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -/** Base class for all classes supported by OrderDetailsPaymentSettings */ -public interface OrderDetailsSettings {} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.java index 6b2014586..eeabfc043 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPayment.java @@ -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). * @@ -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 * diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentImpl.java index a8fb33245..3c1e7e4bf 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentImpl.java @@ -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 @@ -36,10 +35,6 @@ public class OrderDetailsPaymentImpl implements OrderDetailsPayment { private OptionalValue typeOfGoods; - public static final String JSON_PROPERTY_PAYMENT_SETTINGS = "payment_settings"; - - private OptionalValue paymentSettings; - public static final String JSON_PROPERTY_PAYMENT_BUTTONS = "payment_buttons"; private OptionalValue> paymentButtons; @@ -58,14 +53,12 @@ protected OrderDetailsPaymentImpl( OptionalValue type, OptionalValue referenceId, OptionalValue typeOfGoods, - OptionalValue paymentSettings, OptionalValue> paymentButtons, OptionalValue totalAmountValue, OptionalValue order) { this.type = type; this.referenceId = referenceId; this.typeOfGoods = typeOfGoods; - this.paymentSettings = paymentSettings; this.paymentButtons = paymentButtons; this.totalAmountValue = totalAmountValue; this.order = order; @@ -104,17 +97,6 @@ public OptionalValue typeOfGoods() { return typeOfGoods; } - @JsonIgnore - public OrderDetailsSettings getPaymentSettings() { - return paymentSettings.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_PAYMENT_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OptionalValue paymentSettings() { - return paymentSettings; - } - @JsonIgnore public List getPaymentButtons() { return paymentButtons.orElse(null); @@ -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) @@ -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 @@ -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"); @@ -216,7 +193,6 @@ static class Builder implements OrderDetailsPayment.Builder { OptionalValue type = OptionalValue.empty(); OptionalValue referenceId = OptionalValue.empty(); OptionalValue typeOfGoods = OptionalValue.empty(); - OptionalValue paymentSettings = OptionalValue.empty(); OptionalValue> paymentButtons = OptionalValue.empty(); OptionalValue totalAmountValue = OptionalValue.empty(); OptionalValue order = OptionalValue.empty(); @@ -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 paymentButtons) { this.paymentButtons = OptionalValue.of(paymentButtons); @@ -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); } } } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoleto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoleto.java deleted file mode 100644 index a682f6504..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoleto.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -/** - * OrderDetailsPaymentSettingsBoleto - * - *

* @deprecated - */ -@JsonDeserialize(builder = OrderDetailsPaymentSettingsBoletoImpl.Builder.class) -public interface OrderDetailsPaymentSettingsBoleto - extends com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp - .payment.OrderDetailsSettings { - - /** - * The Boleto digitable line which will be copied to the clipboard when the user taps the Boleto - * button. - * - *

Field is required - * - * @return digitableLine - */ - String getDigitableLine(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new OrderDetailsPaymentSettingsBoletoImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param digitableLine see getter - * @return Current builder - * @see #getDigitableLine - */ - Builder setDigitableLine(String digitableLine); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - OrderDetailsPaymentSettingsBoleto build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoletoImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoletoImpl.java deleted file mode 100644 index e50510a0c..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsBoletoImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsBoletoBoleto; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsBoletoBoletoImpl; -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -@Deprecated -@JsonPropertyOrder({OrderDetailsPaymentSettingsBoletoImpl.JSON_PROPERTY_BOLETO}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class OrderDetailsPaymentSettingsBoletoImpl - implements OrderDetailsPaymentSettingsBoleto, - com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment - .OrderDetailsSettings { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_BOLETO = "boleto"; - - private OptionalValue boleto; - - public OrderDetailsPaymentSettingsBoletoImpl() {} - - protected OrderDetailsPaymentSettingsBoletoImpl( - OptionalValue boleto) { - this.boleto = boleto; - } - - @JsonIgnore - public WhatsAppPaymentSettingsBoletoBoleto getBoleto() { - return boleto.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_BOLETO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue boleto() { - return boleto; - } - - @JsonIgnore - public String getDigitableLine() { - if (null == boleto || !boleto.isPresent() || null == boleto.get().getDigitableLine()) { - return null; - } - return boleto.get().getDigitableLine(); - } - - public OptionalValue digitableLine() { - return null != boleto && boleto.isPresent() - ? boleto - .map(f -> ((WhatsAppPaymentSettingsBoletoBoletoImpl) f).digitableLine()) - .orElse(OptionalValue.empty()) - : OptionalValue.empty(); - } - - /** Return true if this WhatsAppPaymentSettingsBoleto object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderDetailsPaymentSettingsBoletoImpl whatsAppPaymentSettingsBoleto = - (OrderDetailsPaymentSettingsBoletoImpl) o; - return Objects.equals(this.boleto, whatsAppPaymentSettingsBoleto.boleto); - } - - @Override - public int hashCode() { - return Objects.hash(boleto); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderDetailsPaymentSettingsBoletoImpl {\n"); - sb.append(" boleto: ").append(toIndentedString(boleto)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements OrderDetailsPaymentSettingsBoleto.Builder { - OptionalValue boleto = OptionalValue.empty(); - - WhatsAppPaymentSettingsBoletoBoleto.Builder _delegatedBuilder = null; - - @JsonProperty(value = JSON_PROPERTY_BOLETO, required = true) - public Builder setBoleto(WhatsAppPaymentSettingsBoletoBoleto boleto) { - this.boleto = OptionalValue.of(boleto); - return this; - } - - @JsonIgnore - public Builder setDigitableLine(String digitableLine) { - getDelegatedBuilder().setDigitableLine(digitableLine); - return this; - } - - private WhatsAppPaymentSettingsBoletoBoleto.Builder getDelegatedBuilder() { - if (null == _delegatedBuilder) { - this._delegatedBuilder = WhatsAppPaymentSettingsBoletoBoleto.builder(); - } - return this._delegatedBuilder; - } - - public OrderDetailsPaymentSettingsBoleto build() { - // delegated builder was used: filling the related source of delegation field - if (null != this._delegatedBuilder) { - this.boleto = OptionalValue.of(this._delegatedBuilder.build()); - } - return new OrderDetailsPaymentSettingsBoletoImpl(boleto); - } - } - - public static class DelegatedSerializer - extends JsonSerializer> { - @Override - public void serialize( - OptionalValue value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException { - - if (!value.isPresent()) { - return; - } - OrderDetailsPaymentSettingsBoletoImpl impl = - (OrderDetailsPaymentSettingsBoletoImpl) value.get(); - jgen.writeObject(null != impl ? impl.getBoleto() : null); - } - } - - public static class DelegatedDeSerializer - extends JsonDeserializer { - @Override - public OrderDetailsPaymentSettingsBoleto deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException { - - OrderDetailsPaymentSettingsBoletoImpl.Builder builder = - new OrderDetailsPaymentSettingsBoletoImpl.Builder(); - WhatsAppPaymentSettingsBoletoBoletoImpl deserialized = - jp.readValueAs(WhatsAppPaymentSettingsBoletoBoletoImpl.class); - builder.setBoleto(deserialized); - return builder.build(); - } - } - - public static Optional delegatedConverter( - WhatsAppPaymentSettingsBoletoBoleto internal) { - if (null == internal) { - return Optional.empty(); - } - return Optional.of(new Builder().setBoleto(internal).build()); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPix.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPix.java deleted file mode 100644 index 745788452..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPix.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.sinch.sdk.core.utils.EnumDynamic; -import com.sinch.sdk.core.utils.EnumSupportDynamic; -import java.util.Arrays; -import java.util.stream.Stream; - -/** - * OrderDetailsPaymentSettingsDynamicPix - * - *

* @deprecated - */ -@JsonDeserialize(builder = OrderDetailsPaymentSettingsDynamicPixImpl.Builder.class) -public interface OrderDetailsPaymentSettingsDynamicPix - extends com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp - .payment.OrderDetailsSettings { - - /** - * The dynamic Pix code to be used by the buyer to pay. - * - *

Field is required - * - * @return code - */ - String getCode(); - - /** - * Account holder name. - * - *

Field is required - * - * @return merchantName - */ - String getMerchantName(); - - /** - * Pix key. - * - *

Field is required - * - * @return key - */ - String getKey(); - - /** Pix key type. */ - public class KeyTypeEnum extends EnumDynamic { - public static final KeyTypeEnum CPF = new KeyTypeEnum("CPF"); - public static final KeyTypeEnum CNPJ = new KeyTypeEnum("CNPJ"); - public static final KeyTypeEnum EMAIL = new KeyTypeEnum("EMAIL"); - public static final KeyTypeEnum PHONE = new KeyTypeEnum("PHONE"); - public static final KeyTypeEnum EVP = new KeyTypeEnum("EVP"); - - private static final EnumSupportDynamic ENUM_SUPPORT = - new EnumSupportDynamic<>( - KeyTypeEnum.class, KeyTypeEnum::new, Arrays.asList(CPF, CNPJ, EMAIL, PHONE, EVP)); - - private KeyTypeEnum(String value) { - super(value); - } - - public static Stream values() { - return ENUM_SUPPORT.values(); - } - - public static KeyTypeEnum from(String value) { - return ENUM_SUPPORT.from(value); - } - - public static String valueOf(KeyTypeEnum e) { - return ENUM_SUPPORT.valueOf(e); - } - } - - /** - * Pix key type. - * - *

Field is required - * - * @return keyType - */ - KeyTypeEnum getKeyType(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new OrderDetailsPaymentSettingsDynamicPixImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param code see getter - * @return Current builder - * @see #getCode - */ - Builder setCode(String code); - - /** - * see getter - * - * @param merchantName see getter - * @return Current builder - * @see #getMerchantName - */ - Builder setMerchantName(String merchantName); - - /** - * see getter - * - * @param key see getter - * @return Current builder - * @see #getKey - */ - Builder setKey(String key); - - /** - * see getter - * - * @param keyType see getter - * @return Current builder - * @see #getKeyType - */ - Builder setKeyType(KeyTypeEnum keyType); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - OrderDetailsPaymentSettingsDynamicPix build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPixImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPixImpl.java deleted file mode 100644 index d5ae162e3..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsDynamicPixImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsPixDynamicPix; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsPixDynamicPixImpl; -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -@Deprecated -@JsonPropertyOrder({OrderDetailsPaymentSettingsDynamicPixImpl.JSON_PROPERTY_DYNAMIC_PIX}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class OrderDetailsPaymentSettingsDynamicPixImpl - implements OrderDetailsPaymentSettingsDynamicPix, - com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment - .OrderDetailsSettings { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_DYNAMIC_PIX = "dynamic_pix"; - - private OptionalValue dynamicPix; - - public OrderDetailsPaymentSettingsDynamicPixImpl() {} - - protected OrderDetailsPaymentSettingsDynamicPixImpl( - OptionalValue dynamicPix) { - this.dynamicPix = dynamicPix; - } - - @JsonIgnore - public WhatsAppPaymentSettingsPixDynamicPix getDynamicPix() { - return dynamicPix.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_DYNAMIC_PIX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue dynamicPix() { - return dynamicPix; - } - - @JsonIgnore - public String getCode() { - if (null == dynamicPix || !dynamicPix.isPresent() || null == dynamicPix.get().getCode()) { - return null; - } - return dynamicPix.get().getCode(); - } - - public OptionalValue code() { - return null != dynamicPix && dynamicPix.isPresent() - ? dynamicPix - .map(f -> ((WhatsAppPaymentSettingsPixDynamicPixImpl) f).code()) - .orElse(OptionalValue.empty()) - : OptionalValue.empty(); - } - - @JsonIgnore - public String getMerchantName() { - if (null == dynamicPix - || !dynamicPix.isPresent() - || null == dynamicPix.get().getMerchantName()) { - return null; - } - return dynamicPix.get().getMerchantName(); - } - - public OptionalValue merchantName() { - return null != dynamicPix && dynamicPix.isPresent() - ? dynamicPix - .map(f -> ((WhatsAppPaymentSettingsPixDynamicPixImpl) f).merchantName()) - .orElse(OptionalValue.empty()) - : OptionalValue.empty(); - } - - @JsonIgnore - public String getKey() { - if (null == dynamicPix || !dynamicPix.isPresent() || null == dynamicPix.get().getKey()) { - return null; - } - return dynamicPix.get().getKey(); - } - - public OptionalValue key() { - return null != dynamicPix && dynamicPix.isPresent() - ? dynamicPix - .map(f -> ((WhatsAppPaymentSettingsPixDynamicPixImpl) f).key()) - .orElse(OptionalValue.empty()) - : OptionalValue.empty(); - } - - @JsonIgnore - public KeyTypeEnum getKeyType() { - if (null == dynamicPix || !dynamicPix.isPresent() || null == dynamicPix.get().getKeyType()) { - return null; - } - return KeyTypeEnum.from(dynamicPix.get().getKeyType().value()); - } - - public OptionalValue keyType() { - return null != dynamicPix && dynamicPix.isPresent() - ? dynamicPix.map(f -> KeyTypeEnum.from(dynamicPix.get().getKeyType().value())) - : OptionalValue.empty(); - } - - /** Return true if this WhatsAppPaymentSettingsPix object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderDetailsPaymentSettingsDynamicPixImpl whatsAppPaymentSettingsPix = - (OrderDetailsPaymentSettingsDynamicPixImpl) o; - return Objects.equals(this.dynamicPix, whatsAppPaymentSettingsPix.dynamicPix); - } - - @Override - public int hashCode() { - return Objects.hash(dynamicPix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderDetailsPaymentSettingsDynamicPixImpl {\n"); - sb.append(" dynamicPix: ").append(toIndentedString(dynamicPix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements OrderDetailsPaymentSettingsDynamicPix.Builder { - OptionalValue dynamicPix = OptionalValue.empty(); - - WhatsAppPaymentSettingsPixDynamicPix.Builder _delegatedBuilder = null; - - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_PIX, required = true) - public Builder setDynamicPix(WhatsAppPaymentSettingsPixDynamicPix dynamicPix) { - this.dynamicPix = OptionalValue.of(dynamicPix); - return this; - } - - @JsonIgnore - public Builder setCode(String code) { - getDelegatedBuilder().setCode(code); - return this; - } - - @JsonIgnore - public Builder setMerchantName(String merchantName) { - getDelegatedBuilder().setMerchantName(merchantName); - return this; - } - - @JsonIgnore - public Builder setKey(String key) { - getDelegatedBuilder().setKey(key); - return this; - } - - @JsonIgnore - public Builder setKeyType(KeyTypeEnum keyType) { - getDelegatedBuilder() - .setKeyType( - null != keyType - ? WhatsAppPaymentSettingsPixDynamicPixImpl.KeyTypeEnum.from(keyType.value()) - : null); - return this; - } - - private WhatsAppPaymentSettingsPixDynamicPix.Builder getDelegatedBuilder() { - if (null == _delegatedBuilder) { - this._delegatedBuilder = WhatsAppPaymentSettingsPixDynamicPix.builder(); - } - return this._delegatedBuilder; - } - - public OrderDetailsPaymentSettingsDynamicPix build() { - // delegated builder was used: filling the related source of delegation field - if (null != this._delegatedBuilder) { - this.dynamicPix = OptionalValue.of(this._delegatedBuilder.build()); - } - return new OrderDetailsPaymentSettingsDynamicPixImpl(dynamicPix); - } - } - - public static class DelegatedSerializer - extends JsonSerializer> { - @Override - public void serialize( - OptionalValue value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException { - - if (!value.isPresent()) { - return; - } - OrderDetailsPaymentSettingsDynamicPixImpl impl = - (OrderDetailsPaymentSettingsDynamicPixImpl) value.get(); - jgen.writeObject(null != impl ? impl.getDynamicPix() : null); - } - } - - public static class DelegatedDeSerializer - extends JsonDeserializer { - @Override - public OrderDetailsPaymentSettingsDynamicPix deserialize( - JsonParser jp, DeserializationContext ctxt) throws IOException { - - OrderDetailsPaymentSettingsDynamicPixImpl.Builder builder = - new OrderDetailsPaymentSettingsDynamicPixImpl.Builder(); - WhatsAppPaymentSettingsPixDynamicPixImpl deserialized = - jp.readValueAs(WhatsAppPaymentSettingsPixDynamicPixImpl.class); - builder.setDynamicPix(deserialized); - return builder.build(); - } - } - - public static Optional delegatedConverter( - WhatsAppPaymentSettingsPixDynamicPix internal) { - if (null == internal) { - return Optional.empty(); - } - return Optional.of(new Builder().setDynamicPix(internal).build()); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLink.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLink.java deleted file mode 100644 index 1898f9ba8..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLink.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -/** - * OrderDetailsPaymentSettingsPaymentLink - * - *

* @deprecated - */ -@JsonDeserialize(builder = OrderDetailsPaymentSettingsPaymentLinkImpl.Builder.class) -public interface OrderDetailsPaymentSettingsPaymentLink - extends com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp - .payment.OrderDetailsSettings { - - /** - * The payment link to be used by the buyer to pay. - * - *

Field is required - * - * @return uri - */ - String getUri(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new OrderDetailsPaymentSettingsPaymentLinkImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param uri see getter - * @return Current builder - * @see #getUri - */ - Builder setUri(String uri); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - OrderDetailsPaymentSettingsPaymentLink build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLinkImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLinkImpl.java deleted file mode 100644 index 3ec907a40..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsPaymentSettingsPaymentLinkImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsPaymentLinkPaymentLink; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal.WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl; -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -@Deprecated -@JsonPropertyOrder({OrderDetailsPaymentSettingsPaymentLinkImpl.JSON_PROPERTY_PAYMENT_LINK}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class OrderDetailsPaymentSettingsPaymentLinkImpl - implements OrderDetailsPaymentSettingsPaymentLink, - com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment - .OrderDetailsSettings { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_PAYMENT_LINK = "payment_link"; - - private OptionalValue paymentLink; - - public OrderDetailsPaymentSettingsPaymentLinkImpl() {} - - protected OrderDetailsPaymentSettingsPaymentLinkImpl( - OptionalValue paymentLink) { - this.paymentLink = paymentLink; - } - - @JsonIgnore - public WhatsAppPaymentSettingsPaymentLinkPaymentLink getPaymentLink() { - return paymentLink.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_PAYMENT_LINK) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue paymentLink() { - return paymentLink; - } - - @JsonIgnore - public String getUri() { - if (null == paymentLink || !paymentLink.isPresent() || null == paymentLink.get().getUri()) { - return null; - } - return paymentLink.get().getUri(); - } - - public OptionalValue uri() { - return null != paymentLink && paymentLink.isPresent() - ? paymentLink - .map(f -> ((WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl) f).uri()) - .orElse(OptionalValue.empty()) - : OptionalValue.empty(); - } - - /** Return true if this WhatsAppPaymentSettingsPaymentLink object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderDetailsPaymentSettingsPaymentLinkImpl whatsAppPaymentSettingsPaymentLink = - (OrderDetailsPaymentSettingsPaymentLinkImpl) o; - return Objects.equals(this.paymentLink, whatsAppPaymentSettingsPaymentLink.paymentLink); - } - - @Override - public int hashCode() { - return Objects.hash(paymentLink); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderDetailsPaymentSettingsPaymentLinkImpl {\n"); - sb.append(" paymentLink: ").append(toIndentedString(paymentLink)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements OrderDetailsPaymentSettingsPaymentLink.Builder { - OptionalValue paymentLink = - OptionalValue.empty(); - - WhatsAppPaymentSettingsPaymentLinkPaymentLink.Builder _delegatedBuilder = null; - - @JsonProperty(value = JSON_PROPERTY_PAYMENT_LINK, required = true) - public Builder setPaymentLink(WhatsAppPaymentSettingsPaymentLinkPaymentLink paymentLink) { - this.paymentLink = OptionalValue.of(paymentLink); - return this; - } - - @JsonIgnore - public Builder setUri(String uri) { - getDelegatedBuilder().setUri(uri); - return this; - } - - private WhatsAppPaymentSettingsPaymentLinkPaymentLink.Builder getDelegatedBuilder() { - if (null == _delegatedBuilder) { - this._delegatedBuilder = WhatsAppPaymentSettingsPaymentLinkPaymentLink.builder(); - } - return this._delegatedBuilder; - } - - public OrderDetailsPaymentSettingsPaymentLink build() { - // delegated builder was used: filling the related source of delegation field - if (null != this._delegatedBuilder) { - this.paymentLink = OptionalValue.of(this._delegatedBuilder.build()); - } - return new OrderDetailsPaymentSettingsPaymentLinkImpl(paymentLink); - } - } - - public static class DelegatedSerializer - extends JsonSerializer> { - @Override - public void serialize( - OptionalValue value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException { - - if (!value.isPresent()) { - return; - } - OrderDetailsPaymentSettingsPaymentLinkImpl impl = - (OrderDetailsPaymentSettingsPaymentLinkImpl) value.get(); - jgen.writeObject(null != impl ? impl.getPaymentLink() : null); - } - } - - public static class DelegatedDeSerializer - extends JsonDeserializer { - @Override - public OrderDetailsPaymentSettingsPaymentLink deserialize( - JsonParser jp, DeserializationContext ctxt) throws IOException { - - OrderDetailsPaymentSettingsPaymentLinkImpl.Builder builder = - new OrderDetailsPaymentSettingsPaymentLinkImpl.Builder(); - WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl deserialized = - jp.readValueAs(WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.class); - builder.setPaymentLink(deserialized); - return builder.build(); - } - } - - public static Optional delegatedConverter( - WhatsAppPaymentSettingsPaymentLinkPaymentLink internal) { - if (null == internal) { - return Optional.empty(); - } - return Optional.of(new Builder().setPaymentLink(internal).build()); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettings.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettings.java deleted file mode 100644 index 4343890a4..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettings.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize( - using = - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl - .WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplDeserializer - .class) -public interface WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettings {} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.java deleted file mode 100644 index 598b71016..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.java +++ /dev/null @@ -1,387 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.MapperFeature; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import com.sinch.sdk.core.models.AbstractOpenApiSchema; -import com.sinch.sdk.core.utils.databind.JSONNavigator; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.OrderDetailsPaymentSettingsBoletoImpl; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.OrderDetailsPaymentSettingsDynamicPixImpl; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.OrderDetailsPaymentSettingsPaymentLinkImpl; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -@JsonDeserialize( - using = - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl - .WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplDeserializer - .class) -@JsonSerialize( - using = - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl - .WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplSerializer - .class) -public class WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl - extends AbstractOpenApiSchema - implements WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettings { - private static final Logger log = - Logger.getLogger( - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.class - .getName()); - - public static final - class WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplSerializer - extends StdSerializer< - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl> { - private static final long serialVersionUID = 1L; - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplSerializer( - Class t) { - super(t); - } - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplSerializer() { - this(null); - } - - @Override - public void serialize( - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static final - class WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplDeserializer - extends StdDeserializer< - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl> { - - private static final long serialVersionUID = 1L; - - public - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplDeserializer() { - this(WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.class); - } - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImplDeserializer( - Class vc) { - super(vc); - } - - @Override - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl deserialize( - JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - Object deserialized = null; - boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize OrderDetailsPaymentSettingsBoletoImpl - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (OrderDetailsPaymentSettingsBoletoImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Long.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Double.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Boolean.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((OrderDetailsPaymentSettingsBoletoImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((OrderDetailsPaymentSettingsBoletoImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsBoletoImpl.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (OrderDetailsPaymentSettingsBoletoImpl.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (OrderDetailsPaymentSettingsBoletoImpl.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(OrderDetailsPaymentSettingsBoletoImpl.class); - // TODO: there is no validation against JSON schema constraints - // (min, max, enum, pattern...), this does not perform a strict JSON - // validation, which means the 'match' count may be higher than it should be. - match++; - log.log(Level.FINER, "Input data matches schema 'OrderDetailsPaymentSettingsBoletoImpl'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'OrderDetailsPaymentSettingsBoletoImpl'", - e); - } - - // deserialize OrderDetailsPaymentSettingsDynamicPixImpl - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Long.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Double.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Boolean.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (OrderDetailsPaymentSettingsDynamicPixImpl.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(OrderDetailsPaymentSettingsDynamicPixImpl.class); - // TODO: there is no validation against JSON schema constraints - // (min, max, enum, pattern...), this does not perform a strict JSON - // validation, which means the 'match' count may be higher than it should be. - match++; - log.log( - Level.FINER, "Input data matches schema 'OrderDetailsPaymentSettingsDynamicPixImpl'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'OrderDetailsPaymentSettingsDynamicPixImpl'", - e); - } - - // deserialize OrderDetailsPaymentSettingsPaymentLinkImpl - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Long.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Double.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Boolean.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Integer.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Float.class) - || OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (OrderDetailsPaymentSettingsPaymentLinkImpl.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()) - .readValueAs(OrderDetailsPaymentSettingsPaymentLinkImpl.class); - // TODO: there is no validation against JSON schema constraints - // (min, max, enum, pattern...), this does not perform a strict JSON - // validation, which means the 'match' count may be higher than it should be. - match++; - log.log( - Level.FINER, - "Input data matches schema 'OrderDetailsPaymentSettingsPaymentLinkImpl'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'OrderDetailsPaymentSettingsPaymentLinkImpl'", - e); - } - - if (match == 1) { - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl ret = - new WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for" - + " WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl:" - + " %d classes match result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl getNullValue( - DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), - "WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl cannot be" - + " null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl() { - super("oneOf", Boolean.FALSE); - } - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl( - OrderDetailsPaymentSettingsBoletoImpl o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl( - OrderDetailsPaymentSettingsDynamicPixImpl o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl( - OrderDetailsPaymentSettingsPaymentLinkImpl o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "OrderDetailsPaymentSettingsBoletoImpl", OrderDetailsPaymentSettingsBoletoImpl.class); - schemas.put( - "OrderDetailsPaymentSettingsDynamicPixImpl", - OrderDetailsPaymentSettingsDynamicPixImpl.class); - schemas.put( - "OrderDetailsPaymentSettingsPaymentLinkImpl", - OrderDetailsPaymentSettingsPaymentLinkImpl.class); - JSONNavigator.registerDescendants( - WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.class, - Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return WhatsAppPaymentOrderDetailsChannelSpecificMessagePaymentPaymentSettingsImpl.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: OrderDetailsPaymentSettingsBoletoImpl, - * OrderDetailsPaymentSettingsDynamicPixImpl, OrderDetailsPaymentSettingsPaymentLinkImpl - * - *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a - * composed schema (allOf, anyOf, oneOf). - */ - @Override - public void setActualInstance(Object instance) { - if (JSONNavigator.isInstanceOf( - OrderDetailsPaymentSettingsBoletoImpl.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSONNavigator.isInstanceOf( - OrderDetailsPaymentSettingsDynamicPixImpl.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSONNavigator.isInstanceOf( - OrderDetailsPaymentSettingsPaymentLinkImpl.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be OrderDetailsPaymentSettingsBoletoImpl," - + " OrderDetailsPaymentSettingsDynamicPixImpl," - + " OrderDetailsPaymentSettingsPaymentLinkImpl"); - } - - /** - * Get the actual instance, which can be the following: OrderDetailsPaymentSettingsBoletoImpl, - * OrderDetailsPaymentSettingsDynamicPixImpl, OrderDetailsPaymentSettingsPaymentLinkImpl - * - * @return The actual instance (OrderDetailsPaymentSettingsBoletoImpl, - * OrderDetailsPaymentSettingsDynamicPixImpl, OrderDetailsPaymentSettingsPaymentLinkImpl) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `OrderDetailsPaymentSettingsBoletoImpl`. If the actual instance is - * not `OrderDetailsPaymentSettingsBoletoImpl`, the ClassCastException will be thrown. - * - * @return The actual instance of `OrderDetailsPaymentSettingsBoletoImpl` - * @throws ClassCastException if the instance is not `OrderDetailsPaymentSettingsBoletoImpl` - */ - public OrderDetailsPaymentSettingsBoletoImpl getOrderDetailsPaymentSettingsBoletoImpl() - throws ClassCastException { - return (OrderDetailsPaymentSettingsBoletoImpl) super.getActualInstance(); - } - - /** - * Get the actual instance of `OrderDetailsPaymentSettingsDynamicPixImpl`. If the actual instance - * is not `OrderDetailsPaymentSettingsDynamicPixImpl`, the ClassCastException will be thrown. - * - * @return The actual instance of `OrderDetailsPaymentSettingsDynamicPixImpl` - * @throws ClassCastException if the instance is not `OrderDetailsPaymentSettingsDynamicPixImpl` - */ - public OrderDetailsPaymentSettingsDynamicPixImpl getOrderDetailsPaymentSettingsDynamicPixImpl() - throws ClassCastException { - return (OrderDetailsPaymentSettingsDynamicPixImpl) super.getActualInstance(); - } - - /** - * Get the actual instance of `OrderDetailsPaymentSettingsPaymentLinkImpl`. If the actual instance - * is not `OrderDetailsPaymentSettingsPaymentLinkImpl`, the ClassCastException will be thrown. - * - * @return The actual instance of `OrderDetailsPaymentSettingsPaymentLinkImpl` - * @throws ClassCastException if the instance is not `OrderDetailsPaymentSettingsPaymentLinkImpl` - */ - public OrderDetailsPaymentSettingsPaymentLinkImpl getOrderDetailsPaymentSettingsPaymentLinkImpl() - throws ClassCastException { - return (OrderDetailsPaymentSettingsPaymentLinkImpl) super.getActualInstance(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoleto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoleto.java deleted file mode 100644 index df8582fa4..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoleto.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -/** The Boleto payment settings. */ -@JsonDeserialize(builder = WhatsAppPaymentSettingsBoletoBoletoImpl.Builder.class) -public interface WhatsAppPaymentSettingsBoletoBoleto { - - /** - * The Boleto digitable line which will be copied to the clipboard when the user taps the Boleto - * button. - * - *

Field is required - * - * @return digitableLine - */ - String getDigitableLine(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new WhatsAppPaymentSettingsBoletoBoletoImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param digitableLine see getter - * @return Current builder - * @see #getDigitableLine - */ - Builder setDigitableLine(String digitableLine); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - WhatsAppPaymentSettingsBoletoBoleto build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoletoImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoletoImpl.java deleted file mode 100644 index 1558e8388..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsBoletoBoletoImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import java.util.Objects; - -@JsonPropertyOrder({WhatsAppPaymentSettingsBoletoBoletoImpl.JSON_PROPERTY_DIGITABLE_LINE}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class WhatsAppPaymentSettingsBoletoBoletoImpl - implements WhatsAppPaymentSettingsBoletoBoleto { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_DIGITABLE_LINE = "digitable_line"; - - private OptionalValue digitableLine; - - public WhatsAppPaymentSettingsBoletoBoletoImpl() {} - - protected WhatsAppPaymentSettingsBoletoBoletoImpl(OptionalValue digitableLine) { - this.digitableLine = digitableLine; - } - - @JsonIgnore - public String getDigitableLine() { - return digitableLine.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_DIGITABLE_LINE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue digitableLine() { - return digitableLine; - } - - /** Return true if this WhatsAppPaymentSettingsBoleto_boleto object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WhatsAppPaymentSettingsBoletoBoletoImpl whatsAppPaymentSettingsBoletoBoleto = - (WhatsAppPaymentSettingsBoletoBoletoImpl) o; - return Objects.equals(this.digitableLine, whatsAppPaymentSettingsBoletoBoleto.digitableLine); - } - - @Override - public int hashCode() { - return Objects.hash(digitableLine); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WhatsAppPaymentSettingsBoletoBoletoImpl {\n"); - sb.append(" digitableLine: ").append(toIndentedString(digitableLine)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements WhatsAppPaymentSettingsBoletoBoleto.Builder { - OptionalValue digitableLine = OptionalValue.empty(); - - @JsonProperty(value = JSON_PROPERTY_DIGITABLE_LINE, required = true) - public Builder setDigitableLine(String digitableLine) { - this.digitableLine = OptionalValue.of(digitableLine); - return this; - } - - public WhatsAppPaymentSettingsBoletoBoleto build() { - return new WhatsAppPaymentSettingsBoletoBoletoImpl(digitableLine); - } - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLink.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLink.java deleted file mode 100644 index bdb3b28fa..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLink.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -/** The payment link payment settings. */ -@JsonDeserialize(builder = WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.Builder.class) -public interface WhatsAppPaymentSettingsPaymentLinkPaymentLink { - - /** - * The payment link to be used by the buyer to pay. - * - *

Field is required - * - * @return uri - */ - String getUri(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param uri see getter - * @return Current builder - * @see #getUri - */ - Builder setUri(String uri); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - WhatsAppPaymentSettingsPaymentLinkPaymentLink build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.java deleted file mode 100644 index 8ed3ca51c..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import java.util.Objects; - -@JsonPropertyOrder({WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl.JSON_PROPERTY_URI}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl - implements WhatsAppPaymentSettingsPaymentLinkPaymentLink { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_URI = "uri"; - - private OptionalValue uri; - - public WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl() {} - - protected WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl(OptionalValue uri) { - this.uri = uri; - } - - @JsonIgnore - public String getUri() { - return uri.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_URI) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue uri() { - return uri; - } - - /** Return true if this WhatsAppPaymentSettingsPaymentLink_payment_link object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl - whatsAppPaymentSettingsPaymentLinkPaymentLink = - (WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl) o; - return Objects.equals(this.uri, whatsAppPaymentSettingsPaymentLinkPaymentLink.uri); - } - - @Override - public int hashCode() { - return Objects.hash(uri); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl {\n"); - sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements WhatsAppPaymentSettingsPaymentLinkPaymentLink.Builder { - OptionalValue uri = OptionalValue.empty(); - - @JsonProperty(value = JSON_PROPERTY_URI, required = true) - public Builder setUri(String uri) { - this.uri = OptionalValue.of(uri); - return this; - } - - public WhatsAppPaymentSettingsPaymentLinkPaymentLink build() { - return new WhatsAppPaymentSettingsPaymentLinkPaymentLinkImpl(uri); - } - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPix.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPix.java deleted file mode 100644 index ffb222568..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPix.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Conversation API | Sinch - * - * OpenAPI document version: 1.0 - * Contact: support@sinch.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.sinch.sdk.core.utils.EnumDynamic; -import com.sinch.sdk.core.utils.EnumSupportDynamic; -import java.util.Arrays; -import java.util.stream.Stream; - -/** The dynamic Pix payment settings. */ -@JsonDeserialize(builder = WhatsAppPaymentSettingsPixDynamicPixImpl.Builder.class) -public interface WhatsAppPaymentSettingsPixDynamicPix { - - /** - * The dynamic Pix code to be used by the buyer to pay. - * - *

Field is required - * - * @return code - */ - String getCode(); - - /** - * Account holder name. - * - *

Field is required - * - * @return merchantName - */ - String getMerchantName(); - - /** - * Pix key. - * - *

Field is required - * - * @return key - */ - String getKey(); - - /** Pix key type. */ - public class KeyTypeEnum extends EnumDynamic { - public static final KeyTypeEnum CPF = new KeyTypeEnum("CPF"); - public static final KeyTypeEnum CNPJ = new KeyTypeEnum("CNPJ"); - public static final KeyTypeEnum EMAIL = new KeyTypeEnum("EMAIL"); - public static final KeyTypeEnum PHONE = new KeyTypeEnum("PHONE"); - public static final KeyTypeEnum EVP = new KeyTypeEnum("EVP"); - - private static final EnumSupportDynamic ENUM_SUPPORT = - new EnumSupportDynamic<>( - KeyTypeEnum.class, KeyTypeEnum::new, Arrays.asList(CPF, CNPJ, EMAIL, PHONE, EVP)); - - private KeyTypeEnum(String value) { - super(value); - } - - public static Stream values() { - return ENUM_SUPPORT.values(); - } - - public static KeyTypeEnum from(String value) { - return ENUM_SUPPORT.from(value); - } - - public static String valueOf(KeyTypeEnum e) { - return ENUM_SUPPORT.valueOf(e); - } - } - - /** - * Pix key type. - * - *

Field is required - * - * @return keyType - */ - KeyTypeEnum getKeyType(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new WhatsAppPaymentSettingsPixDynamicPixImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param code see getter - * @return Current builder - * @see #getCode - */ - Builder setCode(String code); - - /** - * see getter - * - * @param merchantName see getter - * @return Current builder - * @see #getMerchantName - */ - Builder setMerchantName(String merchantName); - - /** - * see getter - * - * @param key see getter - * @return Current builder - * @see #getKey - */ - Builder setKey(String key); - - /** - * see getter - * - * @param keyType see getter - * @return Current builder - * @see #getKeyType - */ - Builder setKeyType(KeyTypeEnum keyType); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - WhatsAppPaymentSettingsPixDynamicPix build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPixImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPixImpl.java deleted file mode 100644 index 7c6a219fd..000000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/internal/WhatsAppPaymentSettingsPixDynamicPixImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.internal; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import java.util.Objects; - -@JsonPropertyOrder({ - WhatsAppPaymentSettingsPixDynamicPixImpl.JSON_PROPERTY_CODE, - WhatsAppPaymentSettingsPixDynamicPixImpl.JSON_PROPERTY_MERCHANT_NAME, - WhatsAppPaymentSettingsPixDynamicPixImpl.JSON_PROPERTY_KEY, - WhatsAppPaymentSettingsPixDynamicPixImpl.JSON_PROPERTY_KEY_TYPE -}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class WhatsAppPaymentSettingsPixDynamicPixImpl - implements WhatsAppPaymentSettingsPixDynamicPix { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_CODE = "code"; - - private OptionalValue code; - - public static final String JSON_PROPERTY_MERCHANT_NAME = "merchant_name"; - - private OptionalValue merchantName; - - public static final String JSON_PROPERTY_KEY = "key"; - - private OptionalValue key; - - public static final String JSON_PROPERTY_KEY_TYPE = "key_type"; - - private OptionalValue keyType; - - public WhatsAppPaymentSettingsPixDynamicPixImpl() {} - - protected WhatsAppPaymentSettingsPixDynamicPixImpl( - OptionalValue code, - OptionalValue merchantName, - OptionalValue key, - OptionalValue keyType) { - this.code = code; - this.merchantName = merchantName; - this.key = key; - this.keyType = keyType; - } - - @JsonIgnore - public String getCode() { - return code.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue code() { - return code; - } - - @JsonIgnore - public String getMerchantName() { - return merchantName.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_MERCHANT_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue merchantName() { - return merchantName; - } - - @JsonIgnore - public String getKey() { - return key.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue key() { - return key; - } - - @JsonIgnore - public KeyTypeEnum getKeyType() { - return keyType.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_KEY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue keyType() { - return keyType; - } - - /** Return true if this WhatsAppPaymentSettingsPix_dynamic_pix object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WhatsAppPaymentSettingsPixDynamicPixImpl whatsAppPaymentSettingsPixDynamicPix = - (WhatsAppPaymentSettingsPixDynamicPixImpl) o; - return Objects.equals(this.code, whatsAppPaymentSettingsPixDynamicPix.code) - && Objects.equals(this.merchantName, whatsAppPaymentSettingsPixDynamicPix.merchantName) - && Objects.equals(this.key, whatsAppPaymentSettingsPixDynamicPix.key) - && Objects.equals(this.keyType, whatsAppPaymentSettingsPixDynamicPix.keyType); - } - - @Override - public int hashCode() { - return Objects.hash(code, merchantName, key, keyType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WhatsAppPaymentSettingsPixDynamicPixImpl {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" merchantName: ").append(toIndentedString(merchantName)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements WhatsAppPaymentSettingsPixDynamicPix.Builder { - OptionalValue code = OptionalValue.empty(); - OptionalValue merchantName = OptionalValue.empty(); - OptionalValue key = OptionalValue.empty(); - OptionalValue keyType = OptionalValue.empty(); - - @JsonProperty(value = JSON_PROPERTY_CODE, required = true) - public Builder setCode(String code) { - this.code = OptionalValue.of(code); - return this; - } - - @JsonProperty(value = JSON_PROPERTY_MERCHANT_NAME, required = true) - public Builder setMerchantName(String merchantName) { - this.merchantName = OptionalValue.of(merchantName); - return this; - } - - @JsonProperty(value = JSON_PROPERTY_KEY, required = true) - public Builder setKey(String key) { - this.key = OptionalValue.of(key); - return this; - } - - @JsonProperty(value = JSON_PROPERTY_KEY_TYPE, required = true) - public Builder setKeyType(KeyTypeEnum keyType) { - this.keyType = OptionalValue.of(keyType); - return this; - } - - public WhatsAppPaymentSettingsPixDynamicPix build() { - return new WhatsAppPaymentSettingsPixDynamicPixImpl(code, merchantName, key, keyType); - } - } -} diff --git a/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDtoTest.java b/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDtoTest.java index 08ed744ea..e4a48d2a3 100644 --- a/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDtoTest.java +++ b/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDtoTest.java @@ -53,7 +53,6 @@ public class OrderDetailsDtoTest extends ConversationBaseTest { .setTaxDescription("tax description") .setTaxValue(7000) .build()) - .setPaymentSettings(OrderDetailsSettingsDtoTest.dynamicPix) .setPaymentButtons(Arrays.asList(OrderDetailsPaymentButtonsDtoTest.dynamicPix)) .setReferenceId("a reference ID") .setTotalAmountValue(1200) diff --git a/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDtoTest.java b/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDtoTest.java deleted file mode 100644 index 60a785ef7..000000000 --- a/openapi-contracts/src/test/java/com/sinch/sdk/domains/conversation/models/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDtoTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment; - -import com.adelean.inject.resources.junit.jupiter.GivenTextResource; -import com.adelean.inject.resources.junit.jupiter.TestWithResources; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.sinch.sdk.core.TestHelpers; -import com.sinch.sdk.domains.conversation.api.v1.adapters.ConversationBaseTest; -import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.whatsapp.payment.OrderDetailsPaymentSettingsDynamicPix.KeyTypeEnum; -import org.json.JSONException; -import org.junit.jupiter.api.Test; -import org.skyscreamer.jsonassert.JSONAssert; - -@TestWithResources -public class OrderDetailsSettingsDtoTest extends ConversationBaseTest { - - @GivenTextResource( - "/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDynamicPixDto.json") - static String jsonDynamicPixDto; - - @GivenTextResource( - "/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsPaymentLinkDto.json") - static String jsonPaymentLinkDto; - - @GivenTextResource( - "/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsBoletoDto.json") - static String jsonBoletoDto; - - public static OrderDetailsSettings dynamicPix = - OrderDetailsPaymentSettingsDynamicPix.builder() - .setCode("code value") - .setKey("key value") - .setKeyType(KeyTypeEnum.CNPJ) - .setMerchantName("merchant name") - .build(); - - public static OrderDetailsSettings paymentLink = - OrderDetailsPaymentSettingsPaymentLink.builder() - .setUri("https://payment.link/abc123") - .build(); - - public static OrderDetailsSettings boleto = - OrderDetailsPaymentSettingsBoleto.builder() - .setDigitableLine("00190.00009 01234.567890 12345.678901 7 89010000012345") - .build(); - - @Test - void deserializeDynamicPix() throws JsonProcessingException { - Object deserialized = objectMapper.readValue(jsonDynamicPixDto, OrderDetailsSettings.class); - - TestHelpers.recursiveEquals(deserialized, dynamicPix); - } - - @Test - void serializeDynamicPix() throws JsonProcessingException, JSONException { - String serializedString = objectMapper.writeValueAsString(dynamicPix); - - JSONAssert.assertEquals(jsonDynamicPixDto, serializedString, true); - } - - @Test - void deserializePaymentLink() throws JsonProcessingException { - Object deserialized = objectMapper.readValue(jsonPaymentLinkDto, OrderDetailsSettings.class); - - TestHelpers.recursiveEquals(deserialized, paymentLink); - } - - @Test - void serializePaymentLink() throws JsonProcessingException, JSONException { - String serializedString = objectMapper.writeValueAsString(paymentLink); - - JSONAssert.assertEquals(jsonPaymentLinkDto, serializedString, true); - } - - @Test - void deserializeBoleto() throws JsonProcessingException { - Object deserialized = objectMapper.readValue(jsonBoletoDto, OrderDetailsSettings.class); - - TestHelpers.recursiveEquals(deserialized, boleto); - } - - @Test - void serializeBoleto() throws JsonProcessingException, JSONException { - String serializedString = objectMapper.writeValueAsString(boleto); - - JSONAssert.assertEquals(jsonBoletoDto, serializedString, true); - } -} diff --git a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDto.json b/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDto.json index e904a67a5..d71eaa3c8 100644 --- a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDto.json +++ b/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsDto.json @@ -15,14 +15,6 @@ "type": "br", "reference_id": "a reference ID", "type_of_goods": "digital-goods", - "payment_settings": { - "dynamic_pix": { - "code": "code value", - "merchant_name": "merchant name", - "key": "key value", - "key_type": "CNPJ" - } - }, "payment_buttons": [ { "type": "pix_dynamic_code", diff --git a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsBoletoDto.json b/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsBoletoDto.json deleted file mode 100644 index f8833cd89..000000000 --- a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsBoletoDto.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "boleto": { - "digitable_line": "00190.00009 01234.567890 12345.678901 7 89010000012345" - } -} diff --git a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDynamicPixDto.json b/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDynamicPixDto.json deleted file mode 100644 index 3db74d7e6..000000000 --- a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsDynamicPixDto.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dynamic_pix": { - "code": "code value", - "merchant_name": "merchant name", - "key": "key value", - "key_type": "CNPJ" - } -} diff --git a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsPaymentLinkDto.json b/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsPaymentLinkDto.json deleted file mode 100644 index bf1393f62..000000000 --- a/openapi-contracts/src/test/resources/domains/conversation/v1/messages/types/channelspecific/whatsapp/payment/OrderDetailsSettingsPaymentLinkDto.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "payment_link": { - "uri": "https://payment.link/abc123" - } -}