Sha256: a95e46fcc688c7ae5971f0ab862a7c8cede039cdd822e206ca12bafc97bfa727

Contents?: true

Size: 813 Bytes

Versions: 9

Compression:

Stored size: 813 Bytes

Contents

module Billimatic
  module Resources
    class Invoice < InvoiceRule
      def search(contract_id:, issue_date_from:, issue_date_to:)
        http.get(
          "/contracts/#{contract_id}#{resource_base_path}/search",
          params: { issue_date_from: issue_date_from, issue_date_to: issue_date_to }
        ) do |response|
          respond_with_collection response
        end
      end

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

      def destroy(id, contract_id:)
        http.delete(
          "/contracts/#{contract_id}#{resource_base_path}/#{id}"
        ) do |response|
          response.code == 204
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
billimatic-client-0.11.3 lib/billimatic/resources/invoice.rb
billimatic-client-0.11.2 lib/billimatic/resources/invoice.rb
billimatic-client-0.11.1 lib/billimatic/resources/invoice.rb
billimatic-client-0.11.0 lib/billimatic/resources/invoice.rb
billimatic-client-0.10.2 lib/billimatic/resources/invoice.rb
billimatic-client-0.10.1 lib/billimatic/resources/invoice.rb
billimatic-client-0.10.0 lib/billimatic/resources/invoice.rb
billimatic-client-0.9.0 lib/billimatic/resources/invoice.rb
billimatic-client-0.8.0 lib/billimatic/resources/invoice.rb