Class: Billimatic::Resources::Contract

Inherits:
Base
  • Object
show all
Defined in:
lib/billimatic/resources/contract.rb

Instance Attribute Summary

Attributes inherited from Base

#http

Instance Method Summary collapse

Methods inherited from Base

#collection_name, #create, crud, #destroy, #initialize, #list_by_organization, #parsed_body, #show_by_organization, #update

Methods included from Hooks

#notify

Constructor Details

This class inherits a constructor from Billimatic::Resources::Base

Instance Method Details

#list(organization_id:) ⇒ Object



12
13
14
# File 'lib/billimatic/resources/contract.rb', line 12

def list(organization_id:)
  list_by_organization(organization_id)
end

#search(name:) ⇒ Object



6
7
8
9
10
# File 'lib/billimatic/resources/contract.rb', line 6

def search(name:)
  http.get(
    "#{resource_base_path}/search", params: { name: name }
  ) { |response| respond_with_collection response }
end

#show(id, organization_id:) ⇒ Object



16
17
18
# File 'lib/billimatic/resources/contract.rb', line 16

def show(id, organization_id:)
  show_by_organization(organization_id, id)
end