Module: EnotasApi::EncodingHelper

Included in:
Request
Defined in:
lib/enotas_api/support/encoding_helper.rb

Instance Method Summary collapse

Instance Method Details

#encode_query_params(params) ⇒ Object



11
12
13
# File 'lib/enotas_api/support/encoding_helper.rb', line 11

def encode_query_params(params)
  URI.encode_www_form(params.compact { |_k, v| v.nil? })
end

#url_encode(value) ⇒ Object



7
8
9
# File 'lib/enotas_api/support/encoding_helper.rb', line 7

def url_encode(value)
  ERB::Util.url_encode(value)
end