Class: Google::Apis::CoordinateV1::CustomFieldDef

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/coordinate_v1/classes.rb,
generated/google/apis/coordinate_v1/representations.rb,
generated/google/apis/coordinate_v1/representations.rb

Overview

Custom field definition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CustomFieldDef

Returns a new instance of CustomFieldDef.


98
99
100
# File 'generated/google/apis/coordinate_v1/classes.rb', line 98

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#enabledBoolean Also known as: enabled?

Whether the field is enabled. Corresponds to the JSON property enabled

Returns:

  • (Boolean)

63
64
65
# File 'generated/google/apis/coordinate_v1/classes.rb', line 63

def enabled
  @enabled
end

#enumitemsArray<Google::Apis::CoordinateV1::EnumItemDef>

List of enum items for this custom field. Populated only if the field type is enum. Enum fields appear as 'lists' in the Coordinate web and mobile UI. Corresponds to the JSON property enumitems


70
71
72
# File 'generated/google/apis/coordinate_v1/classes.rb', line 70

def enumitems
  @enumitems
end

#idString

Custom field id. Corresponds to the JSON property id

Returns:

  • (String)

75
76
77
# File 'generated/google/apis/coordinate_v1/classes.rb', line 75

def id
  @id
end

#kindString

Identifies this object as a custom field definition. Corresponds to the JSON property kind

Returns:

  • (String)

80
81
82
# File 'generated/google/apis/coordinate_v1/classes.rb', line 80

def kind
  @kind
end

#nameString

Custom field name. Corresponds to the JSON property name

Returns:

  • (String)

85
86
87
# File 'generated/google/apis/coordinate_v1/classes.rb', line 85

def name
  @name
end

#required_for_checkoutBoolean Also known as: required_for_checkout?

Whether the field is required for checkout. Corresponds to the JSON property requiredForCheckout

Returns:

  • (Boolean)

90
91
92
# File 'generated/google/apis/coordinate_v1/classes.rb', line 90

def required_for_checkout
  @required_for_checkout
end

#typeString

Custom field type. Corresponds to the JSON property type

Returns:

  • (String)

96
97
98
# File 'generated/google/apis/coordinate_v1/classes.rb', line 96

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


103
104
105
106
107
108
109
110
111
# File 'generated/google/apis/coordinate_v1/classes.rb', line 103

def update!(**args)
  @enabled = args[:enabled] if args.key?(:enabled)
  @enumitems = args[:enumitems] if args.key?(:enumitems)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @required_for_checkout = args[:required_for_checkout] if args.key?(:required_for_checkout)
  @type = args[:type] if args.key?(:type)
end