class Trello::CustomField
A Custom Field can be activated on a board. Values are stored at the card level.
@!attribute [r] id
@return [String]
@!attribute [rw] model_id
@return [String]
@!attribute [rw] model_type
@return [String]
@!attribute [r] field_group
@return [String]
@!attribute [rw] name
@return [String]
@!attribute [rw] position
@return [Float]
@!attribute [rw] type
@return [String]
@!attribute [rw] checkbox_options
@return [Array<Hash>]
@!attribute [w] enable_display_on_card
@return [Boolean]
Public Class Methods
find(id, params = {})
click to toggle source
Find a custom field by its id.
# File lib/trello/custom_field.rb, line 45 def find(id, params = {}) client.find('customFields', id, params) end
Public Instance Methods
collection_name()
click to toggle source
# File lib/trello/custom_field.rb, line 50 def collection_name 'customFields' end
create_new_option(value)
click to toggle source
If type == 'list', create a new option and add to this Custom Field
# File lib/trello/custom_field.rb, line 68 def create_new_option(value) payload = { value: value } client.post("/customFields/#{id}/options", payload) end
delete()
click to toggle source
Delete this custom field Also deletes all associated values across all cards
# File lib/trello/custom_field.rb, line 63 def delete client.delete("/customFields/#{id}") end
delete_option(option_id)
click to toggle source
Will also clear it from individual cards that have this option selected
# File lib/trello/custom_field.rb, line 74 def delete_option(option_id) client.delete("/customFields/#{id}/options/#{option_id}") end