CashTransferMock.eu

Otp

getOTP

obtain OTP plus valid signature

Given the IBAN and the value, the mock returns and OTP and a signature certifying the cash transfer


/cashTransfer

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost/cashTransfer?iban=ES0011112222333344445555&value=20"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OtpApi;

import java.io.File;
import java.util.*;

public class OtpApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        OtpApi apiInstance = new OtpApi();
        String iban = ES0011112222333344445555; // String | IBAN/Account number for the intermediary
        Long value = 20; // Long | amount for the funding

        try {
            OTPResponse result = apiInstance.getOTP(iban, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OtpApi#getOTP");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.OtpApi;

public class OtpApiExample {
    public static void main(String[] args) {
        OtpApi apiInstance = new OtpApi();
        String iban = ES0011112222333344445555; // String | IBAN/Account number for the intermediary
        Long value = 20; // Long | amount for the funding

        try {
            OTPResponse result = apiInstance.getOTP(iban, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OtpApi#getOTP");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OtpApi *apiInstance = [[OtpApi alloc] init];
String *iban = ES0011112222333344445555; // IBAN/Account number for the intermediary (default to null)
Long *value = 20; // amount for the funding (default to null)

// obtain OTP plus valid signature
[apiInstance getOTPWith:iban
    value:value
              completionHandler: ^(OTPResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var CashTransferMockEu = require('cash_transfer_mock_eu');

// Create an instance of the API class
var api = new CashTransferMockEu.OtpApi()
var iban = ES0011112222333344445555; // {String} IBAN/Account number for the intermediary
var value = 20; // {Long} amount for the funding

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOTP(iban, value, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getOTPExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new OtpApi();
            var iban = ES0011112222333344445555;  // String | IBAN/Account number for the intermediary (default to null)
            var value = 20;  // Long | amount for the funding (default to null)

            try {
                // obtain OTP plus valid signature
                OTPResponse result = apiInstance.getOTP(iban, value);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OtpApi.getOTP: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OtpApi();
$iban = ES0011112222333344445555; // String | IBAN/Account number for the intermediary
$value = 20; // Long | amount for the funding

try {
    $result = $api_instance->getOTP($iban, $value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OtpApi->getOTP: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::OtpApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OtpApi->new();
my $iban = ES0011112222333344445555; # String | IBAN/Account number for the intermediary
my $value = 20; # Long | amount for the funding

eval {
    my $result = $api_instance->getOTP(iban => $iban, value => $value);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OtpApi->getOTP: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.OtpApi()
iban = ES0011112222333344445555 # String | IBAN/Account number for the intermediary (default to null)
value = 20 # Long | amount for the funding (default to null)

try:
    # obtain OTP plus valid signature
    api_response = api_instance.get_otp(iban, value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OtpApi->getOTP: %s\n" % e)
extern crate OtpApi;

pub fn main() {
    let iban = ES0011112222333344445555; // String
    let value = 20; // Long

    let mut context = OtpApi::Context::default();
    let result = client.getOTP(iban, value, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
iban*
String
IBAN/Account number for the intermediary
Required
value*
Long (int64)
amount for the funding
Required

Responses