Class: BigDoor::NamedTransactionGroup

Inherits:
Object
  • Object
show all
Includes:
ClassMethods
Defined in:
lib/big-door/named_transaction_group.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ClassMethods

app_key, included, #parse_out_classes, #perform_request, #remote_id, secret_key

Constructor Details

#initialize(params) ⇒ NamedTransactionGroup

Returns a new instance of NamedTransactionGroup.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/big-door/named_transaction_group.rb', line 5

def initialize(params)
	params.each_pair do |key, val|
		self.class.class_eval do
			next if self.instance_methods.include?(key) and key.to_s != 'id'
			self.instance_eval do
				attr_accessor key
			end
		end
		instance_variable_set("@#{key}", val)
	end
	
	self.named_transactions = parse_out_classes(params['named_transactions'])
end

Class Method Details

.allObject



19
20
21
# File 'lib/big-door/named_transaction_group.rb', line 19

def self.all
	perform_request('get', 'named_transaction_group')
end

.find(params = {}) ⇒ Object



23
24
25
# File 'lib/big-door/named_transaction_group.rb', line 23

def self.find(params={})
	results = perform_request('get', 'named_transaction_group', params)
end