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
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'
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 using -I
as follows:
ruby -Ilib script.rb
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
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 |
- ElepayApi::ChargeCaptureReq
- ElepayApi::ChargeDateTimeType
- ElepayApi::ChargeDto
- ElepayApi::ChargeReq
- ElepayApi::ChargeStatusType
- ElepayApi::ChargeVerifyReq
- ElepayApi::ChargesResponse
- ElepayApi::CustomerDto
- ElepayApi::CustomerReq
- ElepayApi::CustomerResponse
- ElepayApi::PaymentMethodType
- ElepayApi::ProviderConfigDto
- ElepayApi::RefundDto
- ElepayApi::RefundReq
- ElepayApi::RefundStatusType
- ElepayApi::RefundsDto
- ElepayApi::RefundsResponse
- ElepayApi::ResourceType
- ElepayApi::SortOrderType
- ElepayApi::SourceConfirmReq
- ElepayApi::SourceDto
- ElepayApi::SourceReq
- ElepayApi::SourceResponse
- ElepayApi::SourceStatusType
- Type: HTTP basic authentication