Class: Epics::FDL

Inherits:
GenericRequest show all
Defined in:
lib/epics/fdl.rb

Instance Attribute Summary

Attributes inherited from GenericRequest

#client, #options, #transaction_id

Instance Method Summary collapse

Methods inherited from GenericRequest

#auth_signature, #body, #initialize, #nonce, #root, #timestamp, #to_receipt_xml, #to_transfer_xml, #to_xml

Constructor Details

This class inherits a constructor from Epics::GenericRequest

Instance Method Details

#headerObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/epics/fdl.rb', line 4

def header
  fdl_order_params = Hash.new.tap do |params|
    params[:DateRange] = {
      Start: options[:from],
      End: options[:to],
    } if options[:from] && options[:to]
    params[:FileFormat] = options[:file_format]
  end

  client.header_request.build(
    nonce: nonce,
    timestamp: timestamp,
    order_type: 'FDL',
    order_attribute: 'DZHNN',
    order_id: 'A00A',
    custom_order_params: { FDLOrderParams: fdl_order_params },
    mutable: { TransactionPhase: 'Initialisation' }
  )
end