Skip to content

Commit

Permalink
build: Bump SDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Jul 12, 2024
1 parent 0b8f84a commit 4360512
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.vonage</groupId>
<artifactId>server-sdk-kotlin</artifactId>
<version>0.4.0</version>
<version>0.3.1</version>

<packaging>jar</packaging>
<name>Vonage Kotlin Server SDK</name>
Expand Down Expand Up @@ -53,13 +53,13 @@
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<artifactId>kotlin-stdlib</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.vonage</groupId>
<artifactId>server-sdk</artifactId>
<version>8.9.1</version>
<version>8.9.2</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down
10 changes: 6 additions & 4 deletions src/main/kotlin/com/vonage/client/kt/Conversion.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion src/test/kotlin/com/vonage/client/kt/AbstractTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4360512

Please sign in to comment.