duyngha/trusha-sdk

Trustshare SDK for PHP

1.0.4 2023-02-08 05:45 UTC

This package is auto-updated.

Last update: 2024-04-08 08:16:59 UTC


README

This PHP package is automatically generated by the Swagger Codegen project:

  • API 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/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@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');

$apiInstance = new Swagger\Client\Api\ParticipantsApi(
    // 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()
);
$body = new \Swagger\Client\Model\V1ParticipantsBody(); // \Swagger\Client\Model\V1ParticipantsBody | 
$authorization = "authorization_example"; // string | Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.

try {
    $result = $apiInstance->createParticipant($body, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ParticipantsApi->createParticipant: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new Swagger\Client\Api\ParticipantsApi(
    // 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()
);
$authorization = "authorization_example"; // string | Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.
$id = "id_example"; // string | A unique ID of an existing participant.  A string in the format: `participant_[0-9a-z]`

try {
    $result = $apiInstance->getParticipant($authorization, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ParticipantsApi->getParticipant: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://rest.trustshare.io

Class Method HTTP request Description
ParticipantsApi createParticipant POST /v1/participants Create a Participant
ParticipantsApi getParticipant GET /v1/participant/{id} Get a Participant
PaymentsApi createPaymentIntent POST /v1/intents/payment Create a Payment Intent
PaymentsApi createRefunds POST /v1/outbounds/refunds Create Refunds
PaymentsApi createReleases POST /v1/outbounds/releases Create Releases
PaymentsApi getCheckout GET /v1/checkout/{id} Get a Checkout
PaymentsApi getInbound GET /v1/inbound/{id} Get an Inbound
PaymentsApi getIntent GET /v1/intent/{id} Get an Intent
PaymentsApi getInvoice GET /v1/invoice/{id} Get an Invoice
PaymentsApi getOutbound GET /v1/outbound/{id} Get an Outbound
PaymentsApi getProject GET /v1/project/{id} Get a Project
PaymentsApi getSettlement GET /v1/settlement/{id} Get a Settlement
ProjectsApi createProject POST /v1/projects Create a Project
ProjectsApi getProject GET /v1/project/{id} Get a Project
VerificationsApi createVerification POST /v1/verifications Create a Verification
VerificationsApi getParticipant GET /v1/participant/{id} Get a Participant
VerificationsApi getVerification GET /v1/verification/{id} Get a Verification

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

support@trustshare.co