Class: Dolibarr::Api::Proposals::Contacts
- Inherits:
-
Object
- Object
- Dolibarr::Api::Proposals::Contacts
- Defined in:
- lib/dolibarr-api/api/proposals/contacts.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ Contacts
constructor
A new instance of Contacts.
- #list(id:, type: nil) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Contacts
Returns a new instance of Contacts.
5 6 7 |
# File 'lib/dolibarr-api/api/proposals/contacts.rb', line 5 def initialize(connection) @connection = connection end |
Instance Method Details
#list(id:, type: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dolibarr-api/api/proposals/contacts.rb', line 9 def list(id:, type: nil) raise ArgumentError, 'id is required' if id.nil? @connection.call( :GET, '/proposals/{id}/contacts' .gsub('{id}', ERB::Util.url_encode(id.to_s)), type: nil, auth: ['api_key'], query: { 'type' => type } ) end |