stbaldricks 10.4.0.alpha.2 → 10.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stbaldricks/configuration.rb +4 -4
- data/lib/stbaldricks/endpoints/donation.rb +2 -2
- data/lib/stbaldricks/endpoints/lib/entity.rb +2 -2
- data/lib/stbaldricks/endpoints/photo.rb +1 -3
- data/lib/stbaldricks/entities/batch.rb +2 -2
- data/lib/stbaldricks/entities/challenge.rb +4 -4
- data/lib/stbaldricks/entities/challenger.rb +2 -2
- data/lib/stbaldricks/entities/challenger/model_type.rb +2 -0
- data/lib/stbaldricks/entities/concerns/entity_response_concern.rb +2 -4
- data/lib/stbaldricks/entities/config.rb +1 -1
- data/lib/stbaldricks/entities/contact.rb +1 -1
- data/lib/stbaldricks/entities/deduplicator_match.rb +5 -5
- data/lib/stbaldricks/entities/donation.rb +3 -3
- data/lib/stbaldricks/entities/donation/donor_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/how_created.rb +2 -0
- data/lib/stbaldricks/entities/donation/payment_gateway.rb +2 -0
- data/lib/stbaldricks/entities/donation/payment_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/promo_code.rb +19 -5
- data/lib/stbaldricks/entities/donation/recipient_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/special_donation_type.rb +2 -0
- data/lib/stbaldricks/entities/donation/status.rb +2 -0
- data/lib/stbaldricks/entities/donation/submitter_type.rb +2 -0
- data/lib/stbaldricks/entities/event.rb +10 -14
- data/lib/stbaldricks/entities/event/fund_relationship_type.rb +2 -0
- data/lib/stbaldricks/entities/event/how_created.rb +2 -0
- data/lib/stbaldricks/entities/event/promo_code.rb +2 -0
- data/lib/stbaldricks/entities/event/status.rb +2 -0
- data/lib/stbaldricks/entities/event/sub_type.rb +2 -0
- data/lib/stbaldricks/entities/event/type.rb +2 -0
- data/lib/stbaldricks/entities/event_application/model_type.rb +2 -0
- data/lib/stbaldricks/entities/event_application/status.rb +2 -0
- data/lib/stbaldricks/entities/fund.rb +1 -2
- data/lib/stbaldricks/entities/fundraiser.rb +21 -25
- data/lib/stbaldricks/entities/international_partner.rb +2 -2
- data/lib/stbaldricks/entities/kid.rb +62 -62
- data/lib/stbaldricks/entities/kid_honor.rb +4 -4
- data/lib/stbaldricks/entities/lib/address.rb +2 -2
- data/lib/stbaldricks/entities/lib/alternate_shipping_address.rb +2 -2
- data/lib/stbaldricks/entities/lib/base.rb +24 -27
- data/lib/stbaldricks/entities/lib/cacheable.rb +1 -3
- data/lib/stbaldricks/entities/lib/collection.rb +2 -2
- data/lib/stbaldricks/entities/lib/email_address.rb +2 -2
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +1 -1
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +4 -4
- data/lib/stbaldricks/entities/lib/payment.rb +14 -14
- data/lib/stbaldricks/entities/lib/phone.rb +3 -3
- data/lib/stbaldricks/entities/lib/third_party_media.rb +2 -2
- data/lib/stbaldricks/entities/lib/top_level.rb +4 -4
- data/lib/stbaldricks/entities/memorial.rb +3 -4
- data/lib/stbaldricks/entities/message.rb +8 -8
- data/lib/stbaldricks/entities/organization.rb +21 -21
- data/lib/stbaldricks/entities/page.rb +4 -6
- data/lib/stbaldricks/entities/participant.rb +58 -61
- data/lib/stbaldricks/entities/person.rb +97 -98
- data/lib/stbaldricks/entities/photo.rb +26 -26
- data/lib/stbaldricks/entities/recurring_gift.rb +18 -18
- data/lib/stbaldricks/entities/search.rb +8 -8
- data/lib/stbaldricks/entities/shave_schedule.rb +2 -2
- data/lib/stbaldricks/entities/team.rb +15 -18
- data/lib/stbaldricks/entities/user.rb +7 -5
- data/lib/stbaldricks/enums/cancer_types.rb +2 -0
- data/lib/stbaldricks/enums/country.rb +2 -0
- data/lib/stbaldricks/enums/league_status.rb +2 -0
- data/lib/stbaldricks/enums/model_type.rb +2 -0
- data/lib/stbaldricks/enums/permission.rb +8 -8
- data/lib/stbaldricks/enums/permission_model_type.rb +2 -0
- data/lib/stbaldricks/enums/province.rb +2 -0
- data/lib/stbaldricks/enums/state.rb +2 -0
- data/lib/stbaldricks/enums/top_level_category_type.rb +2 -0
- data/lib/stbaldricks/log.rb +3 -1
- data/lib/stbaldricks/patches/hash.rb +2 -2
- data/lib/stbaldricks/patches/string.rb +1 -1
- data/lib/stbaldricks/request.rb +3 -3
- data/lib/stbaldricks/version.rb +1 -1
- data/lib/stbaldricks_factories.rb +1 -1
- data/spec/factories/challenger.rb +2 -2
- data/spec/factories/kid.rb +3 -3
- data/spec/factories/kid_institution.rb +2 -2
- data/spec/factories/team.rb +2 -2
- metadata +88 -88
@@ -8,8 +8,8 @@ module SBF
|
|
8
8
|
include Entities::Cacheable
|
9
9
|
|
10
10
|
DEFAULT_ENDPOINT = SBF::Client::EntityEndpoint
|
11
|
-
DEFAULT_INSTANCE_ACTIONS =
|
12
|
-
DEFAULT_CLASS_ACTIONS =
|
11
|
+
DEFAULT_INSTANCE_ACTIONS = %i(save create update delete).freeze
|
12
|
+
DEFAULT_CLASS_ACTIONS = %i(get find find_first aggregate update delete).freeze
|
13
13
|
DEFAULT_CRUD_ACTIONS = DEFAULT_INSTANCE_ACTIONS + DEFAULT_CLASS_ACTIONS
|
14
14
|
|
15
15
|
class << self
|
@@ -45,7 +45,7 @@ module SBF
|
|
45
45
|
define_method(name) do |*args|
|
46
46
|
result = endpoint.send(name, self, *args)
|
47
47
|
result unless result.is_a?(SBF::Client::TopLevelEntity)
|
48
|
-
|
48
|
+
%i(save create).include?(name) && result.errors? ? false : result
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -58,7 +58,7 @@ module SBF
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def action(name)
|
61
|
-
instance_action(name) if
|
61
|
+
instance_action(name) if %i(save create).include?(name)
|
62
62
|
|
63
63
|
if name == :update
|
64
64
|
define_method(name) do |*args|
|
@@ -7,8 +7,7 @@ require 'stbaldricks/entities/concerns/donation_recipient_concern'
|
|
7
7
|
module SBF
|
8
8
|
module Client
|
9
9
|
class Memorial < SBF::Client::TopLevelEntity
|
10
|
-
include Entities::DefaultCacheable
|
11
|
-
include DonationRecipientConcern
|
10
|
+
include DonationRecipientConcern, Entities::DefaultCacheable
|
12
11
|
actions DEFAULT_CRUD_ACTIONS
|
13
12
|
blacklist_action :save
|
14
13
|
blacklist_action :create
|
@@ -17,8 +16,8 @@ module SBF
|
|
17
16
|
disallow_instantiation
|
18
17
|
|
19
18
|
module Status
|
20
|
-
ACTIVE = 'active'
|
21
|
-
PENDING = 'pending'
|
19
|
+
ACTIVE = 'active'.freeze
|
20
|
+
PENDING = 'pending'.freeze
|
22
21
|
end
|
23
22
|
|
24
23
|
class Tribute < SBF::Client::BaseEntity
|
@@ -14,21 +14,21 @@ module SBF
|
|
14
14
|
action :mark_as_unread
|
15
15
|
|
16
16
|
module Type
|
17
|
-
MEMBERS_COMMUNICATION = 'members_communication'
|
18
|
-
REPLY = 'reply'
|
17
|
+
MEMBERS_COMMUNICATION = 'members_communication'.freeze
|
18
|
+
REPLY = 'reply'.freeze
|
19
19
|
end
|
20
20
|
|
21
21
|
module Status
|
22
|
-
PENDING = 'pending'
|
23
|
-
SENT = 'sent'
|
24
|
-
DELETED = 'deleted'
|
22
|
+
PENDING = 'pending'.freeze
|
23
|
+
SENT = 'sent'.freeze
|
24
|
+
DELETED = 'deleted'.freeze
|
25
25
|
end
|
26
26
|
|
27
27
|
class Recipient < SBF::Client::BaseEntity
|
28
28
|
module Status
|
29
|
-
UNREAD = 'unread'
|
30
|
-
READ = 'read'
|
31
|
-
DELETED = 'deleted'
|
29
|
+
UNREAD = 'unread'.freeze
|
30
|
+
READ = 'read'.freeze
|
31
|
+
DELETED = 'deleted'.freeze
|
32
32
|
end
|
33
33
|
|
34
34
|
attr_accessor :id
|
@@ -16,39 +16,39 @@ module SBF
|
|
16
16
|
disallow_instantiation
|
17
17
|
|
18
18
|
module Status
|
19
|
-
PENDING = 'pending'
|
20
|
-
ACTIVE = 'active'
|
21
|
-
DECEASED = 'deceased'
|
19
|
+
PENDING = 'pending'.freeze
|
20
|
+
ACTIVE = 'active'.freeze
|
21
|
+
DECEASED = 'deceased'.freeze
|
22
22
|
end
|
23
23
|
|
24
24
|
module Type
|
25
|
-
BUSINESS = 'business'
|
26
|
-
ORGANIZATION_FOUNDATION = 'foundation'
|
25
|
+
BUSINESS = 'business'.freeze
|
26
|
+
ORGANIZATION_FOUNDATION = 'foundation'.freeze
|
27
27
|
end
|
28
28
|
|
29
29
|
module Gender
|
30
|
-
NOT_SELECTED = 'not_selected'
|
30
|
+
NOT_SELECTED = 'not_selected'.freeze
|
31
31
|
end
|
32
32
|
|
33
33
|
module HowCreated
|
34
|
-
WEBSITE = 'website'
|
35
|
-
ADMIN_IMPORT = 'admin_import'
|
36
|
-
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
37
|
-
SUBMIT_CASH = 'submit_cash'
|
38
|
-
MOBILE = 'mobile'
|
39
|
-
PARTICIPANT_REGISTRATION = 'participant_registration'
|
40
|
-
FUNDRAISER_REGISTRATION = 'fundraiser_registration'
|
41
|
-
FAST_DONATION = 'fast_donation'
|
42
|
-
RECURRING_GIFTS = 'recurring'
|
43
|
-
GIVE_ONCE = 'give_once'
|
44
|
-
DONATE = 'donate'
|
45
|
-
PAYMENT_SPRING_APP = 'payment_spring_app'
|
34
|
+
WEBSITE = 'website'.freeze
|
35
|
+
ADMIN_IMPORT = 'admin_import'.freeze
|
36
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'.freeze
|
37
|
+
SUBMIT_CASH = 'submit_cash'.freeze
|
38
|
+
MOBILE = 'mobile'.freeze
|
39
|
+
PARTICIPANT_REGISTRATION = 'participant_registration'.freeze
|
40
|
+
FUNDRAISER_REGISTRATION = 'fundraiser_registration'.freeze
|
41
|
+
FAST_DONATION = 'fast_donation'.freeze
|
42
|
+
RECURRING_GIFTS = 'recurring'.freeze
|
43
|
+
GIVE_ONCE = 'give_once'.freeze
|
44
|
+
DONATE = 'donate'.freeze
|
45
|
+
PAYMENT_SPRING_APP = 'payment_spring_app'.freeze
|
46
46
|
end
|
47
47
|
|
48
48
|
module ShippingPreference
|
49
|
-
USE_PRIMARY_ADDRESS = 'use_primary_address'
|
50
|
-
USE_VENUE_ADDRESS = 'use_venue_address'
|
51
|
-
USE_ALTERNATE_ADDRESS = 'use_alternate_address'
|
49
|
+
USE_PRIMARY_ADDRESS = 'use_primary_address'.freeze
|
50
|
+
USE_VENUE_ADDRESS = 'use_venue_address'.freeze
|
51
|
+
USE_ALTERNATE_ADDRESS = 'use_alternate_address'.freeze
|
52
52
|
end
|
53
53
|
|
54
54
|
class Addresses < SBF::Client::BaseEntity
|
@@ -18,8 +18,8 @@ module SBF
|
|
18
18
|
attr_reader :date_modified
|
19
19
|
|
20
20
|
module Type
|
21
|
-
TEXT = 'text'
|
22
|
-
META = 'meta'
|
21
|
+
TEXT = 'text'.freeze
|
22
|
+
META = 'meta'.freeze
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -61,7 +61,7 @@ module SBF
|
|
61
61
|
|
62
62
|
def add_draft_sections(sections)
|
63
63
|
sections.each do |cid, data|
|
64
|
-
#convert symbol to integer
|
64
|
+
# convert symbol to integer
|
65
65
|
cid = cid.to_s.to_i
|
66
66
|
|
67
67
|
content = published_content.find { |c| c.id == cid }
|
@@ -69,9 +69,7 @@ module SBF
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
private
|
73
|
-
|
74
|
-
def update_draft_content_section(content, data, cid)
|
72
|
+
private def update_draft_content_section(content, data, cid)
|
75
73
|
# update or create draft version of content
|
76
74
|
draft = draft_content.find { |d| d.id == cid }
|
77
75
|
if draft.nil?
|
@@ -18,10 +18,7 @@ require 'stbaldricks/entities/concerns/fundraising_page_concern'
|
|
18
18
|
module SBF
|
19
19
|
module Client
|
20
20
|
class Participant < SBF::Client::TopLevelEntity
|
21
|
-
include Entities::DefaultCacheable
|
22
|
-
include DonationRecipientConcern
|
23
|
-
include EventYearConcern
|
24
|
-
include FundraisingPageConcern
|
21
|
+
include FundraisingPageConcern, EventYearConcern, DonationRecipientConcern, Entities::DefaultCacheable
|
25
22
|
endpoint SBF::Client::ParticipantEndpoint
|
26
23
|
actions DEFAULT_CRUD_ACTIONS
|
27
24
|
action :join_team
|
@@ -33,61 +30,61 @@ module SBF
|
|
33
30
|
disallow_instantiation
|
34
31
|
|
35
32
|
module Status
|
36
|
-
ACTIVE = 'active'
|
37
|
-
PENDING = 'pending'
|
33
|
+
ACTIVE = 'active'.freeze
|
34
|
+
PENDING = 'pending'.freeze
|
38
35
|
end
|
39
36
|
|
40
37
|
module ShirtSize
|
41
|
-
FAST_REG_UNSPECIFIED = 'fast_reg_unspecified'
|
42
|
-
NOT_SPECIFIED = 'not specified'
|
43
|
-
YOUTH_SMALL = 'youth_small'
|
44
|
-
YOUTH_MEDIUM = 'youth_medium'
|
45
|
-
YOUTH_LARGE = 'youth_large'
|
46
|
-
XS = 'xs'
|
47
|
-
SMALL = 'small'
|
48
|
-
MEDIUM = 'medium'
|
49
|
-
LARGE = 'large'
|
50
|
-
XL = 'xl'
|
51
|
-
XXL = 'xxl'
|
52
|
-
XXXL = '3x'
|
53
|
-
XXXXL = '4x'
|
54
|
-
XXXXXL = '5x'
|
38
|
+
FAST_REG_UNSPECIFIED = 'fast_reg_unspecified'.freeze
|
39
|
+
NOT_SPECIFIED = 'not specified'.freeze
|
40
|
+
YOUTH_SMALL = 'youth_small'.freeze
|
41
|
+
YOUTH_MEDIUM = 'youth_medium'.freeze
|
42
|
+
YOUTH_LARGE = 'youth_large'.freeze
|
43
|
+
XS = 'xs'.freeze
|
44
|
+
SMALL = 'small'.freeze
|
45
|
+
MEDIUM = 'medium'.freeze
|
46
|
+
LARGE = 'large'.freeze
|
47
|
+
XL = 'xl'.freeze
|
48
|
+
XXL = 'xxl'.freeze
|
49
|
+
XXXL = '3x'.freeze
|
50
|
+
XXXXL = '4x'.freeze
|
51
|
+
XXXXXL = '5x'.freeze
|
55
52
|
|
56
53
|
def self.list
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
54
|
+
%i(
|
55
|
+
FAST_REG_UNSPECIFIED
|
56
|
+
YOUTH_SMALL
|
57
|
+
YOUTH_MEDIUM
|
58
|
+
YOUTH_LARGE
|
59
|
+
XS
|
60
|
+
SMALL
|
61
|
+
MEDIUM
|
62
|
+
LARGE
|
63
|
+
XL
|
64
|
+
XXL
|
65
|
+
XXXL
|
66
|
+
XXXXL
|
67
|
+
XXXXXL
|
68
|
+
)
|
72
69
|
end
|
73
70
|
end
|
74
71
|
|
75
72
|
module HowCreated
|
76
|
-
WEBSITE = 'website'
|
77
|
-
ADMIN_IMPORT = 'admin_import'
|
78
|
-
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
79
|
-
MOBILE = 'mobile'
|
80
|
-
FAST_REGISTRATION = 'fast_registration'
|
73
|
+
WEBSITE = 'website'.freeze
|
74
|
+
ADMIN_IMPORT = 'admin_import'.freeze
|
75
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'.freeze
|
76
|
+
MOBILE = 'mobile'.freeze
|
77
|
+
FAST_REGISTRATION = 'fast_registration'.freeze
|
81
78
|
end
|
82
79
|
|
83
80
|
module FundRelationshipType
|
84
|
-
NO_ASSOCIATION = 'no_association'
|
85
|
-
DIRECT = 'direct'
|
86
|
-
DIRECT_BUT_LOCKED = 'direct_but_locked'
|
87
|
-
INHERITED_FROM_TEAM = 'inherited_from_team'
|
88
|
-
INHERITED_FROM_EVENT = 'inherited_from_event'
|
89
|
-
INHERITED_FROM_TEAMS_EVENT = 'inherited_from_teams_event'
|
90
|
-
INHERITED_FROM_BOTH_TEAM_AND_EVENT = 'inherited_from_both_team_and_event'
|
81
|
+
NO_ASSOCIATION = 'no_association'.freeze
|
82
|
+
DIRECT = 'direct'.freeze
|
83
|
+
DIRECT_BUT_LOCKED = 'direct_but_locked'.freeze
|
84
|
+
INHERITED_FROM_TEAM = 'inherited_from_team'.freeze
|
85
|
+
INHERITED_FROM_EVENT = 'inherited_from_event'.freeze
|
86
|
+
INHERITED_FROM_TEAMS_EVENT = 'inherited_from_teams_event'.freeze
|
87
|
+
INHERITED_FROM_BOTH_TEAM_AND_EVENT = 'inherited_from_both_team_and_event'.freeze
|
91
88
|
end
|
92
89
|
|
93
90
|
class Photos < SBF::Client::BaseEntity
|
@@ -104,25 +101,25 @@ module SBF
|
|
104
101
|
|
105
102
|
class Roles < SBF::Client::BaseEntity
|
106
103
|
module Status
|
107
|
-
ACTIVE = 'active'
|
108
|
-
PENDING = 'pending'
|
109
|
-
SUSPENDED = 'suspended'
|
104
|
+
ACTIVE = 'active'.freeze
|
105
|
+
PENDING = 'pending'.freeze
|
106
|
+
SUSPENDED = 'suspended'.freeze
|
110
107
|
end
|
111
108
|
|
112
109
|
module Type
|
113
|
-
SHAVEE = 'shavee'
|
114
|
-
BARBER = 'barber'
|
115
|
-
TREASURER = 'treasurer'
|
116
|
-
SHAVEE_RECRUITER = 'shavee_recruiter'
|
117
|
-
ORGANIZER = 'organizer'
|
118
|
-
TEAM_CAPTAIN = 'team_captain'
|
119
|
-
LEAD_TREASURER = 'lead_treasurer'
|
120
|
-
LEAD_ORGANIZER = 'lead_organizer'
|
121
|
-
BARBER_COORDINATOR = 'barber_coordinator'
|
122
|
-
VOLUNTEER = 'volunteer'
|
110
|
+
SHAVEE = 'shavee'.freeze
|
111
|
+
BARBER = 'barber'.freeze
|
112
|
+
TREASURER = 'treasurer'.freeze
|
113
|
+
SHAVEE_RECRUITER = 'shavee_recruiter'.freeze
|
114
|
+
ORGANIZER = 'organizer'.freeze
|
115
|
+
TEAM_CAPTAIN = 'team_captain'.freeze
|
116
|
+
LEAD_TREASURER = 'lead_treasurer'.freeze
|
117
|
+
LEAD_ORGANIZER = 'lead_organizer'.freeze
|
118
|
+
BARBER_COORDINATOR = 'barber_coordinator'.freeze
|
119
|
+
VOLUNTEER = 'volunteer'.freeze
|
123
120
|
end
|
124
121
|
|
125
|
-
CORE_COMMITTEE_TYPES = [Type::ORGANIZER, Type::TREASURER, Type::BARBER_COORDINATOR, Type::SHAVEE_RECRUITER]
|
122
|
+
CORE_COMMITTEE_TYPES = [Type::ORGANIZER, Type::TREASURER, Type::BARBER_COORDINATOR, Type::SHAVEE_RECRUITER].freeze
|
126
123
|
|
127
124
|
class Role < SBF::Client::BaseEntity
|
128
125
|
attr_accessor :status
|
@@ -13,29 +13,28 @@ require 'stbaldricks/entities/concerns/type_concern'
|
|
13
13
|
module SBF
|
14
14
|
module Client
|
15
15
|
class Person < SBF::Client::TopLevelEntity
|
16
|
-
include Entities::DefaultCacheable
|
17
|
-
include TypeConcern
|
16
|
+
include TypeConcern, Entities::DefaultCacheable
|
18
17
|
disallow_instantiation
|
19
18
|
|
20
19
|
actions DEFAULT_CRUD_ACTIONS
|
21
20
|
blacklist_action :delete
|
22
21
|
|
23
22
|
module Status
|
24
|
-
PENDING = 'pending' #1
|
25
|
-
ACTIVE = 'active' #2
|
26
|
-
DECEASED = 'deceased' #7 (may be deprecated: working on this with SBF)
|
23
|
+
PENDING = 'pending'.freeze # 1
|
24
|
+
ACTIVE = 'active'.freeze # 2
|
25
|
+
DECEASED = 'deceased'.freeze # 7 (may be deprecated: working on this with SBF)
|
27
26
|
end
|
28
27
|
|
29
28
|
module Type
|
30
|
-
INDIVIDUAL = 'individual'
|
31
|
-
BUSINESS = 'business'
|
32
|
-
FOUNDATION = 'foundation'
|
29
|
+
INDIVIDUAL = 'individual'.freeze
|
30
|
+
BUSINESS = 'business'.freeze
|
31
|
+
FOUNDATION = 'foundation'.freeze
|
33
32
|
|
34
33
|
IDS = {
|
35
34
|
INDIVIDUAL => 1,
|
36
35
|
BUSINESS => 2,
|
37
36
|
FOUNDATION => 3
|
38
|
-
}
|
37
|
+
}.freeze
|
39
38
|
IDS.freeze
|
40
39
|
|
41
40
|
def self.to_s(type_id)
|
@@ -48,32 +47,32 @@ module SBF
|
|
48
47
|
end
|
49
48
|
|
50
49
|
module Gender
|
51
|
-
NOT_SELECTED = 'not_selected'
|
52
|
-
CHOSE_NOT_TO_SPECIFY = 'chose_not_to_specify'
|
53
|
-
MALE = 'male'
|
54
|
-
FEMALE = 'female'
|
50
|
+
NOT_SELECTED = 'not_selected'.freeze
|
51
|
+
CHOSE_NOT_TO_SPECIFY = 'chose_not_to_specify'.freeze
|
52
|
+
MALE = 'male'.freeze
|
53
|
+
FEMALE = 'female'.freeze
|
55
54
|
end
|
56
55
|
|
57
56
|
module HowCreated
|
58
|
-
WEBSITE = 'website'
|
59
|
-
ADMIN_IMPORT = 'admin_import'
|
60
|
-
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
61
|
-
SUBMIT_CASH = 'submit_cash'
|
62
|
-
MOBILE = 'mobile'
|
63
|
-
PARTICIPANT_REGISTRATION = 'participant_registration'
|
64
|
-
FUNDRAISER_REGISTRATION = 'fundraiser_registration'
|
65
|
-
FAST_REGISTRATION = 'fast_registration'
|
66
|
-
FAST_DONATION = 'fast_donation'
|
67
|
-
RECURRING_GIFTS = 'recurring'
|
68
|
-
GIVE_ONCE = 'give_once'
|
69
|
-
DONATE = 'donate'
|
70
|
-
PAYMENT_SPRING_APP = 'payment_spring_app'
|
57
|
+
WEBSITE = 'website'.freeze
|
58
|
+
ADMIN_IMPORT = 'admin_import'.freeze
|
59
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'.freeze
|
60
|
+
SUBMIT_CASH = 'submit_cash'.freeze
|
61
|
+
MOBILE = 'mobile'.freeze
|
62
|
+
PARTICIPANT_REGISTRATION = 'participant_registration'.freeze
|
63
|
+
FUNDRAISER_REGISTRATION = 'fundraiser_registration'.freeze
|
64
|
+
FAST_REGISTRATION = 'fast_registration'.freeze
|
65
|
+
FAST_DONATION = 'fast_donation'.freeze
|
66
|
+
RECURRING_GIFTS = 'recurring'.freeze
|
67
|
+
GIVE_ONCE = 'give_once'.freeze
|
68
|
+
DONATE = 'donate'.freeze
|
69
|
+
PAYMENT_SPRING_APP = 'payment_spring_app'.freeze
|
71
70
|
end
|
72
71
|
|
73
72
|
module ShippingPreference
|
74
|
-
USE_PRIMARY_ADDRESS = 'use_primary_address'
|
75
|
-
USE_VENUE_ADDRESS = 'use_venue_address'
|
76
|
-
USE_ALTERNATE_ADDRESS = 'use_alternate_address'
|
73
|
+
USE_PRIMARY_ADDRESS = 'use_primary_address'.freeze
|
74
|
+
USE_VENUE_ADDRESS = 'use_venue_address'.freeze
|
75
|
+
USE_ALTERNATE_ADDRESS = 'use_alternate_address'.freeze
|
77
76
|
end
|
78
77
|
|
79
78
|
class Addresses < SBF::Client::BaseEntity
|
@@ -110,24 +109,24 @@ module SBF
|
|
110
109
|
attr_reader :is_child_survivor, :is_child_family, :is_child_friend, :is_adult_survivor, :is_adult_friend_or_family, :is_none
|
111
110
|
|
112
111
|
module CancerType
|
113
|
-
ACUTE_LYMPHOBLASTIC_LEUKEMIA = 'Acute lymphoblastic leukemia (ALL)'
|
114
|
-
ACUTE_MYELOID_LEUKEMIA = 'Acute myeloid leukemia (AML)'
|
115
|
-
BRAIN_OR_SPINAL_CORD_TUMOR = 'Brain or spinal cord tumor'
|
116
|
-
CLEAR_CELL_SARCOMA_OF_THE_KIDNEY = 'Clear cell sarcoma of the kidney'
|
117
|
-
EWING_SARCOMA = 'Ewing sarcoma'
|
118
|
-
GERM_CELL_TUMOR = 'Germ cell tumor'
|
119
|
-
HEPATOBLASTOMA = 'Hepatoblastoma'
|
120
|
-
HODGKIN_LYMPHOMA = 'Hodgkin lymphoma'
|
121
|
-
LANGERHANS_CELL_HISTIOCYTOSIS = 'Langerhans Cell Histiocytosis (LCH)'
|
122
|
-
LYMPHOMA = 'Lymphoma'
|
123
|
-
NEUROBLASTOMA = 'Neuroblastoma'
|
124
|
-
NON_HODGKIN_LYMPHOMA = 'Non-Hodgkin lymphoma'
|
125
|
-
OSTEOSARCOMA = 'Osteosarcoma'
|
126
|
-
RETINOBLASTOMA = 'Retinoblastoma'
|
127
|
-
RHABDOMYOSARCOMA = 'Rhabdomyosarcoma'
|
128
|
-
WILMS_OR_OTHER_KIDNEY_TUMOR = 'Wilms or other kidney tumor'
|
129
|
-
ADULT_WITH_A_TYPE_OF_CHILDHOOD_CANCER = 'Adult with a type of childhood cancer'
|
130
|
-
OTHER_CHILDHOOD_CANCER = 'Other childhood cancer'
|
112
|
+
ACUTE_LYMPHOBLASTIC_LEUKEMIA = 'Acute lymphoblastic leukemia (ALL)'.freeze
|
113
|
+
ACUTE_MYELOID_LEUKEMIA = 'Acute myeloid leukemia (AML)'.freeze
|
114
|
+
BRAIN_OR_SPINAL_CORD_TUMOR = 'Brain or spinal cord tumor'.freeze
|
115
|
+
CLEAR_CELL_SARCOMA_OF_THE_KIDNEY = 'Clear cell sarcoma of the kidney'.freeze
|
116
|
+
EWING_SARCOMA = 'Ewing sarcoma'.freeze
|
117
|
+
GERM_CELL_TUMOR = 'Germ cell tumor'.freeze
|
118
|
+
HEPATOBLASTOMA = 'Hepatoblastoma'.freeze
|
119
|
+
HODGKIN_LYMPHOMA = 'Hodgkin lymphoma'.freeze
|
120
|
+
LANGERHANS_CELL_HISTIOCYTOSIS = 'Langerhans Cell Histiocytosis (LCH)'.freeze
|
121
|
+
LYMPHOMA = 'Lymphoma'.freeze
|
122
|
+
NEUROBLASTOMA = 'Neuroblastoma'.freeze
|
123
|
+
NON_HODGKIN_LYMPHOMA = 'Non-Hodgkin lymphoma'.freeze
|
124
|
+
OSTEOSARCOMA = 'Osteosarcoma'.freeze
|
125
|
+
RETINOBLASTOMA = 'Retinoblastoma'.freeze
|
126
|
+
RHABDOMYOSARCOMA = 'Rhabdomyosarcoma'.freeze
|
127
|
+
WILMS_OR_OTHER_KIDNEY_TUMOR = 'Wilms or other kidney tumor'.freeze
|
128
|
+
ADULT_WITH_A_TYPE_OF_CHILDHOOD_CANCER = 'Adult with a type of childhood cancer'.freeze
|
129
|
+
OTHER_CHILDHOOD_CANCER = 'Other childhood cancer'.freeze
|
131
130
|
@list = {
|
132
131
|
ACUTE_LYMPHOBLASTIC_LEUKEMIA => 'acute_lymphoblastic_leukemia',
|
133
132
|
ACUTE_MYELOID_LEUKEMIA => 'acute_myeloid_leukemia',
|
@@ -155,18 +154,18 @@ module SBF
|
|
155
154
|
end
|
156
155
|
|
157
156
|
module FamilyRelationship
|
158
|
-
NONE = 'None'
|
159
|
-
MOTHER = 'Mother'
|
160
|
-
FATHER = 'Father'
|
161
|
-
SISTER = 'Sister'
|
162
|
-
BROTHER = 'Brother'
|
163
|
-
AUNT = 'Aunt'
|
164
|
-
UNCLE = 'Uncle'
|
165
|
-
GRANDMOTHER = 'Grandmother'
|
166
|
-
GRANDFATHER = 'Grandfather'
|
167
|
-
STEP_MOTHER = 'Step-Mother'
|
168
|
-
STEP_FATHER = 'Step-Father'
|
169
|
-
LEGAL_GUARDIAN = 'Legal-Guardian'
|
157
|
+
NONE = 'None'.freeze
|
158
|
+
MOTHER = 'Mother'.freeze
|
159
|
+
FATHER = 'Father'.freeze
|
160
|
+
SISTER = 'Sister'.freeze
|
161
|
+
BROTHER = 'Brother'.freeze
|
162
|
+
AUNT = 'Aunt'.freeze
|
163
|
+
UNCLE = 'Uncle'.freeze
|
164
|
+
GRANDMOTHER = 'Grandmother'.freeze
|
165
|
+
GRANDFATHER = 'Grandfather'.freeze
|
166
|
+
STEP_MOTHER = 'Step-Mother'.freeze
|
167
|
+
STEP_FATHER = 'Step-Father'.freeze
|
168
|
+
LEGAL_GUARDIAN = 'Legal-Guardian'.freeze
|
170
169
|
@list = {
|
171
170
|
NONE => 'none',
|
172
171
|
MOTHER => 'mother',
|
@@ -188,11 +187,11 @@ module SBF
|
|
188
187
|
end
|
189
188
|
|
190
189
|
module CancerStatus
|
191
|
-
CANCER_FREE = 'Cancer free'
|
192
|
-
IN_REMISSION = 'In remission'
|
193
|
-
IN_TREATMENT = 'In treatment'
|
194
|
-
IN_MAINTENANCE = 'In maintenance'
|
195
|
-
LOST_TO_CANCER = 'Lost to cancer'
|
190
|
+
CANCER_FREE = 'Cancer free'.freeze
|
191
|
+
IN_REMISSION = 'In remission'.freeze
|
192
|
+
IN_TREATMENT = 'In treatment'.freeze
|
193
|
+
IN_MAINTENANCE = 'In maintenance'.freeze
|
194
|
+
LOST_TO_CANCER = 'Lost to cancer'.freeze
|
196
195
|
@list = {
|
197
196
|
CANCER_FREE => 'cancer_free',
|
198
197
|
IN_REMISSION => 'in_remission',
|
@@ -208,22 +207,22 @@ module SBF
|
|
208
207
|
end
|
209
208
|
class Occupation < SBF::Client::BaseEntity
|
210
209
|
module Type
|
211
|
-
STUDENT = 'Student'
|
212
|
-
EDUCATOR = 'Educator'
|
213
|
-
PHYSICIAN = 'Physician'
|
214
|
-
NURSE = 'Nurse'
|
215
|
-
RESEARCHER = 'Researcher'
|
216
|
-
SOCIAL_WORKER = 'Social Worker'
|
217
|
-
OTHER_CARE_GIVER = 'Other Caregiver'
|
218
|
-
CHILDHOOD_HEALTH_ADVOCATE = 'Childhood Health Advocate'
|
219
|
-
FIREFIGHTER = 'Firefighter'
|
220
|
-
POLICE_OFFICER = 'Police Officer'
|
221
|
-
MILITARY = 'Military'
|
222
|
-
INSURANCE_INDUSTRIES = 'Insurance Industries'
|
223
|
-
BANKING_FINANCE = 'Banking & Finance'
|
224
|
-
SECURITIES_TRADING = 'Securities & Trading'
|
225
|
-
BARBER_COSMETOLOGIST = 'Barber or Cosmetologist'
|
226
|
-
OTHER = 'Other'
|
210
|
+
STUDENT = 'Student'.freeze
|
211
|
+
EDUCATOR = 'Educator'.freeze
|
212
|
+
PHYSICIAN = 'Physician'.freeze
|
213
|
+
NURSE = 'Nurse'.freeze
|
214
|
+
RESEARCHER = 'Researcher'.freeze
|
215
|
+
SOCIAL_WORKER = 'Social Worker'.freeze
|
216
|
+
OTHER_CARE_GIVER = 'Other Caregiver'.freeze
|
217
|
+
CHILDHOOD_HEALTH_ADVOCATE = 'Childhood Health Advocate'.freeze
|
218
|
+
FIREFIGHTER = 'Firefighter'.freeze
|
219
|
+
POLICE_OFFICER = 'Police Officer'.freeze
|
220
|
+
MILITARY = 'Military'.freeze
|
221
|
+
INSURANCE_INDUSTRIES = 'Insurance Industries'.freeze
|
222
|
+
BANKING_FINANCE = 'Banking & Finance'.freeze
|
223
|
+
SECURITIES_TRADING = 'Securities & Trading'.freeze
|
224
|
+
BARBER_COSMETOLOGIST = 'Barber or Cosmetologist'.freeze
|
225
|
+
OTHER = 'Other'.freeze
|
227
226
|
|
228
227
|
@list = {
|
229
228
|
STUDENT => 'student',
|
@@ -250,11 +249,11 @@ module SBF
|
|
250
249
|
end
|
251
250
|
|
252
251
|
module EducatorType
|
253
|
-
PRESCHOOL = 'Preschool'
|
254
|
-
ELEMENTARY_SCHOOL = 'Elementary School'
|
255
|
-
MIDDLE_SCHOOL = 'Middle School'
|
256
|
-
HIGH_SCHOOL = 'High School'
|
257
|
-
COLLEGE = 'College'
|
252
|
+
PRESCHOOL = 'Preschool'.freeze
|
253
|
+
ELEMENTARY_SCHOOL = 'Elementary School'.freeze
|
254
|
+
MIDDLE_SCHOOL = 'Middle School'.freeze
|
255
|
+
HIGH_SCHOOL = 'High School'.freeze
|
256
|
+
COLLEGE = 'College'.freeze
|
258
257
|
|
259
258
|
@list = {
|
260
259
|
PRESCHOOL => 'preschool',
|
@@ -270,10 +269,10 @@ module SBF
|
|
270
269
|
end
|
271
270
|
|
272
271
|
module StudentType
|
273
|
-
ELEMENTARY_SCHOOL = 'Elementary School'
|
274
|
-
MIDDLE_SCHOOL = 'Middle School'
|
275
|
-
HIGH_SCHOOL = 'High School'
|
276
|
-
COLLEGE = 'College'
|
272
|
+
ELEMENTARY_SCHOOL = 'Elementary School'.freeze
|
273
|
+
MIDDLE_SCHOOL = 'Middle School'.freeze
|
274
|
+
HIGH_SCHOOL = 'High School'.freeze
|
275
|
+
COLLEGE = 'College'.freeze
|
277
276
|
@list = {
|
278
277
|
ELEMENTARY_SCHOOL => 'elementary_school',
|
279
278
|
MIDDLE_SCHOOL => 'middle_school',
|
@@ -287,12 +286,12 @@ module SBF
|
|
287
286
|
end
|
288
287
|
|
289
288
|
module MilitaryBranchType
|
290
|
-
ARMY = 'Army'
|
291
|
-
NAVY = 'Navy'
|
292
|
-
AIR_FORCE = 'Air Force'
|
293
|
-
MARINES = 'Marines'
|
294
|
-
COAST_GUARD = 'Coast Guard'
|
295
|
-
NATIONAL_GUARD = 'National Guard'
|
289
|
+
ARMY = 'Army'.freeze
|
290
|
+
NAVY = 'Navy'.freeze
|
291
|
+
AIR_FORCE = 'Air Force'.freeze
|
292
|
+
MARINES = 'Marines'.freeze
|
293
|
+
COAST_GUARD = 'Coast Guard'.freeze
|
294
|
+
NATIONAL_GUARD = 'National Guard'.freeze
|
296
295
|
|
297
296
|
@list = {
|
298
297
|
ARMY => 'army',
|
@@ -309,9 +308,9 @@ module SBF
|
|
309
308
|
end
|
310
309
|
|
311
310
|
module MilitaryStatusType
|
312
|
-
ACTIVE_DUTY = 'Active Duty'
|
313
|
-
RESERVES = 'Reserves'
|
314
|
-
RETIRED = 'Retired'
|
311
|
+
ACTIVE_DUTY = 'Active Duty'.freeze
|
312
|
+
RESERVES = 'Reserves'.freeze
|
313
|
+
RETIRED = 'Retired'.freeze
|
315
314
|
|
316
315
|
@list = {
|
317
316
|
ACTIVE_DUTY => 'active_duty',
|