From 43605121ad443934eedff4acfe5d957a865512e3 Mon Sep 17 00:00:00 2001 From: Sina Madani Date: Fri, 12 Jul 2024 13:43:07 +0100 Subject: [PATCH] build: Bump SDK version --- CHANGELOG.md | 7 +++---- pom.xml | 6 +++--- src/main/kotlin/com/vonage/client/kt/Conversion.kt | 10 ++++++---- src/test/kotlin/com/vonage/client/kt/AbstractTest.kt | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55b25f7..a6e8aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [0.4.0] - 2024-07-?? - -### Added -- TODO +## [0.3.1] - 2024-07-12 +### Changed +- Upgraded Java SDK version to 8.9.2 ## [0.3.0] - 2024-07-08 diff --git a/pom.xml b/pom.xml index 26df024..e191b27 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.vonage server-sdk-kotlin - 0.4.0 + 0.3.1 jar Vonage Kotlin Server SDK @@ -53,13 +53,13 @@ org.jetbrains.kotlin - kotlin-stdlib-jdk8 + kotlin-stdlib 2.0.0 com.vonage server-sdk - 8.9.1 + 8.9.2 org.jetbrains.kotlin diff --git a/src/main/kotlin/com/vonage/client/kt/Conversion.kt b/src/main/kotlin/com/vonage/client/kt/Conversion.kt index 4be1be8..42c9dbf 100644 --- a/src/main/kotlin/com/vonage/client/kt/Conversion.kt +++ b/src/main/kotlin/com/vonage/client/kt/Conversion.kt @@ -6,12 +6,14 @@ import java.util.* class Conversion(private val conversionClient: ConversionClient) { - private fun convert(type: ConversionRequest.Type, messageId: String, delivered: Boolean, timestamp: Instant) = - conversionClient.submitConversion(type, messageId, delivered, Date.from(timestamp)) + private fun convert(type: ConversionRequest.Type, messageId: String, delivered: Boolean, timestamp: Instant?) = + conversionClient.submitConversion(type, messageId, delivered, + if (timestamp != null) Date.from(timestamp) else null + ) - fun convertSms(messageId: String, delivered: Boolean, timestamp: Instant = Instant.now()) = + fun convertSms(messageId: String, delivered: Boolean, timestamp: Instant? = null) = convert(ConversionRequest.Type.SMS, messageId, delivered, timestamp) - fun convertVoice(callId: String, delivered: Boolean, timestamp: Instant = Instant.now()) = + fun convertVoice(callId: String, delivered: Boolean, timestamp: Instant? = null) = convert(ConversionRequest.Type.VOICE, callId, delivered, timestamp) } diff --git a/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt b/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt index 33b6ffd..dcfb9a4 100644 --- a/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt +++ b/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt @@ -141,7 +141,7 @@ abstract class AbstractTest { val authHeaderName = "Authorization" when (authType) { AuthType.JWT -> headers contains authHeaderName like - "Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiUlMyNTYifQ(\\..+){2}" + "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9(\\..+){2}" AuthType.API_KEY_SECRET_HEADER -> headers contains authHeaderName equalTo "Basic $apiKeySecretEncoded"