Class: Sepa::ApplicationRequest
- Inherits:
-
Object
- Object
- Sepa::ApplicationRequest
- Defined in:
- lib/sepa/application_request.rb
Instance Method Summary collapse
- #get_as_base64 ⇒ Object
-
#initialize(params) ⇒ ApplicationRequest
constructor
A new instance of ApplicationRequest.
Constructor Details
#initialize(params) ⇒ ApplicationRequest
Returns a new instance of ApplicationRequest.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sepa/application_request.rb', line 3 def initialize(params) # Used by most, both Nordea and Danske @command = check_command(params.fetch(:command)) @customer_id = params.fetch(:customer_id) @environment = params.fetch(:environment) @target_id = params[:target_id] @status = params[:status] @file_type = params[:file_type] @content = params[:content] @file_reference = params[:file_reference] @private_key, @cert, @pin, @service, @csr, @hmac, @bank_root_cert_serial,@request_id = '' # Set values for the previously defined attributes initialize_required_fields_per_request(params) end |
Instance Method Details
#get_as_base64 ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sepa/application_request.rb', line 21 def get_as_base64 load_template(@command) set_nodes_contents # No signature for Certificate Requests if @command != :get_certificate && @command != :get_bank_certificate process_signature end Base64.encode64(@ar.to_xml) end |