lib/monday/resources/account.rb in monday_ruby-0.6.2 vs lib/monday/resources/account.rb in monday_ruby-1.0.0

- old
+ new

@@ -1,20 +1,22 @@ # frozen_string_literal: true +require_relative "base" + module Monday module Resources # Represents Monday.com's account resource. - module Account + class Account < Base DEFAULT_SELECT = %w[id name].freeze # Retrieves the users account. # # Allows customizing the values to retrieve using the select option. # By default, ID and name are retrieved. - def account(select: DEFAULT_SELECT) - query = "query { users { account {#{Util.format_select(select)}}}}" + def query(select: DEFAULT_SELECT) + request_query = "query{users{account {#{Util.format_select(select)}}}}" - make_request(query) + make_request(request_query) end end end end