Skip to content

Commit

Permalink
Merge pull request #856 from drocek/feature/CF-569_allowed_to_create_…
Browse files Browse the repository at this point in the history
…voice_call_provider_as_extension

CF-569: Allowed to create voice call provider as extension
  • Loading branch information
generalbytes authored Nov 7, 2023
2 parents 620f92a + 5fc9ff7 commit 505fcfb
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 26 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# buildscript - project id
projectGroup=com.generalbytes.batm.public
projectVersion=1.2.0
projectVersion=1.2.1

# buildscript - common dependency versions
bitrafaelVersion=1.0.44
Expand Down
50 changes: 26 additions & 24 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-base" version="2.12.0">
<artifact name="jackson-base-2.12.0.pom">
<sha256 value="145cf8abce581cec4993f90175ef2eb8edc465a5c2100b5a637ed7bbd1da53e5" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-base-2.12.0.pom">
<sha256 value="145cf8abce581cec4993f90175ef2eb8edc465a5c2100b5a637ed7bbd1da53e5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-bom" version="2.12.0">
<artifact name="jackson-bom-2.12.0.pom">
Expand Down Expand Up @@ -74,11 +74,6 @@
<sha256 value="35ba920affa5b6c330d5845fc8e59c851bf7e7968d55a4ea7cd44de79081d5cd" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.datatype" name="jackson-datatypes-collections" version="2.12.0">
<artifact name="jackson-datatypes-collections-2.12.0.pom">
<sha256 value="8b7775f572a36a27a56803545733f31f42f88e6e7411a8da3c7fda3d3d705c7e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.datatype" name="jackson-datatype-guava" version="2.12.0">
<artifact name="jackson-datatype-guava-2.12.0.jar">
<sha256 value="484a53b30466d3eb2ac95de3e3fd1e6c060e1629f907140fa1aeadd153caee2b" origin="Generated by Gradle"/>
Expand All @@ -103,6 +98,11 @@
<sha256 value="0e86803f0aad2794010de92a995af8d1c4a43b002e56f5859fdb08dd6bfb7e4d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.datatype" name="jackson-datatypes-collections" version="2.12.0">
<artifact name="jackson-datatypes-collections-2.12.0.pom">
<sha256 value="8b7775f572a36a27a56803545733f31f42f88e6e7411a8da3c7fda3d3d705c7e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.jaxrs" name="jackson-jaxrs-base" version="2.12.0">
<artifact name="jackson-jaxrs-base-2.12.0.jar">
<sha256 value="9f524c13234447cf4ccb2708dfb8337fb6bacb918307047ca7aa9f226d6e8e5f" origin="Generated by Gradle"/>
Expand All @@ -111,11 +111,6 @@
<sha256 value="f46df1094708f5f3ce3d2f1262cc745f100d160ecc3b8051bf0f7f21ff2504dd" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.jaxrs" name="jackson-jaxrs-providers" version="2.12.0">
<artifact name="jackson-jaxrs-providers-2.12.0.pom">
<sha256 value="dea16d396006d10877bc35e2a0a09c5363b823e4128da357c6618569678f3fb2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.jaxrs" name="jackson-jaxrs-json-provider" version="2.12.0">
<artifact name="jackson-jaxrs-json-provider-2.12.0.jar">
<sha256 value="7bcf0f909304403ff08f2373a0a1ebe0a80d4db5d0e702ed388074a3887d23e1" origin="Generated by Gradle"/>
Expand All @@ -124,15 +119,10 @@
<sha256 value="4b25e14c6bd710fccb87dab5c648966b2f1457feee3d26ce284fb8667095b605" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-modules-base" version="2.12.0">
<artifact name="jackson-modules-base-2.12.0.pom">
<sha256 value="5e3e8b4568b4d058e5d1f8e68eb0e190541a3d8a8537dfc45f1a7af40f91e057" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-modules-java8" version="2.12.0">
<artifact name="jackson-modules-java8-2.12.0.pom">
<sha256 value="f4473079941288f100f4ad38effadf34cb76229cc73728492c8b7bd2bc0b179e" origin="Generated by Gradle"/>
</artifact>
<component group="com.fasterxml.jackson.jaxrs" name="jackson-jaxrs-providers" version="2.12.0">
<artifact name="jackson-jaxrs-providers-2.12.0.pom">
<sha256 value="dea16d396006d10877bc35e2a0a09c5363b823e4128da357c6618569678f3fb2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-module-jaxb-annotations" version="2.12.0">
<artifact name="jackson-module-jaxb-annotations-2.12.0.jar">
Expand All @@ -142,6 +132,16 @@
<sha256 value="89552c18387b668300555fec92f4d9adbffe3047b4b51ca706055598c427ba42" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-modules-base" version="2.12.0">
<artifact name="jackson-modules-base-2.12.0.pom">
<sha256 value="5e3e8b4568b4d058e5d1f8e68eb0e190541a3d8a8537dfc45f1a7af40f91e057" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-modules-java8" version="2.12.0">
<artifact name="jackson-modules-java8-2.12.0.pom">
<sha256 value="f4473079941288f100f4ad38effadf34cb76229cc73728492c8b7bd2bc0b179e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.generalbytes.bitrafael.public" name="bitrafael-client" version="1.0.44">
<artifact name="bitrafael-client-1.0.44.jar">
<sha256 value="1449595b744ea24a32a15220d8abf8aa55249c1f45c27b311a2e031428842385" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1132,7 +1132,9 @@
</component>
<component group="net.java" name="jvnet-parent" version="1">
<artifact name="jvnet-parent-1.pom">
<sha256 value="281440811268e65d9e266b3cc898297e214e04f09740d0386ceeb4a8923d63bf" origin="Generated by Gradle"/>
<sha256 value="281440811268e65d9e266b3cc898297e214e04f09740d0386ceeb4a8923d63bf" origin="Generated by Gradle">
<also-trust value="5b936f6757872c1b901cb821001652eda746e3b6cffef9c434443534a96bfc9a"/>
</sha256>
</artifact>
</component>
<component group="net.java" name="jvnet-parent" version="3">
Expand Down Expand Up @@ -1655,7 +1657,7 @@
</component>
<component group="org.junit" name="junit-bom" version="5.7.1">
<artifact name="junit-bom-5.7.1.module">
<sha256 value="9854e3894d64b2485207e0046bca07b3d42d169e782f4fa8c9ce229a78faee04" origin="Generated by Gradle"/>
<sha256 value="9854e3894d64b2485207e0046bca07b3d42d169e782f4fa8c9ce229a78faee04" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-bom-5.7.1.pom">
<sha256 value="0b9b14a3d62106fafe8c68a717b87b87ad18685899451b753c04fa41b6857784" origin="Generated by Gradle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.generalbytes.batm.server.extensions.aml.verification.IIdentityVerificationProvider;
import com.generalbytes.batm.server.extensions.communication.ICommunicationProvider;
import com.generalbytes.batm.server.extensions.communication.IPhoneLookupProvider;
import com.generalbytes.batm.server.extensions.communication.voicecall.IVoiceCallProvider;
import com.generalbytes.batm.server.extensions.watchlist.IWatchList;

