{"size": 1491, "ext": "js", "max_stars_repo_path": "lib/client/ticketfieldoptions.js", "max_stars_repo_name": "kakamg0/node-zendesk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/client/ticketfieldoptions.js", "max_issues_repo_name": "kakamg0/node-zendesk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/client/ticketfieldoptions.js", "max_forks_repo_name": "kakamg0/node-zendesk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 38.2307692308, "max_line_length": 92, "alphanum_fraction": 0.6277665996}
//ticketfields.js: Client for the zendesk API.


var util        = require('util'),
    Client      = require('./client').Client,
    defaultUser = require('./helpers').defaultUser;


var TicketFieldOptions = exports.TicketFieldOptions = function (options) {
  this.jsonAPINames = [ 'custom_field_options', 'custom_field_option' ];
  Client.call(this, options);
};

// Inherit from Client base object
util.inherits(TicketFieldOptions, Client);

// ######################################################## Ticket Field Options
// ====================================== Listing Tickets Field Options
TicketFieldOptions.prototype.list = function (ticketFieldID, cb) {
  this.requestAll('GET', ['ticket_fields', ticketFieldID, 'options'], cb);//all
};


// ====================================== Viewing Tickets Field Option
TicketFieldOptions.prototype.show = function (ticketFieldID, optionID, cb) {
  this.request('GET', ['ticket_fields', ticketFieldID, 'options', optionID], cb);
};

// ====================================== Creating/Updating Tickets Field Option
TicketFieldOptions.prototype.update = function (ticketFieldID, ticketFieldOption, cb) {
  this.request('POST', ['ticket_fields', ticketFieldID, 'options'], ticketFieldOption,  cb);
};

// ====================================== Deleting Tickets Field Option
TicketFieldOptions.prototype.delete = function (ticketFieldID, optionID, cb) {
  this.request('DELETE', ['ticket_fields', ticketFieldID, 'options', optionID],  cb);
};

