cedricziel/bondora-openapi-php

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Bondora API version 1

dev-master 2020-01-04 14:25 UTC

This package is auto-updated.

Last update: 2021-10-04 18:21:15 UTC


README

Bondora API version 1

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit https://www.bondora.com

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/cedricziel/bondora-openapi-php.git"
    }
  ],
  "require": {
    "cedricziel/bondora-openapi-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/Bondora OpenAPI PHP Client/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: oauth2
$config = CedricZiel\OpenAPI\BondoraPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new CedricZiel\OpenAPI\BondoraPHP\Api\AccountApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$requestLoanIssuedDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Loan issued start date from
$requestLoanIssuedDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Loan issued start date to
$requestPrincipalMin = 3.4; // double | Remaining principal amount min
$requestPrincipalMax = 3.4; // double | Remaining principal amount max
$requestInterestMin = 3.4; // double | Interest rate min
$requestInterestMax = 3.4; // double | Interest rate max
$requestLengthMax = 56; // int | Loan lenght min
$requestLengthMin = 56; // int | Loan lenght max
$requestLatePrincipalAmountMin = 3.4; // double | Principal debt amount min
$requestLatePrincipalAmountMax = 3.4; // double | Principal debt amount max
$requestDebtOccuredOnFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Principal debt started date from
$requestDebtOccuredOnTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Principal debt started date to
$requestDebtOccuredOnForSecondaryFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Interest debt started date from
$requestDebtOccuredOnForSecondaryTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Interest debt started date to
$requestDefaultedDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Defaulted date from
$requestDefaultedDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Defaulted date to
$requestRescheduledFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Defaulted date from
$requestRescheduledTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Defaulted date to
$requestSoldDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | When it was sold on Secondary market from
$requestSoldDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | When it was sold on Secondary market to
$requestPurchaseDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | When you received the investment Auctions/Secondary market from
$requestPurchaseDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | When you received the investment Auctions/Secondary market to
$requestNextPaymentDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Next payment date to
$requestNextPaymentDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Next payment date from
$requestLastPaymentDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Last payment date from
$requestLastPaymentDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Last payment date to
$requestCountries = array('requestCountries_example'); // string[] | Two letter iso code for country of origin: EE, ES, FI
$requestRatings = array('requestRatings_example'); // string[] | Bondora's rating: AA, A, B, C, D, E, F, HR
$requestCreditScoreMin = 56; // int | Minimum credit score
$requestCreditScoreMax = 56; // int | Maximum credit score
$requestUserName = 'requestUserName_example'; // string | Borrower's username
$requestLoanStatusCode = array(56); // int[] | Loan status code              <para>0 Reserved</para><para>2 Current</para><para>3 Cancelled</para><para>100 Overdue</para><para>5 60+ days overdue</para><para>4 Repaid</para><para>8 Released</para>
$requestIncomeVerificationStatus = 56; // int | Income verification type
$requestLoanDebtManagementStage = 56; // int | Latest debt management stage
$requestLoanDebtManagementStageType = 56; // int | Latest debt management stage type
$requestLoanDebtManagementDateActiveFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Latest debt management date active from
$requestLoanDebtManagementDateActiveTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Latest debt management date active to
$requestAuctionBidType = 56; // int | Auction bid type
$requestSalesStatus = 56; // int | Second market sale status              <para>NULL All active</para><para>0 Bought investments</para><para>1 Sold investments</para><para>2 Investment is on sale</para><para>3 Investment is not on sale</para>
$requestIsInRepayment = True; // bool | Search only active in repayment loans, StatusCodes (2, 5, 100)
$requestPageSize = 56; // int | Max items in result, up to 50000
$requestPageNr = 56; // int | Result page nr

try {
    $result = $apiInstance->accountGetActive($requestLoanIssuedDateFrom, $requestLoanIssuedDateTo, $requestPrincipalMin, $requestPrincipalMax, $requestInterestMin, $requestInterestMax, $requestLengthMax, $requestLengthMin, $requestLatePrincipalAmountMin, $requestLatePrincipalAmountMax, $requestDebtOccuredOnFrom, $requestDebtOccuredOnTo, $requestDebtOccuredOnForSecondaryFrom, $requestDebtOccuredOnForSecondaryTo, $requestDefaultedDateFrom, $requestDefaultedDateTo, $requestRescheduledFrom, $requestRescheduledTo, $requestSoldDateFrom, $requestSoldDateTo, $requestPurchaseDateFrom, $requestPurchaseDateTo, $requestNextPaymentDateTo, $requestNextPaymentDateFrom, $requestLastPaymentDateFrom, $requestLastPaymentDateTo, $requestCountries, $requestRatings, $requestCreditScoreMin, $requestCreditScoreMax, $requestUserName, $requestLoanStatusCode, $requestIncomeVerificationStatus, $requestLoanDebtManagementStage, $requestLoanDebtManagementStageType, $requestLoanDebtManagementDateActiveFrom, $requestLoanDebtManagementDateActiveTo, $requestAuctionBidType, $requestSalesStatus, $requestIsInRepayment, $requestPageSize, $requestPageNr);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->accountGetActive: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://api.bondora.com

Class Method HTTP request Description
AccountApi accountGetActive GET /api/v1/account/investments Gets list of your investments
AccountApi accountGetBalance GET /api/v1/account/balance Gets your account balance information
AccountApi accountGetEventLog GET /api/v1/eventlog Gets events that have been made with this application (related to current access token)
AuctionApi auctionGet GET /api/v1/auction/{id} Gets Auction info by auction identifier
AuctionApi auctionGetActive GET /api/v1/auctions Gets list of active Auctions
BidApi bidCancelBid POST /api/v1/bid/{id}/cancel Cancel the Bid
BidApi bidGetBid GET /api/v1/bid/{id} Get the Bid
BidApi bidGetBidSummaries GET /api/v1/bids Gets list of bids the investor has made.
BidApi bidMakeBids POST /api/v1/bid Makes bid(s) into specified auction(s).
ReportApi reportGenerateReport POST /api/v1/report Request to generate specified report type for set period.
ReportApi reportGetPublicDataset GET /api/v1/publicdataset Provides daily public dataset of all loan data that is not covered by the data protection laws.
ReportApi reportGetReport GET /api/v1/report/{id} Get report data for specified report identificator.
ReportApi reportGetReportList GET /api/v1/reports List of all reports
SecondMarketApi secondMarketBuy POST /api/v1/secondarymarket/buy Buy loans from secondary market.
SecondMarketApi secondMarketCancel POST /api/v1/secondarymarket/{id}/cancel Remove your loans from secondary market.
SecondMarketApi secondMarketCancelMultiple POST /api/v1/secondarymarket/cancel Remove your loans from secondary market.
SecondMarketApi secondMarketGet GET /api/v1/loanpart/{id} Gets LoanPartDetails info by identifier
SecondMarketApi secondMarketGetActive GET /api/v1/secondarymarket Gets list of active secondary market items
SecondMarketApi secondMarketGetItem GET /api/v1/secondarymarket/{id} Get the secondary market item summary
SecondMarketApi secondMarketGetItemList POST /api/v1/secondarymarket/list Get the secondary market item summaries in a list
SecondMarketApi secondMarketGetList POST /api/v1/loanpart/list Gets LoanPartDetails info by identifiers in a list (up to 1000 items).
SecondMarketApi secondMarketSell POST /api/v1/secondarymarket/sell Sell your loans to secondary market.

Documentation For Models

Documentation For Authorization

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.bondora.com/oauth/authorize
  • Scopes:
  • Investments: Get list of user investments
  • BidsRead: Get user bids
  • BidsEdit: Create or cancel bids
  • SmSell: Sell loans in Secondary Market
  • SmBuy: Buy loans from Secondary Market
  • ReportCreate: Allow to create new report(s)
  • ReportRead: Allow to view user's created report items and report details

Author

investor@bondora.com