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



439
440
441
# File 'lib/phraseapp-ruby.rb', line 439

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

#note=(val) ⇒ Object



443
444
445
# File 'lib/phraseapp-ruby.rb', line 443

def note=(val)
  super(val)
end

#scopes=(val) ⇒ Object



447
448
449
# File 'lib/phraseapp-ruby.rb', line 447

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

#validateObject



451
452
453
454
455
456
# File 'lib/phraseapp-ruby.rb', line 451

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