lib/epics/cdz.rb in epics-1.8.1 vs lib/epics/cdz.rb in epics-2.0.0
- old
+ new
@@ -1,9 +1,9 @@
class Epics::CDZ < Epics::GenericRequest
attr_accessor :from, :to
- def initialize(client, from, to)
+ def initialize(client, from = nil, to = nil)
super(client)
self.from = from
self.to = to
end
@@ -18,16 +18,20 @@
xml.UserID user_id
xml.Product("EPICS - a ruby ebics kernel", 'Language' => 'de')
xml.OrderDetails {
xml.OrderType 'CDZ'
xml.OrderAttribute 'DZHNN'
- xml.StandardOrderParams {
- xml.DateRange {
- xml.Start from
- xml.End to
+ if !!from && !!to
+ xml.StandardOrderParams {
+ xml.DateRange {
+ xml.Start from
+ xml.End to
+ }
}
- }
- }
+ else
+ xml.StandardOrderParams
+ end
+ }
xml.BankPubKeyDigests {
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
}
xml.SecurityMedium '0000'