Class: FdxV660Api::RecipientsController
- Inherits:
-
BaseController
- Object
- BaseController
- FdxV660Api::RecipientsController
- Defined in:
- lib/fdx_v660_api/controllers/recipients_controller.rb
Overview
RecipientsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#create_recipient(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) ⇒ ApiResponse
Request to Register Recipient by Creating a Recipient Record 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 here.
-
#delete_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Delete data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party.
-
#get_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Get data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party.
-
#get_registry_recipient(x_fapi_interaction_id, recipient_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Get a specific recipient 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) Uniquely identifies a Recipient whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request.
-
#get_registry_recipients(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Get recipients 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 provider to send the next set of records.
-
#update_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) ⇒ ApiResponse
Update data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party.
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
#create_recipient(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) ⇒ ApiResponse
Request to Register Recipient by Creating a Recipient Record 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 here
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 22 def create_recipient(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/register', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .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')) .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) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecipientProvider.method(:from_hash)) .is_api_response(true)) .execute end |
#delete_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Delete data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party. Recipient identifier Client ID need not be paired with a Client Secret and can be used as an identifier only whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 145 def delete_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/register/{client_id}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(client_id, key: 'client_id') .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')) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .is_response_void(true) .is_api_response(true)) .execute end |
#get_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Get data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party. Recipient identifier Client ID need not be paired with a Client Secret and can be used as an identifier only whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 61 def get_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/register/{client_id}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(client_id, key: 'client_id') .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('application/json', key: 'accept')) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecipientProvider.method(:from_hash)) .is_api_response(true)) .execute end |
#get_registry_recipient(x_fapi_interaction_id, recipient_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) ⇒ ApiResponse
Get a specific recipient 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) Uniquely identifies a Recipient whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 227 def get_registry_recipient(x_fapi_interaction_id, recipient_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/recipients/{recipientId}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(recipient_id, key: 'recipientId') .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('application/json', key: 'accept')) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecipientRecordAtEcosystemRegistry.method(:from_hash)) .is_api_response(true)) .execute end |
#get_registry_recipients(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, offset: nil, page_key: nil, limit: nil) ⇒ ApiResponse
Get recipients 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 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
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 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 188 def get_registry_recipients(x_fapi_interaction_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, offset: nil, page_key: nil, limit: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/recipients', 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')) .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')) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecipientRecordsAtEcosystemRegistry.method(:from_hash)) .is_api_response(true)) .execute end |
#update_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) ⇒ ApiResponse
Update data for a specific recipient identified by client_id 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) Uniquely identifies DR, the authorized third party. Recipient identifier Client ID need not be paired with a Client Secret and can be used as an identifier only whether the customer is present (USER) or it is a BATCH operation financial institution responding to the request here
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 |
# File 'lib/fdx_v660_api/controllers/recipients_controller.rb', line 102 def update_recipient(x_fapi_interaction_id, client_id, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/register/{client_id}', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(client_id, key: 'client_id') .is_required(true) .should_encode(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')) .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) .auth(Single.new('OAuthFapi1Baseline'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(RecipientProvider.method(:from_hash)) .is_api_response(true)) .execute end |