Class: Sepa::SoapBuilder
- Inherits:
-
Object
- Object
- Sepa::SoapBuilder
- Defined in:
- lib/sepa/soap_builder.rb
Instance Method Summary collapse
- #get_ar_as_base64 ⇒ Object
-
#initialize(params) ⇒ SoapBuilder
constructor
SoapBuilder checks and validates incoming params and creates the SOAP structure.
- #to_xml ⇒ Object
Constructor Details
#initialize(params) ⇒ SoapBuilder
SoapBuilder checks and validates incoming params and creates the SOAP structure
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sepa/soap_builder.rb', line 4 def initialize(params) check_params(params) # Generate a request ID for the request params[:request_id] = generate_request_id # Check if the bank&command need keys/certificates/csr's @params = initialize_certificates_and_csr(params) check_if_bank_allows_command(@params) @ar = ApplicationRequest.new(@params).get_as_base64 @bank = @params.fetch(:bank) find_correct_bank_extension(@bank) @template_path = File.('../xml_templates/soap/', __FILE__) end |
Instance Method Details
#get_ar_as_base64 ⇒ Object
28 29 30 |
# File 'lib/sepa/soap_builder.rb', line 28 def get_ar_as_base64 @ar end |
#to_xml ⇒ Object
23 24 25 26 |
# File 'lib/sepa/soap_builder.rb', line 23 def to_xml # Returns a complete SOAP message in xml format find_correct_build(@params).to_xml end |