Skip to content

Latest commit

 

History

History

ruby

openapi_client

OpenapiClient - the Ruby gem for the スマレジ

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • 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 openapi_client.gemspec

Then either install the gem locally:

gem install ./openapi_client-1.0.0.gem

(for development, run gem install --dev ./openapi_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 'openapi_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 'openapi_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 'openapi_client'

# Setup authorization
OpenapiClient.configure do |config|
  # Configure Bearer authorization: AccessToken
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = OpenapiClient::DefaultApi.new
contract_id = 'contract_id_example' # String | 契約id
opts = {
  create_customers: OpenapiClient::CreateCustomers.new({customer_code: 'customer_code_example', first_name: 'first_name_example', last_name: 'last_name_example'}) # CreateCustomers | 
}

begin
  #会員情報を登録します。
  result = api_instance.create_customers(contract_id, opts)
  p result
rescue OpenapiClient::ApiError => e
  puts "Exception when calling DefaultApi->create_customers: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.smaregi.dev

Class Method HTTP request Description
OpenapiClient::DefaultApi create_customers POST /{contract_id}/pos/customers 会員情報を登録します。
OpenapiClient::DefaultApi delete_coupons DELETE /{contract_id}/pos/coupons/{coupon_id}
OpenapiClient::DefaultApi delete_customers DELETE /{contract_id}/pos/customers/{customer_id} 会員情報を削除します。
OpenapiClient::DefaultApi get_coupons GET /{contract_id}/pos/coupons Your GET endpoint
OpenapiClient::DefaultApi get_customer_point_list GET /{contract_id}/pos/customers/point 会員ポイント一覧取得
OpenapiClient::DefaultApi get_customer_required_column_setting GET /{contract_id}/pos/customer_required_column_setting 会員必須項目設定取得
OpenapiClient::DefaultApi get_customers GET /{contract_id}/pos/customers 会員情報一覧を取得します。
OpenapiClient::DefaultApi get_layaway_by_id GET /{contract_id}/pos/transactions/layaways/{layaway_id} Your GET endpoint
OpenapiClient::DefaultApi get_layaway_list GET /{contract_id}/pos/transactions/layaways 取置き一覧を取得します。
OpenapiClient::DefaultApi get_stores GET /{contract_id}/pos/stores 店舗一覧取得
OpenapiClient::DefaultApi get_transaction GET /{contract_id}/pos/transactions 取引情報一覧を取得します。
OpenapiClient::DefaultApi get_transaction_id GET /{contract_id}/pos/transactions/{transaction_id} 取引情報を取得します。
OpenapiClient::DefaultApi post_create_coupons POST /{contract_id}/pos/coupons
OpenapiClient::DefaultApi update_customer_point PATCH /{contract_id}/pos/customers/{customer_id}/point 会員ポイント更新
OpenapiClient::DefaultApi update_customer_point_relative POST /{contract_id}/pos/customers/{customer_id}/point/add
OpenapiClient::DefaultApi update_customers PATCH /{contract_id}/pos/customers/{customer_id}
OpenapiClient::DefaultApi update_store PATCH /{contract_id}/pos/stores/{store_id} 店舗更新
OpenapiClient::DefaultApi update_transaction_for_customer PATCH /{contract_id}/pos/transactions/{transaction_id}/customer 取引会員更新

Documentation for Models

Documentation for Authorization

AccessToken

  • Type: Bearer authentication