Class: PhraseApp::RequestParams::AuthorizationParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::AuthorizationParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
AuthorizationParams
Parameters:
- expires_at
-
Expiration date for the authorization token. Null means no expiration date (default).
- note
-
A note to help you remember what the access is used for.
- scopes
-
A list of scopes that the access can be used for.
Instance Method Summary collapse
Instance Method Details
#expires_at=(val) ⇒ Object
487 488 489 |
# File 'lib/phraseapp-ruby.rb', line 487 def expires_at=(val) super(DateTime.parse(val)) end |
#note=(val) ⇒ Object
491 492 493 |
# File 'lib/phraseapp-ruby.rb', line 491 def note=(val) super(val) end |
#scopes=(val) ⇒ Object
495 496 497 |
# File 'lib/phraseapp-ruby.rb', line 495 def scopes=(val) super(val.split(',')) end |
#validate ⇒ Object
499 500 501 502 503 504 |
# File 'lib/phraseapp-ruby.rb', line 499 def validate if note == nil || note == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"note\" of \"AuthorizationParams\" not set") end end |