class Lazop::LazopRequest

Public Class Methods

new(api_name = nil,http_method = 'POST') click to toggle source
# File lib/LazopRequest.rb, line 17
def initialize(api_name = nil,http_method = 'POST')
    @api_name , @http_method = api_name,http_method
    @api_params = Hash.new
    @header_params = Hash.new
    @file_params = Hash.new
end

Public Instance Methods

add_api_parameter(key,value) click to toggle source
# File lib/LazopRequest.rb, line 24
def add_api_parameter(key,value)
    if key.kind_of? String
        @api_params[key] = value
    else
        raise 'api param key is not String'  
    end
end
add_file_parameter(key,file_path) click to toggle source

file_path must be String

# File lib/LazopRequest.rb, line 41
def add_file_parameter(key,file_path)
    if (key.kind_of? String) && (file_path.kind_of? String)
        @file_params[key] = file_path
    else
        raise 'http param key is not String'  
    end
end
add_http_parameter(key,value) click to toggle source
# File lib/LazopRequest.rb, line 32
def add_http_parameter(key,value)
    if key.kind_of? String
        @header_params[key] = value
    else
        raise 'http param key is not String'  
    end
end
api_name() click to toggle source
# File lib/LazopRequest.rb, line 61
def api_name
    @api_name
end
api_params() click to toggle source
# File lib/LazopRequest.rb, line 57
def api_params
    @api_params
end
file_params() click to toggle source
# File lib/LazopRequest.rb, line 69
def file_params
    @file_params
end
header_params() click to toggle source
# File lib/LazopRequest.rb, line 73
def header_params
    @header_params
end
http_method() click to toggle source
# File lib/LazopRequest.rb, line 65
def http_method
    @http_method
end
set_timestamp=(value) click to toggle source
# File lib/LazopRequest.rb, line 53
def set_timestamp=(value)
    @timestamp = value
end
timestamp() click to toggle source
# File lib/LazopRequest.rb, line 49
def timestamp
    @timestamp
end