module ChartMogul::API::Actions::Custom::ClassMethods
Public Instance Methods
custom!(http_method, http_path, body_data = {})
click to toggle source
# File lib/chartmogul/api/actions/custom.rb, line 31 def custom!(http_method, http_path, body_data = {}) json = custom_without_assign!(http_method, http_path, body_data) new_from_json(json) end
custom_without_assign!(http_method, http_path, body_data = {})
click to toggle source
# File lib/chartmogul/api/actions/custom.rb, line 21 def custom_without_assign!(http_method, http_path, body_data = {}) resp = handling_errors do connection.send(http_method, http_path) do |req| req.headers['Content-Type'] = 'application/json' req.body = JSON.dump(body_data) end end ChartMogul::Utils::JSONParser.parse(resp.body, immutable_keys: immutable_keys) end