Class: FdxV660Api::TermsAndConditionsController
- Inherits:
-
BaseController
- Object
- BaseController
- FdxV660Api::TermsAndConditionsController
- Defined in:
- lib/fdx_v660_api/controllers/terms_and_conditions_controller.rb
Overview
TermsAndConditionsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_terms_and_conditions(x_fapi_interaction_id, account_id, accept_language: nil, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Retrieve the full static terms and conditions for the account identified by
{accountId}.
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
#get_terms_and_conditions(x_fapi_interaction_id, account_id, accept_language: nil, fdx_api_actor_type: nil, fdx_api_data_provider_id: nil, fdx_api_data_recipient_id: nil) ⇒ ApiResponse
Retrieve the full static terms and conditions for the account identified
by {accountId}. Use the Accept HTTP request
header
to indicate one or more content types to request for the response in
comma-separated string array format. Use application/json to request
data (and embedded URI links to documents or HTML pages), or
application/pdf or application/zip to request documents
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)
[Accept-Language HTTP request
header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Header
s/Accept-Language) to indicate one or more languages to request for the
response content in comma-separated string array format. English (code
en) is the default if header is not sent. Spanish is es and French is
fr. Provider may support any languages they choose
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
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 77 78 79 80 81 82 83 |
# File 'lib/fdx_v660_api/controllers/terms_and_conditions_controller.rb', line 36 def get_terms_and_conditions(x_fapi_interaction_id, account_id, accept_language: nil, 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, '/accounts/{accountId}/terms-and-conditions', Server::DEFAULT) .header_param(new_parameter(x_fapi_interaction_id, key: 'x-fapi-interaction-id') .is_required(true)) .template_param(new_parameter(account_id, key: 'accountId') .is_required(true) .should_encode(true)) .header_param(new_parameter(accept_language, key: 'Accept-Language')) .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(proc do |response, should_symbolize| APIHelper.deserialize_union_type( UnionTypeLookUp.get(:TermsAndConditions), response, should_symbolize, true ) end) .is_api_response(true) .local_error('400', 'Accept header media type(s) sent by client are not supported', ErrorException) .local_error('404', 'Account with id 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 |