Sha256: b635c4d9934001e1e3e827e1448063ed1a202e09223c6896c9e05cef9c28597e

Contents?: true

Size: 784 Bytes

Versions: 2

Compression:

Stored size: 784 Bytes

Contents

class CentrumFaktur::Customer
  class << self
    def list(options = {})
      request = CentrumFaktur::Connection.new.get("/api/1.0/customers/", options)
      request.handle_response
    end

    def show(customer_uri, options = {})
      request = CentrumFaktur::Connection.new.get(customer_uri, options)
      request.handle_response
    end

    def create(params)
      request = CentrumFaktur::Connection.new.post("/api/1.0/customers/", params)
      request.handle_response
    end

    def update(customer_uri, params)
      request = CentrumFaktur::Connection.new.put(customer_uri, params)
      request.handle_response
    end

    def destroy(customer_uri)
      request = CentrumFaktur::Connection.new.delete(customer_uri)
      request.handle_response
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
centrum_faktur-0.2.2 lib/centrum_faktur/customer.rb
centrum_faktur-0.2.1 lib/centrum_faktur/customer.rb