class Myfinance::Resources::CustomClassifier

Public Instance Methods

create(params) click to toggle source

Creates a custom classifier

API

Method: POST /custom_classifiers

Documentation: sandbox.myfinance.com.br/docs/api/custom_classifiers#post_create

# File lib/myfinance/resources/custom_classifier.rb, line 42
def create(params)
  http.post("/custom_classifiers", body: { custom_classifier: params }) do |response|
    respond_with_object response, "custom_classifier"
  end
end
destroy(id) click to toggle source

Destroy a custom_classifier

API

Method: DELETE /custom_classifiers/:id

Documentation: sandbox.myfinance.com.br/docs/api/custom_classifiers#delete_destroy

# File lib/myfinance/resources/custom_classifier.rb, line 70
def destroy(id)
  http.delete("/custom_classifiers/#{id}", body: {}) do |response|
    respond_with_object response, "custom_classifier"
  end
end
find(id) click to toggle source

Find a custom classifier

API

Method: GET /custom_classifiers/:id

Documentation: sandbox.myfinance.com.br/docs/api/custom_classifiers#get_show

# File lib/myfinance/resources/custom_classifier.rb, line 28
def find(id)
  http.get("/custom_classifiers/#{id}", body: {}) do |response|
    respond_with_object response, "custom_classifier"
  end
end
find_all(params = {}) click to toggle source

List all custom classifiers

API

Method: GET /custom_classifiers

Documentation: sandbox.myfinance.com.br/docs/api/custom_classifiers#get_index

# File lib/myfinance/resources/custom_classifier.rb, line 12
def find_all(params = {})
  search_endpoint = build_search_endpoint(params)

  http.get(search_endpoint) do |response|
    respond_with_collection(response)
  end
end
update(id, params = {}) click to toggle source

Updates a custom classifier

API

Method: PUT /custom_classifiers/:id

Documentation: sandbox.myfinance.com.br/docs/api/custom_classifiers#put_update

# File lib/myfinance/resources/custom_classifier.rb, line 56
def update(id, params = {})
  http.put("/custom_classifiers/#{id}", body: { custom_classifier: params }) do |response|
    respond_with_object response, "custom_classifier"
  end
end

Private Instance Methods

endpoint() click to toggle source
# File lib/myfinance/resources/custom_classifier.rb, line 78
def endpoint
  "/custom_classifiers"
end