class UsersAsync
Public Class Methods
new(username, password)
click to toggle source
# File lib/usersAsync.rb, line 4 def initialize(username, password) @username = username @password = password @client = Savon.client(wsdl: "http://api.payamak-panel.com/post/users.asmx?wsdl") end
Public Instance Methods
add(options)
click to toggle source
# File lib/usersAsync.rb, line 24 def add(options) execute(:add_user,options) end
add_complete(options)
click to toggle source
# File lib/usersAsync.rb, line 27 def add_complete(options) execute(:add_user_complete,options) end
add_payment(options)
click to toggle source
# File lib/usersAsync.rb, line 21 def add_payment(options) execute(:add_payment,options) end
add_with_location(options)
click to toggle source
# File lib/usersAsync.rb, line 30 def add_with_location(options) execute(:add_user_with_location,options) end
authenticate()
click to toggle source
# File lib/usersAsync.rb, line 33 def authenticate execute(:authenticate_user,{}) end
change_credit(amount, description, targetUsername, getTax)
click to toggle source
# File lib/usersAsync.rb, line 36 def change_credit(amount, description, targetUsername, getTax) execute(:change_user_credit,{ :amount => amount, :description => description, :targetUsername => targetUsername, :GetTax => getTax }) end
execute(method,data)
click to toggle source
# File lib/usersAsync.rb, line 15 def execute(method,data) response = nil t = Thread.new{response = @client.call(method, message:data.merge(get_data))} t.join response.body end
forgot_password(mobileNumber, emailAddress, targetUsername)
click to toggle source
# File lib/usersAsync.rb, line 45 def forgot_password(mobileNumber, emailAddress, targetUsername) execute(:forgot_password,{ :mobileNumber => mobileNumber, :emailAddress => emailAddress, :targetUsername => targetUsername }) end
get()
click to toggle source
# File lib/usersAsync.rb, line 95 def get execute(:get_users,{}) end
get_base_price(targetUsername)
click to toggle source
# File lib/usersAsync.rb, line 52 def get_base_price(targetUsername) execute(:get_user_base_price,{ :targetUsername => targetUsername }) end
get_cities(provinceId)
click to toggle source
# File lib/usersAsync.rb, line 78 def get_cities(provinceId) execute(:get_cities,{ :provinceId => provinceId }) end
get_credit(targetUsername)
click to toggle source
# File lib/usersAsync.rb, line 62 def get_credit(targetUsername) execute(:get_user_credit,{ :targetUsername => targetUsername }) end
get_data()
click to toggle source
# File lib/usersAsync.rb, line 9 def get_data { :username => @username, :password => @password } end
get_details(targetUsername)
click to toggle source
# File lib/usersAsync.rb, line 67 def get_details(targetUsername) execute(:get_user_details,{ :targetUsername => targetUsername }) end
get_expire_date()
click to toggle source
# File lib/usersAsync.rb, line 83 def get_expire_date execute(:get_expire_date,{}) end
get_numbers()
click to toggle source
# File lib/usersAsync.rb, line 72 def get_numbers execute(:get_user_numbers,{}) end
get_provinces()
click to toggle source
# File lib/usersAsync.rb, line 75 def get_provinces execute(:get_provinces,{}) end
get_transactions(targetUsername, creditType, dateFrom, dateTo, keyword)
click to toggle source
# File lib/usersAsync.rb, line 86 def get_transactions(targetUsername, creditType, dateFrom, dateTo, keyword) execute(:get_user_transactions,{ :creditType => creditType, :dateFrom => dateFrom, :targetUsername => targetUsername, :dateTo => dateTo, :keyword => keyword }) end
has_filter(text)
click to toggle source
# File lib/usersAsync.rb, line 98 def has_filter(text) execute(:has_filter,{ :text => text }) end
remove(targetUsername)
click to toggle source
# File lib/usersAsync.rb, line 57 def remove(targetUsername) execute(:remove_user,{ :targetUsername => targetUsername }) end