<commit_before>'use strict'

const {encode} = require('./helpers')

module.exports = class Products {
  constructor (client) {
    this.client = client
  }

  create (product, callback) {
    return this.client.post('/products', product, callback)
  }

  get (productId, callback) {
    return this.client.get(`/products/${encode(productId)}`, null, callback)
  }

  update (product, callback) {
    return this.client.put(`/products/${encode(product.id)}`, product, callback)
  }

  delete (productId, callback) {
    return this.client.delete(`/products/${encode(productId)}`, callback)
  }

  createSku (productId, sku, callback) {
    return this.client.post(`/products/${encode(productId)}/skus`, sku, callback)
  }

  getSku (productId, skuId, callback) {
    return this.client.get(
      `/products/${encode(productId)}/skus/${encode(skuId)}`,
      null, callback
    )
  }

  updateSku (productId, sku, callback) {
    return this.client.put(
      `/products/${encode(productId)}/skus/${encode(sku.id)}`,
      sku, callback
    )
  }

  deleteSku (productId, skuId, callback) {
    return this.client.delete(
      `/products/${encode(productId)}/skus/${encode(skuId)}`,
      callback
    )
  }
}
<commit_msg>add missing Product API methods<commit_after>'use strict'

const {encode} = require('./helpers')

module.exports = class Products {
  constructor (client) {
    this.client = client
  }

  create (product, callback) {
    return this.client.post('/products', product, callback)
  }

  get (productId, callback) {
    return this.client.get(`/products/${encode(productId)}`, null, callback)
  }

  update (product, callback) {
    return this.client.put(`/products/${encode(product.id)}`, product, callback)
  }

  delete (productId, callback) {
    return this.client.delete(`/products/${encode(productId)}`, callback)
  }

  list (callback) {
    return this.client.get('/products', null, callback)
  }

  createSku (productId, sku, callback) {
    return this.client.post(`/products/${encode(productId)}/skus`, sku, callback)
  }

  getSku (productId, skuId, callback) {
    return this.client.get(
      `/products/${encode(productId)}/skus/${encode(skuId)}`,
      null, callback
    )
  }

  updateSku (productId, sku, callback) {
    return this.client.put(
      `/products/${encode(productId)}/skus/${encode(sku.id)}`,
      sku, callback
    )
  }

  deleteSku (productId, skuId, callback) {
    return this.client.delete(
      `/products/${encode(productId)}/skus/${encode(skuId)}`,
      callback
    )
  }

  listSkus (productId, callback) {
    return this.client.get(`/products/${encode(productId)}/skus`, null, callback)
  }
}

{'fraction_non_alphanumeric': 0.16585365853658537, 'fraction_numerical': 0.0, 'mean_word_length': 3.4882154882154883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4069548', 'n_tokens_mistral': 884, 'n_tokens_neox': 888, 'n_words': 163}