lib/square/api/catalog_api.rb
def catalog_info
      # Prepare query url.
      _query_builder = config.get_base_uri
      _query_builder << '/v2/catalog/info'
      _query_url = APIHelper.clean_url _query_builder

      # Prepare headers.
      _headers = {
        'accept' => 'application/json'
      }

      # Prepare and execute HttpRequest.
      _request = config.http_client.get(
        _query_url,
        headers: _headers
      )
      OAuth2.apply(config, _request)
      _response = execute_request(_request)

      # Return appropriate response type.
      decoded = APIHelper.json_deserialize(_response.raw_body)
      _errors = APIHelper.map_response(decoded, ['errors'])
      ApiResponse.new(
        _response, data: decoded, errors: _errors
      )
    end
# Retrieves information about the Square Catalog API, such as batch size
# limits that can be used by the `BatchUpsertCatalogObjects` endpoint.
# @return [CatalogInfoResponse Hash] response from the API call
Retrieves information about the Square Catalog API, such as batch size
limits that can be used by the `BatchUpsertCatalogObjects` endpoint.
Retrieves information about the Square Catalog API such as batch size limits that can be used by the ` BatchUpsertCatalogObjects ` endpoint .
def catalog_info
      _query_builder = config.get_base_uri
      _query_builder << '/v2/catalog/info'
      _query_url = APIHelper.clean_url _query_builder
      _headers = {
        'accept' => 'application/json'
      }
      _request = config.http_client.get(
        _query_url,
        headers: _headers
      )
      OAuth2.apply(config, _request)
      _response = execute_request(_request)
      decoded = APIHelper.json_deserialize(_response.raw_body)
      _errors = APIHelper.map_response(decoded, ['errors'])
      ApiResponse.new(
        _response, data: decoded, errors: _errors
      )
    end
def catalog_info _query_builder = config . get_base_uri _query_builder << '/v2/catalog/info' _query_url = APIHelper . clean_url _query_builder _headers = { 'accept' => 'application/json' } _request = config . http_client . get ( _query_url , headers : _headers ) OAuth2 . apply ( config , _request ) _response = execute_request ( _request ) decoded = APIHelper . json_deserialize ( _response . raw_body ) _errors = APIHelper . map_response ( decoded , [ 'errors' ] ) ApiResponse . new ( _response , data : decoded , errors : _errors ) end
Retrieves information about the Square Catalog API, such as batch size
limits that can be used by the `BatchUpsertCatalogObjects` endpoint.
Retrieves information about the Square Catalog API such as batch size limits that can be used by the ` BatchUpsertCatalogObjects ` endpoint .
# Prepare query url. # Prepare headers. # Prepare and execute HttpRequest. # Return appropriate response type.
response from the API call
response from the API call
CatalogInfoResponse Hash