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