Class: PhraseApp::RequestParams::AuthorizationParams

Inherits:
OpenStruct
  • Object
show all
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



374
375
376
# File 'lib/phraseapp-ruby.rb', line 374

def expires_at=(val)
  super(DateTime.parse(val))
end

#note=(val) ⇒ Object



378
379
380
# File 'lib/phraseapp-ruby.rb', line 378

def note=(val)
  super(val)
end

#scopes=(val) ⇒ Object



382
383
384
# File 'lib/phraseapp-ruby.rb', line 382

def scopes=(val)
  super(val.split(','))
end

#validateObject



386
387
388
389
390
391
# File 'lib/phraseapp-ruby.rb', line 386

def validate
  
  if note == nil || note == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"note\" of \"AuthorizationParams\" not set")
  end
end