class MoreappAPI::Customer
Attributes
id[RW]
moreapp_api[RW]
name[RW]
raw_data[RW]
Public Class Methods
new(moreapp_api, data)
click to toggle source
# File lib/moreapp_api/customer.rb, line 8 def initialize(moreapp_api, data) @moreapp_api = moreapp_api @id = data["customerId"] @name = data["name"] @raw_data = data end
Public Instance Methods
folders()
click to toggle source
# File lib/moreapp_api/customer.rb, line 16 def folders response = @moreapp_api.request(:get, "/api/v1.0/forms/customer/#{self.id}/folders?expand=forms") folders = JSON.parse(response.body) folders.map{|data| MoreappAPI::Folder.new(self, data)} end