stbaldricks 1.5.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/lib/stbaldricks.rb +2 -0
- data/lib/stbaldricks/api.rb +7 -0
- data/lib/stbaldricks/api_connector.rb +47 -0
- data/lib/stbaldricks/client.rb +7 -0
- data/lib/stbaldricks/configuration.rb +47 -0
- data/lib/stbaldricks/default_logger.rb +24 -0
- data/lib/stbaldricks/endpoints/communicate.rb +67 -0
- data/lib/stbaldricks/endpoints/config.rb +18 -0
- data/lib/stbaldricks/endpoints/contact.rb +12 -0
- data/lib/stbaldricks/endpoints/event.rb +39 -0
- data/lib/stbaldricks/endpoints/event_application.rb +32 -0
- data/lib/stbaldricks/endpoints/fund.rb +24 -0
- data/lib/stbaldricks/endpoints/kid.rb +24 -0
- data/lib/stbaldricks/endpoints/kid_honor.rb +17 -0
- data/lib/stbaldricks/endpoints/lib/entity.rb +247 -0
- data/lib/stbaldricks/endpoints/message.rb +27 -0
- data/lib/stbaldricks/endpoints/newsletter_recipient.rb +41 -0
- data/lib/stbaldricks/endpoints/participant.rb +66 -0
- data/lib/stbaldricks/endpoints/photo.rb +51 -0
- data/lib/stbaldricks/endpoints/recurring_gift.rb +18 -0
- data/lib/stbaldricks/endpoints/search.rb +63 -0
- data/lib/stbaldricks/endpoints/shave_schedule.rb +28 -0
- data/lib/stbaldricks/endpoints/user.rb +106 -0
- data/lib/stbaldricks/entities/batch.rb +29 -0
- data/lib/stbaldricks/entities/campaign.rb +37 -0
- data/lib/stbaldricks/entities/communicate.rb +20 -0
- data/lib/stbaldricks/entities/config.rb +41 -0
- data/lib/stbaldricks/entities/contact.rb +40 -0
- data/lib/stbaldricks/entities/contact_group.rb +29 -0
- data/lib/stbaldricks/entities/document_library.rb +19 -0
- data/lib/stbaldricks/entities/document_library_category.rb +14 -0
- data/lib/stbaldricks/entities/donation.rb +372 -0
- data/lib/stbaldricks/entities/donation/donor_type.rb +13 -0
- data/lib/stbaldricks/entities/donation/how_created.rb +22 -0
- data/lib/stbaldricks/entities/donation/payment_type.rb +17 -0
- data/lib/stbaldricks/entities/donation/promo_code.rb +22 -0
- data/lib/stbaldricks/entities/donation/recipient_type.rb +17 -0
- data/lib/stbaldricks/entities/donation/special_donation_type.rb +78 -0
- data/lib/stbaldricks/entities/donation/status.rb +12 -0
- data/lib/stbaldricks/entities/donation/submitter_type.rb +13 -0
- data/lib/stbaldricks/entities/donor.rb +15 -0
- data/lib/stbaldricks/entities/event.rb +173 -0
- data/lib/stbaldricks/entities/event/fund_relationship_type.rb +15 -0
- data/lib/stbaldricks/entities/event/how_created.rb +14 -0
- data/lib/stbaldricks/entities/event/promo_code.rb +11 -0
- data/lib/stbaldricks/entities/event/status.rb +13 -0
- data/lib/stbaldricks/entities/event/sub_type.rb +16 -0
- data/lib/stbaldricks/entities/event/type.rb +12 -0
- data/lib/stbaldricks/entities/event_application.rb +135 -0
- data/lib/stbaldricks/entities/event_application/model_type.rb +15 -0
- data/lib/stbaldricks/entities/event_application/status.rb +23 -0
- data/lib/stbaldricks/entities/event_donation_summary.rb +18 -0
- data/lib/stbaldricks/entities/event_participant_summary.rb +17 -0
- data/lib/stbaldricks/entities/event_supporter.rb +24 -0
- data/lib/stbaldricks/entities/fund.rb +98 -0
- data/lib/stbaldricks/entities/fundraiser.rb +124 -0
- data/lib/stbaldricks/entities/international_partner.rb +58 -0
- data/lib/stbaldricks/entities/kid.rb +190 -0
- data/lib/stbaldricks/entities/kid_honor.rb +123 -0
- data/lib/stbaldricks/entities/lib/address.rb +25 -0
- data/lib/stbaldricks/entities/lib/base.rb +505 -0
- data/lib/stbaldricks/entities/lib/cacheable.rb +43 -0
- data/lib/stbaldricks/entities/lib/default_cacheable.rb +17 -0
- data/lib/stbaldricks/entities/lib/email_address.rb +15 -0
- data/lib/stbaldricks/entities/lib/error.rb +38 -0
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +20 -0
- data/lib/stbaldricks/entities/lib/geo_location.rb +9 -0
- data/lib/stbaldricks/entities/lib/location.rb +27 -0
- data/lib/stbaldricks/entities/lib/name.rb +17 -0
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +32 -0
- data/lib/stbaldricks/entities/lib/opt_out_settings.rb +21 -0
- data/lib/stbaldricks/entities/lib/payment.rb +86 -0
- data/lib/stbaldricks/entities/lib/permissions.rb +33 -0
- data/lib/stbaldricks/entities/lib/phone.rb +29 -0
- data/lib/stbaldricks/entities/lib/third_party_media.rb +20 -0
- data/lib/stbaldricks/entities/lib/top_level.rb +99 -0
- data/lib/stbaldricks/entities/lib/venue.rb +18 -0
- data/lib/stbaldricks/entities/memorial.rb +61 -0
- data/lib/stbaldricks/entities/message.rb +65 -0
- data/lib/stbaldricks/entities/newsletter_recipient.rb +17 -0
- data/lib/stbaldricks/entities/organization.rb +90 -0
- data/lib/stbaldricks/entities/page.rb +49 -0
- data/lib/stbaldricks/entities/participant.rb +216 -0
- data/lib/stbaldricks/entities/person.rb +403 -0
- data/lib/stbaldricks/entities/photo.rb +260 -0
- data/lib/stbaldricks/entities/recurring_gift.rb +215 -0
- data/lib/stbaldricks/entities/response.rb +37 -0
- data/lib/stbaldricks/entities/search.rb +223 -0
- data/lib/stbaldricks/entities/section.rb +15 -0
- data/lib/stbaldricks/entities/shave_schedule.rb +69 -0
- data/lib/stbaldricks/entities/summary.rb +32 -0
- data/lib/stbaldricks/entities/team.rb +95 -0
- data/lib/stbaldricks/entities/user.rb +76 -0
- data/lib/stbaldricks/enums/country.rb +223 -0
- data/lib/stbaldricks/enums/feature.rb +29 -0
- data/lib/stbaldricks/enums/league_status.rb +16 -0
- data/lib/stbaldricks/enums/model_type.rb +39 -0
- data/lib/stbaldricks/enums/permission.rb +223 -0
- data/lib/stbaldricks/enums/permission_model_type.rb +21 -0
- data/lib/stbaldricks/enums/province.rb +39 -0
- data/lib/stbaldricks/enums/state.rb +137 -0
- data/lib/stbaldricks/enums/top_level_category_type.rb +25 -0
- data/lib/stbaldricks/errors.rb +18 -0
- data/lib/stbaldricks/log.rb +16 -0
- data/lib/stbaldricks/patches/array.rb +6 -0
- data/lib/stbaldricks/patches/boolean.rb +25 -0
- data/lib/stbaldricks/patches/class.rb +13 -0
- data/lib/stbaldricks/patches/float.rb +9 -0
- data/lib/stbaldricks/patches/hash.rb +16 -0
- data/lib/stbaldricks/patches/integer.rb +9 -0
- data/lib/stbaldricks/patches/nil.rb +25 -0
- data/lib/stbaldricks/patches/string.rb +54 -0
- data/lib/stbaldricks/request.rb +146 -0
- data/lib/stbaldricks/version.rb +5 -0
- metadata +215 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/base'
|
2
|
+
require 'stbaldricks/entities/lib/phone'
|
3
|
+
require 'stbaldricks/entities/lib/location'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class Venue < SBF::Client::BaseEntity
|
8
|
+
class Social < SBF::Client::BaseEntity
|
9
|
+
attr_accessor :facebook_url, :twitter_name
|
10
|
+
end
|
11
|
+
|
12
|
+
entity_attr_accessor :location, 'SBF::Client::Location'
|
13
|
+
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
14
|
+
attr_accessor :website_url
|
15
|
+
entity_attr_accessor :social, 'SBF::Client::Venue::Social'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/address'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/lib/third_party_media'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class Memorial < SBF::Client::TopLevelEntity
|
8
|
+
actions DEFAULT_CRUD_ACTIONS
|
9
|
+
blacklist_action :save
|
10
|
+
blacklist_action :create
|
11
|
+
blacklist_action :delete
|
12
|
+
|
13
|
+
disallow_instantiation
|
14
|
+
|
15
|
+
module Status
|
16
|
+
ACTIVE = 'active'
|
17
|
+
PENDING = 'pending'
|
18
|
+
end
|
19
|
+
|
20
|
+
class Tribute < SBF::Client::BaseEntity
|
21
|
+
attr_accessor :birthday
|
22
|
+
attr_accessor :date_of_passing
|
23
|
+
attr_accessor :name
|
24
|
+
end
|
25
|
+
|
26
|
+
class Totals < SBF::Client::BaseEntity
|
27
|
+
attr_reader :amount_raised
|
28
|
+
attr_reader :donations
|
29
|
+
end
|
30
|
+
|
31
|
+
class Photos < SBF::Client::BaseEntity
|
32
|
+
attr_reader :avatar, :default, :cover, :cover_original
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class PartialMemorial < Memorial
|
37
|
+
attr_accessor :id
|
38
|
+
end
|
39
|
+
|
40
|
+
class FullMemorial < Memorial
|
41
|
+
attr_accessor :id
|
42
|
+
attr_accessor :status
|
43
|
+
attr_accessor :website_message
|
44
|
+
attr_reader :display_name
|
45
|
+
entity_attr_accessor :address, 'SBF::Client::Address'
|
46
|
+
entity_attr_accessor :tribute, 'SBF::Client::Memorial::Tribute'
|
47
|
+
entity_attr_reader :totals, 'SBF::Client::Memorial::Totals'
|
48
|
+
entity_collection_attr_accessor :donations, 'SBF::Client::FullDonation', 'SBF::Client::PartialDonation'
|
49
|
+
attr_reader :created_at, :modified_at
|
50
|
+
attr_accessor :expires_at
|
51
|
+
entity_attr_accessor :photos, 'SBF::Client::Memorial::Photos'
|
52
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
53
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
54
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
55
|
+
|
56
|
+
def active?
|
57
|
+
status == SBF::Client::Memorial::Status::ACTIVE
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'stbaldricks/endpoints/message'
|
2
|
+
require 'stbaldricks/entities/lib/base'
|
3
|
+
require 'stbaldricks/entities/lib/top_level'
|
4
|
+
require 'stbaldricks/entities/contact'
|
5
|
+
require 'stbaldricks/entities/person'
|
6
|
+
require 'htmlentities'
|
7
|
+
|
8
|
+
module SBF
|
9
|
+
module Client
|
10
|
+
class Message < SBF::Client::TopLevelEntity
|
11
|
+
endpoint SBF::Client::MessageEndpoint
|
12
|
+
|
13
|
+
actions DEFAULT_CRUD_ACTIONS
|
14
|
+
action :mark_as_read
|
15
|
+
action :mark_as_unread
|
16
|
+
|
17
|
+
module Type
|
18
|
+
MEMBERS_COMMUNICATION = 'members_communication'
|
19
|
+
REPLY = 'reply'
|
20
|
+
end
|
21
|
+
|
22
|
+
module Status
|
23
|
+
PENDING = 'pending'
|
24
|
+
SENT = 'sent'
|
25
|
+
DELETED = 'deleted'
|
26
|
+
end
|
27
|
+
|
28
|
+
class Recipient < SBF::Client::BaseEntity
|
29
|
+
module Status
|
30
|
+
UNREAD = 'unread'
|
31
|
+
READ = 'read'
|
32
|
+
DELETED = 'deleted'
|
33
|
+
end
|
34
|
+
|
35
|
+
attr_accessor :id
|
36
|
+
attr_accessor :status
|
37
|
+
|
38
|
+
attr_accessor :message_id
|
39
|
+
entity_attr_reader :person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
40
|
+
attr_accessor :display_name
|
41
|
+
attr_accessor :email
|
42
|
+
|
43
|
+
attr_reader :modified_at
|
44
|
+
end
|
45
|
+
|
46
|
+
attr_accessor :id
|
47
|
+
attr_accessor :type
|
48
|
+
attr_accessor :status
|
49
|
+
|
50
|
+
entity_collection_attr_accessor :to, 'SBF::Client::Message::Recipient'
|
51
|
+
attr_reader :from_ip
|
52
|
+
entity_attr_reader :from_person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
53
|
+
attr_reader :from_email
|
54
|
+
attr_reader :display_name
|
55
|
+
attr_accessor :subject
|
56
|
+
attr_accessor :body
|
57
|
+
|
58
|
+
attr_reader :created_at, :modified_at, :sent_at
|
59
|
+
|
60
|
+
def body
|
61
|
+
HTMLEntities.new.decode(@body)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'stbaldricks/endpoints/newsletter_recipient'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/person'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class NewsletterRecipient < SBF::Client::TopLevelEntity
|
8
|
+
endpoint SBF::Client::NewsletterRecipientEndpoint
|
9
|
+
action :subscribe
|
10
|
+
action :unsubscribe
|
11
|
+
instance_action :subscribe
|
12
|
+
instance_action :unsubscribe
|
13
|
+
|
14
|
+
attr_accessor :email_address, :first_name, :last_name
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/address'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/lib/email_address'
|
4
|
+
require 'stbaldricks/entities/lib/name'
|
5
|
+
require 'stbaldricks/entities/lib/phone'
|
6
|
+
require 'stbaldricks/entities/lib/opt_out_settings'
|
7
|
+
|
8
|
+
module SBF
|
9
|
+
module Client
|
10
|
+
class Organization < SBF::Client::TopLevelEntity
|
11
|
+
actions DEFAULT_CRUD_ACTIONS
|
12
|
+
|
13
|
+
disallow_instantiation
|
14
|
+
|
15
|
+
module Status
|
16
|
+
PENDING = 'pending'
|
17
|
+
ACTIVE = 'active'
|
18
|
+
DECEASED = 'deceased'
|
19
|
+
end
|
20
|
+
|
21
|
+
module Type
|
22
|
+
BUSINESS = 'business'
|
23
|
+
ORGANIZATION_FOUNDATION = 'foundation'
|
24
|
+
end
|
25
|
+
|
26
|
+
module Gender
|
27
|
+
NOT_SELECTED = 'not_selected'
|
28
|
+
end
|
29
|
+
|
30
|
+
module HowCreated
|
31
|
+
WEBSITE = 'website'
|
32
|
+
ADMIN_IMPORT = 'admin_import'
|
33
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
34
|
+
SUBMIT_CASH = 'submit_cash'
|
35
|
+
MOBILE = 'mobile'
|
36
|
+
PARTICIPANT_REGISTRATION = 'participant_registration'
|
37
|
+
FUNDRAISER_REGISTRATION = 'fundraiser_registration'
|
38
|
+
FAST_DONATION = 'fast_donation'
|
39
|
+
RECURRING_GIFTS = 'recurring'
|
40
|
+
GIVE_ONCE = 'give_once'
|
41
|
+
DONATE = 'donate'
|
42
|
+
end
|
43
|
+
|
44
|
+
class Addresses < SBF::Client::BaseEntity
|
45
|
+
entity_attr_accessor :primary, 'SBF::Client::Address'
|
46
|
+
entity_attr_accessor :secondary, 'SBF::Client::Address'
|
47
|
+
end
|
48
|
+
|
49
|
+
class PhoneNumbers < SBF::Client::BaseEntity
|
50
|
+
entity_attr_accessor :primary, 'SBF::Client::Phone'
|
51
|
+
entity_attr_accessor :secondary, 'SBF::Client::Phone'
|
52
|
+
end
|
53
|
+
|
54
|
+
class EmailAddresses < SBF::Client::BaseEntity
|
55
|
+
entity_attr_accessor :primary, 'SBF::Client::EmailAddress'
|
56
|
+
entity_attr_accessor :secondary, 'SBF::Client::EmailAddress'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class PartialOrganization < SBF::Client::Organization
|
61
|
+
attr_accessor :id, :type
|
62
|
+
end
|
63
|
+
|
64
|
+
class FullOrganization < SBF::Client::Organization
|
65
|
+
class ContactName < SBF::Client::BaseEntity
|
66
|
+
attr_reader :name
|
67
|
+
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
68
|
+
end
|
69
|
+
|
70
|
+
attr_accessor :id
|
71
|
+
attr_accessor :type
|
72
|
+
attr_accessor :status
|
73
|
+
attr_reader :display_name
|
74
|
+
attr_accessor :display_name_override
|
75
|
+
attr_accessor :name
|
76
|
+
entity_attr_accessor :contact, 'SBF::Client::FullOrganization::ContactName'
|
77
|
+
entity_attr_accessor :addresses, 'SBF::Client::Organization::Addresses'
|
78
|
+
entity_attr_accessor :phone_numbers, 'SBF::Client::Organization::PhoneNumbers'
|
79
|
+
entity_attr_accessor :email_addresses, 'SBF::Client::Organization::EmailAddresses'
|
80
|
+
entity_attr_accessor :opt_out_settings, 'SBF::Client::OptOutSettings', nil, true
|
81
|
+
attr_reader :created_at, :modified_at
|
82
|
+
attr_accessor :modified_by
|
83
|
+
attr_accessor :how_created
|
84
|
+
|
85
|
+
def active?
|
86
|
+
status == SBF::Client::Organization::Status::ACTIVE
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/base'
|
2
|
+
require 'stbaldricks/entities/lib/top_level'
|
3
|
+
require 'stbaldricks/entities/lib/default_cacheable'
|
4
|
+
|
5
|
+
module SBF
|
6
|
+
module Client
|
7
|
+
class Page < SBF::Client::TopLevelEntity
|
8
|
+
include Entities::DefaultCacheable
|
9
|
+
actions DEFAULT_CRUD_ACTIONS
|
10
|
+
|
11
|
+
class Content < SBF::Client::BaseEntity
|
12
|
+
attr_reader :id
|
13
|
+
attr_accessor :is_draft
|
14
|
+
attr_accessor :type
|
15
|
+
attr_accessor :title
|
16
|
+
attr_accessor :text
|
17
|
+
attr_accessor :sort_order
|
18
|
+
attr_reader :date_modified
|
19
|
+
|
20
|
+
module Type
|
21
|
+
TEXT = 'text'
|
22
|
+
META = 'meta'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
attr_reader :id
|
27
|
+
attr_accessor :title
|
28
|
+
attr_accessor :lookup
|
29
|
+
attr_accessor :title_tag
|
30
|
+
attr_accessor :locked_by_profile_id
|
31
|
+
attr_accessor :locked_at
|
32
|
+
attr_reader :may_edit
|
33
|
+
entity_collection_attr_accessor :content, 'SBF::Client::Page::Content'
|
34
|
+
|
35
|
+
def meta_content
|
36
|
+
content.select { |x| x.type == SBF::Client::Page::Content::Type::META }
|
37
|
+
end
|
38
|
+
|
39
|
+
def published_content
|
40
|
+
# Sort content so meta type is at the bottom. This preserves order for rendering on page
|
41
|
+
content.select { |x| x.is_draft == false }.sort! { |a, b| a.sort_order <=> b.sort_order }.sort! { |a, b| b.type <=> a.type }
|
42
|
+
end
|
43
|
+
|
44
|
+
def draft_content
|
45
|
+
content.select { |x| x.is_draft == true }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,216 @@
|
|
1
|
+
require 'stbaldricks/endpoints/participant'
|
2
|
+
require 'stbaldricks/entities/fund'
|
3
|
+
require 'stbaldricks/entities/event'
|
4
|
+
require 'stbaldricks/entities/team'
|
5
|
+
require 'stbaldricks/entities/person'
|
6
|
+
require 'stbaldricks/entities/lib/address'
|
7
|
+
require 'stbaldricks/entities/lib/base'
|
8
|
+
require 'stbaldricks/entities/lib/top_level'
|
9
|
+
require 'stbaldricks/entities/lib/fundraising_page'
|
10
|
+
require 'stbaldricks/entities/lib/name'
|
11
|
+
require 'stbaldricks/entities/lib/phone'
|
12
|
+
require 'stbaldricks/entities/lib/permissions'
|
13
|
+
require 'htmlentities'
|
14
|
+
require 'stbaldricks/entities/lib/default_cacheable'
|
15
|
+
|
16
|
+
module SBF
|
17
|
+
module Client
|
18
|
+
class Participant < SBF::Client::TopLevelEntity
|
19
|
+
include Entities::DefaultCacheable
|
20
|
+
endpoint SBF::Client::ParticipantEndpoint
|
21
|
+
actions DEFAULT_CRUD_ACTIONS
|
22
|
+
action :join_team
|
23
|
+
action :start_team
|
24
|
+
action :leave_team
|
25
|
+
action :delete_role
|
26
|
+
action :move_to_different_event
|
27
|
+
|
28
|
+
disallow_instantiation
|
29
|
+
|
30
|
+
module Status
|
31
|
+
ACTIVE = 'active'
|
32
|
+
PENDING = 'pending'
|
33
|
+
end
|
34
|
+
|
35
|
+
module ShirtSize
|
36
|
+
FAST_REG_UNSPECIFIED = 'fast_reg_unspecified'
|
37
|
+
NOT_SPECIFIED = 'not specified'
|
38
|
+
YOUTH_SMALL = 'youth_small'
|
39
|
+
YOUTH_MEDIUM = 'youth_medium'
|
40
|
+
YOUTH_LARGE = 'youth_large'
|
41
|
+
SMALL = 'small'
|
42
|
+
MEDIUM = 'medium'
|
43
|
+
LARGE = 'large'
|
44
|
+
XL = 'xl'
|
45
|
+
XXL = 'xxl'
|
46
|
+
XXXL = '3x'
|
47
|
+
XXXXL = '4x'
|
48
|
+
XXXXXL = '5x'
|
49
|
+
end
|
50
|
+
|
51
|
+
module HowCreated
|
52
|
+
WEBSITE = 'website'
|
53
|
+
ADMIN_IMPORT = 'admin_import'
|
54
|
+
ADMIN_CONTROL_PANEL = 'admin_control_panel'
|
55
|
+
MOBILE = 'mobile'
|
56
|
+
FAST_REGISTRATION = 'fast_registration'
|
57
|
+
end
|
58
|
+
|
59
|
+
module FundRelationshipType
|
60
|
+
NO_ASSOCIATION = 'no_association'
|
61
|
+
DIRECT = 'direct'
|
62
|
+
DIRECT_BUT_LOCKED = 'direct_but_locked'
|
63
|
+
INHERITED_TEAM = 'inherited_team'
|
64
|
+
INHERITED_EVENT = 'inherited_event'
|
65
|
+
INHERITED_TEAMS_EVENT = 'inherited_teams_event'
|
66
|
+
INHERITED_BOTH_TEAM_AND_EVENT = 'inherited_both_team_and_event'
|
67
|
+
end
|
68
|
+
|
69
|
+
class Photos < SBF::Client::BaseEntity
|
70
|
+
attr_reader :before, :after, :avatar, :default
|
71
|
+
end
|
72
|
+
|
73
|
+
class Policies < SBF::Client::BaseEntity
|
74
|
+
attr_accessor :is_waiver_policy_accepted, :is_razor_policy_accepted
|
75
|
+
end
|
76
|
+
|
77
|
+
class ShaveSchedule < SBF::Client::BaseEntity
|
78
|
+
attr_accessor :date, :time, :notified
|
79
|
+
end
|
80
|
+
|
81
|
+
class Roles < SBF::Client::BaseEntity
|
82
|
+
module Status
|
83
|
+
ACTIVE = 'active'
|
84
|
+
PENDING = 'pending'
|
85
|
+
SUSPENDED = 'suspended'
|
86
|
+
end
|
87
|
+
|
88
|
+
module Type
|
89
|
+
SHAVEE = 'shavee'
|
90
|
+
BARBER = 'barber'
|
91
|
+
TREASURER = 'treasurer'
|
92
|
+
SHAVEE_RECRUITER = 'shavee_recruiter'
|
93
|
+
ORGANIZER = 'organizer'
|
94
|
+
TEAM_CAPTAIN = 'team_captain'
|
95
|
+
LEAD_TREASURER = 'lead_treasurer'
|
96
|
+
LEAD_ORGANIZER = 'lead_organizer'
|
97
|
+
BARBER_COORDINATOR = 'barber_coordinator'
|
98
|
+
VOLUNTEER = 'volunteer'
|
99
|
+
end
|
100
|
+
|
101
|
+
CORE_COMMITTEE_TYPES = [Type::ORGANIZER, Type::TREASURER, Type::BARBER_COORDINATOR, Type::SHAVEE_RECRUITER]
|
102
|
+
|
103
|
+
class Role < SBF::Client::BaseEntity
|
104
|
+
attr_accessor :status
|
105
|
+
|
106
|
+
def active?
|
107
|
+
status == SBF::Client::Participant::Roles::Status::ACTIVE
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class LeadRole < SBF::Client::Participant::Roles::Role
|
112
|
+
attr_accessor :is_lead, :status
|
113
|
+
end
|
114
|
+
|
115
|
+
class Organizer < SBF::Client::Participant::Roles::LeadRole
|
116
|
+
class Policies < SBF::Client::BaseEntity
|
117
|
+
attr_accessor :agreement_received_date, :coaches_questionnaire_received_date
|
118
|
+
attr_accessor :is_revenue_waiver_accepted, :is_host_agreement_waiver_accepted
|
119
|
+
end
|
120
|
+
|
121
|
+
class PreviousOrganization < SBF::Client::BaseEntity
|
122
|
+
attr_accessor :charity, :date
|
123
|
+
end
|
124
|
+
|
125
|
+
attr_accessor :is_lead, :status
|
126
|
+
entity_attr_accessor :policies, 'SBF::Client::Participant::Roles::Organizer::Policies'
|
127
|
+
entity_attr_accessor :previous_organization, 'SBF::Client::Participant::Roles::Organizer::PreviousOrganization'
|
128
|
+
end
|
129
|
+
|
130
|
+
class Barber < SBF::Client::Participant::Roles::Role
|
131
|
+
class License < SBF::Client::BaseEntity
|
132
|
+
attr_accessor :number, :organization
|
133
|
+
end
|
134
|
+
|
135
|
+
class Salon < SBF::Client::BaseEntity
|
136
|
+
attr_accessor :name
|
137
|
+
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
138
|
+
end
|
139
|
+
|
140
|
+
entity_attr_accessor :license, 'SBF::Client::Participant::Roles::Barber::License'
|
141
|
+
entity_attr_accessor :salon, 'SBF::Client::Participant::Roles::Barber::Salon'
|
142
|
+
end
|
143
|
+
|
144
|
+
class Shavee < SBF::Client::Participant::Roles::Role; end
|
145
|
+
class Volunteer < SBF::Client::Participant::Roles::Role; end
|
146
|
+
class ShaveeRecruiter < SBF::Client::Participant::Roles::Role; end
|
147
|
+
class TeamCaptain < SBF::Client::Participant::Roles::Role; end
|
148
|
+
class BarberCoordinator < SBF::Client::Participant::Roles::Role; end
|
149
|
+
class Treasurer < SBF::Client::Participant::Roles::LeadRole; end
|
150
|
+
|
151
|
+
entity_attr_accessor :shavee, 'SBF::Client::Participant::Roles::Shavee'
|
152
|
+
entity_attr_accessor :volunteer, 'SBF::Client::Participant::Roles::Volunteer'
|
153
|
+
entity_attr_accessor :barber_coordinator, 'SBF::Client::Participant::Roles::BarberCoordinator'
|
154
|
+
entity_attr_accessor :shavee_recruiter, 'SBF::Client::Participant::Roles::ShaveeRecruiter'
|
155
|
+
entity_attr_accessor :team_captain, 'SBF::Client::Participant::Roles::TeamCaptain'
|
156
|
+
entity_attr_accessor :organizer, 'SBF::Client::Participant::Roles::Organizer'
|
157
|
+
entity_attr_accessor :treasurer, 'SBF::Client::Participant::Roles::Treasurer'
|
158
|
+
entity_attr_accessor :barber, 'SBF::Client::Participant::Roles::Barber'
|
159
|
+
end
|
160
|
+
|
161
|
+
class Totals < SBF::Client::BaseEntity
|
162
|
+
attr_reader :amount_raised
|
163
|
+
end
|
164
|
+
|
165
|
+
class Rankings < SBF::Client::BaseEntity
|
166
|
+
class Ranking < SBF::Client::BaseEntity
|
167
|
+
attr_reader :rank, :total
|
168
|
+
end
|
169
|
+
|
170
|
+
entity_attr_reader :team, 'SBF::Client::Participant::Rankings::Ranking'
|
171
|
+
entity_attr_reader :event, 'SBF::Client::Participant::Rankings::Ranking'
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
class PartialParticipant < Participant
|
176
|
+
attr_accessor :id
|
177
|
+
end
|
178
|
+
|
179
|
+
class FullParticipant < Participant
|
180
|
+
attr_accessor :id
|
181
|
+
attr_accessor :status
|
182
|
+
attr_accessor :display_name_override
|
183
|
+
attr_reader :display_name
|
184
|
+
entity_attr_accessor :person, 'SBF::Client::FullPerson'
|
185
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
186
|
+
entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam', true
|
187
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
188
|
+
attr_accessor :fund_relationship_type
|
189
|
+
attr_accessor :shirt_size
|
190
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
191
|
+
attr_accessor :fundraising_goal, :fundraising_message
|
192
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
193
|
+
entity_attr_reader :photos, 'SBF::Client::Participant::Photos'
|
194
|
+
entity_attr_accessor :policies, 'SBF::Client::Participant::Policies'
|
195
|
+
attr_accessor :is_virtual
|
196
|
+
entity_attr_accessor :shave_schedule, 'SBF::Client::Participant::ShaveSchedule'
|
197
|
+
entity_attr_accessor :roles, 'SBF::Client::Participant::Roles', nil, true
|
198
|
+
entity_attr_reader :rankings, 'SBF::Client::Participant::Rankings', nil, true
|
199
|
+
entity_attr_reader :totals, 'SBF::Client::Participant::Totals'
|
200
|
+
attr_reader :created_at, :modified_at
|
201
|
+
attr_accessor :modified_by
|
202
|
+
attr_accessor :how_created
|
203
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
204
|
+
entity_attr_reader :permissions_at_event, 'SBF::Client::PermissionsAtEvent', nil, true
|
205
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
206
|
+
|
207
|
+
def active?
|
208
|
+
status == SBF::Client::Participant::Status::ACTIVE
|
209
|
+
end
|
210
|
+
|
211
|
+
def display_name
|
212
|
+
HTMLEntities.new.decode(@display_name)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|