-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add parameter guard for language in magic link options (#165)
- Loading branch information
Showing
5 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
=begin | ||
#Passage Management API | ||
#Passage's management API to manage your Passage apps and users. | ||
The version of the OpenAPI document: 1 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
Generator version: 7.11.0-SNAPSHOT | ||
=end | ||
|
||
require 'date' | ||
require 'time' | ||
|
||
module OpenapiClient | ||
class MagicLinkLanguage | ||
DE = "de".freeze | ||
EN = "en".freeze | ||
ES = "es".freeze | ||
IT = "it".freeze | ||
PL = "pl".freeze | ||
PT = "pt".freeze | ||
ZH = "zh".freeze | ||
|
||
def self.all_vars | ||
@all_vars ||= [DE, EN, ES, IT, PL, PT, ZH].freeze | ||
end | ||
|
||
# Builds the enum from string | ||
# @param [String] The enum value in the form of the string | ||
# @return [String] The enum value | ||
def self.build_from_hash(value) | ||
new.build_from_hash(value) | ||
end | ||
|
||
# Builds the enum from string | ||
# @param [String] The enum value in the form of the string | ||
# @return [String] The enum value | ||
def build_from_hash(value) | ||
return value if MagicLinkLanguage.all_vars.include?(value) | ||
raise "Invalid ENUM value #{value} for class #MagicLinkLanguage" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters