1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
|
# File 'lib/hive/broadcast.rb', line 1308
def self.create_proposal(options, &block)
required_fields = %i(creator start_date end_date daily_pay subject permlink)
params = options[:params]
check_required_fields(params, *required_fields)
params[:start_date] = Time.parse(params[:start_date].to_s)
params[:start_date] = params[:start_date].strftime('%Y-%m-%dT%H:%M:%S')
params[:end_date] = Time.parse(params[:end_date].to_s)
params[:end_date] = params[:end_date].strftime('%Y-%m-%dT%H:%M:%S')
params[:daily_pay] = normalize_amount(options.merge amount: params[:daily_pay])
ops = [[:create_proposal, params]]
process(options.merge(ops: ops), &block)
end
|