Class: Pesamoni::DefaultApi
- Inherits:
-
Object
- Object
- Pesamoni::DefaultApi
- Defined in:
- lib/pesamoni_ruby/api/default_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ DefaultApi
constructor
A new instance of DefaultApi.
-
#transactions_post(method, opts = {}) ⇒ InlineResponse200
Below are parameters and their respective expected responses.
-
#transactions_post_with_http_info(method, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Below are parameters and their respective expected responses.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ DefaultApi
Returns a new instance of DefaultApi.
7 8 9 |
# File 'lib/pesamoni_ruby/api/default_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/pesamoni_ruby/api/default_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#transactions_post(method, opts = {}) ⇒ InlineResponse200
Below are parameters and their respective expected responses. In order to try out the service, simply click Try it out.
28 29 30 31 |
# File 'lib/pesamoni_ruby/api/default_api.rb', line 28 def transactions_post(method, opts = {}) data, _status_code, _headers = transactions_post_with_http_info(method, opts) data end |
#transactions_post_with_http_info(method, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Below are parameters and their respective expected responses. In order to try out the service, simply click Try it out.
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 95 96 97 98 99 100 |
# File 'lib/pesamoni_ruby/api/default_api.rb', line 51 def transactions_post_with_http_info(method, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transactions_post ...' end # verify the required parameter 'method' is set if @api_client.config.client_side_validation && method.nil? fail ArgumentError, "Missing the required parameter 'method' when calling DefaultApi.transactions_post" end # resource path local_var_path = '/transactions' # query parameters query_params = {} query_params[:'method'] = method query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil? query_params[:'mobile'] = opts[:'mobile'] if !opts[:'mobile'].nil? query_params[:'holdername'] = opts[:'holdername'] if !opts[:'holdername'].nil? query_params[:'cardnumber'] = opts[:'cardnumber'] if !opts[:'cardnumber'].nil? query_params[:'cvv'] = opts[:'cvv'] if !opts[:'cvv'].nil? query_params[:'exp'] = opts[:'exp'] if !opts[:'exp'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil? query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil? query_params[:'genericmsg'] = opts[:'genericmsg'] if !opts[:'genericmsg'].nil? query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil? query_params[:'bouquet'] = opts[:'bouquet'] if !opts[:'bouquet'].nil? query_params[:'payoption'] = opts[:'payoption'] if !opts[:'payoption'].nil? query_params[:'meternumber'] = opts[:'meternumber'] if !opts[:'meternumber'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apipassword', 'apiusername'] 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 => 'InlineResponse200') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transactions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |