Class: Billimatic::Resources::InvoiceRule
- Defined in:
- lib/billimatic/resources/invoice_rule.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#collection_name, crud, #destroy, #initialize, #list, #list_by_organization, #parsed_body, #show
Methods included from Hooks
Constructor Details
This class inherits a constructor from Billimatic::Resources::Base
Instance Method Details
#create(params, contract_id:) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/billimatic/resources/invoice_rule.rb', line 4 def create(params, contract_id:) http.post( "/contracts/#{contract_id}#{resource_base_path}", body: { underscored_klass_name.to_sym => params } ) do |response| respond_with_entity(response) end end |
#update(id, params, contract_id:) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/billimatic/resources/invoice_rule.rb', line 13 def update(id, params, contract_id:) http.put( "/contracts/#{contract_id}#{resource_base_path}/#{id}", body: { underscored_klass_name.to_sym => params } ) do |response| respond_with_entity(response) end end |