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
407 408 409 |
# File 'lib/phraseapp-ruby.rb', line 407 def expires_at=(val) super(DateTime.parse(val)) end |
#note=(val) ⇒ Object
411 412 413 |
# File 'lib/phraseapp-ruby.rb', line 411 def note=(val) super(val) end |
#scopes=(val) ⇒ Object
415 416 417 |
# File 'lib/phraseapp-ruby.rb', line 415 def scopes=(val) super(val.split(',')) end |
#validate ⇒ Object
419 420 421 422 423 424 |
# File 'lib/phraseapp-ruby.rb', line 419 def validate if note == nil || note == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"note\" of \"AuthorizationParams\" not set") end end |