hryvinskyi / reepay-api
2.0.3
2023-03-27 22:11 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
REST API to manage Reepay resources
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/hryvinskyi/reepay-api.git"
}
],
"require": {
"hryvinskyi/reepay-api": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/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 HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->createPrivateKey(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->createPrivateKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->createPublicKey(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->createPublicKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $key = "key_example"; // string | Private key try { $apiInstance->expirePrivateKey($key); } catch (Exception $e) { echo 'Exception when calling AccountApi->expirePrivateKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $key = "key_example"; // string | Public key try { $apiInstance->expirePublicKey($key); } catch (Exception $e) { echo 'Exception when calling AccountApi->expirePublicKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->generateWebhookSecret(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->generateWebhookSecret: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getCurrentAccount(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getCurrentAccount: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getDiscountSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getDiscountSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getMailSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getMailSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getMfaSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getMfaSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getPrivateKeys(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getPrivateKeys: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getPublicKeys(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getPublicKeys: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getTerms(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getTerms: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); try { $result = $apiInstance->getWebhookSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getWebhookSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\UpdateAccount(); // \Reepay\Model\UpdateAccount | try { $result = $apiInstance->updateAccountJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateAccountJson: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\DiscountSettings(); // \Reepay\Model\DiscountSettings | try { $result = $apiInstance->updateDiscountSettings($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateDiscountSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\MailSettings(); // \Reepay\Model\MailSettings | try { $result = $apiInstance->updateMailSettingsJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateMailSettingsJson: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\AccountMfaSettings(); // \Reepay\Model\AccountMfaSettings | try { $result = $apiInstance->updateMfaSettings($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateMfaSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\Terms(); // \Reepay\Model\Terms | try { $result = $apiInstance->updateTerms($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateTerms: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\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 ); $body = new \Reepay\Model\UpdateWebhookSettings(); // \Reepay\Model\UpdateWebhookSettings | try { $result = $apiInstance->updateWebhookSettingsJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateWebhookSettingsJson: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://api.reepay.com/api.reepay.com
Documentation For Models
- Account
- AccountFundingInformation
- AccountMfaSettings
- ActivateMpsAgreement
- ActivateSubscription
- AddOn
- AddOnList
- AddPaymentMethod
- AdditionalCost
- AmountRule
- AnydayAgreement
- AnydayTransaction
- ApplepayAgreement
- AuthenticateLoginBody
- BancontactTransaction
- BlikTransaction
- CancelSubscription
- Card
- CardCountryRule
- CardGatewayAgreement
- CardPrefixRule
- CardTokenDto
- CardTransaction
- CardTypeRule
- CardV2
- CardVerification
- CardVerificationRequest
- ChangeNextPeriodStart
- ChangeSubscription
- ChangedSubscription
- Charge
- ChargeList
- ChargeParameters
- ChargeSource
- CheckoutAccountDataDto
- CheckoutSessionDataDto
- CopyCard
- CorporateCardRule
- Coupon
- CouponList
- CouponRedemption
- CreateAddOn
- CreateAdditionalCost
- CreateCardGatewayAgreement
- CreateCharge
- CreateCoupon
- CreateCredit
- CreateCreditNoteLine
- CreateCustomer
- CreateCustomerInvoice
- CreateCustomerNote
- CreateDiscount
- CreateDunningPlan
- CreateEntitlement
- CreateMpsAgreement
- CreateOrderLine
- CreatePayout
- CreatePreparedSubscription
- CreateRefund
- CreateSubscription
- CreateSubscriptionAddOn
- CreateSubscriptionAdditionalCost
- CreateSubscriptionDiscount
- CreateSubscriptionInvoice
- CreateSubscriptionPlan
- CreateTaxPolicy
- CreateVippsAgreement
- Credit
- CreditInvoice
- CreditNoteLine
- CreditNoteSettings
- CurrencyRule
- Customer
- CustomerDebtorSettings
- CustomerList
- CustomerNote
- Discount
- DiscountList
- DiscountSettings
- DunningPlan
- EmvConfiguration
- Entitlement
- EntitlementSearch
- EpsTransaction
- ErrorCodeDto
- ErrorResponse
- EstoniaBanksTransaction
- Event
- EventList
- ExpireSubscription
- ExtendAuthResponse
- ExtendKlarnaAuthResponse
- GatewayAgreement
- GooglepayAgreement
- IdealTransaction
- ImportMpsPaymentMethodRequest
- ImportVippsRecurringPaymentMethodRequest
- InlineResponse200
- IntervalAmount
- InviteUser
- InviteUserAccept
- Invoice
- InvoiceBillingAddress
- InvoiceConfiguration
- InvoiceCreditNote
- InvoiceCreditNoteListDto
- InvoiceCreditNoteV2
- InvoiceList
- InvoiceSequenceConfiguration
- InvoiceShippingAddress
- Key
- KlarnaAgreement
- KlarnaTransaction
- LatviaBanksTransaction
- LithuaniaBanksTransaction
- MailSettings
- ManualRefundTransfer
- ManualSettleTransfer
- ManualTransaction
- MbwayTransaction
- MoveCard
- MpoAgreement
- MpsAgreement
- MpsSubscription
- MpsSubscriptionV2
- MpsTransaction
- MultibancoTransaction
- MybankTransaction
- NotSameCountryRule
- OfflineAgreement
- OnHoldSubscription
- OrderLine
- Organisation
- OrganisationLogin
- P24Transaction
- PayconiqTransaction
- PayeverAgreement
- PaymentMethodList
- PaymentMethodV2
- PaymentTypeRule
- Payout
- PayoutList
- PayoutTransaction
- PaypalAgreement
- PaypalTransaction
- PaysafecardTransaction
- PayseraTransaction
- Plan
- PlanList
- PostfinanceTransaction
- PproAgreement
- PrepareChargeDto
- PreparedSubscription
- ProviderRule
- ReactivateSubscription
- RedeemCouponCode
- Refund
- RequesterCountryRule
- ResetUserPassword
- ResursAgreement
- ResursTransaction
- RiskConfiguration
- RiskRule
- RiskRuleSet
- SantanderTransaction
- SatispayTransaction
- SepaMandate
- SetPaymentMethod
- Settle
- SettleCharge
- StandardTaxRatesResponseDto
- StrongAuthenticationStatusRule
- StronglyAuthenticatedRule
- Subscription
- SubscriptionAddOn
- SubscriptionCancelPreview
- SubscriptionChange
- SubscriptionChangeJournal
- SubscriptionDiscount
- SubscriptionLinks
- SubscriptionList
- SubscriptionPeriodBalance
- SupersedeSubscriptionPlan
- SwishAgreement
- SwishTransaction
- TaxPolicy
- TaxPolicyFallbacks
- TaxPolicyList
- TaxRate
- TemplateModel
- Terms
- ThreeDSecureStatusRule
- Transaction
- TransactionContextRule
- TransactionList
- TrustlyTransaction
- UpdateAccount
- UpdateAddOn
- UpdateAnydayAgreement
- UpdateCardGatewayAgreement
- UpdateCoupon
- UpdateCustomer
- UpdateDiscount
- UpdateDunningPlan
- UpdateEmvConfiguration
- UpdateFeeConfiguration
- UpdateGooglepayAgreement
- UpdateKlarnaAgreement
- UpdateMpsAgreement
- UpdateOfflineAgreement
- UpdateOrganisation
- UpdatePayeverAgreement
- UpdatePaypalAgreement
- UpdatePproAgreement
- UpdateResursAgreement
- UpdateSubscriptionPlan
- UpdateSurcharge
- UpdateTaxPolicy
- UpdateUser
- UpdateUserGroups
- UpdateUserPassword
- UpdateViabillAgreement
- UpdateWebhookSettings
- User
- UserAccount
- UserAccountMfa
- UserInfo
- UserLogin
- UserRenew
- UserResetRequestPassword
- UserSetMfa
- ViabillAgreement
- ViabillTransaction
- VippsAgreement
- VippsMerchantOnboarding
- VippsRecurringAgreement
- VippsRecurringMandate
- VippsRecurringMerchantOnboarding
- VippsRecurringMerchantOnboardingResponse
- VippsRecurringTransaction
- WeChatPayTransaction
- Webhook
- WebhookDisableRequest
- WebhookList
- WebhookRequest
- WebhookResendRequest
- WebhookSettings
- WebhookUpdateRequest
Documentation For Authorization
apiKey
- Type: API key
- API key parameter name: X-Auth-Token
- Location: HTTP header
basicAuth
- Type: HTTP basic authentication