Sha256: 4a8b76921a553b3c1a2e6f85c8743608d681c855c3d79243e30e5f57cad5323f
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true require 'portfolio_manager/rest/request' require 'nokogiri' module PortfolioManager module REST ## # Utilities used throughout REST Client module Utils private ## # @param [String] path # @param [Hash] options def perform_get_request(path, options = {}) perform_request(:get, path, options) end ## # @param [String] path # @param [Hash] options def perform_post_request(path, options = {}) perform_request(:post, path, options) end ## # @param [Symbol, String] request_method # @param [String] path # @param [Hash] options def perform_request(request_method, path, options = {}) PortfolioManager::REST::Request.new( self, request_method, path, options ).perform end def request_response_xml(action, note) Nokogiri::XML::Builder.new do |xml| xml.sharingResponse do xml.action action xml.note note end end.to_xml end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
portfolio_manager-0.4.0 | lib/portfolio_manager/rest/utils.rb |