Sha256: 583e2be2c8ef529603361779a828f5096411b9addc3e69552474c107ef938000

Contents?: true

Size: 1.26 KB

Versions: 9

Compression:

Stored size: 1.26 KB

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../lib/ccb_api'
require File.dirname(__FILE__) + '/api_connect.rb'

# IndividualList is returned from Search
x_names = ChurchCommunityBuilder::Search.search_for_person_by_name("x")
puts x_names.all_names

# Individual is created here
individual = ChurchCommunityBuilder::Individual.load_by_id(2)
puts "Name ==> " + individual.full_name
puts "Address: "
puts individual.mailing_address.street_address + "\n" +
		 individual.mailing_address.city + ", " + 
		 individual.mailing_address.state + " " +
		 individual.mailing_address.zip

puts "Phone ==>" + individual.contact_phone
puts "Email ==> " + individual.email

puts "Gender ==> " + individual.gender
puts "Birthday ==> " + individual.birthday
puts "Marital Status ==> " + individual.marital_status

puts "Family Name ==> " + individual.family_name
puts "Campus Name ==> " + individual.campus_name

# Grab all individuals
all_valid_individuals = ChurchCommunityBuilder::Search.search_for_all_valid_individuals

# all individuals is a ValidIndividualList.
# we can use this to build an IndividualList
mil = ChurchCommunityBuilder::MergeableIndividualList.new

all_valid_individuals.each do |vi|
	individual = ChurchCommunityBuilder::Individual.load_by_id(vi.id)
	mil.add(individual)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
church-community-builder-0.2.2 examples/individual.rb
church-community-builder-0.2.1 examples/individual.rb
church-community-builder-0.2.0 examples/individual.rb
church-community-builder-0.1.6 examples/individual.rb
church-community-builder-0.1.5 examples/individual.rb
church-community-builder-0.1.4 examples/individual.rb
church-community-builder-0.1.3 examples/individual.rb
church-community-builder-0.1.2 examples/individual.rb
church-community-builder-0.1.1 examples/individual.rb