mfk_openapi_ruby_client
see https://developer.mfkessai.co.jp/docs/v2
MfkOpenapiRubyClient - the Ruby gem for the Money Forward Kessai API v2
Money Forward Kessai REST API
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.6.7
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://support.mfkessai.co.jp/hc/ja
Client
regenerate ruby client
regenerate
make client/ruby/generate
spec
cd ./clients/ruby
bundle install
bundle exec rspec
it may be failed because of Open Api Generator has bugs. Fix manually and Commit it
Installation
Build a gem
To build the Ruby code into a gem:
gem build mfk_openapi_ruby_client.gemspec
Then either install the gem locally:
gem install ./mfk_openapi_ruby_client-1.0.0.gem
(for development, run gem install --dev ./mfk_openapi_ruby_client-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 'mfk_openapi_ruby_client', '~> 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 'mfk_openapi_ruby_client', :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 'mfk_openapi_ruby_client'
# Setup authorization
MfkOpenapiRubyClient.configure do |config|
# Configure API key authorization: apikey
config.api_key['apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['apikey'] = 'Bearer'
end
api_instance = MfkOpenapiRubyClient::BillingApi.new
billing_id = 'billing_id_example' # String | 対象の請求IDを指定してください。
begin
result = api_instance.get_billing(billing_id)
p result
rescue MfkOpenapiRubyClient::ApiError => e
puts "Exception when calling BillingApi->get_billing: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://sandbox-api.mfkessai.co.jp/v2
| Class | Method | HTTP request | Description |
|---|---|---|---|
| MfkOpenapiRubyClient::BillingApi | get_billing | GET /billings/billing_id | |
| MfkOpenapiRubyClient::BillingApi | get_billings_list | GET /billings | |
| MfkOpenapiRubyClient::CreditFacilityApi | get_credit_facilities_list | GET /credit_facilities | 与信枠の一覧を取得します。顧客IDや取引登録期間開始日・終了日で絞り込んで取得することもできます。 |
| MfkOpenapiRubyClient::CreditFacilityApi | get_credit_facility | GET /credit_facilities/credit_facility_id | 与信枠IDを指定して対象与信枠1件を取得することができます。 |
| MfkOpenapiRubyClient::CustomerApi | assign_bank_transfer | POST /customers/customer_id/bank_transfer | 対象顧客1件に振込先口座番号を未割り当ての場合、割り当てます。 |
| MfkOpenapiRubyClient::CustomerApi | create_customer | POST /customers | 顧客を登録することができます。顧客には必ず一つの請求先が必要であるため同時に請求先一件も登録します。 |
| MfkOpenapiRubyClient::CustomerApi | get_customer | GET /customers/customer_id | 顧客IDを指定して対象顧客1件を取得することができます。 |
| MfkOpenapiRubyClient::CustomerApi | get_customers_list | GET /customers | 顧客の一覧を取得することができます。顧客番号や支払方法、未入金の有無で絞り込んで取得することもできます。 |
| MfkOpenapiRubyClient::CustomerApi | update_customer | PATCH /customers/customer_id | 顧客の情報を更新することができます。 |
| MfkOpenapiRubyClient::CustomerExaminationApi | create_customer_examination | POST /customer_examinations | 顧客を指定して与信枠審査を申請することができます。最長で申請後2営業日以内に審査いたします。 自動与信枠審査をご利用の場合、こちらで増枠した金額は今後の与信枠付与に継続して利用されます。また、対象顧客のアラートは解消されます。 Sandbox環境では動作テストのため、任意の審査結果を指定することができます。審査結果の操作を参照してください。 |
| MfkOpenapiRubyClient::CustomerExaminationApi | get_customer_examination | GET /customer_examinations/customer_examination_id | 与信枠審査IDを指定して対象与信枠審査1件を取得することができます。 |
| MfkOpenapiRubyClient::CustomerExaminationApi | get_customer_examinations_list | GET /customer_examinations | 与信枠審査の一覧を取得します。顧客IDやステータスで絞り込んで取得することもできます。 |
| MfkOpenapiRubyClient::DestinationApi | create_destination | POST /destinations | 顧客を指定して請求先を登録することができます。 |
| MfkOpenapiRubyClient::DestinationApi | get_destination | GET /destinations/destination_id | 請求先IDを指定して対象請求先1件を取得することができます。 |
| MfkOpenapiRubyClient::DestinationApi | get_destinations_list | GET /destinations | 請求先の一覧を取得します。顧客IDや顧客番号で特定の顧客に紐づく請求先に絞り込んで取得することもできます。 |
| MfkOpenapiRubyClient::PayoutApi | get_payout | GET /payouts/payout_id | |
| MfkOpenapiRubyClient::PayoutApi | get_payouts_list | GET /payouts | |
| MfkOpenapiRubyClient::PayoutRefundApi | get_payout_refunds_list | GET /payout_refunds | |
| MfkOpenapiRubyClient::PayoutTransactionApi | get_payout_transaction | GET /payout_transactions/payout_transaction_id | |
| MfkOpenapiRubyClient::PayoutTransactionApi | get_payout_transactions_list | GET /payout_transactions | |
| MfkOpenapiRubyClient::TransactionApi | cancel_transaction | DELETE /transactions/transaction_id | 取引の状態によってはキャンセルができない場合もあります。キャンセルについてを参照してください。 |
| MfkOpenapiRubyClient::TransactionApi | create_transaction | POST /transactions | 請求先を指定して取引を登録できます。最長で申請後2営業日以内に審査いたします。 Sandbox環境では動作テストのため、任意の審査結果を指定することができます。審査結果の操作を参照してください。 |
| MfkOpenapiRubyClient::TransactionApi | get_transaction | GET /transactions/transaction_id | |
| MfkOpenapiRubyClient::TransactionApi | get_transactions_list | GET /transactions |
Documentation for Models
- MfkOpenapiRubyClient::AccountTransfer
- MfkOpenapiRubyClient::AmountPerTaxRateType
- MfkOpenapiRubyClient::BankTransfer
- MfkOpenapiRubyClient::Billing
- MfkOpenapiRubyClient::BillingCondition
- MfkOpenapiRubyClient::BillingUnpaid
- MfkOpenapiRubyClient::BillingsList
- MfkOpenapiRubyClient::CreateCustomerResponse
- MfkOpenapiRubyClient::CreditFacilitiesList
- MfkOpenapiRubyClient::CreditFacility
- MfkOpenapiRubyClient::Customer
- MfkOpenapiRubyClient::CustomerExamination
- MfkOpenapiRubyClient::CustomerExaminationPayload
- MfkOpenapiRubyClient::CustomerExaminationsList
- MfkOpenapiRubyClient::CustomerPayload
- MfkOpenapiRubyClient::CustomerPayloadCustomerExamination
- MfkOpenapiRubyClient::CustomerPayloadDestination
- MfkOpenapiRubyClient::CustomerUpdatePayload
- MfkOpenapiRubyClient::CustomersList
- MfkOpenapiRubyClient::Deduction
- MfkOpenapiRubyClient::DeductionTax
- MfkOpenapiRubyClient::DeductionTaxFree
- MfkOpenapiRubyClient::DeductionTaxable
- MfkOpenapiRubyClient::DeductionTaxableBillingCharge
- MfkOpenapiRubyClient::DeductionTaxableConvenienceBilling
- MfkOpenapiRubyClient::DeductionTaxablePosting
- MfkOpenapiRubyClient::DeductionUntaxable
- MfkOpenapiRubyClient::DeductionUntaxableRevenueStamp
- MfkOpenapiRubyClient::Destination
- MfkOpenapiRubyClient::DestinationPayload
- MfkOpenapiRubyClient::DestinationsList
- MfkOpenapiRubyClient::Error
- MfkOpenapiRubyClient::InvoiceDeliveryMethod
- MfkOpenapiRubyClient::Pagination
- MfkOpenapiRubyClient::PaymentMethod
- MfkOpenapiRubyClient::Payout
- MfkOpenapiRubyClient::PayoutRefund
- MfkOpenapiRubyClient::PayoutRefundsList
- MfkOpenapiRubyClient::PayoutTransaction
- MfkOpenapiRubyClient::PayoutTransactionsList
- MfkOpenapiRubyClient::PayoutsList
- MfkOpenapiRubyClient::TaxIncludedType
- MfkOpenapiRubyClient::TaxRateType
- MfkOpenapiRubyClient::Transaction
- MfkOpenapiRubyClient::TransactionDetail
- MfkOpenapiRubyClient::TransactionDetailPayload
- MfkOpenapiRubyClient::TransactionPayload
- MfkOpenapiRubyClient::TransactionsList
Documentation for Authorization
apikey
- Type: API key
- API key parameter name: apikey
- Location: HTTP header