Class: PhraseApp::RequestParams::WebhookParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::WebhookParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
WebhookParams
Parameters:
- active
-
Whether webhook is active or inactive
- callback_url
-
Callback URL to send requests to
- description
-
Webhook description
- events
-
List of event names to trigger the webhook (separated by comma)
Instance Method Summary collapse
- #active=(val) ⇒ Object
- #callback_url=(val) ⇒ Object
- #description=(val) ⇒ Object
- #events=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#active=(val) ⇒ Object
1072 1073 1074 1075 1076 1077 1078 1079 1080 |
# File 'lib/phraseapp-ruby.rb', line 1072 def active=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#callback_url=(val) ⇒ Object
1082 1083 1084 |
# File 'lib/phraseapp-ruby.rb', line 1082 def callback_url=(val) super(val) end |
#description=(val) ⇒ Object
1086 1087 1088 |
# File 'lib/phraseapp-ruby.rb', line 1086 def description=(val) super(val) end |
#events=(val) ⇒ Object
1090 1091 1092 |
# File 'lib/phraseapp-ruby.rb', line 1090 def events=(val) super(val) end |
#validate ⇒ Object
1094 1095 1096 1097 1098 1099 1100 1101 1102 |
# File 'lib/phraseapp-ruby.rb', line 1094 def validate if callback_url == nil || callback_url == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"callback_url\" of \"WebhookParams\" not set") end if events == nil || events == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"events\" of \"WebhookParams\" not set") end end |