Class: AboutYou::SDK::Model::App

Inherits:
Object
  • Object
show all
Defined in:
lib/AboutYou/Model/app.rb

Overview

This Class represents an app model

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

the id of the app



9
10
11
# File 'lib/AboutYou/Model/app.rb', line 9

def id
  @id
end

#logo_urlObject

the logo url of the app



11
12
13
# File 'lib/AboutYou/Model/app.rb', line 11

def logo_url
  @logo_url
end

#nameObject

the name of the app



13
14
15
# File 'lib/AboutYou/Model/app.rb', line 13

def name
  @name
end

#privacy_statement_urlObject

the privacy statement url



17
18
19
# File 'lib/AboutYou/Model/app.rb', line 17

def privacy_statement_url
  @privacy_statement_url
end

#tos_urlObject

the tearms of service url



19
20
21
# File 'lib/AboutYou/Model/app.rb', line 19

def tos_url
  @tos_url
end

#urlObject

the url of the app



15
16
17
# File 'lib/AboutYou/Model/app.rb', line 15

def url
  @url
end

Class Method Details

.create_from_json(json) ⇒ Object

This method is used for creating an instance of this class by a json_object.

  • Args :

    • json -> the json_object received from the api

  • Returns :

    • Instance of AboutYou::SDK::Model::App



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/AboutYou/Model/app.rb', line 30

def self.create_from_json(json)
  app = new

  app.id                    = json['id']
  app.logo_url              = json['logo_url']
  app.name                  = json['name']
  app.url                   = json['url']
  app.privacy_statement_url = json['privacy_statement_url']
  app.tos_url               = json['tos_url']

  app
end