Class: FdxV660Api::RecurringPaymentsController
- Inherits:
-
BaseController
- Object
- BaseController
- FdxV660Api::RecurringPaymentsController
- Defined in:
- lib/fdx_v660_api/controllers/recurring_payments_controller.rb
Overview
RecurringPaymentsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#cancel_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Cancel a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier.
-
#get_payments_for_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Search for payments associated with the recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier.
-
#get_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Get a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier.
-
#schedule_recurring_payment(x_fapi_interaction_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) ⇒ ApiResponse
Schedule a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) requests whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made type description here.
-
#search_for_recurring_payments(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Search for recurring payments identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made been created or updated since the nextUpdateId provider to send the next set of records.
-
#update_recurring_payment(x_fapi_interaction_id, recurring_payment_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) ⇒ ApiResponse
Update a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from FdxV660Api::BaseController
Instance Method Details
#cancel_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Cancel a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier. Uniquely identifies a recurring payment whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made
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 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 292 def cancel_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/recurring-payments/{recurringPaymentId}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(recurring_payment_id, key: 'recurringPaymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecurringPaymentEntity.method(:from_hash)) .is_api_response(true) .local_error('400', 'Recurring payment cannot be modified or cancelled at this time'\ '. Likely due to the state that it is in', ErrorException) .local_error('404', 'A recurring payment with provided ID was not found', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |
#get_payments_for_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Search for payments associated with the recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier. Uniquely identifies a recurring payment whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made been created or updated since the nextUpdateId provider to send the next set of records. Deprecated in favor of PageKeyQuery, will be removed with a future major release provider to send the next set of records. Pagination can be implemented per provider's preference consumer wishes to receive. Providers should implement reasonable default/maximum/minimum values based on their internal architecture and update their documentation accordingly
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 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 363 def get_payments_for_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/recurring-payments/{recurringPaymentId}/payments', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(recurring_payment_id, key: 'recurringPaymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .query_param(new_parameter(updated_since, key: 'updatedSince')) .query_param(new_parameter(offset, key: 'offset')) .query_param(new_parameter(page_key, key: 'pageKey')) .query_param(new_parameter(limit, key: 'limit')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(PaymentsEntity.method(:from_hash)) .is_api_response(true) .local_error('404', 'A recurring payment with provided ID was not found', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |
#get_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Get a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier. Uniquely identifies a recurring payment whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made
162 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 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 162 def get_recurring_payment(x_fapi_interaction_id, recurring_payment_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/recurring-payments/{recurringPaymentId}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(recurring_payment_id, key: 'recurringPaymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecurringPaymentEntity.method(:from_hash)) .is_api_response(true) .local_error('404', 'A recurring payment with provided ID was not found', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |
#schedule_recurring_payment(x_fapi_interaction_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) ⇒ ApiResponse
Schedule a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) requests whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made type description here
95 96 97 98 99 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 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 95 def schedule_recurring_payment(x_fapi_interaction_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/recurring-payments', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .header_param(new_parameter(idempotency_key, key: 'idempotency-key') .is_required(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecurringPaymentEntity.method(:from_hash)) .is_api_response(true) .local_error('400', 'Request is invalid', ErrorException) .local_error('404', 'Requested payment is invalid', ErrorException) .local_error('409', 'Duplicate Request', RecurringPaymentEntityErrorException) .local_error('422', 'Account type not supported', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |
#search_for_recurring_payments(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Search for recurring payments identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made been created or updated since the nextUpdateId provider to send the next set of records. Deprecated in favor of PageKeyQuery, will be removed with a future major release provider to send the next set of records. Pagination can be implemented per provider's preference consumer wishes to receive. Providers should implement reasonable default/maximum/minimum values based on their internal architecture and update their documentation accordingly
34 35 36 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 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 34 def search_for_recurring_payments(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, updated_since: nil, offset: nil, page_key: nil, limit: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/recurring-payments', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .query_param(new_parameter(updated_since, key: 'updatedSince')) .query_param(new_parameter(offset, key: 'offset')) .query_param(new_parameter(page_key, key: 'pageKey')) .query_param(new_parameter(limit, key: 'limit')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecurringPaymentsEntity.method(:from_hash)) .is_api_response(true) .local_error('404', 'Data not found for request parameters', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |
#update_recurring_payment(x_fapi_interaction_id, recurring_payment_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) ⇒ ApiResponse
Update a recurring payment identifier for this interaction, as defined by [FAPI 2.0 Implementation Advice, 2.2.1 x-fapi-interaction-id](https://openid.bitbucket.io/fapi/fapi-2_0-implement ation_advice.html#name-x-fapi-interaction-id) Identifier. Uniquely identifies a recurring payment requests whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request for the data recipient(s) on whose behalf the request is being made type description here
221 222 223 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 |
# File 'lib/fdx_v660_api/controllers/recurring_payments_controller.rb', line 221 def update_recurring_payment(x_fapi_interaction_id, recurring_payment_id, idempotency_key, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/recurring-payments/{recurringPaymentId}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(recurring_payment_id, key: 'recurringPaymentId') .is_required(true) .should_encode(true)) .header_param(new_parameter(idempotency_key, key: 'idempotency-key') .is_required(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .header_param(new_parameter(fdx_api_actor_type, key: 'FDX-API-Actor-Type')) .header_param(new_parameter(fdx_api_data_provider_id, key: 'FDX-API-Data-Provider-Id')) .header_param(new_parameter(fdx_api_data_recipient_id, key: 'FDX-API-Data-Recipient-Id')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecurringPaymentEntity.method(:from_hash)) .is_api_response(true) .local_error('400', 'Request is invalid', ErrorException) .local_error('404', 'Requested recurring payment change is invalid', ErrorException) .local_error('409', 'Duplicate Request', RecurringPaymentEntityErrorException) .local_error('422', 'Account type not supported', ErrorException) .local_error('500', 'Catch-all exception where request was not processed due to an'\ ' internal outage/issue. Consider other more specific errors'\ ' before using this error', ErrorException) .local_error('501', 'Error when FdxVersion in Header is not one of those'\ ' implemented at backend', ErrorException) .local_error('503', 'System is down for maintenance', ErrorException)) .execute end |