Class: CityPayApiClient::WebHooks
- Inherits:
-
Object
- Object
- CityPayApiClient::WebHooks
- Defined in:
- lib/citypay_api_client/api/web_hooks__.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ WebHooks
constructor
A new instance of WebHooks.
-
#web_hook_channel_create_request(web_hook_channel_create_request, opts = {}) ⇒ WebHookChannelCreateResponse
Web Hook Channel Create Request A WebHookChannel is required to establish a connection with our event notification system.
-
#web_hook_channel_create_request_with_http_info(web_hook_channel_create_request, opts = {}) ⇒ Array<(WebHookChannelCreateResponse, Integer, Hash)>
Web Hook Channel Create Request A WebHookChannel is required to establish a connection with our event notification system.
-
#web_hook_channel_delete_request(web_hook_channel_delete_request, opts = {}) ⇒ Acknowledgement
Web Hook Channel Delete Request The WebHookChannelDeleteRequest allows you to remove an existing WebHookChannel from the event notification system.
-
#web_hook_channel_delete_request_with_http_info(web_hook_channel_delete_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Web Hook Channel Delete Request The WebHookChannelDeleteRequest allows you to remove an existing WebHookChannel from the event notification system.
-
#web_hook_subscription_request(web_hook_subscription_request, opts = {}) ⇒ WebHookSubscriptionResponse
Web Hook Subscription Request The WebHookSubscriptionRequest is used to define and activate event triggers for an existing WebHookChannel.
-
#web_hook_subscription_request_with_http_info(web_hook_subscription_request, opts = {}) ⇒ Array<(WebHookSubscriptionResponse, Integer, Hash)>
Web Hook Subscription Request The WebHookSubscriptionRequest is used to define and activate event triggers for an existing WebHookChannel.
-
#web_hook_unsubscribe_request(web_hook_unsubscribe_request, opts = {}) ⇒ Acknowledgement
Web Hook Unsubscribe Request The WebHookUnsubscribeRequest is used to remove an existing webhook subscription from the system.
-
#web_hook_unsubscribe_request_with_http_info(web_hook_unsubscribe_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Web Hook Unsubscribe Request The WebHookUnsubscribeRequest is used to remove an existing webhook subscription from the system.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WebHooks
Returns a new instance of WebHooks.
19 20 21 |
# File 'lib/citypay_api_client/api/web_hooks__.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/citypay_api_client/api/web_hooks__.rb', line 17 def api_client @api_client end |
Instance Method Details
#web_hook_channel_create_request(web_hook_channel_create_request, opts = {}) ⇒ WebHookChannelCreateResponse
Web Hook Channel Create Request A WebHookChannel is required to establish a connection with our event notification system. The channel serves as the communication link between your application and the events generated by the payment gateway. When you register a WebHookChannel, you’re defining the endpoint where we will deliver notifications, such as payment events. The WebHookChannel encapsulates important configuration details like the endpoint type (e.g., HTTP), the client ID, and security parameters. However, the channel itself does not specify which events will be sent but should be considered as the pipeline for receiving those events. After registering a channel, you can then configure triggers separately using a subscription request to define which specific payment events should flow through this channel.
27 28 29 30 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 27 def web_hook_channel_create_request(web_hook_channel_create_request, opts = {}) data, _status_code, _headers = web_hook_channel_create_request_with_http_info(web_hook_channel_create_request, opts) data end |
#web_hook_channel_create_request_with_http_info(web_hook_channel_create_request, opts = {}) ⇒ Array<(WebHookChannelCreateResponse, Integer, Hash)>
Web Hook Channel Create Request A WebHookChannel is required to establish a connection with our event notification system. The channel serves as the communication link between your application and the events generated by the payment gateway. When you register a WebHookChannel, you're defining the endpoint where we will deliver notifications, such as payment events. The WebHookChannel encapsulates important configuration details like the endpoint type (e.g., HTTP), the client ID, and security parameters. However, the channel itself does not specify which events will be sent but should be considered as the pipeline for receiving those events. After registering a channel, you can then configure triggers separately using a subscription request to define which specific payment events should flow through this channel.
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 84 85 86 87 88 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 37 def web_hook_channel_create_request_with_http_info(web_hook_channel_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebHooks.web_hook_channel_create_request ...' end # verify the required parameter 'web_hook_channel_create_request' is set if @api_client.config.client_side_validation && web_hook_channel_create_request.nil? fail ArgumentError, "Missing the required parameter 'web_hook_channel_create_request' when calling WebHooks.web_hook_channel_create_request" end # resource path local_var_path = '/hooks/channel/create' # 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', 'text/xml']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(web_hook_channel_create_request) # return_type return_type = opts[:debug_return_type] || 'WebHookChannelCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"WebHooks.web_hook_channel_create_request", :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: WebHooks#web_hook_channel_create_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#web_hook_channel_delete_request(web_hook_channel_delete_request, opts = {}) ⇒ Acknowledgement
Web Hook Channel Delete Request The WebHookChannelDeleteRequest allows you to remove an existing WebHookChannel from the event notification system. By specifying the channel ID, you can deactivate the communication link between your application and the payment gateway’s event system. Deleting a channel effectively halts any further notifications being sent to the associated endpoint, ensuring that no additional events are processed through that channel.
95 96 97 98 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 95 def web_hook_channel_delete_request(web_hook_channel_delete_request, opts = {}) data, _status_code, _headers = web_hook_channel_delete_request_with_http_info(web_hook_channel_delete_request, opts) data end |
#web_hook_channel_delete_request_with_http_info(web_hook_channel_delete_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Web Hook Channel Delete Request The WebHookChannelDeleteRequest allows you to remove an existing WebHookChannel from the event notification system. By specifying the channel ID, you can deactivate the communication link between your application and the payment gateway’s event system. Deleting a channel effectively halts any further notifications being sent to the associated endpoint, ensuring that no additional events are processed through that channel.
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 149 150 151 152 153 154 155 156 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 105 def web_hook_channel_delete_request_with_http_info(web_hook_channel_delete_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebHooks.web_hook_channel_delete_request ...' end # verify the required parameter 'web_hook_channel_delete_request' is set if @api_client.config.client_side_validation && web_hook_channel_delete_request.nil? fail ArgumentError, "Missing the required parameter 'web_hook_channel_delete_request' when calling WebHooks.web_hook_channel_delete_request" end # resource path local_var_path = '/hooks/channel/delete' # 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', 'text/xml']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(web_hook_channel_delete_request) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"WebHooks.web_hook_channel_delete_request", :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: WebHooks#web_hook_channel_delete_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#web_hook_subscription_request(web_hook_subscription_request, opts = {}) ⇒ WebHookSubscriptionResponse
Web Hook Subscription Request The WebHookSubscriptionRequest is used to define and activate event triggers for an existing WebHookChannel. This request specifies the events or conditions that your application wants to be notified about, ensuring that only relevant event data flows through the channel.
163 164 165 166 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 163 def web_hook_subscription_request(web_hook_subscription_request, opts = {}) data, _status_code, _headers = web_hook_subscription_request_with_http_info(web_hook_subscription_request, opts) data end |
#web_hook_subscription_request_with_http_info(web_hook_subscription_request, opts = {}) ⇒ Array<(WebHookSubscriptionResponse, Integer, Hash)>
Web Hook Subscription Request The WebHookSubscriptionRequest is used to define and activate event triggers for an existing WebHookChannel. This request specifies the events or conditions that your application wants to be notified about, ensuring that only relevant event data flows through the channel.
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 173 def web_hook_subscription_request_with_http_info(web_hook_subscription_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebHooks.web_hook_subscription_request ...' end # verify the required parameter 'web_hook_subscription_request' is set if @api_client.config.client_side_validation && web_hook_subscription_request.nil? fail ArgumentError, "Missing the required parameter 'web_hook_subscription_request' when calling WebHooks.web_hook_subscription_request" end # resource path local_var_path = '/hooks/subscribe' # 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', 'text/xml']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(web_hook_subscription_request) # return_type return_type = opts[:debug_return_type] || 'WebHookSubscriptionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"WebHooks.web_hook_subscription_request", :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: WebHooks#web_hook_subscription_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#web_hook_unsubscribe_request(web_hook_unsubscribe_request, opts = {}) ⇒ Acknowledgement
Web Hook Unsubscribe Request The WebHookUnsubscribeRequest is used to remove an existing webhook subscription from the system. This allows clients to stop receiving event notifications for specific webhook subscriptions that are no longer needed.
231 232 233 234 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 231 def web_hook_unsubscribe_request(web_hook_unsubscribe_request, opts = {}) data, _status_code, _headers = web_hook_unsubscribe_request_with_http_info(web_hook_unsubscribe_request, opts) data end |
#web_hook_unsubscribe_request_with_http_info(web_hook_unsubscribe_request, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Web Hook Unsubscribe Request The WebHookUnsubscribeRequest is used to remove an existing webhook subscription from the system. This allows clients to stop receiving event notifications for specific webhook subscriptions that are no longer needed.
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 284 285 286 287 288 289 290 291 292 |
# File 'lib/citypay_api_client/api/web_hooks__.rb', line 241 def web_hook_unsubscribe_request_with_http_info(web_hook_unsubscribe_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebHooks.web_hook_unsubscribe_request ...' end # verify the required parameter 'web_hook_unsubscribe_request' is set if @api_client.config.client_side_validation && web_hook_unsubscribe_request.nil? fail ArgumentError, "Missing the required parameter 'web_hook_unsubscribe_request' when calling WebHooks.web_hook_unsubscribe_request" end # resource path local_var_path = '/hooks/unsubscribe' # 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', 'text/xml']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(web_hook_unsubscribe_request) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"WebHooks.web_hook_unsubscribe_request", :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: WebHooks#web_hook_unsubscribe_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |