Function Hook_ecommerce_tax_taxjar->make_taxjar_request

Definitions

sources/hooks/systems/ecommerce_tax/taxjar.php

  • Make a request to the TaxJar API.Since all TaxJar requests require the API key, and we want to specify the API version being used, we use this wrapper for TaxJar.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$endpoint SHORT_TEXT No No required parameter N/A N/A The API endpoint to request
$options array No No required parameter N/A N/A Array of options to pass
$cache_and_carry boolean No No False N/A N/A Whether to perform this request as a cache and carry
$skip_config_check boolean No No False N/A N/A Whether to skip checking if TaxJar was configured correctly before making the request

Returns

  • The output of cms_http_request or, if $cache_and_carry, the output of cache_and_carry
  • Type: mixed
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a request to the TaxJar API.Since all TaxJar requests require the API key, and we want to specify the API version being used, we use this wrapper for TaxJar.
 *
 * @param  SHORT_TEXT $endpoint The API endpoint to request
 * @param  array $options Array of options to pass
 * @param  boolean $cache_and_carry Whether to perform this request as a cache and carry
 * @param  boolean $skip_config_check Whether to skip checking if TaxJar was configured correctly before making the request
 * @return mixed The output of cms_http_request or, if $cache_and_carry, the output of cache_and_carry
 */

protected function make_taxjar_request(string $endpoint, array $options, bool $cache_and_carry = false, bool $skip_config_check = false)