Class: Falsify::Metafield
- Inherits:
-
Object
- Object
- Falsify::Metafield
- Defined in:
- lib/falsify/models/customer/metafield.rb
Overview
Attaches additional metadata to a shop's resources
Instance Attribute Summary collapse
-
#description ⇒ String?
Additional information about the metafield (optional).
-
#key ⇒ Boolean
An identifier for the metafield (maximum of 30 characters, required).
-
#namespace ⇒ String
A container for a set of metadata (maximum of 20 characters, required) Namespaces help distinguish between metadata that you created and metadata created by another individual with a similar namespace.
-
#value ⇒ String, Integer
Information to be stored as metadata (required).
-
#value_type ⇒ String
The value type (required) Valid values:
string
andinteger
.
Instance Method Summary collapse
Constructor Details
#initialize(key:, namespace:, value:, value_type:, description: nil) ⇒ void
28 29 30 31 32 33 34 |
# File 'lib/falsify/models/customer/metafield.rb', line 28 def initialize(key:, namespace:, value:, value_type:, description: nil) self.key = key self.namespace = namespace self.value = value self.value_type = value_type self.description = description end |
Instance Attribute Details
#description ⇒ String?
Additional information about the metafield (optional)
20 21 22 |
# File 'lib/falsify/models/customer/metafield.rb', line 20 def description @description end |
#key ⇒ Boolean
An identifier for the metafield (maximum of 30 characters, required)
6 7 8 |
# File 'lib/falsify/models/customer/metafield.rb', line 6 def key @key end |
#namespace ⇒ String
A container for a set of metadata (maximum of 20 characters, required) Namespaces help distinguish between metadata that you created and metadata created by another individual with a similar namespace.
10 11 12 |
# File 'lib/falsify/models/customer/metafield.rb', line 10 def namespace @namespace end |
#value ⇒ String, Integer
Information to be stored as metadata (required)
13 14 15 |
# File 'lib/falsify/models/customer/metafield.rb', line 13 def value @value end |
#value_type ⇒ String
The value type (required)
Valid values: string
and integer
.
17 18 19 |
# File 'lib/falsify/models/customer/metafield.rb', line 17 def value_type @value_type end |