yapstone-disputes

Yapstone - the Ruby gem for the YapStone Dispute Composite Service

This service provides a Dispute engine that enables a Marketplace to manage Disputes and Dispute related objects like Evidences on processed Payments.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • 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-disputes.gemspec

Then either install the gem locally:

gem install ./yapstone-disputes-1.0.0.gem

(for development, run gem install --dev ./yapstone-disputes-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-disputes', '~> 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-disputes', :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-disputes'

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/v1/dispute

Class Method HTTP request Description
Yapstone::AuthenticationApi authenticate_partner POST /v1/oauth2/client_credential/accesstoken Authenticate Partner
Yapstone::DisputesApi action_by_dispute_id PATCH /disputes/id/action Action to perform on the dispute - two values are supported - ACCEPT or CONTEST
Yapstone::DisputesApi create_dispute POST /disputes Create a dispute [Test Only]
Yapstone::DisputesApi final_disposition_by_dispute_id PATCH /disputes/id/finalDisposition Final disposition to be set on the dispute - two values are supported - WON or LOST
Yapstone::DisputesApi get_dispute GET /disputes/id Fetch a single dispute
Yapstone::DisputesApi get_dispute_events GET /disputes/id/events Fetch the dispute events associated with a dispute
Yapstone::DisputesApi update_status PATCH /disputes/id/status Status to be updated in the dispute
Yapstone::DisputesApi update_workflow_status PATCH /disputes/id/disputeWorkflow Workflow status to be updated in Dispute
Yapstone::EvidencesApi create_file POST /evidences/id/files Update a dispute evidences
Yapstone::EvidencesApi create_text POST /evidences/id/text Update a dispute evidences
Yapstone::EvidencesApi delete_file DELETE /files/id Get the evidence by it's id
Yapstone::EvidencesApi delete_text DELETE /text/id Get the evidence by it's id
Yapstone::EvidencesApi get_evidence GET /evidences/id Get the evidence by it's id
Yapstone::EvidencesApi get_file_content_by_id GET /files/id/content Get file content by file evidence id

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header