Class: StrawberryAPI::CustomMetadataField

Inherits:
Object
  • Object
show all
Defined in:
lib/strawberry_api/custom_metadata/custom_metadata_field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ CustomMetadataField

Returns a new instance of CustomMetadataField



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 17

def initialize(params = {})
  params.each do |k, v|
    if k == 'select_field_options'
      v.map! do ||
        CustomMetadataOption.new()
      end
    end
    
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#custom_metadata_set_idObject

Returns the value of attribute custom_metadata_set_id



11
12
13
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 11

def 
  @custom_metadata_set_id
end

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 5

def id
  @id
end

#mandatoryObject

Returns the value of attribute mandatory



9
10
11
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 9

def mandatory
  @mandatory
end

#maxlenObject

Returns the value of attribute maxlen



8
9
10
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 8

def maxlen
  @maxlen
end

#nameObject

Returns the value of attribute name



6
7
8
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 6

def name
  @name
end

#patternObject

Returns the value of attribute pattern



14
15
16
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 14

def pattern
  @pattern
end

#positionObject

Returns the value of attribute position



10
11
12
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 10

def position
  @position
end

#restrictionObject

Returns the value of attribute restriction



13
14
15
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 13

def restriction
  @restriction
end

#select_field_optionsObject

Returns the value of attribute select_field_options



15
16
17
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 15

def select_field_options
  @select_field_options
end

#typeObject

Returns the value of attribute type



7
8
9
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 7

def type
  @type
end

#use_in_project_nameObject

Returns the value of attribute use_in_project_name



12
13
14
# File 'lib/strawberry_api/custom_metadata/custom_metadata_field.rb', line 12

def use_in_project_name
  @use_in_project_name
end