Sha256: ec54d8881bc33ae9a4a046c4bc32c559b9f21b888692db5706581d1e63452047
Contents?: true
Size: 570 Bytes
Versions: 6
Compression:
Stored size: 570 Bytes
Contents
module Shipcloud module Request class Info attr_accessor :http_method, :api_url, :data def initialize(http_method, api_url, data) @http_method = http_method @api_url = api_url @data = data end def url url = "/#{API_VERSION}/#{api_url}" url end def path_with_params(path, params) unless params.empty? encoded_params = URI.encode_www_form(params) [path, encoded_params].join("?") else path end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems