Class: CommandTower::Messaging::Endpoints::SafeView

Inherits:
Data
  • Object
show all
Defined in:
app/services/command_tower/messaging/endpoints/safe_view.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#channel_keyObject (readonly)

Returns the value of attribute channel_key

Returns:

  • (Object)

    the current value of channel_key



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def channel_key
  @channel_key
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def created_at
  @created_at
end

#credentials_configuredObject (readonly)

Returns the value of attribute credentials_configured

Returns:

  • (Object)

    the current value of credentials_configured



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def credentials_configured
  @credentials_configured
end

#encryption_key_versionObject (readonly)

Returns the value of attribute encryption_key_version

Returns:

  • (Object)

    the current value of encryption_key_version



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def encryption_key_version
  @encryption_key_version
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def id
  @id
end

#last_successful_use_atObject (readonly)

Returns the value of attribute last_successful_use_at

Returns:

  • (Object)

    the current value of last_successful_use_at



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def last_successful_use_at
  @last_successful_use_at
end

#lifecycle_stateObject (readonly)

Returns the value of attribute lifecycle_state

Returns:

  • (Object)

    the current value of lifecycle_state



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def lifecycle_state
  @lifecycle_state
end

#masked_display_valueObject (readonly)

Returns the value of attribute masked_display_value

Returns:

  • (Object)

    the current value of masked_display_value



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def masked_display_value
  @masked_display_value
end

#owner_user_idObject (readonly)

Returns the value of attribute owner_user_id

Returns:

  • (Object)

    the current value of owner_user_id



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def owner_user_id
  @owner_user_id
end

#revoked_atObject (readonly)

Returns the value of attribute revoked_at

Returns:

  • (Object)

    the current value of revoked_at



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def revoked_at
  @revoked_at
end

#updated_atObject (readonly)

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def updated_at
  @updated_at
end

#verification_stateObject (readonly)

Returns the value of attribute verification_state

Returns:

  • (Object)

    the current value of verification_state



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def verification_state
  @verification_state
end

#verified_atObject (readonly)

Returns the value of attribute verified_at

Returns:

  • (Object)

    the current value of verified_at



6
7
8
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 6

def verified_at
  @verified_at
end

Class Method Details

.from_record(record) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'app/services/command_tower/messaging/endpoints/safe_view.rb', line 21

def self.from_record(record)
  new(
    id: record.id,
    owner_user_id: record.user_id,
    channel_key: record.channel_key,
    lifecycle_state: record.lifecycle_state,
    verification_state: record.verification_state,
    masked_display_value: record.masked_display_value,
    credentials_configured: credentials_configured?(record),
    encryption_key_version: record.encryption_key_version,
    verified_at: record.verified_at,
    revoked_at: record.revoked_at,
    last_successful_use_at: record.last_successful_use_at,
    created_at: record.created_at,
    updated_at: record.updated_at,
  ).freeze
end