Class: Yapstone::SearchApi
- Inherits:
-
Object
- Object
- Yapstone::SearchApi
- Defined in:
- lib/yapstone-payments/api/search_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) ⇒ SearchApi
constructor
A new instance of SearchApi.
-
#search_by_payment_id(authorization, x_yapstone_ip_address, payment_id, opts = {}) ⇒ SearchPaymentResponse
Search with Payment Id Use this endpoint to search for a payment by payment ID.
-
#search_by_payment_id_with_http_info(authorization, x_yapstone_ip_address, payment_id, opts = {}) ⇒ Array<(SearchPaymentResponse, Integer, Hash)>
Search with Payment Id Use this endpoint to search for a payment by payment ID.
-
#search_by_transaction_id(authorization, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) ⇒ SearchPaymentResponse
Search with transaction id Use this endpoint to search for particular transactions using their transaction ID.
-
#search_by_transaction_id_with_http_info(authorization, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) ⇒ Array<(SearchPaymentResponse, Integer, Hash)>
Search with transaction id Use this endpoint to search for particular transactions using their transaction ID.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/yapstone-payments/api/search_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#search_by_payment_id(authorization, x_yapstone_ip_address, payment_id, opts = {}) ⇒ SearchPaymentResponse
Search with Payment Id Use this endpoint to search for a payment by payment ID.
30 31 32 33 |
# File 'lib/yapstone-payments/api/search_api.rb', line 30 def search_by_payment_id(, x_yapstone_ip_address, payment_id, opts = {}) data, _status_code, _headers = search_by_payment_id_with_http_info(, x_yapstone_ip_address, payment_id, opts) data end |
#search_by_payment_id_with_http_info(authorization, x_yapstone_ip_address, payment_id, opts = {}) ⇒ Array<(SearchPaymentResponse, Integer, Hash)>
Search with Payment Id Use this endpoint to search for a payment by payment ID.
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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/yapstone-payments/api/search_api.rb', line 43 def search_by_payment_id_with_http_info(, x_yapstone_ip_address, payment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchApi.search_by_payment_id ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling SearchApi.search_by_payment_id" end # verify the required parameter 'x_yapstone_ip_address' is set if @api_client.config.client_side_validation && x_yapstone_ip_address.nil? fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling SearchApi.search_by_payment_id" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling SearchApi.search_by_payment_id" end # resource path local_var_path = '/v2/search/payment/{paymentId}'.sub('{' + 'paymentId' + '}', CGI.escape(payment_id.to_s).gsub('%2F', '/')) # 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']) header_params[:'Authorization'] = header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SearchPaymentResponse' # auth_names auth_names = opts[:auth_names] || ['Bearer'] = opts.merge( :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: SearchApi#search_by_payment_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_by_transaction_id(authorization, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) ⇒ SearchPaymentResponse
Search with transaction id Use this endpoint to search for particular transactions using their transaction ID.
110 111 112 113 |
# File 'lib/yapstone-payments/api/search_api.rb', line 110 def search_by_transaction_id(, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) data, _status_code, _headers = search_by_transaction_id_with_http_info(, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts) data end |
#search_by_transaction_id_with_http_info(authorization, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) ⇒ Array<(SearchPaymentResponse, Integer, Hash)>
Search with transaction id Use this endpoint to search for particular transactions using their transaction ID.
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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/yapstone-payments/api/search_api.rb', line 124 def search_by_transaction_id_with_http_info(, x_yapstone_fpsid, x_yapstone_ip_address, transaction_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchApi.search_by_transaction_id ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling SearchApi.search_by_transaction_id" end # verify the required parameter 'x_yapstone_fpsid' is set if @api_client.config.client_side_validation && x_yapstone_fpsid.nil? fail ArgumentError, "Missing the required parameter 'x_yapstone_fpsid' when calling SearchApi.search_by_transaction_id" end # verify the required parameter 'x_yapstone_ip_address' is set if @api_client.config.client_side_validation && x_yapstone_ip_address.nil? fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling SearchApi.search_by_transaction_id" 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 SearchApi.search_by_transaction_id" end # resource path local_var_path = '/v2/search/transaction/{transactionId}'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s).gsub('%2F', '/')) # 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']) header_params[:'Authorization'] = header_params[:'X-Yapstone-fpsid'] = x_yapstone_fpsid header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SearchPaymentResponse' # auth_names auth_names = opts[:auth_names] || ['Bearer'] = opts.merge( :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: SearchApi#search_by_transaction_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |