Class: MfkOpenapiRubyClient::TransactionApi
- Inherits:
-
Object
- Object
- MfkOpenapiRubyClient::TransactionApi
- Defined in:
- lib/mfk_openapi_ruby_client/api/transaction_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_transaction(transaction_id, opts = {}) ⇒ Transaction
取引の状態によってはキャンセルができない場合もあります。<a target="_blank" href="support.mfkessai.co.jp/hc/ja/articles/900002235166-%E5%8F%96%E5%BC%95%E3%81%AE%E3%82%AD%E3%83%A3%E3%83%B3%E3%82%BB%E3%83%AB">キャンセルについて</a>を参照してください。 取引キャンセル.
-
#cancel_transaction_with_http_info(transaction_id, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
取引の状態によってはキャンセルができない場合もあります。<a target="_blank" href="support.mfkessai.co.jp/hc/ja/articles/900002235166-%E5%8F%96%E5%BC%95%E3%81%AE%E3%82%AD%E3%83%A3%E3%83%B3%E3%82%BB%E3%83%AB">キャンセルについて</a>を参照してください。 取引キャンセル.
-
#create_transaction(payload, opts = {}) ⇒ Transaction
請求先を指定して取引を登録できます。最長で申請後2営業日以内に審査いたします。
Sandbox環境では動作テストのため、任意の審査結果を指定することができます。(#environment_magic_number)を参照してください。 取引登録. -
#create_transaction_with_http_info(payload, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
請求先を指定して取引を登録できます。最長で申請後2営業日以内に審査いたします。<br> Sandbox環境では動作テストのため、任意の審査結果を指定することができます。(#environment_magic_number)を参照してください。 取引登録.
-
#get_transaction(transaction_id, opts = {}) ⇒ Transaction
取引取得.
-
#get_transaction_with_http_info(transaction_id, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
取引取得.
-
#get_transactions_list(opts = {}) ⇒ TransactionsList
取引一覧取得.
-
#get_transactions_list_with_http_info(opts = {}) ⇒ Array<(TransactionsList, Integer, Hash)>
取引一覧取得.
-
#initialize(api_client = ApiClient.default) ⇒ TransactionApi
constructor
A new instance of TransactionApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TransactionApi
19 20 21 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_transaction(transaction_id, opts = {}) ⇒ Transaction
取引の状態によってはキャンセルができない場合もあります。<a target="_blank" href="support.mfkessai.co.jp/hc/ja/articles/900002235166-%E5%8F%96%E5%BC%95%E3%81%AE%E3%82%AD%E3%83%A3%E3%83%B3%E3%82%BB%E3%83%AB">キャンセルについて</a>を参照してください。取引キャンセル
27 28 29 30 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 27 def cancel_transaction(transaction_id, opts = {}) data, _status_code, _headers = cancel_transaction_with_http_info(transaction_id, opts) data end |
#cancel_transaction_with_http_info(transaction_id, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
取引の状態によってはキャンセルができない場合もあります。<a target="_blank" href="support.mfkessai.co.jp/hc/ja/articles/900002235166-%E5%8F%96%E5%BC%95%E3%81%AE%E3%82%AD%E3%83%A3%E3%83%B3%E3%82%BB%E3%83%AB">キャンセルについて</a>を参照してください。取引キャンセル
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 37 def cancel_transaction_with_http_info(transaction_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.cancel_transaction ...' end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionApi.cancel_transaction" end # resource path local_var_path = '/transactions/{transaction_id}'.sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Transaction' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"TransactionApi.cancel_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#cancel_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_transaction(payload, opts = {}) ⇒ Transaction
請求先を指定して取引を登録できます。最長で申請後2営業日以内に審査いたします。
Sandbox環境では動作テストのため、任意の審査結果を指定することができます。(#environment_magic_number)を参照してください。取引登録
90 91 92 93 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 90 def create_transaction(payload, opts = {}) data, _status_code, _headers = create_transaction_with_http_info(payload, opts) data end |
#create_transaction_with_http_info(payload, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
請求先を指定して取引を登録できます。最長で申請後2営業日以内に審査いたします。<br> Sandbox環境では動作テストのため、任意の審査結果を指定することができます。(#environment_magic_number)を参照してください。取引登録
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 100 def create_transaction_with_http_info(payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.create_transaction ...' end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling TransactionApi.create_transaction" end # resource path local_var_path = '/transactions' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(payload) # return_type return_type = opts[:debug_return_type] || 'Transaction' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"TransactionApi.create_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#create_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transaction(transaction_id, opts = {}) ⇒ Transaction
取引取得
154 155 156 157 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 154 def get_transaction(transaction_id, opts = {}) data, _status_code, _headers = get_transaction_with_http_info(transaction_id, opts) data end |
#get_transaction_with_http_info(transaction_id, opts = {}) ⇒ Array<(Transaction, Integer, Hash)>
取引取得
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 163 def get_transaction_with_http_info(transaction_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.get_transaction ...' end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionApi.get_transaction" end # resource path local_var_path = '/transactions/{transaction_id}'.sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Transaction' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"TransactionApi.get_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#get_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transactions_list(opts = {}) ⇒ TransactionsList
取引一覧取得
233 234 235 236 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 233 def get_transactions_list(opts = {}) data, _status_code, _headers = get_transactions_list_with_http_info(opts) data end |
#get_transactions_list_with_http_info(opts = {}) ⇒ Array<(TransactionsList, Integer, Hash)>
取引一覧取得
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/mfk_openapi_ruby_client/api/transaction_api.rb', line 260 def get_transactions_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.get_transactions_list ...' end if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'].to_s.length > 100 fail ArgumentError, 'invalid value for "opts[:"number"]" when calling TransactionApi.get_transactions_list, the character length must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'customer_number'].nil? && opts[:'customer_number'].to_s.length > 100 fail ArgumentError, 'invalid value for "opts[:"customer_number"]" when calling TransactionApi.get_transactions_list, the character length must be smaller than or equal to 100.' end allowable_values = ["unexamined", "passed", "rejected", "canceled"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionApi.get_transactions_list, must be smaller than or equal to 200.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionApi.get_transactions_list, must be greater than or equal to 1.' end # resource path local_var_path = '/transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'customer_number'] = opts[:'customer_number'] if !opts[:'customer_number'].nil? query_params[:'billing_id'] = opts[:'billing_id'] if !opts[:'billing_id'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'billing'] = opts[:'billing'] if !opts[:'billing'].nil? query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'created_at_from'] = opts[:'created_at_from'] if !opts[:'created_at_from'].nil? query_params[:'created_at_to'] = opts[:'created_at_to'] if !opts[:'created_at_to'].nil? query_params[:'canceled_at_from'] = opts[:'canceled_at_from'] if !opts[:'canceled_at_from'].nil? query_params[:'canceled_at_to'] = opts[:'canceled_at_to'] if !opts[:'canceled_at_to'].nil? query_params[:'accepted_at_from'] = opts[:'accepted_at_from'] if !opts[:'accepted_at_from'].nil? query_params[:'accepted_at_to'] = opts[:'accepted_at_to'] if !opts[:'accepted_at_to'].nil? query_params[:'billing_accepted_at_from'] = opts[:'billing_accepted_at_from'] if !opts[:'billing_accepted_at_from'].nil? query_params[:'billing_accepted_at_to'] = opts[:'billing_accepted_at_to'] if !opts[:'billing_accepted_at_to'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TransactionsList' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"TransactionApi.get_transactions_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#get_transactions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |