class Zoho::Api::HostedPage
Attributes
addons[RW]
customer[RW]
plan[RW]
redirect_url[RW]
subscription_id[RW]
Public Class Methods
all()
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 20 def all base_url = Zoho::Api::HOST+"/api/v1/hostedpages" response = Zoho::Request.get(base_url) if response.code == 0 return response.hostedpages else return response end end
buy_onetime_addon(attrs={})
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 45 def buy_onetime_addon attrs={} hostpage = Zoho::Api::HostedPage.new(attrs) base_url = Zoho::Api::HOST+"/api/v1/hostedpages/buyonetimeaddon" response = post(base_url) do |http, request| request.body = hostpage.to_json response = http.request(request) response = JSON.parse(response.body, object_class: OpenStruct) end return response end
create_subscription(attrs={})
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 40 def create_subscription attrs={} hostpage = Zoho::Api::HostedPage.new(attrs) return hostpage.save end
find(page_id)
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 30 def find page_id base_url = Zoho::Api::HOST+"/api/v1/hostedpages/#{page_id}" response = Zoho::Request.get(base_url) if response.code == 0 return response.data else return response end end
Public Instance Methods
find(hostpage_id)
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 15 def find hostpage_id return Zoho::Api::HostedPage.find(hostpage_id) end
save()
click to toggle source
# File lib/zoho/api/hosted_pages.rb, line 4 def save base_url = Zoho::Api::HOST+"/api/v1/hostedpages/newsubscription" response = post(base_url) do |http, request| request.body = self.to_json response = http.request(request) response = JSON.parse(response.body, object_class: OpenStruct) end return response end