Class: TreezorClient::WalletApi
- Inherits:
-
Object
- Object
- TreezorClient::WalletApi
- Defined in:
- lib/treezor_client/api/wallet_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_wallet(id, origin, opts = {}) ⇒ InlineResponse20028
delete a wallet Change wallet’s status to CANCELED.
-
#delete_wallet_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
delete a wallet Change wallet's status to CANCELED.
-
#get_wallet(id, opts = {}) ⇒ InlineResponse20028
get a wallet.
-
#get_wallet_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
get a wallet.
-
#get_wallets(opts = {}) ⇒ InlineResponse20028
search wallets Get wallets from the system that match the search criteria.
-
#get_wallets_with_http_info(opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
search wallets Get wallets from the system that match the search criteria.
-
#initialize(api_client = ApiClient.default) ⇒ WalletApi
constructor
A new instance of WalletApi.
-
#post_wallets(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) ⇒ InlineResponse20028
create a wallet Create a new wallet in the system..
-
#post_wallets_with_http_info(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
create a wallet Create a new wallet in the system..
-
#put_wallet(id, opts = {}) ⇒ InlineResponse20028
update a wallet Modifiy wallet information.
-
#put_wallet_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
update a wallet Modifiy wallet information.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/treezor_client/api/wallet_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_wallet(id, origin, opts = {}) ⇒ InlineResponse20028
delete a wallet Change wallet’s status to CANCELED.
32 33 34 35 |
# File 'lib/treezor_client/api/wallet_api.rb', line 32 def delete_wallet(id, origin, opts = {}) data, _status_code, _headers = delete_wallet_with_http_info(id, origin, opts) data end |
#delete_wallet_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
delete a wallet Change wallet's status to CANCELED.
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 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/treezor_client/api/wallet_api.rb', line 47 def delete_wallet_with_http_info(id, origin, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WalletApi.delete_wallet ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling WalletApi.delete_wallet" end # verify the required parameter 'origin' is set if @api_client.config.client_side_validation && origin.nil? fail ArgumentError, "Missing the required parameter 'origin' when calling WalletApi.delete_wallet" end # resource path local_var_path = '/wallets/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'origin'] = origin query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20028') if @api_client.config.debugging @api_client.config.logger.debug "API called: WalletApi#delete_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_wallet(id, opts = {}) ⇒ InlineResponse20028
get a wallet
104 105 106 107 |
# File 'lib/treezor_client/api/wallet_api.rb', line 104 def get_wallet(id, opts = {}) data, _status_code, _headers = get_wallet_with_http_info(id, opts) data end |
#get_wallet_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
get a wallet
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 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/treezor_client/api/wallet_api.rb', line 118 def get_wallet_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WalletApi.get_wallet ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling WalletApi.get_wallet" end # resource path local_var_path = '/wallets/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20028') if @api_client.config.debugging @api_client.config.logger.debug "API called: WalletApi#get_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_wallets(opts = {}) ⇒ InlineResponse20028
search wallets Get wallets from the system that match the search criteria.
190 191 192 193 |
# File 'lib/treezor_client/api/wallet_api.rb', line 190 def get_wallets(opts = {}) data, _status_code, _headers = get_wallets_with_http_info(opts) data end |
#get_wallets_with_http_info(opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
search wallets Get wallets from the system that match the search criteria.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/treezor_client/api/wallet_api.rb', line 224 def get_wallets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WalletApi.get_wallets ...' end # resource path local_var_path = '/wallets' # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIP'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'walletId'] = opts[:'wallet_id'] if !opts[:'wallet_id'].nil? query_params[:'walletStatus'] = opts[:'wallet_status'] if !opts[:'wallet_status'].nil? query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'parentUserId'] = opts[:'parent_user_id'] if !opts[:'parent_user_id'].nil? query_params[:'walletTag'] = opts[:'wallet_tag'] if !opts[:'wallet_tag'].nil? query_params[:'walletTypeId'] = opts[:'wallet_type_id'] if !opts[:'wallet_type_id'].nil? query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil? query_params[:'eventAlias'] = opts[:'event_alias'] if !opts[:'event_alias'].nil? query_params[:'eventPayinStartDate'] = opts[:'event_payin_start_date'] if !opts[:'event_payin_start_date'].nil? query_params[:'eventPayinEndDate'] = opts[:'event_payin_end_date'] if !opts[:'event_payin_end_date'].nil? query_params[:'tariffId'] = opts[:'tariff_id'] if !opts[:'tariff_id'].nil? query_params[:'payinCount'] = opts[:'payin_count'] if !opts[:'payin_count'].nil? query_params[:'solde'] = opts[:'solde'] if !opts[:'solde'].nil? query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil? query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'createdDateFrom'] = opts[:'created_date_from'] if !opts[:'created_date_from'].nil? query_params[:'createdDateTo'] = opts[:'created_date_to'] if !opts[:'created_date_to'].nil? query_params[:'updatedDateFrom'] = opts[:'updated_date_from'] if !opts[:'updated_date_from'].nil? query_params[:'updatedDateTo'] = opts[:'updated_date_to'] if !opts[:'updated_date_to'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20028') if @api_client.config.debugging @api_client.config.logger.debug "API called: WalletApi#get_wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_wallets(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) ⇒ InlineResponse20028
create a wallet Create a new wallet in the system..
304 305 306 307 |
# File 'lib/treezor_client/api/wallet_api.rb', line 304 def post_wallets(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) data, _status_code, _headers = post_wallets_with_http_info(wallet_type_id, tariff_id, user_id, currency, event_name, opts) data end |
#post_wallets_with_http_info(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
create a wallet Create a new wallet in the system..
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/treezor_client/api/wallet_api.rb', line 329 def post_wallets_with_http_info(wallet_type_id, tariff_id, user_id, currency, event_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WalletApi.post_wallets ...' end # verify the required parameter 'wallet_type_id' is set if @api_client.config.client_side_validation && wallet_type_id.nil? fail ArgumentError, "Missing the required parameter 'wallet_type_id' when calling WalletApi.post_wallets" end # verify the required parameter 'tariff_id' is set if @api_client.config.client_side_validation && tariff_id.nil? fail ArgumentError, "Missing the required parameter 'tariff_id' when calling WalletApi.post_wallets" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling WalletApi.post_wallets" end # verify the required parameter 'currency' is set if @api_client.config.client_side_validation && currency.nil? fail ArgumentError, "Missing the required parameter 'currency' when calling WalletApi.post_wallets" end # verify the required parameter 'event_name' is set if @api_client.config.client_side_validation && event_name.nil? fail ArgumentError, "Missing the required parameter 'event_name' when calling WalletApi.post_wallets" end # resource path local_var_path = '/wallets' # query parameters query_params = {} query_params[:'walletTypeId'] = wallet_type_id query_params[:'tariffId'] = tariff_id query_params[:'userId'] = user_id query_params[:'currency'] = currency query_params[:'eventName'] = event_name query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIP'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'jointUserId'] = opts[:'joint_user_id'] if !opts[:'joint_user_id'].nil? query_params[:'walletTag'] = opts[:'wallet_tag'] if !opts[:'wallet_tag'].nil? query_params[:'eventAlias'] = opts[:'event_alias'] if !opts[:'event_alias'].nil? query_params[:'eventDate'] = opts[:'event_date'] if !opts[:'event_date'].nil? query_params[:'eventMessage'] = opts[:'event_message'] if !opts[:'event_message'].nil? query_params[:'eventPayinStartDate'] = opts[:'event_payin_start_date'] if !opts[:'event_payin_start_date'].nil? query_params[:'eventPayinEndDate'] = opts[:'event_payin_end_date'] if !opts[:'event_payin_end_date'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20028') if @api_client.config.debugging @api_client.config.logger.debug "API called: WalletApi#post_wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_wallet(id, opts = {}) ⇒ InlineResponse20028
update a wallet Modifiy wallet information
419 420 421 422 |
# File 'lib/treezor_client/api/wallet_api.rb', line 419 def put_wallet(id, opts = {}) data, _status_code, _headers = put_wallet_with_http_info(id, opts) data end |
#put_wallet_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20028, Fixnum, Hash)>
update a wallet Modifiy wallet information
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/treezor_client/api/wallet_api.rb', line 443 def put_wallet_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WalletApi.put_wallet ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling WalletApi.put_wallet" end # resource path local_var_path = '/wallets/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'walletTypeId'] = opts[:'wallet_type_id'] if !opts[:'wallet_type_id'].nil? query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil? query_params[:'eventAlias'] = opts[:'event_alias'] if !opts[:'event_alias'].nil? query_params[:'eventDate'] = opts[:'event_date'] if !opts[:'event_date'].nil? query_params[:'eventMessage'] = opts[:'event_message'] if !opts[:'event_message'].nil? query_params[:'eventPayinStartDate'] = opts[:'event_payin_start_date'] if !opts[:'event_payin_start_date'].nil? query_params[:'eventPayinEndDate'] = opts[:'event_payin_end_date'] if !opts[:'event_payin_end_date'].nil? query_params[:'urlImage'] = opts[:'url_image'] if !opts[:'url_image'].nil? query_params[:'imageName'] = opts[:'image_name'] if !opts[:'image_name'].nil? query_params[:'tariffId'] = opts[:'tariff_id'] if !opts[:'tariff_id'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20028') if @api_client.config.debugging @api_client.config.logger.debug "API called: WalletApi#put_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |