Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cedricziel/bondora-openapi-php

Generated client for the Bondora API
https://github.com/cedricziel/bondora-openapi-php

bondora openapi php

Last synced: 23 days ago
JSON representation

Generated client for the Bondora API

Awesome Lists containing this project

README

        

# Bondora OpenAPI PHP Client

Bondora API version 1

This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
For more information, please visit [https://www.bondora.com](https://www.bondora.com)

## Requirements

PHP 5.5 and later

## Installation & Usage

### Composer

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```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`:

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

## Tests

To run the unit tests:

```bash
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
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 0 Reserved2 Current3 Cancelled100 Overdue5 60+ days overdue4 Repaid8 Released
$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 NULL All active0 Bought investments1 Sold investments2 Investment is on sale3 Investment is not on sale
$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**](docs/Api/AccountApi.md#accountgetactive) | **GET** /api/v1/account/investments | Gets list of your investments
*AccountApi* | [**accountGetBalance**](docs/Api/AccountApi.md#accountgetbalance) | **GET** /api/v1/account/balance | Gets your account balance information
*AccountApi* | [**accountGetEventLog**](docs/Api/AccountApi.md#accountgeteventlog) | **GET** /api/v1/eventlog | Gets events that have been made with this application (related to current access token)
*AuctionApi* | [**auctionGet**](docs/Api/AuctionApi.md#auctionget) | **GET** /api/v1/auction/{id} | Gets Auction info by auction identifier
*AuctionApi* | [**auctionGetActive**](docs/Api/AuctionApi.md#auctiongetactive) | **GET** /api/v1/auctions | Gets list of active Auctions
*BidApi* | [**bidCancelBid**](docs/Api/BidApi.md#bidcancelbid) | **POST** /api/v1/bid/{id}/cancel | Cancel the Bid
*BidApi* | [**bidGetBid**](docs/Api/BidApi.md#bidgetbid) | **GET** /api/v1/bid/{id} | Get the Bid
*BidApi* | [**bidGetBidSummaries**](docs/Api/BidApi.md#bidgetbidsummaries) | **GET** /api/v1/bids | Gets list of bids the investor has made.
*BidApi* | [**bidMakeBids**](docs/Api/BidApi.md#bidmakebids) | **POST** /api/v1/bid | Makes bid(s) into specified auction(s).
*ReportApi* | [**reportGenerateReport**](docs/Api/ReportApi.md#reportgeneratereport) | **POST** /api/v1/report | Request to generate specified report type for set period.
*ReportApi* | [**reportGetPublicDataset**](docs/Api/ReportApi.md#reportgetpublicdataset) | **GET** /api/v1/publicdataset | Provides daily public dataset of all loan data that is not covered by the data protection laws.
*ReportApi* | [**reportGetReport**](docs/Api/ReportApi.md#reportgetreport) | **GET** /api/v1/report/{id} | Get report data for specified report identificator.
*ReportApi* | [**reportGetReportList**](docs/Api/ReportApi.md#reportgetreportlist) | **GET** /api/v1/reports | List of all reports
*SecondMarketApi* | [**secondMarketBuy**](docs/Api/SecondMarketApi.md#secondmarketbuy) | **POST** /api/v1/secondarymarket/buy | Buy loans from secondary market.
*SecondMarketApi* | [**secondMarketCancel**](docs/Api/SecondMarketApi.md#secondmarketcancel) | **POST** /api/v1/secondarymarket/{id}/cancel | Remove your loans from secondary market.
*SecondMarketApi* | [**secondMarketCancelMultiple**](docs/Api/SecondMarketApi.md#secondmarketcancelmultiple) | **POST** /api/v1/secondarymarket/cancel | Remove your loans from secondary market.
*SecondMarketApi* | [**secondMarketGet**](docs/Api/SecondMarketApi.md#secondmarketget) | **GET** /api/v1/loanpart/{id} | Gets LoanPartDetails info by identifier
*SecondMarketApi* | [**secondMarketGetActive**](docs/Api/SecondMarketApi.md#secondmarketgetactive) | **GET** /api/v1/secondarymarket | Gets list of active secondary market items
*SecondMarketApi* | [**secondMarketGetItem**](docs/Api/SecondMarketApi.md#secondmarketgetitem) | **GET** /api/v1/secondarymarket/{id} | Get the secondary market item summary
*SecondMarketApi* | [**secondMarketGetItemList**](docs/Api/SecondMarketApi.md#secondmarketgetitemlist) | **POST** /api/v1/secondarymarket/list | Get the secondary market item summaries in a list
*SecondMarketApi* | [**secondMarketGetList**](docs/Api/SecondMarketApi.md#secondmarketgetlist) | **POST** /api/v1/loanpart/list | Gets LoanPartDetails info by identifiers in a list (up to 1000 items).
*SecondMarketApi* | [**secondMarketSell**](docs/Api/SecondMarketApi.md#secondmarketsell) | **POST** /api/v1/secondarymarket/sell | Sell your loans to secondary market.

## Documentation For Models

- [ApiBidSummariesRequest](docs/Model/ApiBidSummariesRequest.md)
- [ApiError](docs/Model/ApiError.md)
- [ApiResult](docs/Model/ApiResult.md)
- [ApiResultAuctions](docs/Model/ApiResultAuctions.md)
- [ApiResultBid](docs/Model/ApiResultBid.md)
- [ApiResultBids](docs/Model/ApiResultBids.md)
- [ApiResultCreateReport](docs/Model/ApiResultCreateReport.md)
- [ApiResultEventLog](docs/Model/ApiResultEventLog.md)
- [ApiResultExtendedAuction](docs/Model/ApiResultExtendedAuction.md)
- [ApiResultLoanPartDetails](docs/Model/ApiResultLoanPartDetails.md)
- [ApiResultLoanPartDetailsList](docs/Model/ApiResultLoanPartDetailsList.md)
- [ApiResultMakeBids](docs/Model/ApiResultMakeBids.md)
- [ApiResultMyAccountBalance](docs/Model/ApiResultMyAccountBalance.md)
- [ApiResultMyInvestments](docs/Model/ApiResultMyInvestments.md)
- [ApiResultPublicDataset](docs/Model/ApiResultPublicDataset.md)
- [ApiResultReport](docs/Model/ApiResultReport.md)
- [ApiResultReportList](docs/Model/ApiResultReportList.md)
- [ApiResultSecondMarket](docs/Model/ApiResultSecondMarket.md)
- [ApiResultSecondMarketItemSummary](docs/Model/ApiResultSecondMarketItemSummary.md)
- [ApiResultSecondMarketItemSummaryList](docs/Model/ApiResultSecondMarketItemSummaryList.md)
- [ApiResultSecondMarketSale](docs/Model/ApiResultSecondMarketSale.md)
- [Auction](docs/Model/Auction.md)
- [AuctionExtended](docs/Model/AuctionExtended.md)
- [AuctionRequest](docs/Model/AuctionRequest.md)
- [Bid](docs/Model/Bid.md)
- [BidRequest](docs/Model/BidRequest.md)
- [BidResponse](docs/Model/BidResponse.md)
- [BidSummary](docs/Model/BidSummary.md)
- [BorrowerHistory](docs/Model/BorrowerHistory.md)
- [Debt](docs/Model/Debt.md)
- [DebtManagementEvent](docs/Model/DebtManagementEvent.md)
- [EventLogItem](docs/Model/EventLogItem.md)
- [EventLogRequest](docs/Model/EventLogRequest.md)
- [GoGrowAccount](docs/Model/GoGrowAccount.md)
- [Liability](docs/Model/Liability.md)
- [LoanPartDetails](docs/Model/LoanPartDetails.md)
- [LoanPartDetailsRequest](docs/Model/LoanPartDetailsRequest.md)
- [LoanTransfer](docs/Model/LoanTransfer.md)
- [MyAccountBalance](docs/Model/MyAccountBalance.md)
- [MyInvestmentItem](docs/Model/MyInvestmentItem.md)
- [MyInvestmentsRequest](docs/Model/MyInvestmentsRequest.md)
- [PublicDatasetItem](docs/Model/PublicDatasetItem.md)
- [PublicDatasetRequest](docs/Model/PublicDatasetRequest.md)
- [Report](docs/Model/Report.md)
- [ReportCreateRequest](docs/Model/ReportCreateRequest.md)
- [ReportItem](docs/Model/ReportItem.md)
- [ReportResponse](docs/Model/ReportResponse.md)
- [ScheduledPayment](docs/Model/ScheduledPayment.md)
- [SecondMarketBuyRequest](docs/Model/SecondMarketBuyRequest.md)
- [SecondMarketCancelRequest](docs/Model/SecondMarketCancelRequest.md)
- [SecondMarketItem](docs/Model/SecondMarketItem.md)
- [SecondMarketItemSummary](docs/Model/SecondMarketItemSummary.md)
- [SecondMarketListingRequest](docs/Model/SecondMarketListingRequest.md)
- [SecondMarketRequest](docs/Model/SecondMarketRequest.md)
- [SecondMarketSaleRequest](docs/Model/SecondMarketSaleRequest.md)
- [SecondMarketSaleResponse](docs/Model/SecondMarketSaleResponse.md)
- [SecondMarketSell](docs/Model/SecondMarketSell.md)

## 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

[email protected]