Class: LunchMoney::Calls::Tags

Inherits:
Base
  • Object
show all
Defined in:
lib/lunchmoney/calls/tags.rb

Overview

Constant Summary

Constants inherited from Base

Base::BASE_URL

Instance Attribute Summary

Attributes inherited from Base

#api_key

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from LunchMoney::Calls::Base

Instance Method Details

#tagsArray<LunchMoney::Objects::Tag>, LunchMoney::Errors



11
12
13
14
15
16
17
18
# File 'lib/lunchmoney/calls/tags.rb', line 11

def tags
  response = get("tags")

  api_errors = errors(response)
  return api_errors if api_errors.present?

  response.body.map { |tag| LunchMoney::Objects::Tag.new(**tag) }
end