     ###
     POST call
     ###
-    apiPost: (action, data, callback, binary_data_params) ->
+    apiPost: (action, data, binary_data_params, callback) ->
+        # support callback function as third arg
+        if typeof binary_data_params is 'function'
+            callback = binary_data_params
+            binary_data_params = undefined
         if binary_data_params is undefined
             binary_data_params = []
         if binary_data_params.length > 0 then @apiPostMultiPart action, data, callback, binary_data_params else @_apiRequest action, data, 'POST', callback

    getJobStatus: (jobId, callback) ->
        @apiGet 'job', {'job_id': job_id}, callback

    processJob: (job, callback, options, report_email, postback_url, binary_data_params) ->
        if options is undefined
            options = null
        if report_email is undefined

        @apiDelete 'alert', data, callback

    # purchase API Call
    purchase: (email, items, options, callback) ->
        # support callback function as third arg
        if typeof options is 'function'
            callback = options
            options = undefined
        data = @_getOptions options
        data.email = email
        data.items = items
