Class: Sepa::SoapBuilder

Inherits:
Object
  • Object
show all
Includes:
Utilities
Defined in:
lib/sepa/soap_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utilities

#canonicalize_exclusively, #canonicalized_node, #cert_is_trusted, #cert_request_valid?, #check_validity_against_schema, #csr_to_binary, #decode, #encode, #extract_cert, #format_cert, #format_cert_request, #hmac, #iso_time, #load_body_template, #process_cert_value, #rsa_key, #x509_certificate, #xml_doc

Constructor Details

#initialize(params) ⇒ SoapBuilder

SoapBuilder creates the SOAP structure.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/sepa/soap_builder.rb', line 8

def initialize(params)
  @bank                   = params[:bank]
  @signing_certificate    = params[:signing_certificate]
  @command                = params[:command]
  @content                = params[:content]
  @customer_id            = params[:customer_id]
  @encryption_certificate = params[:encryption_certificate]
  @environment            = params[:environment]
  @file_reference         = params[:file_reference]
  @file_type              = params[:file_type]
  @language               = params[:language]
  @signing_private_key    = params[:signing_private_key]
  @status                 = params[:status]
  @target_id              = params[:target_id]

  @application_request    = ApplicationRequest.new params
  @header_template        = load_header_template
  @template               = load_body_template SOAP_TEMPLATE_PATH

  find_correct_bank_extension
end

Instance Attribute Details

#application_requestObject (readonly)

Returns the value of attribute application_request.



5
6
7
# File 'lib/sepa/soap_builder.rb', line 5

def application_request
  @application_request
end

Instance Method Details

#to_xmlObject



30
31
32
33
# File 'lib/sepa/soap_builder.rb', line 30

def to_xml
  # Returns a complete SOAP message in xml format
  find_correct_build.to_xml
end