class Users

Public Class Methods

new(username, password) click to toggle source
# File lib/users.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/users.rb, line 22
def add(options)
    execute(:add_user,options)
end
add_complete(options) click to toggle source
# File lib/users.rb, line 25
def add_complete(options)
    execute(:add_user_complete,options)
end
add_payment(options) click to toggle source
# File lib/users.rb, line 19
def add_payment(options)
    execute(:add_payment,options)
end
add_with_location(options) click to toggle source
# File lib/users.rb, line 28
def add_with_location(options)
    execute(:add_user_with_location,options)
end
authenticate() click to toggle source
# File lib/users.rb, line 31
def authenticate
    execute(:authenticate_user,{})
end
change_credit(amount, description, targetUsername, getTax) click to toggle source
# File lib/users.rb, line 34
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/users.rb, line 15
def execute(method,data)
    response = @client.call(method, message:data.merge(get_data))
    response.body
end
forgot_password(mobileNumber, emailAddress, targetUsername) click to toggle source
# File lib/users.rb, line 43
def forgot_password(mobileNumber, emailAddress, targetUsername)
    execute(:forgot_password,{
        :mobileNumber => mobileNumber,
        :emailAddress => emailAddress,
        :targetUsername => targetUsername
    })
end
get() click to toggle source
# File lib/users.rb, line 93
def get
    execute(:get_users,{})
end
get_base_price(targetUsername) click to toggle source
# File lib/users.rb, line 50
def get_base_price(targetUsername)
    execute(:get_user_base_price,{
        :targetUsername => targetUsername
    })
end
get_cities(provinceId) click to toggle source
# File lib/users.rb, line 76
def get_cities(provinceId)
    execute(:get_cities,{
        :provinceId => provinceId
    })
end
get_credit(targetUsername) click to toggle source
# File lib/users.rb, line 60
def get_credit(targetUsername)
    execute(:get_user_credit,{
        :targetUsername => targetUsername
    })
end
get_data() click to toggle source
# File lib/users.rb, line 9
def get_data
    {
        :username => @username,
        :password => @password
    }
end
get_details(targetUsername) click to toggle source
# File lib/users.rb, line 65
def get_details(targetUsername)
    execute(:get_user_details,{
        :targetUsername => targetUsername
    })
end
get_expire_date() click to toggle source
# File lib/users.rb, line 81
def get_expire_date
    execute(:get_expire_date,{})
end
get_numbers() click to toggle source
# File lib/users.rb, line 70
def get_numbers
    execute(:get_user_numbers,{})
end
get_provinces() click to toggle source
# File lib/users.rb, line 73
def get_provinces
    execute(:get_provinces,{})
end
get_transactions(targetUsername, creditType, dateFrom, dateTo, keyword) click to toggle source
# File lib/users.rb, line 84
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/users.rb, line 96
def has_filter(text)
    execute(:has_filter,{
        :text => text
    })
end
remove(targetUsername) click to toggle source
# File lib/users.rb, line 55
def remove(targetUsername)
    execute(:remove_user,{
        :targetUsername => targetUsername
    })
end