stbaldricks 12.10.0.alpha.2 → 12.10.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stbaldricks/configuration.rb +2 -2
- data/lib/stbaldricks/default_logger.rb +2 -2
- data/lib/stbaldricks/endpoints/blog_post.rb +8 -8
- data/lib/stbaldricks/endpoints/communicate.rb +1 -1
- data/lib/stbaldricks/endpoints/config.rb +1 -1
- data/lib/stbaldricks/endpoints/deduplicator_match.rb +2 -2
- data/lib/stbaldricks/endpoints/kid.rb +1 -1
- data/lib/stbaldricks/endpoints/lib/entity.rb +11 -13
- data/lib/stbaldricks/endpoints/newsletter_recipient.rb +5 -11
- data/lib/stbaldricks/endpoints/participant.rb +3 -3
- data/lib/stbaldricks/endpoints/photo.rb +4 -5
- data/lib/stbaldricks/endpoints/search.rb +2 -2
- data/lib/stbaldricks/endpoints/user.rb +1 -1
- data/lib/stbaldricks/entities/batch.rb +5 -3
- data/lib/stbaldricks/entities/blog_post.rb +7 -1
- data/lib/stbaldricks/entities/campaign.rb +13 -6
- data/lib/stbaldricks/entities/challenge.rb +6 -4
- data/lib/stbaldricks/entities/challenger.rb +6 -4
- data/lib/stbaldricks/entities/concerns/entity_response_concern.rb +1 -1
- data/lib/stbaldricks/entities/config.rb +8 -3
- data/lib/stbaldricks/entities/contact.rb +7 -4
- data/lib/stbaldricks/entities/contact_group.rb +2 -2
- data/lib/stbaldricks/entities/deduplicator_history.rb +6 -1
- data/lib/stbaldricks/entities/deduplicator_match.rb +7 -4
- data/lib/stbaldricks/entities/disease.rb +5 -2
- data/lib/stbaldricks/entities/document_library.rb +8 -3
- data/lib/stbaldricks/entities/document_library_category.rb +4 -1
- data/lib/stbaldricks/entities/donation.rb +18 -12
- data/lib/stbaldricks/entities/donor.rb +5 -1
- data/lib/stbaldricks/entities/event.rb +43 -32
- data/lib/stbaldricks/entities/event_application.rb +10 -6
- data/lib/stbaldricks/entities/event_donation_summary.rb +5 -2
- data/lib/stbaldricks/entities/event_participant_summary.rb +3 -1
- data/lib/stbaldricks/entities/event_supporter.rb +3 -3
- data/lib/stbaldricks/entities/fund.rb +23 -6
- data/lib/stbaldricks/entities/fundraiser.rb +29 -16
- data/lib/stbaldricks/entities/grant.rb +25 -12
- data/lib/stbaldricks/entities/institution.rb +4 -3
- data/lib/stbaldricks/entities/international_partner.rb +16 -4
- data/lib/stbaldricks/entities/kid.rb +30 -13
- data/lib/stbaldricks/entities/kid_honor.rb +0 -1
- data/lib/stbaldricks/entities/kid_institution.rb +2 -2
- data/lib/stbaldricks/entities/lib/address.rb +6 -3
- data/lib/stbaldricks/entities/lib/alternate_shipping_address.rb +3 -1
- data/lib/stbaldricks/entities/lib/base.rb +39 -47
- data/lib/stbaldricks/entities/lib/collection.rb +2 -2
- data/lib/stbaldricks/entities/lib/email_address.rb +2 -1
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +2 -1
- data/lib/stbaldricks/entities/lib/location.rb +0 -1
- data/lib/stbaldricks/entities/lib/milestone.rb +3 -1
- data/lib/stbaldricks/entities/lib/name.rb +2 -2
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +1 -1
- data/lib/stbaldricks/entities/lib/permissions.rb +4 -2
- data/lib/stbaldricks/entities/lib/phone.rb +3 -2
- data/lib/stbaldricks/entities/lib/third_party_media.rb +5 -1
- data/lib/stbaldricks/entities/lib/top_level.rb +1 -1
- data/lib/stbaldricks/entities/matching_gift_company.rb +39 -16
- data/lib/stbaldricks/entities/memorial.rb +14 -9
- data/lib/stbaldricks/entities/message.rb +15 -4
- data/lib/stbaldricks/entities/organization.rb +17 -11
- data/lib/stbaldricks/entities/page.rb +15 -6
- data/lib/stbaldricks/entities/participant.rb +28 -18
- data/lib/stbaldricks/entities/participant_donation_summary.rb +4 -2
- data/lib/stbaldricks/entities/person.rb +30 -22
- data/lib/stbaldricks/entities/person_donation_by_year_summary.rb +2 -1
- data/lib/stbaldricks/entities/photo.rb +11 -5
- data/lib/stbaldricks/entities/recurring_gift.rb +22 -10
- data/lib/stbaldricks/entities/response.rb +0 -1
- data/lib/stbaldricks/entities/search.rb +168 -30
- data/lib/stbaldricks/entities/section.rb +4 -1
- data/lib/stbaldricks/entities/shave_schedule.rb +13 -4
- data/lib/stbaldricks/entities/summary.rb +7 -1
- data/lib/stbaldricks/entities/team.rb +16 -12
- data/lib/stbaldricks/entities/team_donation_summary.rb +4 -2
- data/lib/stbaldricks/request.rb +2 -2
- data/lib/stbaldricks/version.rb +1 -1
- data/lib/stbaldricks_factories.rb +5 -0
- data/spec/factories/address.rb +14 -0
- data/spec/factories/campaign/totals.rb +9 -0
- data/spec/factories/campaign.rb +9 -0
- data/spec/factories/challenge.rb +19 -0
- data/spec/factories/challenger.rb +33 -0
- data/spec/factories/collection.rb +17 -0
- data/spec/factories/contact.rb +18 -0
- data/spec/factories/contact_group.rb +18 -0
- data/spec/factories/diagnosis.rb +12 -0
- data/spec/factories/disease.rb +11 -0
- data/spec/factories/donation/participant.rb +27 -0
- data/spec/factories/donation.rb +68 -0
- data/spec/factories/donor.rb +13 -0
- data/spec/factories/email_address.rb +11 -0
- data/spec/factories/error.rb +9 -0
- data/spec/factories/event/coach_tracking/coaching_interactions.rb +12 -0
- data/spec/factories/event/coach_tracking/plaque.rb +12 -0
- data/spec/factories/event/coach_tracking/proceeds.rb +12 -0
- data/spec/factories/event/coach_tracking.rb +18 -0
- data/spec/factories/event/contacts/contact.rb +17 -0
- data/spec/factories/event/contacts/name_pieces.rb +12 -0
- data/spec/factories/event/contacts.rb +16 -0
- data/spec/factories/event/photos.rb +12 -0
- data/spec/factories/event/totals.rb +15 -0
- data/spec/factories/event/venue/location.rb +18 -0
- data/spec/factories/event/venue/social.rb +16 -0
- data/spec/factories/event/venue.rb +16 -0
- data/spec/factories/event.rb +66 -0
- data/spec/factories/event_application.rb +34 -0
- data/spec/factories/event_supporter.rb +19 -0
- data/spec/factories/fund.rb +18 -0
- data/spec/factories/fundraiser/photos.rb +12 -0
- data/spec/factories/fundraiser/policies.rb +11 -0
- data/spec/factories/fundraiser/totals.rb +11 -0
- data/spec/factories/fundraiser.rb +24 -0
- data/spec/factories/fundraising_page.rb +29 -0
- data/spec/factories/grant.rb +22 -0
- data/spec/factories/grant_institution.rb +17 -0
- data/spec/factories/institution.rb +18 -0
- data/spec/factories/kid/custom_institution.rb +12 -0
- data/spec/factories/kid.rb +68 -0
- data/spec/factories/kid_honor.rb +16 -0
- data/spec/factories/kid_institution.rb +23 -0
- data/spec/factories/lib/faker_patch.rb +27 -0
- data/spec/factories/lib/helpers.rb +7 -0
- data/spec/factories/location.rb +17 -0
- data/spec/factories/memorial/photos.rb +14 -0
- data/spec/factories/memorial/totals.rb +11 -0
- data/spec/factories/memorial/tribute.rb +19 -0
- data/spec/factories/memorial.rb +22 -0
- data/spec/factories/message.rb +31 -0
- data/spec/factories/milestone.rb +15 -0
- data/spec/factories/name_pieces.rb +24 -0
- data/spec/factories/newsletter_recipient.rb +13 -0
- data/spec/factories/organization/addresses.rb +16 -0
- data/spec/factories/organization/email_addresses.rb +14 -0
- data/spec/factories/organization/phone_numbers.rb +14 -0
- data/spec/factories/organization.rb +34 -0
- data/spec/factories/page.rb +5 -0
- data/spec/factories/participant/photos.rb +14 -0
- data/spec/factories/participant/policies.rb +12 -0
- data/spec/factories/participant/rankings/ranking.rb +12 -0
- data/spec/factories/participant/rankings.rb +16 -0
- data/spec/factories/participant/roles/role.rb +154 -0
- data/spec/factories/participant/roles.rb +37 -0
- data/spec/factories/participant/totals.rb +11 -0
- data/spec/factories/participant.rb +95 -0
- data/spec/factories/payment.rb +13 -0
- data/spec/factories/permissions.rb +12 -0
- data/spec/factories/person/addresses.rb +16 -0
- data/spec/factories/person/email_addresses.rb +14 -0
- data/spec/factories/person/phone_numbers.rb +14 -0
- data/spec/factories/person/policies.rb +13 -0
- data/spec/factories/person.rb +22 -0
- data/spec/factories/phone.rb +11 -0
- data/spec/factories/photo.rb +11 -0
- data/spec/factories/photos.rb +9 -0
- data/spec/factories/recurring_gift.rb +22 -0
- data/spec/factories/researcher.rb +15 -0
- data/spec/factories/response.rb +38 -0
- data/spec/factories/search_event.rb +19 -0
- data/spec/factories/search_fundraiser.rb +15 -0
- data/spec/factories/search_kid.rb +13 -0
- data/spec/factories/search_participant.rb +15 -0
- data/spec/factories/search_team.rb +13 -0
- data/spec/factories/shave_schedule/time_selection_permissions.rb +12 -0
- data/spec/factories/shave_schedule.rb +33 -0
- data/spec/factories/team/photos.rb +12 -0
- data/spec/factories/team/rankings/ranking.rb +12 -0
- data/spec/factories/team/rankings.rb +15 -0
- data/spec/factories/team/totals.rb +14 -0
- data/spec/factories/team.rb +43 -0
- data/spec/factories/third_party_media.rb +12 -0
- data/spec/factories/treatment_status.rb +10 -0
- data/spec/factories/user.rb +14 -0
- data/spec/factories/venue.rb +15 -0
- metadata +279 -85
@@ -35,14 +35,12 @@ module SBF
|
|
35
35
|
|
36
36
|
class EmployerMatched < SBF::Client::BaseEntity
|
37
37
|
attr_accessor :is_match
|
38
|
-
|
39
38
|
entity_attr_accessor :matching_donation, 'SBF::Client::FullDonation'
|
40
39
|
end
|
41
40
|
|
42
41
|
class Tribute < SBF::Client::BaseEntity
|
43
42
|
attr_accessor :type
|
44
43
|
attr_reader :name
|
45
|
-
|
46
44
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
47
45
|
|
48
46
|
module Type
|
@@ -126,7 +124,8 @@ module SBF
|
|
126
124
|
|
127
125
|
class FullFund < SBF::Client::FullFund
|
128
126
|
include ModelTypeConcern
|
129
|
-
attr_reader :model_type
|
127
|
+
attr_reader :model_type
|
128
|
+
attr_reader :direct_to_fund_donations_only
|
130
129
|
|
131
130
|
def model_type
|
132
131
|
SBF::Client::Donation::RecipientType::FUND
|
@@ -204,7 +203,6 @@ module SBF
|
|
204
203
|
class RecognitionCard < SBF::Client::BaseEntity
|
205
204
|
class Recipient < SBF::Client::BaseEntity
|
206
205
|
attr_reader :name
|
207
|
-
|
208
206
|
entity_attr_accessor :name_pieces, SBF::Client::NamePieces
|
209
207
|
entity_attr_accessor :address, SBF::Client::Address
|
210
208
|
end
|
@@ -252,7 +250,7 @@ module SBF
|
|
252
250
|
|
253
251
|
# Get country and state from the person
|
254
252
|
country = person.addresses.primary.country
|
255
|
-
state = (
|
253
|
+
state = (country.to_sym == SBF::Client::Country.list[SBF::Client::Country::UNITED_STATES] ? person.addresses.primary.state : '')
|
256
254
|
|
257
255
|
else
|
258
256
|
country = (defined?(entity.country).nil? ? nil : entity.country)
|
@@ -284,7 +282,7 @@ module SBF
|
|
284
282
|
|
285
283
|
# Get country and state from the person
|
286
284
|
country = person.addresses.primary.country
|
287
|
-
state = (
|
285
|
+
state = (country.to_sym == SBF::Client::Country.list[SBF::Client::Country::UNITED_STATES] ? person.addresses.primary.state : '')
|
288
286
|
|
289
287
|
else
|
290
288
|
country = (defined?(event.venue.location.address.country).nil? ? nil : event.venue.location.address.country)
|
@@ -300,10 +298,13 @@ module SBF
|
|
300
298
|
class PartialDonation < SBF::Client::Donation
|
301
299
|
attr_accessor :id
|
302
300
|
end
|
303
|
-
|
304
301
|
class FullDonation < SBF::Client::Donation
|
305
|
-
attr_accessor :id
|
306
|
-
|
302
|
+
attr_accessor :id
|
303
|
+
attr_accessor :status
|
304
|
+
attr_accessor :amount
|
305
|
+
attr_accessor :fee_amount
|
306
|
+
attr_accessor :display_name
|
307
|
+
attr_accessor :year
|
307
308
|
attr_reader :is_send_card
|
308
309
|
|
309
310
|
multitype_attr_accessor(
|
@@ -347,6 +348,7 @@ module SBF
|
|
347
348
|
optional: true
|
348
349
|
)
|
349
350
|
|
351
|
+
attr_accessor :is_unrecognized, :special_donation_type
|
350
352
|
multitype_attr_accessor(
|
351
353
|
:donor,
|
352
354
|
[
|
@@ -393,7 +395,8 @@ module SBF
|
|
393
395
|
|
394
396
|
entity_attr_accessor :employer_matching, 'SBF::Client::Donation::EmployerMatching'
|
395
397
|
entity_attr_accessor :employer_matched, 'SBF::Client::Donation::EmployerMatched'
|
396
|
-
|
398
|
+
attr_accessor :foreign_beneficiary_country
|
399
|
+
attr_accessor :promotional_code
|
397
400
|
entity_attr_accessor :recurring_gift, 'SBF::Client::FullRecurringGift'
|
398
401
|
entity_attr_accessor :fund, 'SBF::Client::FullFund'
|
399
402
|
entity_attr_accessor :memorial, 'SBF::Client::FullMemorial'
|
@@ -417,15 +420,18 @@ module SBF
|
|
417
420
|
)
|
418
421
|
entity_attr_accessor :tribute, 'SBF::Client::Donation::Tribute'
|
419
422
|
entity_attr_accessor :recognition_card, 'SBF::Client::Donation::RecognitionCard'
|
423
|
+
attr_accessor :collected_at
|
424
|
+
attr_accessor :created_at, :modified_at, :modified_by, :how_created
|
425
|
+
attr_accessor :is_thanked
|
420
426
|
|
421
427
|
def amount=(value)
|
422
428
|
amount_will_change!
|
423
|
-
@amount = value.to_s.gsub(/[^0-9
|
429
|
+
@amount = value.to_s.gsub(/[^0-9\.]/, '').to_f
|
424
430
|
end
|
425
431
|
|
426
432
|
def fee_amount=(value)
|
427
433
|
fee_amount_will_change!
|
428
|
-
@fee_amount = value.to_s.gsub(/[^0-9
|
434
|
+
@fee_amount = value.to_s.gsub(/[^0-9\.]/, '').to_f
|
429
435
|
end
|
430
436
|
end
|
431
437
|
end
|
@@ -6,7 +6,11 @@ module SBF
|
|
6
6
|
action :find
|
7
7
|
action :find_first
|
8
8
|
|
9
|
-
attr_accessor :donor_name
|
9
|
+
attr_accessor :donor_name
|
10
|
+
attr_accessor :amount
|
11
|
+
attr_accessor :count
|
12
|
+
attr_accessor :donation_created_at
|
13
|
+
attr_accessor :donation_collected_at
|
10
14
|
end
|
11
15
|
end
|
12
16
|
end
|
@@ -47,7 +47,6 @@ module SBF
|
|
47
47
|
class Contacts < SBF::Client::BaseEntity
|
48
48
|
class Contact < SBF::Client::BaseEntity
|
49
49
|
attr_reader :name
|
50
|
-
|
51
50
|
entity_attr_accessor :name_pieces, 'SBF::Client::Event::Contacts::NamePieces'
|
52
51
|
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
53
52
|
entity_attr_accessor :email_address, 'SBF::Client::EmailAddress'
|
@@ -63,9 +62,11 @@ module SBF
|
|
63
62
|
|
64
63
|
class Activity < SBF::Client::BaseEntity
|
65
64
|
attr_reader :id
|
66
|
-
|
67
|
-
|
68
|
-
attr_accessor :
|
65
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
66
|
+
attr_accessor :start_time
|
67
|
+
attr_accessor :end_time
|
68
|
+
attr_accessor :activity
|
69
|
+
attr_accessor :sort_order
|
69
70
|
end
|
70
71
|
|
71
72
|
class CoachTracking < SBF::Client::BaseEntity
|
@@ -82,15 +83,15 @@ module SBF
|
|
82
83
|
end
|
83
84
|
|
84
85
|
attr_accessor :host_agreement_date, :activated_date, :proceeds, :coaching_interactions, :plaque
|
85
|
-
|
86
86
|
entity_attr_accessor :proceeds, 'SBF::Client::Event::CoachTracking::Proceeds'
|
87
87
|
entity_attr_accessor :coaching_interactions, 'SBF::Client::Event::CoachTracking::CoachingInteractions'
|
88
88
|
entity_attr_accessor :plaque, 'SBF::Client::Event::CoachTracking::Plaque'
|
89
89
|
end
|
90
90
|
|
91
91
|
class Totals < SBF::Client::BaseEntity
|
92
|
-
attr_reader :fundraisers, :participants, :shavees, :amount_raised
|
93
|
-
|
92
|
+
attr_reader :fundraisers, :participants, :shavees, :amount_raised
|
93
|
+
attr_reader :current_year_ytd, :previous_year_ytd, :previous_year_total
|
94
|
+
attr_reader :current_year_shavees_ytd, :previous_year_shavees_ytd, :previous_year_shavees_total
|
94
95
|
end
|
95
96
|
|
96
97
|
class Agreement < SBF::Client::BaseEntity
|
@@ -110,7 +111,6 @@ module SBF
|
|
110
111
|
end
|
111
112
|
|
112
113
|
attr_accessor :agreement_received_date
|
113
|
-
|
114
114
|
entity_collection_attr_accessor :questions, 'SBF::Client::Event::Agreement::Question'
|
115
115
|
end
|
116
116
|
|
@@ -133,13 +133,13 @@ module SBF
|
|
133
133
|
HYBRID = 'hybrid'.freeze
|
134
134
|
end
|
135
135
|
|
136
|
-
attr_accessor :type
|
136
|
+
attr_accessor :type
|
137
|
+
attr_accessor :type_other
|
137
138
|
end
|
138
139
|
|
139
140
|
entity_attr_accessor :location, 'SBF::Client::Event::Venue::Location'
|
140
141
|
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
141
142
|
attr_accessor :website_url
|
142
|
-
|
143
143
|
entity_attr_accessor :social, 'SBF::Client::Event::Venue::Social'
|
144
144
|
end
|
145
145
|
end
|
@@ -157,32 +157,43 @@ module SBF
|
|
157
157
|
extend Forwardable
|
158
158
|
def_delegator :@photos, :avatar, :avatar_photo_url
|
159
159
|
|
160
|
-
attr_accessor :id, :year
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
160
|
+
attr_accessor :id, :year
|
161
|
+
attr_accessor :status
|
162
|
+
attr_reader :display_name
|
163
|
+
attr_accessor :event_title
|
164
|
+
attr_accessor :type
|
165
|
+
attr_accessor :type_other
|
166
|
+
attr_accessor :sub_type
|
167
|
+
attr_accessor :is_private
|
168
|
+
attr_accessor :date, :is_date_confirmed
|
169
|
+
attr_accessor :start_time, :end_time, :is_time_confirmed
|
170
|
+
attr_accessor :is_open_for_registration, :is_open_for_fast_registration
|
171
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
172
|
+
attr_accessor :fundraising_goal, :fundraising_message
|
166
173
|
entity_attr_accessor :geo_location, 'SBF::Client::GeoLocation'
|
167
|
-
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil,
|
168
|
-
entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign',
|
169
|
-
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund',
|
174
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
175
|
+
entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign', true
|
176
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
170
177
|
entity_attr_accessor :venue, 'SBF::Client::Event::Venue'
|
171
178
|
entity_attr_accessor :photos, 'SBF::Client::Event::Photos'
|
172
|
-
entity_attr_accessor :contacts, 'SBF::Client::Event::Contacts', nil,
|
179
|
+
entity_attr_accessor :contacts, 'SBF::Client::Event::Contacts', nil, true
|
173
180
|
entity_attr_accessor :coach_tracking, 'SBF::Client::Event::CoachTracking'
|
174
|
-
entity_attr_accessor :shave_schedule, 'SBF::Client::ShaveSchedule', nil,
|
175
|
-
entity_attr_reader :totals, 'SBF::Client::Event::Totals', nil,
|
176
|
-
entity_collection_attr_accessor :coaches, 'SBF::Client::FullPerson', nil,
|
177
|
-
entity_collection_attr_accessor :closed_roles, 'SBF::Client::Participant::Roles::Type', nil,
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
entity_collection_attr_accessor :
|
181
|
+
entity_attr_accessor :shave_schedule, 'SBF::Client::ShaveSchedule', nil, true
|
182
|
+
entity_attr_reader :totals, 'SBF::Client::Event::Totals', nil, true
|
183
|
+
entity_collection_attr_accessor :coaches, 'SBF::Client::FullPerson', nil, true
|
184
|
+
entity_collection_attr_accessor :closed_roles, 'SBF::Client::Participant::Roles::Type', nil, true
|
185
|
+
attr_reader :created_at, :modified_at
|
186
|
+
attr_accessor :modified_by
|
187
|
+
attr_accessor :how_created
|
188
|
+
attr_accessor :promotional_code
|
189
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
190
|
+
entity_attr_reader :agreement, 'SBF::Client::Event::Agreement', nil, true
|
191
|
+
entity_collection_attr_accessor :organizers, 'SBF::Client::FullParticipant', nil, true
|
192
|
+
entity_collection_attr_accessor :treasurers, 'SBF::Client::FullParticipant', nil, true
|
193
|
+
entity_collection_attr_accessor :activities, 'SBF::Client::Event::Activity', nil, true
|
194
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
195
|
+
entity_collection_attr_accessor :supporters, 'SBF::Client::FullEventSupporter', nil, true
|
196
|
+
attr_accessor :fund_relationship_type
|
186
197
|
|
187
198
|
def active?
|
188
199
|
status == SBF::Client::Event::Status::ACTIVE
|
@@ -93,19 +93,23 @@ module SBF
|
|
93
93
|
|
94
94
|
class Requestor < SBF::Client::BaseEntity
|
95
95
|
attr_accessor :name
|
96
|
-
|
97
96
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
98
97
|
entity_attr_accessor :email_address, 'SBF::Client::EmailAddress'
|
99
98
|
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
100
99
|
entity_attr_accessor :address, 'SBF::Client::Address'
|
101
100
|
end
|
102
101
|
|
103
|
-
attr_accessor :id
|
104
|
-
|
102
|
+
attr_accessor :id
|
103
|
+
attr_accessor :requested_event_title
|
104
|
+
attr_accessor :status
|
105
|
+
attr_accessor :is_archived
|
106
|
+
attr_accessor :no_conversion_reason
|
107
|
+
attr_accessor :promotional_code
|
108
|
+
attr_accessor :created_at, :modified_at
|
105
109
|
entity_attr_accessor :requestor, 'SBF::Client::EventApplication::Requestor'
|
106
|
-
entity_attr_accessor :qualifier, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson',
|
107
|
-
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund',
|
108
|
-
entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign',
|
110
|
+
entity_attr_accessor :qualifier, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson', true
|
111
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
112
|
+
entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign', true
|
109
113
|
|
110
114
|
multitype_attr_accessor(
|
111
115
|
:model,
|
@@ -9,9 +9,12 @@ module SBF
|
|
9
9
|
blacklist_action :update
|
10
10
|
blacklist_action :delete
|
11
11
|
|
12
|
-
attr_accessor :amount_raised
|
12
|
+
attr_accessor :amount_raised
|
13
|
+
attr_accessor :donations
|
14
|
+
attr_accessor :direct_amount_raised
|
15
|
+
attr_accessor :direct_donations
|
13
16
|
|
14
|
-
entity_attr_reader :event, 'SBF::Client::FullEvent', nil,
|
17
|
+
entity_attr_reader :event, 'SBF::Client::FullEvent', nil, true
|
15
18
|
end
|
16
19
|
end
|
17
20
|
end
|
@@ -15,10 +15,10 @@ module SBF
|
|
15
15
|
end
|
16
16
|
|
17
17
|
class FullEventSupporter < EventSupporter
|
18
|
-
attr_accessor :photo_url
|
18
|
+
attr_accessor :photo_url
|
19
|
+
attr_accessor :name, :url
|
19
20
|
attr_reader :created_at, :modified_at
|
20
|
-
|
21
|
-
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', optional: true
|
21
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
22
22
|
entity_attr_accessor :photo, 'SBF::Client::Photo'
|
23
23
|
end
|
24
24
|
end
|
@@ -31,7 +31,14 @@ module SBF
|
|
31
31
|
end
|
32
32
|
|
33
33
|
class YearlyTotals < SBF::Client::BaseEntity
|
34
|
-
attr_reader :year
|
34
|
+
attr_reader :year
|
35
|
+
attr_reader :fundraisers
|
36
|
+
attr_reader :participants
|
37
|
+
attr_reader :shavees
|
38
|
+
attr_reader :non_shavees
|
39
|
+
attr_reader :teams
|
40
|
+
attr_reader :events
|
41
|
+
attr_reader :amount_raised
|
35
42
|
|
36
43
|
def to_hash
|
37
44
|
{}.tap do |hsh|
|
@@ -41,7 +48,13 @@ module SBF
|
|
41
48
|
end
|
42
49
|
|
43
50
|
class Totals < SBF::Client::BaseEntity
|
44
|
-
attr_reader :fundraisers
|
51
|
+
attr_reader :fundraisers
|
52
|
+
attr_reader :participants
|
53
|
+
attr_reader :shavees
|
54
|
+
attr_reader :non_shavees
|
55
|
+
attr_reader :teams
|
56
|
+
attr_reader :events
|
57
|
+
attr_reader :amount_raised
|
45
58
|
end
|
46
59
|
|
47
60
|
class Photos < SBF::Client::BaseEntity
|
@@ -54,14 +67,18 @@ module SBF
|
|
54
67
|
end
|
55
68
|
|
56
69
|
class FullFund < Fund
|
57
|
-
attr_accessor :id
|
70
|
+
attr_accessor :id
|
58
71
|
attr_reader :display_name
|
59
|
-
|
72
|
+
attr_accessor :name
|
73
|
+
attr_accessor :disabled
|
74
|
+
attr_accessor :description
|
60
75
|
entity_attr_accessor :photos, 'SBF::Client::Fund::Photos'
|
61
76
|
entity_attr_reader :totals, 'SBF::Client::Fund::Totals'
|
62
77
|
entity_collection_attr_accessor :totals_by_year, 'SBF::Client::Fund::Total'
|
63
|
-
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil,
|
78
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
64
79
|
entity_attr_accessor :photos, 'SBF::Client::Fund::Photos'
|
80
|
+
attr_accessor :kid_name
|
81
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
65
82
|
|
66
83
|
multitype_attr_accessor(
|
67
84
|
:manager,
|
@@ -93,7 +110,7 @@ module SBF
|
|
93
110
|
|
94
111
|
totals_by_year_will_change!
|
95
112
|
@totals_by_year = value.map do |k, v|
|
96
|
-
SBF::Client::Fund::YearlyTotals.new(v.merge(year: k.to_s.to_i)
|
113
|
+
SBF::Client::Fund::YearlyTotals.new(v.merge(year: k.to_s.to_i))
|
97
114
|
end
|
98
115
|
end
|
99
116
|
|
@@ -67,7 +67,8 @@ module SBF
|
|
67
67
|
end
|
68
68
|
|
69
69
|
class Totals < SBF::Client::BaseEntity
|
70
|
-
attr_reader :amount_raised
|
70
|
+
attr_reader :amount_raised
|
71
|
+
attr_reader :donations
|
71
72
|
end
|
72
73
|
|
73
74
|
class Rankings < SBF::Client::BaseEntity
|
@@ -92,8 +93,8 @@ module SBF
|
|
92
93
|
end
|
93
94
|
end
|
94
95
|
|
95
|
-
def dirty_data(with_keys
|
96
|
-
data = super(with_keys
|
96
|
+
def dirty_data(with_keys = false)
|
97
|
+
data = super(with_keys)
|
97
98
|
data[:event].delete(:id) if data[:event] && data[:event][:id].nil?
|
98
99
|
data
|
99
100
|
end
|
@@ -107,27 +108,39 @@ module SBF
|
|
107
108
|
extend Forwardable
|
108
109
|
def_delegator :@photos, :avatar, :avatar_photo_url
|
109
110
|
|
110
|
-
attr_accessor :id
|
111
|
-
:fundraising_goal, :fundraising_message, :how_created, :modified_by, :offline_donation_uuid,
|
112
|
-
:offline_donation_form, :start_date, :end_date, :start_time, :end_time, :status, :title
|
113
|
-
|
114
|
-
attr_reader :created_at, :modified_at, :display_name
|
111
|
+
attr_accessor :id
|
115
112
|
|
116
|
-
|
117
|
-
|
113
|
+
attr_reader :created_at, :modified_at
|
114
|
+
attr_reader :display_name
|
115
|
+
|
116
|
+
attr_accessor :category
|
117
|
+
attr_accessor :display_name_override
|
118
|
+
attr_accessor :facebook_fundraiser_id
|
119
|
+
attr_accessor :fund_relationship_type
|
120
|
+
attr_accessor :fundraising_goal, :fundraising_message
|
121
|
+
attr_accessor :how_created
|
122
|
+
attr_accessor :modified_by
|
123
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
124
|
+
attr_accessor :start_date, :end_date
|
125
|
+
attr_accessor :start_time, :end_time
|
126
|
+
attr_accessor :status
|
127
|
+
attr_accessor :title
|
128
|
+
|
129
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
130
|
+
entity_attr_reader :rankings, 'SBF::Client::Fundraiser::Rankings', nil, true
|
118
131
|
entity_attr_reader :totals, 'SBF::Client::Fundraiser::Totals'
|
119
132
|
|
120
|
-
entity_attr_accessor :event, 'SBF::Client::Fundraiser::FullEvent', 'SBF::Client::Fundraiser::PartialEvent',
|
121
|
-
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund',
|
122
|
-
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil,
|
133
|
+
entity_attr_accessor :event, 'SBF::Client::Fundraiser::FullEvent', 'SBF::Client::Fundraiser::PartialEvent', true
|
134
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
135
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
123
136
|
entity_attr_accessor :owner, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
124
137
|
entity_attr_accessor :photos, 'SBF::Client::Fundraiser::Photos'
|
125
138
|
entity_attr_accessor :policies, 'SBF::Client::Fundraiser::Policies'
|
126
|
-
entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam',
|
127
|
-
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil,
|
139
|
+
entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam', true
|
140
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
128
141
|
entity_attr_accessor :venue, 'SBF::Client::Venue'
|
129
142
|
|
130
|
-
entity_collection_attr_accessor :milestones, 'SBF::Client::Milestone', nil,
|
143
|
+
entity_collection_attr_accessor :milestones, 'SBF::Client::Milestone', nil, true
|
131
144
|
|
132
145
|
def active?
|
133
146
|
status == SBF::Client::Fundraiser::Status::ACTIVE
|
@@ -22,10 +22,13 @@ module SBF
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class FullResearcher < SBF::Client::BaseEntity
|
25
|
-
attr_accessor :id
|
26
|
-
attr_reader :display_name
|
27
|
-
|
25
|
+
attr_accessor :id
|
26
|
+
attr_reader :display_name
|
27
|
+
attr_accessor :description
|
28
|
+
attr_accessor :photo_url
|
28
29
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
30
|
+
attr_reader :created_at
|
31
|
+
attr_reader :modified_at
|
29
32
|
end
|
30
33
|
|
31
34
|
class PartialFundingType < SBF::Client::BaseEntity
|
@@ -33,8 +36,11 @@ module SBF
|
|
33
36
|
end
|
34
37
|
|
35
38
|
class FullFundingType < SBF::Client::BaseEntity
|
36
|
-
attr_accessor :id
|
37
|
-
|
39
|
+
attr_accessor :id
|
40
|
+
attr_accessor :name
|
41
|
+
attr_accessor :description
|
42
|
+
attr_reader :created_at
|
43
|
+
attr_reader :modified_at
|
38
44
|
end
|
39
45
|
|
40
46
|
class PartialInstitution < SBF::Client::PartialInstitution; end
|
@@ -49,13 +55,20 @@ module SBF
|
|
49
55
|
end
|
50
56
|
|
51
57
|
class FullGrant < SBF::Client::Grant
|
52
|
-
attr_accessor :id
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
attr_accessor :id
|
59
|
+
attr_accessor :name
|
60
|
+
attr_accessor :funding_begin_date
|
61
|
+
attr_accessor :funding_end_date
|
62
|
+
attr_accessor :web_message
|
63
|
+
attr_accessor :article_url
|
64
|
+
attr_accessor :amount
|
65
|
+
entity_attr_accessor :researcher, 'SBF::Client::Grant::FullResearcher', 'SBF::Client::Grant::PartialResearcher', true
|
66
|
+
entity_attr_accessor :institution, 'SBF::Client::Grant::FullInstitution', 'SBF::Client::Grant::PartialInstitution', true
|
67
|
+
entity_attr_accessor :funding_type, 'SBF::Client::Grant::FullFundingType', 'SBF::Client::Grant::PartialFundingType', true
|
68
|
+
entity_collection_attr_accessor :diseases, 'SBF::Client::Grant::Disease', nil, true
|
69
|
+
attr_reader :photo_url
|
70
|
+
attr_reader :created_at
|
71
|
+
attr_reader :modified_at
|
59
72
|
end
|
60
73
|
end
|
61
74
|
end
|
@@ -19,10 +19,11 @@ module SBF
|
|
19
19
|
class PartialInstitution < SBF::Client::Institution; end
|
20
20
|
|
21
21
|
class FullInstitution < SBF::Client::Institution
|
22
|
-
attr_accessor :name
|
23
|
-
|
22
|
+
attr_accessor :name
|
24
23
|
entity_attr_accessor :address, 'SBF::Client::Address'
|
25
|
-
attr_reader :created_at
|
24
|
+
attr_reader :created_at
|
25
|
+
attr_reader :modified_at
|
26
|
+
attr_accessor :institution_info
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -20,11 +20,13 @@ module SBF
|
|
20
20
|
end
|
21
21
|
|
22
22
|
class WebPage < SBF::Client::BaseEntity
|
23
|
-
attr_accessor :url
|
23
|
+
attr_accessor :url
|
24
|
+
attr_accessor :custom_url_segment
|
24
25
|
end
|
25
26
|
|
26
27
|
class Link < SBF::Client::BaseEntity
|
27
|
-
attr_accessor :url
|
28
|
+
attr_accessor :url
|
29
|
+
attr_accessor :text
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -33,10 +35,20 @@ module SBF
|
|
33
35
|
end
|
34
36
|
|
35
37
|
class FullInternationalPartner < SBF::Client::InternationalPartner
|
36
|
-
attr_accessor :id
|
37
|
-
|
38
|
+
attr_accessor :id
|
39
|
+
attr_accessor :status
|
40
|
+
attr_accessor :year
|
41
|
+
attr_accessor :country
|
42
|
+
attr_accessor :country_name
|
43
|
+
attr_accessor :name
|
44
|
+
attr_accessor :message
|
45
|
+
attr_accessor :description
|
38
46
|
entity_attr_accessor :web_page, 'SBF::Client::InternationalPartner::WebPage'
|
39
47
|
entity_attr_accessor :link, 'SBF::Client::InternationalPartner::Link'
|
48
|
+
attr_accessor :donate_url
|
49
|
+
attr_accessor :base_photo_url
|
50
|
+
|
51
|
+
attr_accessor :created_at
|
40
52
|
|
41
53
|
def active?
|
42
54
|
status == SBF::Client::InternationalPartner::Status::ACTIVE
|
@@ -11,7 +11,9 @@ require 'stbaldricks/entities/lib/default_cacheable'
|
|
11
11
|
module SBF
|
12
12
|
module Client
|
13
13
|
class Diagnosis < SBF::Client::BaseEntity
|
14
|
-
attr_accessor :date
|
14
|
+
attr_accessor :date
|
15
|
+
attr_accessor :cancer_type
|
16
|
+
attr_accessor :other
|
15
17
|
|
16
18
|
module CancerType
|
17
19
|
ACUTE_LYMPHOBLASTIC_LEUKEMIA = 'acute_lymphoblastic_leukemia'.freeze
|
@@ -53,15 +55,16 @@ module SBF
|
|
53
55
|
COUSIN = 'cousin'.freeze
|
54
56
|
end
|
55
57
|
|
56
|
-
attr_accessor :name
|
57
|
-
|
58
|
+
attr_accessor :name
|
59
|
+
attr_accessor :relationship
|
58
60
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
59
61
|
entity_attr_accessor :email_address, 'SBF::Client::EmailAddress'
|
60
62
|
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
61
63
|
end
|
62
64
|
|
63
65
|
class TreatmentStatus < SBF::Client::BaseEntity
|
64
|
-
attr_accessor :state
|
66
|
+
attr_accessor :state
|
67
|
+
attr_accessor :other
|
65
68
|
|
66
69
|
module SurvivorState
|
67
70
|
IN_TREATMENT = 'in_treatment'.freeze
|
@@ -132,10 +135,11 @@ module SBF
|
|
132
135
|
attr_accessor :is_editor
|
133
136
|
end
|
134
137
|
|
135
|
-
attr_accessor :kid_id
|
136
|
-
|
138
|
+
attr_accessor :kid_id
|
137
139
|
entity_attr_accessor :person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
138
|
-
|
140
|
+
attr_accessor :type
|
141
|
+
attr_accessor :guardian_type
|
142
|
+
attr_accessor :is_submitter
|
139
143
|
entity_attr_accessor :permissions, 'SBF::Client::Kid::Relationship::Permissions'
|
140
144
|
end
|
141
145
|
|
@@ -150,21 +154,34 @@ module SBF
|
|
150
154
|
extend Forwardable
|
151
155
|
def_delegator :@photos, :avatar, :avatar_photo_url
|
152
156
|
|
153
|
-
attr_accessor :id
|
154
|
-
|
155
|
-
|
157
|
+
attr_accessor :id
|
158
|
+
attr_accessor :status
|
159
|
+
attr_accessor :gender
|
160
|
+
attr_accessor :birthday
|
161
|
+
attr_accessor :ethnicity
|
162
|
+
attr_accessor :date_of_passing
|
163
|
+
attr_accessor :display_name
|
164
|
+
attr_accessor :display_name_override
|
165
|
+
attr_accessor :name
|
166
|
+
attr_accessor :ambassador_year
|
167
|
+
attr_accessor :date_activated
|
168
|
+
attr_accessor :date_packet_sent
|
156
169
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
157
170
|
entity_attr_accessor :address, 'SBF::Client::Address'
|
158
171
|
entity_attr_accessor :diagnosis, 'SBF::Client::Diagnosis'
|
159
172
|
entity_attr_accessor :treatment_status, 'SBF::Client::TreatmentStatus'
|
160
|
-
|
173
|
+
attr_accessor :web_message
|
161
174
|
entity_attr_accessor :photos, 'SBF::Client::Photos'
|
162
175
|
entity_attr_accessor :web_page, 'SBF::Client::WebPage'
|
163
176
|
entity_attr_accessor :guardian, 'SBF::Client::Guardian'
|
164
177
|
entity_collection_attr_accessor :relationships, 'SBF::Client::Kid::Relationship'
|
165
178
|
entity_collection_attr_accessor :urls, 'SBF::Client::KidURL'
|
166
|
-
entity_collection_attr_accessor :custom_institutions, 'SBF::Client::Kid::CustomInstitution', nil,
|
167
|
-
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil,
|
179
|
+
entity_collection_attr_accessor :custom_institutions, 'SBF::Client::Kid::CustomInstitution', nil, true
|
180
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
181
|
+
|
182
|
+
attr_accessor :created_at
|
183
|
+
attr_accessor :modified_at
|
184
|
+
attr_accessor :modified_by
|
168
185
|
|
169
186
|
def fundraising_page_url
|
170
187
|
web_page&.url
|