Class: PinterestSdkClient::CreativeType
- Inherits:
-
Object
- Object
- PinterestSdkClient::CreativeType
- Defined in:
- lib/pinterest_sdk/models/creative_type.rb
Constant Summary collapse
- REGULAR =
"REGULAR".freeze
- VIDEO =
"VIDEO".freeze
- SHOPPING =
"SHOPPING".freeze
- CAROUSEL =
"CAROUSEL".freeze
- MAX_VIDEO =
"MAX_VIDEO".freeze
- SHOP_THE_PIN =
"SHOP_THE_PIN".freeze
- COLLECTION =
"COLLECTION".freeze
- IDEA =
"IDEA".freeze
- SHOWCASE =
"SHOWCASE".freeze
- QUIZ =
"QUIZ".freeze
- COLLAGE =
"COLLAGE".freeze
- MAX_WIDTH_REGULAR_COLLECTION =
"MAX_WIDTH_REGULAR_COLLECTION".freeze
- MAX_WIDTH_VIDEO_COLLECTION =
"MAX_WIDTH_VIDEO_COLLECTION".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
32 33 34 |
# File 'lib/pinterest_sdk/models/creative_type.rb', line 32 def self.all_vars @all_vars ||= [REGULAR, VIDEO, SHOPPING, CAROUSEL, MAX_VIDEO, SHOP_THE_PIN, COLLECTION, IDEA, SHOWCASE, QUIZ, COLLAGE, MAX_WIDTH_REGULAR_COLLECTION, MAX_WIDTH_VIDEO_COLLECTION].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
39 40 41 |
# File 'lib/pinterest_sdk/models/creative_type.rb', line 39 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
46 47 48 49 |
# File 'lib/pinterest_sdk/models/creative_type.rb', line 46 def build_from_hash(value) return value if CreativeType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #CreativeType" end |