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