Class: Whmcs::Quote
Overview
WHMCS::Quote is the class for managing quotes
Class Method Summary collapse
-
.accept_quote(params = {}) ⇒ Object
Accept a quote.
-
.create_quote(params = {}) ⇒ Object
Create a new quote.
-
.delete_quote(params = {}) ⇒ Object
Delete a quote.
-
.send_quote(params = {}) ⇒ Object
Send a quote to client.
-
.update_quote(params = {}) ⇒ Object
Update an existing quote.
Methods inherited from Base
Class Method Details
.accept_quote(params = {}) ⇒ Object
Accept a quote
Parameters:
-
:quoteid
- the id number of the quote in tblquotes
See:
120 121 122 123 |
# File 'lib/whmcs/quote.rb', line 120 def self.accept_quote(params = {}) params.merge!(:action => 'acceptquote') send_request(params) end |
.create_quote(params = {}) ⇒ Object
Create a new quote
Parameters:
-
:userid
- the unique id number of the client in the tblclients table -
:firstname
- optional - only required if userid is not specified -
:lastname
- optional - only required if userid is not specified -
:companyname
- optional - only required if userid is not specified -
:email
- optional - only required if userid is not specified -
:address1
- optional - only required if userid is not specified -
:address2
- optional - only required if userid is not specified -
:city
- optional - only required if userid is not specified -
:state
- optional - only required if userid is not specified -
:postcode
- optional - only required if userid is not specified -
:country
- optional - only required if userid is not specified -
:phonenumber
- optional - only required if userid is not specified -
:currency
- optional - only required if userid is not specified -
:subject
- Subject of the quote -
:stage
- Draft,Delivered,On Hold,Accepted,Lost,Dead -
:validuntil
- In format set in Localisation -
:datecreated
- Optional - In format set in Localisation -
:customernotes
- notes that are viewable by the client -
:adminnotes
- notes that are admin only -
:lineitems
- a base64 encoded serialized array containing: -
:desc
- The line description -
:qty
- The quantity being quoted -
:up
- unit price -
:discount
- discount amount in % -
:taxable
- true or false
See:
38 39 40 41 |
# File 'lib/whmcs/quote.rb', line 38 def self.create_quote(params = {}) params.merge!(:action => 'createquote') send_request(params) end |
.delete_quote(params = {}) ⇒ Object
Delete a quote
Parameters:
-
:quoteid
- the id number of the quote in tblquotes
See:
92 93 94 95 |
# File 'lib/whmcs/quote.rb', line 92 def self.delete_quote(params = {}) params.merge!(:action => 'deletequote') send_request(params) end |
.send_quote(params = {}) ⇒ Object
Send a quote to client
Parameters:
-
:quoteid
- the id number of the quote in tblquotes
See:
106 107 108 109 |
# File 'lib/whmcs/quote.rb', line 106 def self.send_quote(params = {}) params.merge!(:action => 'sendquote') send_request(params) end |
.update_quote(params = {}) ⇒ Object
Update an existing quote
Parameters:
-
:quoteid
- the id number of the quote in tblquotes -
:userid
- the unique id number of the client in the tblclients table -
:firstname
- optional - only required if userid is not specified -
:lastname
- optional - only required if userid is not specified -
:companyname
- optional - only required if userid is not specified -
:email
- optional - only required if userid is not specified -
:address1
- optional - only required if userid is not specified -
:address2
- optional - only required if userid is not specified -
:city
- optional - only required if userid is not specified -
:state
- optional - only required if userid is not specified -
:postcode
- optional - only required if userid is not specified -
:country
- optional - only required if userid is not specified -
:phonenumber
- optional - only required if userid is not specified -
:currency
- optional - only required if userid is not specified -
:subject
- Subject of the quote -
:stage
- Draft,Delivered,On Hold,Accepted,Lost,Dead -
:validuntil
- In format set in Localisation -
:datecreated
- Optional - In format set in Localisation -
:customernotes
- notes that are viewable by the client -
:adminnotes
- notes that are admin only -
:lineitems
- a base64 encoded serialized array containing: -
:id
- existing lineid only required to update existing lines -
:desc
- The line description -
:qty
- The quantity being quoted -
:up
- unit price -
:discount
- discount amount in % -
:taxable
- true or false
See:
78 79 80 81 |
# File 'lib/whmcs/quote.rb', line 78 def self.update_quote(params = {}) params.merge!(:action => 'updatequote') send_request(params) end |