public function build_api_url() {

		$url = parse_url( $this->store_url );

		// default to http if not provided
		$scheme = isset( $url['scheme'] ) ? $url['scheme'] : 'http';

		// set host
		$host = $url['host'];

		// add port to host if provided
		$host .= isset( $url['port'] ) ? ':' . $url['port'] : '';

		// set path and strip any trailing slashes
		$path = isset( $url['path'] ) ? rtrim( $url['path'], '/' ) : '';

		// add WC API path
		$path .= '/wc-api/v2/';

		// build URL
		$this->api_url = "{$scheme}://{$host}{$path}";
	}