Class: LazerPayModule::Swap

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/lazerpay/main_module.rb

Instance Method Summary collapse

Constructor Details

#initializeSwap

Returns a new instance of Swap.



108
# File 'lib/lazerpay/main_module.rb', line 108

def initialize; end

Instance Method Details

#get_swap_amount(payload) ⇒ Object



116
117
118
119
120
# File 'lib/lazerpay/main_module.rb', line 116

def get_swap_amount payload
    response = Agent.post( "/swap/crypto/amount-out", { secret_key: @@sk, public_key: @@pk, data: payload } );

    return response.to_h;
end

#init(payload) ⇒ Object



110
111
112
113
114
# File 'lib/lazerpay/main_module.rb', line 110

def init payload
    response = Agent.post( "/swap/crypto", { secret_key: @@sk, public_key: @@pk, data: payload } );

    return response.to_h;
end