Class: PhraseApp::AuthorizationParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Instance Method Summary collapse

Instance Method Details

#expires_at=(val) ⇒ Object

:expires_at, :note, :scopes,



294
295
296
# File 'lib/phraseapp-ruby.rb', line 294

def expires_at=(val)
  self.expires_at = Time.parse(val)
end

#note=(val) ⇒ Object



298
299
300
# File 'lib/phraseapp-ruby.rb', line 298

def note=(val)
  self.note = val
end

#scopes=(val) ⇒ Object



302
303
304
# File 'lib/phraseapp-ruby.rb', line 302

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

#validate ⇒ Object



306
307
308
309
310
# File 'lib/phraseapp-ruby.rb', line 306

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