15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/unisender_api/partners.rb', line 15
def register(email, login, password = '', notify = 0, = {}, timezone = '', country_code = 'RUS', currency_code = 'RUB', ip = '', api_mode = 'on')
param = Hash.new
param.merge!(self.api.gen_hash(email, 'email'))
param.merge!(self.api.gen_hash(login, 'login'))
param.merge!(self.api.gen_hash(password, 'password')) if password != ''
param.merge!(self.api.gen_hash(notify, 'notify'))
param.merge!(self.api.gen_hash(, 'extra')) unless .empty?
param.merge!(self.api.gen_hash(timezone, 'timezone')) if timezone != ''
param.merge!(self.api.gen_hash(country_code, 'country_code'))
param.merge!(self.api.gen_hash(currency_code, 'currence_code'))
param.merge!(self.api.gen_hash(ip, 'ip')) if ip != ''
param.merge!(self.api.gen_hash(api_mode, 'api_mode'))
self.api.api_call('register', param)
end
|