Sha256: 7d445feb426040139e568d75bb550ebb84fffe8467f61c43f007097e12e493fc
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
module AqumulateAPI class AggAdvisor RESOURCE = 'AggAdvisor' end AggAdvisor.singleton_class.class_eval do methods = { get_advisors: { method: 'GetAdvisors' }, add_advisor: { method: 'AddAdvisor' }, advisor_sign_on: { method: 'AdvisorSignOn' }, get_advisor_by_id: { method: 'GetAdvisorById' }, update_advisor: { method: 'UpdateAdvisor' }, delete_advisor: { method: 'DeleteAdvisor' }, } methods.each do |method, definition| define_method(method) do |body = {}| AqumulateAPI.session.api_request("#{self::RESOURCE}/#{definition[:method]}", body) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aqumulate_api-0.2.0 | lib/aqumulate_api/agg_advisor.rb |