Class: Qrfy::Resources::Folders

Inherits:
Base
  • Object
show all
Defined in:
lib/qrfy/resources/folders.rb

Overview

# Folder Qrfy Resource

You can list and create new folders.

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Qrfy::Resources::Base

Instance Method Details

#create(**attributes) ⇒ Object



16
17
18
19
# File 'lib/qrfy/resources/folders.rb', line 16

def create(**attributes)
  response = post_request("folders", body: attributes)
  response.body["id"]
end

#listObject



11
12
13
14
# File 'lib/qrfy/resources/folders.rb', line 11

def list
  response = get_request("folders")
  Collection.from_response(response.body, type: Qrfy::Objects::Folder)
end