Class: Ebics::File::Upload
Constant Summary
Constants inherited from Client
Client::BANK_NAME, Client::URL_EBICS_SERVER
Instance Attribute Summary
Attributes inherited from Client
#banks, #conf, #partners, #users
Instance Method Summary collapse
Methods inherited from Client
#create_bank, #create_partner, #create_user_directories, #initialize, #load_user, #log, #messages, #require_product, #require_user, #require_user_and_product, #t
Constructor Details
This class inherits a constructor from Ebics::Client
Instance Method Details
#run(path, options) ⇒ Object
22 23 24 25 |
# File 'lib/ebics/file/upload.rb', line 22 def run(path, ) require_user_and_product() send_file(path, @user, @product) end |
#send_file(path, user, product) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ebics/file/upload.rb', line 5 def send_file(path, user, product) session = Java::OrgKopiEbicsSession.EbicsSession.new(user, conf) session.add_session_param 'FORMAT', 'pain.xxx.cfonb160.dct' session.add_session_param 'TEST', 'true' session.add_session_param 'EBCDIC', 'false' session.product = product conf.trace_manager.trace_directory = conf.get_transfer_trace_directory(user) transfer_manager = Java::OrgKopiEbicsClient.FileTransfer.new(session) transfer_manager.send_file( Java::OrgKopiEbicsIo::IOUtils.get_file_content(path), Java::OrgKopiEbicsSession.OrderType::FUL ) end |