Class: Okpay::API::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/okpay.rb

Constant Summary collapse

DEFAULTS =
{
  :wsdl => File.join(File.dirname(File.expand_path(__FILE__)), '../config/wsdl.xml')
}
METHODS =
{
  :get_date_time => [], 
  :wallet_get_balance => [],
  :wallet_get_currency_balance => [:currency],
  :send_money => [:reciever, :currency, :amount, :comment, :is_receiver_pays_fees, :invoice],
  :account_check => [:account],
  :transaction_get => [:txn_id, :invoice],
  :transaction_history => [:from, :till, :page_size, :page_number],
  :debiit_card_prepay => [:email, :currency, :is_courier_delivery, :comment],
  :withdraw_to_ecurrency => [:payment_method, :pay_system_account, :amount, :currency, :fees_from_amount, :invoice],
  :withdraw_to_ecurrency_calculate => [:payment_method, :amount, :currency, :fees_from_amount]
}

Instance Method Summary collapse

Constructor Details

#initialize(wallet_id, api_key, options = {}) ⇒ Client

Returns a new instance of Client.



32
33
34
35
36
37
# File 'lib/okpay.rb', line 32

def initialize(wallet_id, api_key, options={})
  @api_key = api_key.strip
  @wallet_id = wallet_id.strip
  @config = DEFAULTS.merge! options
  @soap_client = Savon.client(wsdl: @config[:wsdl])
end