Skip to content

elestyle/elepay-ruby-sdk

Repository files navigation

elepay-ruby-sdk

ElepayApi - the Ruby gem for the elepay API リファレンス

elepay APIはRESTをベースに構成された決済APIです。支払い処理、返金処理など、決済に関わる運用における様々なことができます。

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.1.1
  • Package version: 1.1.1
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build elepay-ruby-sdk.gemspec

Then either install the gem locally:

gem install ./elepay-ruby-sdk-1.1.1.gem

(for development, run gem install --dev ./elepay-ruby-sdk-1.1.1.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 'elepay-ruby-sdk', '~> 1.1.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/elestyle/elepay-ruby-sdk, then add the following in the Gemfile:

gem 'elepay-ruby-sdk', :git => 'https://github.com/elestyle/elepay-ruby-sdk.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 'elepay-ruby-sdk'

# Setup authorization
ElepayApi.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
end

api_instance = ElepayApi::ChargeApi.new
charge_req = ElepayApi::ChargeReq.new # ChargeReq | 支払リクエスト

begin
  #Create charge
  result = api_instance.create_charge(charge_req)
  p result
rescue ElepayApi::ApiError => e
  puts "Exception when calling ChargeApi->create_charge: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.elepay.io

Class Method HTTP request Description
ElepayApi::ChargeApi create_charge POST /charges Create charge
ElepayApi::ChargeApi list_charges GET /charges List charges
ElepayApi::ChargeApi retrieve_charge GET /charges/{id} Retrieve charge
ElepayApi::CustomerApi create_customer POST /customers Create customer
ElepayApi::CustomerApi create_source POST /customers/{customerId}/sources Create source
ElepayApi::CustomerApi delete_customer DELETE /customers/{customerId} Delete customer
ElepayApi::CustomerApi delete_source DELETE /customers/{customerId}/sources/{sourceId} Delete source
ElepayApi::CustomerApi list_customers GET /customers List customers
ElepayApi::CustomerApi list_sources GET /customers/{customerId}/sources List sources by customer ID
ElepayApi::CustomerApi retrieve_customer GET /customers/{customerId} Retrieve customer
ElepayApi::CustomerApi retrieve_source GET /customers/{customerId}/sources/{sourceId} Retrieve source
ElepayApi::RefundApi create_refund POST /charges/{id}/refunds Create refund
ElepayApi::RefundApi list_charges_refunds GET /charges/{id}/refunds List refunds
ElepayApi::RefundApi retrieve_charge_refund GET /charges/{id}/refunds/{refundId} Retrieve refund

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published