Class: WHMCS::Announcement
Class Method Summary collapse
-
.add_announcement(params = {}) ⇒ Object
Add Announcement This command is used to Add a new announcement to the system.
-
.delete_announcement(params = {}) ⇒ Object
Delete Announcement.
-
.get_announcements(params = {}) ⇒ Object
Get Announcements This command is used to get a list of the announcements in XML format.
-
.update_announcement(params = {}) ⇒ Object
Update Announcement.
Methods inherited from Base
Class Method Details
.add_announcement(params = {}) ⇒ Object
Add Announcement This command is used to Add a new announcement to the system
Parameters:
-
:date- Date of the announcement in format yyyymmdd -
:title- Title of the announcement -
:announcement- Announcement text -
:published- on/off
Returns:
* <tt>:result</tt>
* <tt>:announcementid</tt>
See:
18 19 20 21 |
# File 'lib/whmcs/announcement.rb', line 18 def self.add_announcement(params = {}) params.merge!(:action => 'addannouncement') send_request(params) end |
.delete_announcement(params = {}) ⇒ Object
Delete Announcement
Parameters:
-
:announcementid- The ID of the announcement to delete
See:
63 64 65 66 |
# File 'lib/whmcs/announcement.rb', line 63 def self.delete_announcement(params = {}) params.merge!(:action => 'deleteannouncement') send_request(params) end |
.get_announcements(params = {}) ⇒ Object
Get Announcements This command is used to get a list of the announcements in XML format
Parameters:
-
:limitstart- used for pagination, start at a certain ID -
:limitnum- restrict number of records
See:
50 51 52 53 |
# File 'lib/whmcs/announcement.rb', line 50 def self.get_announcements(params ={}) params.merge!(:action => 'getannouncements') send_request(params) end |
.update_announcement(params = {}) ⇒ Object
Update Announcement
Parameters:
-
:announcementid- ID of the announcement to edit -
:date- Date of the announcement in format yyyymmdd -
:title- Title of the announcement -
:announcement- Announcement text -
:published- on/off
See:
35 36 37 38 |
# File 'lib/whmcs/announcement.rb', line 35 def self.update_announcement(params = {}) params.merge!(:action => 'updateannouncement') send_request(params) end |