Class: Asana::Resources::CustomFieldSetting
- Defined in:
- lib/asana/resources/custom_field_settings.rb
Overview
Custom fields are attached to a particular project with the Custom Field Settings resource. This resource both represents the many-to-many join of the Custom Field and Project as well as stores information that is relevant to that particular pairing; for instance, the ‘is_important` property determines some possible application-specific handling of that custom field (see below)
Instance Attribute Summary collapse
- #created_at ⇒ Object readonly
- #custom_field ⇒ Object readonly
- #id ⇒ Object readonly
- #is_important ⇒ Object readonly
- #project ⇒ Object readonly
Class Method Summary collapse
-
.find_by_project(client, project: required("project"), per_page: 20, options: {}) ⇒ Object
Returns a list of all of the custom fields settings on a project, in compact form.
-
.plural_name ⇒ Object
Returns the plural name of the resource.
Methods inherited from Resource
inherited, #initialize, #method_missing, #refresh, #respond_to_missing?, #to_h, #to_s
Methods included from ResponseHelper
Constructor Details
This class inherits a constructor from Asana::Resources::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Asana::Resources::Resource
Instance Attribute Details
#created_at ⇒ Object (readonly)
16 17 18 |
# File 'lib/asana/resources/custom_field_settings.rb', line 16 def created_at @created_at end |
#custom_field ⇒ Object (readonly)
22 23 24 |
# File 'lib/asana/resources/custom_field_settings.rb', line 22 def custom_field @custom_field end |
#id ⇒ Object (readonly)
14 15 16 |
# File 'lib/asana/resources/custom_field_settings.rb', line 14 def id @id end |
#is_important ⇒ Object (readonly)
18 19 20 |
# File 'lib/asana/resources/custom_field_settings.rb', line 18 def is_important @is_important end |
#project ⇒ Object (readonly)
20 21 22 |
# File 'lib/asana/resources/custom_field_settings.rb', line 20 def project @project end |
Class Method Details
.find_by_project(client, project: required("project"), per_page: 20, options: {}) ⇒ Object
Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, ‘opt_fields` and `opt_expand` can be used to include more data than is returned in the compact representation. See the getting started guide on [input/output options](/developers/documentation/getting-started/input-output-options) for more information.
35 36 37 38 |
# File 'lib/asana/resources/custom_field_settings.rb', line 35 def find_by_project(client, project: required("project"), per_page: 20, options: {}) params = { limit: per_page }.reject { |_,v| v.nil? || Array(v).empty? } Collection.new(parse(client.get("/projects/#{project}/custom_field_settings", params: params, options: )), type: Resource, client: client) end |
.plural_name ⇒ Object
Returns the plural name of the resource.
26 27 28 |
# File 'lib/asana/resources/custom_field_settings.rb', line 26 def plural_name 'custom_field_settings' end |