Class: Payrex::Entities::CustomerSession

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/customer_session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ CustomerSession

Returns a new instance of CustomerSession.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/entities/customer_session.rb', line 14

def initialize(api_resource)
  data = api_resource.data

  @id = data["id"]
  @customer_id = data["customer_id"]
  @client_secret = data["client_secret"]
  @livemode = data["livemode"]
  @components = data["components"]
  @expired = data["expired"]
  @expired_at = data["expired_at"]
  @created_at = data["created_at"]
  @updated_at = data["updated_at"]
end

Instance Attribute Details

#client_secretObject (readonly)

Returns the value of attribute client_secret.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def client_secret
  @client_secret
end

#componentsObject (readonly)

Returns the value of attribute components.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def components
  @components
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def created_at
  @created_at
end

#customer_idObject (readonly)

Returns the value of attribute customer_id.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def customer_id
  @customer_id
end

#expiredObject (readonly)

Returns the value of attribute expired.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def expired
  @expired
end

#expired_atObject (readonly)

Returns the value of attribute expired_at.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def expired_at
  @expired_at
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def livemode
  @livemode
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/entities/customer_session.rb', line 4

def updated_at
  @updated_at
end