Class: Kentaa::Api::Resources::Site
Instance Attribute Summary
Attributes inherited from Resource
#id
Attributes inherited from Base
#config, #endpoint_path, #options, #resource_class
Instance Method Summary
collapse
Methods inherited from Resource
#create, #created_at, #delete, #initialize, #load, #save, #updated_at
Methods inherited from Base
attribute_key, #initialize, #load, #loaded?
Instance Method Details
#background_image_url ⇒ Object
102
103
104
|
# File 'lib/kentaa/api/resources/site.rb', line 102
def background_image_url
data[:background_image_url]
end
|
#banners ⇒ Object
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/kentaa/api/resources/site.rb', line 70
def banners
@banners ||= begin
banners = []
if data[:banners]
data[:banners].each do |banner|
banners << Kentaa::Api::Resources::Banner.new(banner)
end
end
banners
end
end
|
#default_currency ⇒ Object
66
67
68
|
# File 'lib/kentaa/api/resources/site.rb', line 66
def default_currency
data[:default_currency]
end
|
#description ⇒ Object
26
27
28
|
# File 'lib/kentaa/api/resources/site.rb', line 26
def description
data[:description]
end
|
#donate_url ⇒ Object
50
51
52
|
# File 'lib/kentaa/api/resources/site.rb', line 50
def donate_url
data[:donate_url]
end
|
#end_date ⇒ Object
42
43
44
|
# File 'lib/kentaa/api/resources/site.rb', line 42
def end_date
Time.parse(data[:end_date]) if data[:end_date]
end
|
#external_reference ⇒ Object
98
99
100
|
# File 'lib/kentaa/api/resources/site.rb', line 98
def external_reference
data[:external_reference]
end
|
#host ⇒ Object
14
15
16
|
# File 'lib/kentaa/api/resources/site.rb', line 14
def host
data[:host]
end
|
#logos ⇒ Object
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/kentaa/api/resources/site.rb', line 84
def logos
@logos ||= begin
logos = []
if data[:logos]
data[:logos].map do |logo|
logos << Kentaa::Api::Resources::Logo.new(logo)
end
end
logos
end
end
|
#manual_donations ⇒ Object
#name ⇒ Object
18
19
20
|
# File 'lib/kentaa/api/resources/site.rb', line 18
def name
data[:name]
end
|
#newsletter_subscriptions ⇒ Object
#object_key ⇒ Object
10
11
12
|
# File 'lib/kentaa/api/resources/site.rb', line 10
def object_key
"Site_#{id}"
end
|
#owner_email ⇒ Object
62
63
64
|
# File 'lib/kentaa/api/resources/site.rb', line 62
def owner_email
data[:owner_email]
end
|
#owner_name ⇒ Object
58
59
60
|
# File 'lib/kentaa/api/resources/site.rb', line 58
def owner_name
data[:owner_name]
end
|
#sign_up_flow_background_image_url ⇒ Object
106
107
108
|
# File 'lib/kentaa/api/resources/site.rb', line 106
def sign_up_flow_background_image_url
data[:sign_up_flow_background_image_url]
end
|
#target_amount ⇒ Object
30
31
32
|
# File 'lib/kentaa/api/resources/site.rb', line 30
def target_amount
data[:target_amount]
end
|
#theme ⇒ Object
110
111
112
|
# File 'lib/kentaa/api/resources/site.rb', line 110
def theme
@theme ||= Kentaa::Api::Resources::Theme.new(data[:theme])
end
|
#title ⇒ Object
22
23
24
|
# File 'lib/kentaa/api/resources/site.rb', line 22
def title
data[:title]
end
|
#total_amount ⇒ Object
34
35
36
|
# File 'lib/kentaa/api/resources/site.rb', line 34
def total_amount
BigDecimal(data[:total_amount])
end
|
#total_donations ⇒ Object
38
39
40
|
# File 'lib/kentaa/api/resources/site.rb', line 38
def total_donations
data[:total_donations]
end
|
#url ⇒ Object
46
47
48
|
# File 'lib/kentaa/api/resources/site.rb', line 46
def url
data[:url]
end
|
#video_url ⇒ Object
54
55
56
|
# File 'lib/kentaa/api/resources/site.rb', line 54
def video_url
data[:video_url]
end
|