|
|
@ -20,296 +20,6 @@ import io.reactivex.Observable; |
|
|
|
|
|
|
|
public class ExchangeRateV2Gateway extends PrivilegedGateway implements ExchangeRateV2InteractorInterface.ExchangeRateV2GatewayInterface { |
|
|
|
|
|
|
|
String mockedResponseString ="{\n" + |
|
|
|
"\"ErrorCode\": \"0\",\n" + |
|
|
|
"\"Msg\": \"Success\",\n" + |
|
|
|
"\"Id\": \"null\",\n" + |
|
|
|
"\"Data\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Bangladesh\",\n" + |
|
|
|
"\"countryCode\": \"BD\",\n" + |
|
|
|
"\"countryId\": \"16\",\n" + |
|
|
|
"\"currency\": \"BDT\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"13\",\n" + |
|
|
|
"\"text\": \"Mobile Wallet\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Myanmar\",\n" + |
|
|
|
"\"countryCode\": \"MM\",\n" + |
|
|
|
"\"countryId\": \"33\",\n" + |
|
|
|
"\"currency\": \"MMK\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Cambodia\",\n" + |
|
|
|
"\"countryCode\": \"KH\",\n" + |
|
|
|
"\"countryId\": \"36\",\n" + |
|
|
|
"\"currency\": \"USD\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"13\",\n" + |
|
|
|
"\"text\": \"Mobile Wallet\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Sri Lanka\",\n" + |
|
|
|
"\"countryCode\": \"LK\",\n" + |
|
|
|
"\"countryId\": \"42\",\n" + |
|
|
|
"\"currency\": \"LKR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Sri Lanka\",\n" + |
|
|
|
"\"countryCode\": \"LK\",\n" + |
|
|
|
"\"countryId\": \"42\",\n" + |
|
|
|
"\"currency\": \"USD\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"India\",\n" + |
|
|
|
"\"countryCode\": \"IN\",\n" + |
|
|
|
"\"countryId\": \"104\",\n" + |
|
|
|
"\"currency\": \"INR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Indonesia\",\n" + |
|
|
|
"\"countryCode\": \"ID\",\n" + |
|
|
|
"\"countryId\": \"105\",\n" + |
|
|
|
"\"currency\": \"IDR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Malaysia\",\n" + |
|
|
|
"\"countryCode\": \"MY\",\n" + |
|
|
|
"\"countryId\": \"133\",\n" + |
|
|
|
"\"currency\": \"MYR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Nepal\",\n" + |
|
|
|
"\"countryCode\": \"NP\",\n" + |
|
|
|
"\"countryId\": \"151\",\n" + |
|
|
|
"\"currency\": \"NPR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Pakistan\",\n" + |
|
|
|
"\"countryCode\": \"PK\",\n" + |
|
|
|
"\"countryId\": \"169\",\n" + |
|
|
|
"\"currency\": \"PKR\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"13\",\n" + |
|
|
|
"\"text\": \"Mobile Wallet\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Philippines\",\n" + |
|
|
|
"\"countryCode\": \"PH\",\n" + |
|
|
|
"\"countryId\": \"174\",\n" + |
|
|
|
"\"currency\": \"PHP\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Russian Federation\",\n" + |
|
|
|
"\"countryCode\": \"RU\",\n" + |
|
|
|
"\"countryId\": \"184\",\n" + |
|
|
|
"\"currency\": \"RUB\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Singapore\",\n" + |
|
|
|
"\"countryCode\": \"SG\",\n" + |
|
|
|
"\"countryId\": \"201\",\n" + |
|
|
|
"\"currency\": \"SGD\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Vietnam\",\n" + |
|
|
|
"\"countryCode\": \"VN\",\n" + |
|
|
|
"\"countryId\": \"203\",\n" + |
|
|
|
"\"currency\": \"VND\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"12\",\n" + |
|
|
|
"\"text\": \"Home Delivery\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Vietnam\",\n" + |
|
|
|
"\"countryCode\": \"VN\",\n" + |
|
|
|
"\"countryId\": \"203\",\n" + |
|
|
|
"\"currency\": \"USD\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"1\",\n" + |
|
|
|
"\"text\": \"Cash Payment\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"12\",\n" + |
|
|
|
"\"text\": \"Home Delivery\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"},\n" + |
|
|
|
"{\n" + |
|
|
|
"\"country\": \"Thailand\",\n" + |
|
|
|
"\"countryCode\": \"TH\",\n" + |
|
|
|
"\"countryId\": \"218\",\n" + |
|
|
|
"\"currency\": \"THB\",\n" + |
|
|
|
"\"serviceAvailable\": [\n" + |
|
|
|
"{\n" + |
|
|
|
"\"id\": \"2\",\n" + |
|
|
|
"\"text\": \"Bank Deposit\",\n" + |
|
|
|
"\"description\": \"1 Business Day\"\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"}\n" + |
|
|
|
"]\n" + |
|
|
|
"}"; |
|
|
|
|
|
|
|
String mockedSeedValueListString="{\n" + |
|
|
|
" \"data\":\n" + |
|
|
@ -359,10 +69,6 @@ public class ExchangeRateV2Gateway extends PrivilegedGateway implements Exchange |
|
|
|
// return Observable.just(mockedResponse); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getNativeCountry() { |
|
|
|
return "NP"; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Observable<List<CountryPaymentServiceSeedValueModel>> getAllSeedVAlues() { |
|
|
|