Class: Epics::HAC
- Inherits:
-
GenericRequest
- Object
- GenericRequest
- Epics::HAC
- Defined in:
- lib/epics/hac.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Attributes inherited from GenericRequest
Instance Method Summary collapse
- #date_range ⇒ Object
- #header ⇒ Object
-
#initialize(client, from = nil, to = nil) ⇒ HAC
constructor
By default HAC only returns data for transactions which have not yet been fetched.
Methods inherited from GenericRequest
#auth_signature, #body, #nonce, #root, #timestamp, #to_receipt_xml, #to_transfer_xml, #to_xml
Constructor Details
#initialize(client, from = nil, to = nil) ⇒ HAC
By default HAC only returns data for transactions which have not yet been fetched. Therefore, most applications not not have to specify a date range, but can simply fetch the status and be done
7 8 9 10 11 |
# File 'lib/epics/hac.rb', line 7 def initialize(client, from = nil, to = nil) super(client) self.from = from self.to = to end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
2 3 4 |
# File 'lib/epics/hac.rb', line 2 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
2 3 4 |
# File 'lib/epics/hac.rb', line 2 def to @to end |
Instance Method Details
#date_range ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/epics/hac.rb', line 13 def date_range if !!from && !!to { "DateRange" => { "Start" => from, "End" => to } } else { :content! => '' } end end |
#header ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/epics/hac.rb', line 21 def header { :@authenticate => true, static: { "HostID" => host_id, "Nonce" => nonce, "Timestamp" => , "PartnerID" => partner_id, "UserID" => user_id, "Product" => { :@Language => "de", :content! => "EPICS - a ruby ebics kernel" }, "OrderDetails" => { "OrderType" => "HAC", "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 |