lib/epics/client.rb in epics-1.5.0 vs lib/epics/client.rb in epics-1.5.1
- old
+ new
@@ -113,22 +113,34 @@
end
[bank_x, bank_e]
end
+ def AZV(document)
+ upload(Epics::AZV, document)
+ end
+
def CD1(document)
upload(Epics::CD1, document)
end
def CDD(document)
upload(Epics::CDD, document)
end
+ def CDS(document)
+ upload(Epics::CDS, document)
+ end
+
def CCT(document)
upload(Epics::CCT, document)
end
+ def CCS(document)
+ upload(Epics::CCS, document)
+ end
+
def STA(from = nil, to = nil)
download(Epics::STA, from, to)
end
def VMK(from = nil, to = nil)
@@ -184,12 +196,14 @@
def upload(order_type, document)
order = order_type.new(self, document)
res = post(url, order.to_xml).body
order.transaction_id = res.transaction_id
+ order_id = res.order_id
+
res = post(url, order.to_transfer_xml).body
- return res.transaction_id, res.order_id
+ return res.transaction_id, [res.order_id, order_id].detect { |id| id.to_s.chars.any? }
end
def download(order_type, *args)
document = order_type.new(self, *args)
res = post(url, document.to_xml).body