Class: WorkOS::ConnectedAccountDto
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ConnectedAccountDto
- Defined in:
- lib/workos/pipes/connected_account_dto.rb
Constant Summary collapse
- HASH_ATTRS =
{ access_token: :access_token, refresh_token: :refresh_token, expires_at: :expires_at, scopes: :scopes, state: :state }.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(json) ⇒ ConnectedAccountDto
constructor
A new instance of ConnectedAccountDto.
Constructor Details
#initialize(json) ⇒ ConnectedAccountDto
Returns a new instance of ConnectedAccountDto.
22 23 24 25 26 27 28 29 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 22 def initialize(json) hash = self.class.normalize(json) @access_token = hash[:access_token] @refresh_token = hash[:refresh_token] @expires_at = hash[:expires_at] @scopes = hash[:scopes] || [] @state = hash[:state] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
15 16 17 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 15 def access_token @access_token end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
15 16 17 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 15 def expires_at @expires_at end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
15 16 17 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 15 def refresh_token @refresh_token end |
#scopes ⇒ Object
Returns the value of attribute scopes.
15 16 17 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 15 def scopes @scopes end |
#state ⇒ Object
Returns the value of attribute state.
15 16 17 |
# File 'lib/workos/pipes/connected_account_dto.rb', line 15 def state @state end |