Class: Api2cart::RequestUrlComposer

Inherits:
Struct
  • Object
show all
Defined in:
lib/api2cart/request_url_composer.rb

Constant Summary collapse

HOST =
'api.api2cart.com'
PATH_BASE =
'/v1.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key

Returns:

  • (Object)

    the current value of api_key



5
6
7
# File 'lib/api2cart/request_url_composer.rb', line 5

def api_key
  @api_key
end

#method_nameObject

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



5
6
7
# File 'lib/api2cart/request_url_composer.rb', line 5

def method_name
  @method_name
end

#query_paramsObject

Returns the value of attribute query_params

Returns:

  • (Object)

    the current value of query_params



5
6
7
# File 'lib/api2cart/request_url_composer.rb', line 5

def query_params
  @query_params
end

#store_keyObject

Returns the value of attribute store_key

Returns:

  • (Object)

    the current value of store_key



5
6
7
# File 'lib/api2cart/request_url_composer.rb', line 5

def store_key
  @store_key
end

Instance Method Details

#compose_request_urlObject



9
10
11
# File 'lib/api2cart/request_url_composer.rb', line 9

def compose_request_url
  URI::HTTP.build host: HOST, path: full_path, query: query_string
end