Skip to content

Latest commit

 

History

History
682 lines (467 loc) · 20.7 KB

File metadata and controls

682 lines (467 loc) · 20.7 KB

bind_api.api.UserApi

Load the API package

import 'package:bind_api/api.dart';

All URIs are relative to https://api.thebind.uk/v1

Method HTTP request Description
checkKYCDocumentStatus POST /user/kyc/document_status/ Check KYC document status
checkKYCFileStatus POST /user/kyc/check_file/ Check KYC file status
checkKYCRequestApproval GET /users/kyc/requests/approval/ Get status of KYC Request approval
checkKYCStatus POST /user/kyc/check/ Send KYC to check
checkPasscode POST /users/check/passcode/ Check validity of user passcode
createKYCFile POST /user/kyc/file/ CreateKYCFile
createKYCFile_0 GET /user/kyc/create_file/ Create KYC file
createKYCRequest POST /user/kyc/requests/ Create KYC Request
getKYCDocumentUID GET /user/kyc/document_uid/ Get KYC Document UID
getKYCFile GET /user/kyc/file/ GetKYCFile
getUserPaymentCurrency GET /users/payment_currency/ Get user payment currency
moveKYCRequest POST /users/kyc/requests/approval/ Move KYCRequest to approval
qRCodeGenerateCustomString POST /users/generate/custom_qr_code/ Generate QR code with custom string
updateUser PATCH /users/{userID}/ Update user
updateUserPasscode PATCH /users/change_passcode/{userID}/ Update user passcode

checkKYCDocumentStatus

CheckKYCDocumentStatus200Response checkKYCDocumentStatus(kYCDocumentStatusRequest)

Check KYC document status

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final KYCDocumentStatusRequest kYCDocumentStatusRequest = ; // KYCDocumentStatusRequest | 

try {
    final response = api.checkKYCDocumentStatus(kYCDocumentStatusRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->checkKYCDocumentStatus: $e\n');
}

Parameters

Name Type Description Notes
kYCDocumentStatusRequest KYCDocumentStatusRequest [optional]

Return type

CheckKYCDocumentStatus200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

checkKYCFileStatus

CheckKYCFileStatus200Response checkKYCFileStatus(createKYCFile200Response)

Check KYC file status

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final CreateKYCFile200Response createKYCFile200Response = ; // CreateKYCFile200Response | 

try {
    final response = api.checkKYCFileStatus(createKYCFile200Response);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->checkKYCFileStatus: $e\n');
}

Parameters

Name Type Description Notes
createKYCFile200Response CreateKYCFile200Response [optional]

Return type

CheckKYCFileStatus200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

checkKYCRequestApproval

KYCRequestStatus checkKYCRequestApproval()

Get status of KYC Request approval

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.checkKYCRequestApproval();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->checkKYCRequestApproval: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

KYCRequestStatus

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

checkKYCStatus

checkKYCStatus(checkKYCStatusRequest)

Send KYC to check

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final CheckKYCStatusRequest checkKYCStatusRequest = ; // CheckKYCStatusRequest | 

try {
    api.checkKYCStatus(checkKYCStatusRequest);
} catch on DioError (e) {
    print('Exception when calling UserApi->checkKYCStatus: $e\n');
}

Parameters

Name Type Description Notes
checkKYCStatusRequest CheckKYCStatusRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

checkPasscode

bool checkPasscode(checkPasscodeRequest)

Check validity of user passcode

A method to check passcode of a currency User

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final CheckPasscodeRequest checkPasscodeRequest = ; // CheckPasscodeRequest | 

try {
    final response = api.checkPasscode(checkPasscodeRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->checkPasscode: $e\n');
}

Parameters

Name Type Description Notes
checkPasscodeRequest CheckPasscodeRequest [optional]

Return type

bool

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createKYCFile

KYCFile createKYCFile()

CreateKYCFile

Create a new KYC file for current User

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.createKYCFile();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->createKYCFile: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

KYCFile

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createKYCFile_0

CreateKYCFile200Response createKYCFile_0()

Create KYC file

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.createKYCFile_0();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->createKYCFile_0: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

CreateKYCFile200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createKYCRequest

createKYCRequest(selfie, passportScan, idScanFront, idScanBack)

Create KYC Request

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final MultipartFile selfie = BINARY_DATA_HERE; // MultipartFile | 
final MultipartFile passportScan = BINARY_DATA_HERE; // MultipartFile | 
final MultipartFile idScanFront = BINARY_DATA_HERE; // MultipartFile | 
final MultipartFile idScanBack = BINARY_DATA_HERE; // MultipartFile | 

try {
    api.createKYCRequest(selfie, passportScan, idScanFront, idScanBack);
} catch on DioError (e) {
    print('Exception when calling UserApi->createKYCRequest: $e\n');
}

Parameters

Name Type Description Notes
selfie MultipartFile [optional]
passportScan MultipartFile [optional]
idScanFront MultipartFile [optional]
idScanBack MultipartFile [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getKYCDocumentUID

GetKYCDocumentUID200Response getKYCDocumentUID()

Get KYC Document UID

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.getKYCDocumentUID();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->getKYCDocumentUID: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

GetKYCDocumentUID200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getKYCFile

KYCFile getKYCFile()

GetKYCFile

get latest KYC file for current User

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.getKYCFile();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->getKYCFile: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

KYCFile

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserPaymentCurrency

Currency getUserPaymentCurrency()

Get user payment currency

A dedicated method to get User’s payment currency with additional fields from Currency table

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.getUserPaymentCurrency();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->getUserPaymentCurrency: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

Currency

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

moveKYCRequest

KYCRequestMoveResult moveKYCRequest()

Move KYCRequest to approval

Move KYC Request with priorly uploaded data to approval

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();

try {
    final response = api.moveKYCRequest();
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->moveKYCRequest: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

KYCRequestMoveResult

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

qRCodeGenerateCustomString

Uint8List qRCodeGenerateCustomString(qRCodeGenerateCustomStringRequest)

Generate QR code with custom string

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final QRCodeGenerateCustomStringRequest qRCodeGenerateCustomStringRequest = ; // QRCodeGenerateCustomStringRequest | 

try {
    final response = api.qRCodeGenerateCustomString(qRCodeGenerateCustomStringRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->qRCodeGenerateCustomString: $e\n');
}

Parameters

Name Type Description Notes
qRCodeGenerateCustomStringRequest QRCodeGenerateCustomStringRequest [optional]

Return type

Uint8List

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: image/png, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser

User updateUser(userID, user)

Update user

This method allows to change or initially set some fields from WhoAmI method: email, first_name, last_name, middle_name, kyc_status, phone_number, passcode (To be removed), country, payment_currency, refund_currency Fields can be changed in a batch or separately. Method can work with a subset of possible arguments. Authenticated User can change only himself. Calling a method with user_id of a different User will cause NotAllowed exception.

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final String userID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final User user = ; // User | 

try {
    final response = api.updateUser(userID, user);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->updateUser: $e\n');
}

Parameters

Name Type Description Notes
userID String
user User [optional]

Return type

User

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUserPasscode

User updateUserPasscode(userID, updateUserPasscodeRequest)

Update user passcode

A separate method to change User’s passcode

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getUserApi();
final String userID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 
final UpdateUserPasscodeRequest updateUserPasscodeRequest = ; // UpdateUserPasscodeRequest | 

try {
    final response = api.updateUserPasscode(userID, updateUserPasscodeRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling UserApi->updateUserPasscode: $e\n');
}

Parameters

Name Type Description Notes
userID String
updateUserPasscodeRequest UpdateUserPasscodeRequest [optional]

Return type

User

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]