Class: PrefabC::Book

Inherits:
AbstractResource show all
Includes:
CreatesSubresources, ListsSubresources, ReadsSubresources, Updates
Defined in:
lib/prefabc/book.rb

Constant Summary

Constants inherited from AbstractResource

AbstractResource::IMMUTABLE_PARAMETERS, AbstractResource::KEYS_TO_PARSE_AS_DATETIME

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Updates

#update!

Methods included from CreatesSubresources

included

Methods included from ReadsSubresources

included

Methods included from ListsSubresources

included

Methods inherited from AbstractResource

collection_name, #collection_path, hierarchy, #initialize, #parent_path, resource_name, #resource_path, rubify_raw_params, #subresource_collection_path

Constructor Details

This class inherits a constructor from PrefabC::AbstractResource

Class Method Details

.subresourceObject



3
4
5
# File 'lib/prefabc/book.rb', line 3

def self.subresource
  Account
end

Instance Method Details

#post_transaction_set(transaction_set) ⇒ Object



12
13
14
15
# File 'lib/prefabc/book.rb', line 12

def post_transaction_set(transaction_set)
  client = Client.new("/entities/#{entity}/books/#{id}/transactions")
  client.post(transaction_set)
end