Sha256: 077fb103b9c58a77c4e0d9f85d89d2c1ff5aeb8e2b40172d78a2b6efc87dbe7e

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

class Epics::STA < Epics::GenericRequest
  attr_accessor :from, :to

  def initialize(client, from = nil, to = nil)
    super(client)
    self.from = from
    self.to = to
  end

  def date_range
    if !!from && !!to
      { "DateRange" => { "Start" => from, "End" => to } }
    else
      { :content! => '' }
    end
  end

  def header
    {
      :@authenticate => true,
      static: {
        "HostID" => host_id,
        "Nonce" => nonce,
        "Timestamp" => timestamp,
        "PartnerID" => partner_id,
        "UserID" => user_id,
        "Product" => {
          :@Language => "de",
          :content! => "EPICS - a ruby ebics kernel"
        },
        "OrderDetails" => {
          "OrderType" => "STA",
          "OrderAttribute" => "DZHNN",
          "StandardOrderParams" => date_range
        },
        "BankPubKeyDigests" => {
          "Authentication" => {
            :@Version => "X002",
            :@Algorithm => "http://www.w3.org/2001/04/xmlenc#sha256",
            :content! => client.bank_x.public_digest
          },
          "Encryption" => {
            :@Version => "E002",
            :@Algorithm => "http://www.w3.org/2001/04/xmlenc#sha256",
            :content! => client.bank_e.public_digest
          }
        },
        "SecurityMedium" => "0000"
     },
      "mutable" => {
        "TransactionPhase" => "Initialisation"
      }
    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
epics-1.5.1 lib/epics/sta.rb
epics-1.5.0 lib/epics/sta.rb
epics-1.4.1 lib/epics/sta.rb
epics-1.4.0 lib/epics/sta.rb