Class: Stormpath::Rails::AccountSerializer

Inherits:
Object
  • Object
show all
Defined in:
app/serializers/stormpath/rails/account_serializer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account) ⇒ AccountSerializer

Returns a new instance of AccountSerializer.



10
11
12
# File 'app/serializers/stormpath/rails/account_serializer.rb', line 10

def initialize()
  @account = 
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



4
5
6
# File 'app/serializers/stormpath/rails/account_serializer.rb', line 4

def 
  @account
end

Class Method Details

.to_h(account) ⇒ Object



6
7
8
# File 'app/serializers/stormpath/rails/account_serializer.rb', line 6

def self.to_h()
  new().to_h
end

Instance Method Details

#to_hObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/serializers/stormpath/rails/account_serializer.rb', line 14

def to_h
  {
    account: {
      href: .href,
      username: .username,
      modifiedAt: .modified_at,
      status: .status,
      createdAt: .created_at,
      email: .email,
      middleName: .middle_name,
      surname: .surname,
      givenName: .given_name,
      fullName: .full_name
    }
  }
end