Class: Mb::StaffOptions

Inherits:
Options show all
Defined in:
lib/mindbody/staff_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Options

#arrayify, public_var_names

Instance Attribute Details

#filtersObject

Returns the value of attribute filters.



3
4
5
# File 'lib/mindbody/staff_options.rb', line 3

def filters
  @filters
end

#staff_idsObject

Returns the value of attribute staff_ids.



3
4
5
# File 'lib/mindbody/staff_options.rb', line 3

def staff_ids
  @staff_ids
end

Instance Method Details

#to_hashObject

Return a hash ready for inclusion in a savon SOAP request, allow instance variables to renamed dependent on a map set up in the class



11
12
13
14
15
16
17
18
# File 'lib/mindbody/staff_options.rb', line 11

def to_hash
	mapper = self.class.map || {}			 

	to_ret = {}
	to_ret[ mapper[:filters] || "Filters" ]= { "StaffFilter" =>  @filters} if @filters
	to_ret[ mapper[:staff_ids] || "StaffIDs" ]= { "int" =>  @staff_ids} if @staff_ids
	to_ret
end