Sha256: fbc5b31df9a31554db94a31e36a1c11a2e12ba0c462bda81371f979288159fe0

Contents?: true

Size: 578 Bytes

Versions: 7

Compression:

Stored size: 578 Bytes

Contents

module Billimatic
  module Resources
    class Contract < Base
      crud :create, :update, :destroy

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

      def list(organization_id:)
        list_by_organization(organization_id)
      end

      def show(id, organization_id:)
        http.get(
          "/organizations/#{organization_id}#{resource_base_path}/#{id}"
        ) { |response| respond_with_entity response }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
billimatic-client-0.19.1 lib/billimatic/resources/contract.rb
billimatic-client-0.19.0 lib/billimatic/resources/contract.rb
billimatic-client-0.18.1 lib/billimatic/resources/contract.rb
billimatic-client-0.18.0 lib/billimatic/resources/contract.rb
billimatic-client-0.17.0 lib/billimatic/resources/contract.rb
billimatic-client-0.16.0 lib/billimatic/resources/contract.rb
billimatic-client-0.15.0 lib/billimatic/resources/contract.rb