import java.util.Set;
Expand Down Expand Up @@ -127,6 +128,9 @@ public Set<ICommunicationProvider> getCommunicationProviders() {
return null;
}

@Override
public Set<IVoiceCallProvider> getVoiceCallProviders() { return null; }

@Override
public Set<ISsnValidator> getSsnValidators() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.generalbytes.batm.server.extensions.aml.verification.IIdentityVerificationProvider;
import com.generalbytes.batm.server.extensions.communication.ICommunicationProvider;
import com.generalbytes.batm.server.extensions.communication.IPhoneLookupProvider;
import com.generalbytes.batm.server.extensions.communication.voicecall.IVoiceCallProvider;
import com.generalbytes.batm.server.extensions.watchlist.IWatchList;

import java.util.Set;
Expand Down Expand Up @@ -174,11 +175,17 @@ public interface IExtension {
ITransactionScoringProvider createTransactionScoringProvider(String transactionScoringProviderParamValues);

/**
* Optionally returns external communication providers that can be used by server to sending SMS or making voice calls.
* Optionally returns external communication providers that can be used by server to sending SMS.
* @return
*/
Set<ICommunicationProvider> getCommunicationProviders();

/**
* Optionally returns external communication providers that can be used by server to making voice call.
* @return
*/
Set<IVoiceCallProvider> getVoiceCallProviders();

/**
* @return Validators that can be used to validate SSNs
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*************************************************************************************
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/

package com.generalbytes.batm.server.extensions.communication.voicecall;

public interface IVoiceCallErrorResponse {

/**
* Error message.
*/
String getErrorMessage();

/**
* Making of voice call failed due the number is on black list.
*/
boolean isBlacklisted();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*************************************************************************************
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/

package com.generalbytes.batm.server.extensions.communication.voicecall;

/**
* Provider for making voice call.
*/
public interface IVoiceCallProvider {

/**
* Name of the voice call provider.
*/
String getName();

/**
* Make the voice call.
*
* @param credentials Credentials.
* @param phoneNumber Phone number.
* @param message Message.
* @param messageType Type of message.
* @param language Language in ISO 639-1 standard used at terminal.
* @return {@link IVoiceCallResponse}
*/
IVoiceCallResponse makeVoiceCall(String credentials, String phoneNumber, String message, MessageType messageType, String language);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*************************************************************************************
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/

package com.generalbytes.batm.server.extensions.communication.voicecall;

public interface IVoiceCallResponse {

enum ResponseStatus {
OK,
ERROR
}

/**
* ID of voice call.
*/
String getSid();

/**
* Response status [OK, ERROR].
*/
ResponseStatus getStatus();

/**
* Error information.
*/
IVoiceCallErrorResponse getErrorResponse();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*************************************************************************************
* Copyright (C) 2014-2023 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/

package com.generalbytes.batm.server.extensions.communication.voicecall;

public enum MessageType {
MESSAGE,
OTP
}

0 comments on commit 505fcfb

Please sign in to comment.