yapstone-payments

Yapstone - the Ruby gem for the Payments Orchestrator

\"REST API for Payments Orchestrator\"

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.6.4-SNAPSHOT
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build yapstone-payments.gemspec

Then either install the gem locally:

gem install ./yapstone-payments-1.0.0.gem

(for development, run gem install --dev ./yapstone-payments-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'yapstone-payments', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'yapstone-payments', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'yapstone-payments'

api_instance = Yapstone::AuthenticationApi.new
grant_type = 'client_credentials' # String | To do OAuth2 authentication, you must indicate the grant type, then adhere to it structurally. Yapstone API endpoints authenticate with OAuth2 and the grant type client credentials. This type of authentication is used to access resources on your own system rather than access a user's resources. 
authorization = 'Basic SGxkdU5OcU1xMzBUZ0djYUpDWVpIWVRsejJjQUJlSHo6YkdIeWNpWXVibzNVTXZLRA==' # String | Provide client_id:client_secret as base64 encoded basic auth. 

begin
  #Authenticate Partner
  result = api_instance.authenticate_partner(grant_type, authorization)
  p result
rescue Yapstone::ApiError => e
  puts "Exception when calling AuthenticationApi->authenticate_partner: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api-prod-sandbox.yapstone.com

Class Method HTTP request Description
Yapstone::AuthenticationApi authenticate_partner POST /v1/oauth2/client_credential/accesstoken Authenticate Partner
Yapstone::DisbursementsApi disburse_payment_by_id PUT /v2/disbursements/payment/paymentId Change payment from \"Hold payout\" state to be ready for disbursement
Yapstone::DisbursementsApi disburse_transaction_by_id PUT /v2/disbursements/transaction/transactionId Change transaction from \"Hold payout\" state to be ready for disbursement (payout)
Yapstone::PaymentsApi cancel_payment DELETE /v2/payments/payment/paymentId Cancel Payment by payment Id
Yapstone::PaymentsApi cancel_transaction DELETE /v2/payments/transaction/transactionId Cancel Transaction by TransactionId
Yapstone::PaymentsApi capture_payment PATCH /v2/payments/payment/paymentId Capture a prior authorized payment
Yapstone::PaymentsApi create_payment POST /v2/payments/payment Process Payment
Yapstone::PaymentsApi get_payment GET /v2/payments/payment/paymentId Get with Payment Id
Yapstone::PaymentsApi get_transaction GET /v2/payments/transaction/transactionId Get Transaction by Transaction Id
Yapstone::PaymentsApi verify_payment_instrument POST /v2/payments/instrument/verify Verify payment instrument
Yapstone::RefundsApi cancel_refund DELETE /v2/refunds/refund/refundId Cancel Payment by payment Id
Yapstone::RefundsApi create_payment_refund POST /v2/refunds/payment Create a refund
Yapstone::RefundsApi create_transaction_refund POST /v2/refunds/transaction Create a refund
Yapstone::RefundsApi get_by_originaltransaction_id GET /v2/refunds/transaction/transactionId Get master Transaction details including all refund details by transaction Id
Yapstone::RefundsApi get_refund GET /v2/refunds/refund/refundId Get master payment details including all refund detail by refund ID.
Yapstone::RefundsApi get_refund_by_payment_id GET /v2/refunds/payment/paymentId Get master payment details including all refund details by Payment Id.
Yapstone::SearchApi search_by_payment_id GET /v2/search/payment/paymentId Search with Payment Id
Yapstone::SearchApi search_by_transaction_id GET /v2/search/transaction/transactionId Search with transaction id
Yapstone::TokenApi create_token POST /v2/token Create a Token
Yapstone::TokenApi lookup_token POST /v2/token/lookup Lookup a Token

Documentation for Models

Documentation for Authorization

Bearer

  • Type: Bearer authentication (JWT)