stbaldricks 12.10.0.alpha.2 → 12.10.0.alpha.4
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 +198 -4
@@ -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
|
end
|
73
74
|
|
@@ -78,23 +79,28 @@ module SBF
|
|
78
79
|
class FullOrganization < SBF::Client::Organization
|
79
80
|
class ContactName < SBF::Client::BaseEntity
|
80
81
|
attr_reader :name
|
81
|
-
|
82
82
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
83
83
|
end
|
84
84
|
|
85
|
-
attr_accessor :id
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
attr_accessor :id
|
86
|
+
attr_accessor :salesforce_id
|
87
|
+
attr_accessor :salesforce_account_id
|
88
|
+
attr_accessor :type
|
89
|
+
attr_accessor :status
|
90
|
+
attr_reader :display_name
|
91
|
+
attr_accessor :display_name_override
|
92
|
+
attr_accessor :name
|
89
93
|
entity_attr_accessor :contact, 'SBF::Client::FullOrganization::ContactName'
|
90
94
|
entity_attr_accessor :addresses, 'SBF::Client::Organization::Addresses'
|
91
95
|
entity_attr_accessor :phone_numbers, 'SBF::Client::Organization::PhoneNumbers'
|
92
96
|
entity_attr_accessor :email_addresses, 'SBF::Client::Organization::EmailAddresses'
|
93
|
-
entity_attr_accessor :opt_out_settings, 'SBF::Client::OptOutSettings', nil,
|
94
|
-
|
95
|
-
entity_attr_accessor :alternate_shipping_address, 'SBF::Client::AlternateShippingAddress', nil,
|
96
|
-
|
97
|
-
|
97
|
+
entity_attr_accessor :opt_out_settings, 'SBF::Client::OptOutSettings', nil, true
|
98
|
+
attr_accessor :selected_shipping_method
|
99
|
+
entity_attr_accessor :alternate_shipping_address, 'SBF::Client::AlternateShippingAddress', nil, true
|
100
|
+
attr_reader :created_at, :modified_at
|
101
|
+
attr_accessor :modified_by
|
102
|
+
attr_accessor :how_created
|
103
|
+
entity_attr_reader :totals, 'SBF::Client::Organization::Totals', nil, true
|
98
104
|
|
99
105
|
def active?
|
100
106
|
status == SBF::Client::Organization::Status::ACTIVE
|
@@ -9,8 +9,13 @@ module SBF
|
|
9
9
|
actions DEFAULT_CRUD_ACTIONS
|
10
10
|
|
11
11
|
class Content < SBF::Client::BaseEntity
|
12
|
-
attr_reader :id
|
13
|
-
attr_accessor :is_draft
|
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
|
14
19
|
|
15
20
|
module Type
|
16
21
|
TEXT = 'text'.freeze
|
@@ -18,9 +23,13 @@ module SBF
|
|
18
23
|
end
|
19
24
|
end
|
20
25
|
|
21
|
-
attr_reader :id
|
22
|
-
attr_accessor :title
|
23
|
-
|
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
|
24
33
|
entity_collection_attr_accessor :content, 'SBF::Client::Page::Content'
|
25
34
|
|
26
35
|
def meta_content
|
@@ -64,7 +73,7 @@ module SBF
|
|
64
73
|
# update or create draft version of content
|
65
74
|
draft = draft_content.find { |d| d.id == cid }
|
66
75
|
if draft.nil?
|
67
|
-
self.content << SBF::Client::Page::Content.new(content.to_hash.merge(is_draft: true, title: data[:title], text: data[:text])
|
76
|
+
self.content << SBF::Client::Page::Content.new(content.to_hash.merge(is_draft: true, title: data[:title], text: data[:text]))
|
68
77
|
else
|
69
78
|
draft.title = data[:title]
|
70
79
|
draft.text = data[:text]
|
@@ -138,8 +138,8 @@ module SBF
|
|
138
138
|
|
139
139
|
class Organizer < SBF::Client::Participant::Roles::LeadRole
|
140
140
|
class Policies < SBF::Client::BaseEntity
|
141
|
-
attr_accessor :agreement_received_date, :coaches_questionnaire_received_date
|
142
|
-
|
141
|
+
attr_accessor :agreement_received_date, :coaches_questionnaire_received_date
|
142
|
+
attr_accessor :is_revenue_waiver_accepted, :is_host_agreement_waiver_accepted
|
143
143
|
end
|
144
144
|
|
145
145
|
class PreviousOrganization < SBF::Client::BaseEntity
|
@@ -147,7 +147,6 @@ module SBF
|
|
147
147
|
end
|
148
148
|
|
149
149
|
attr_accessor :is_lead, :status
|
150
|
-
|
151
150
|
entity_attr_accessor :policies, 'SBF::Client::Participant::Roles::Organizer::Policies'
|
152
151
|
entity_attr_accessor :previous_organization, 'SBF::Client::Participant::Roles::Organizer::PreviousOrganization'
|
153
152
|
end
|
@@ -159,7 +158,6 @@ module SBF
|
|
159
158
|
|
160
159
|
class Salon < SBF::Client::BaseEntity
|
161
160
|
attr_accessor :name
|
162
|
-
|
163
161
|
entity_attr_accessor :phone, 'SBF::Client::Phone'
|
164
162
|
end
|
165
163
|
|
@@ -211,28 +209,40 @@ module SBF
|
|
211
209
|
extend Forwardable
|
212
210
|
def_delegator :@photos, :avatar, :avatar_photo_url
|
213
211
|
|
214
|
-
attr_accessor :id
|
215
|
-
:how_created, :is_virtual, :modified_by, :offline_donation_uuid, :offline_donation_form, :shirt_size, :status
|
216
|
-
|
217
|
-
attr_reader :created_at, :modified_at, :display_name, :is_website_allowed
|
212
|
+
attr_accessor :id
|
218
213
|
|
219
|
-
|
220
|
-
|
214
|
+
attr_reader :created_at, :modified_at
|
215
|
+
attr_reader :display_name
|
216
|
+
attr_reader :is_website_allowed
|
217
|
+
|
218
|
+
attr_accessor :display_name_override
|
219
|
+
attr_accessor :facebook_fundraiser_id
|
220
|
+
attr_accessor :fund_relationship_type
|
221
|
+
attr_accessor :fundraising_goal, :fundraising_message
|
222
|
+
attr_accessor :how_created
|
223
|
+
attr_accessor :is_virtual
|
224
|
+
attr_accessor :modified_by
|
225
|
+
attr_accessor :offline_donation_uuid, :offline_donation_form
|
226
|
+
attr_accessor :shirt_size
|
227
|
+
attr_accessor :status
|
228
|
+
|
229
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
230
|
+
entity_attr_reader :permissions_at_event, 'SBF::Client::PermissionsAtEvent', nil, true
|
221
231
|
entity_attr_reader :photos, 'SBF::Client::Participant::Photos'
|
222
|
-
entity_attr_reader :rankings, 'SBF::Client::Participant::Rankings', nil,
|
232
|
+
entity_attr_reader :rankings, 'SBF::Client::Participant::Rankings', nil, true
|
223
233
|
entity_attr_reader :totals, 'SBF::Client::Participant::Totals'
|
224
234
|
|
225
|
-
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent',
|
226
|
-
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund',
|
227
|
-
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil,
|
235
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
236
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
237
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
228
238
|
entity_attr_accessor :person, 'SBF::Client::FullPerson'
|
229
239
|
entity_attr_accessor :policies, 'SBF::Client::Participant::Policies'
|
230
|
-
entity_attr_accessor :roles, 'SBF::Client::Participant::Roles', nil,
|
240
|
+
entity_attr_accessor :roles, 'SBF::Client::Participant::Roles', nil, true
|
231
241
|
entity_attr_accessor :shave_schedule, 'SBF::Client::Participant::ShaveSchedule'
|
232
|
-
entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam',
|
233
|
-
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil,
|
242
|
+
entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam', true
|
243
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
234
244
|
|
235
|
-
entity_collection_attr_accessor :milestones, 'SBF::Client::Milestone', nil,
|
245
|
+
entity_collection_attr_accessor :milestones, 'SBF::Client::Milestone', nil, true
|
236
246
|
|
237
247
|
def active?
|
238
248
|
status == SBF::Client::Participant::Status::ACTIVE
|
@@ -9,9 +9,11 @@ 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 :event_year
|
13
15
|
|
14
|
-
entity_attr_reader :participant, 'SBF::Client::FullParticipant', nil,
|
16
|
+
entity_attr_reader :participant, 'SBF::Client::FullParticipant', nil, true
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -92,16 +92,15 @@ module SBF
|
|
92
92
|
|
93
93
|
class Policies < SBF::Client::BaseEntity
|
94
94
|
BACKGROUND_CHECK_YEARS_VALID = 5
|
95
|
-
attr_accessor :is_photo_policy_accepted
|
95
|
+
attr_accessor :is_photo_policy_accepted
|
96
|
+
attr_accessor :background_check_date, :background_check_url
|
96
97
|
|
97
98
|
def background_check_valid_at_date?(check_date)
|
98
99
|
check_date = DateTime.parse(check_date) if check_date.is_a?(String)
|
99
100
|
check_date = DateTime.parse(check_date.to_s) if check_date.is_a?(Date)
|
100
101
|
check_date = DateTime.parse(check_date.strftime('%d/%m/%Y %H:%M:%S')) if check_date.is_a?(Time)
|
101
102
|
background_check_date && check_date.is_a?(DateTime) \
|
102
|
-
&& DateTime.parse(background_check_date) > check_date.prev_year(
|
103
|
-
SBF::Client::Person::Policies::BACKGROUND_CHECK_YEARS_VALID
|
104
|
-
)
|
103
|
+
&& DateTime.parse(background_check_date) > check_date.prev_year(SBF::Client::Person::Policies::BACKGROUND_CHECK_YEARS_VALID)
|
105
104
|
end
|
106
105
|
end
|
107
106
|
|
@@ -206,7 +205,6 @@ module SBF
|
|
206
205
|
end
|
207
206
|
end
|
208
207
|
end
|
209
|
-
|
210
208
|
class Occupation < SBF::Client::BaseEntity
|
211
209
|
module Type
|
212
210
|
STUDENT = 'Student'.freeze
|
@@ -344,21 +342,21 @@ module SBF
|
|
344
342
|
# able to determine what type it should be. As it is currently written, it cannot instanitate itself
|
345
343
|
# without the information contained in the SBF::Client::Person::Occupation instance.
|
346
344
|
attr_accessor :details
|
347
|
-
|
348
345
|
def details=(value)
|
349
346
|
details_will_change!
|
350
347
|
if educator? || student?
|
351
|
-
@details = SBF::Client::Person::Occupation::EducationDetails.new(value
|
348
|
+
@details = SBF::Client::Person::Occupation::EducationDetails.new(value)
|
352
349
|
elsif military?
|
353
|
-
@details = SBF::Client::Person::Occupation::MilitaryDetails.new(value
|
350
|
+
@details = SBF::Client::Person::Occupation::MilitaryDetails.new(value)
|
354
351
|
elsif finance? || other?
|
355
|
-
@details = SBF::Client::Person::Occupation::FinanceDetails.new(value
|
352
|
+
@details = SBF::Client::Person::Occupation::FinanceDetails.new(value)
|
356
353
|
end
|
357
354
|
end
|
358
355
|
end
|
359
356
|
|
360
357
|
class Totals < SBF::Client::BaseEntity
|
361
|
-
attr_reader :amount_raised
|
358
|
+
attr_reader :amount_raised
|
359
|
+
attr_reader :donations
|
362
360
|
end
|
363
361
|
|
364
362
|
def league_status_title
|
@@ -384,23 +382,33 @@ module SBF
|
|
384
382
|
end
|
385
383
|
|
386
384
|
class FullPerson < SBF::Client::Person
|
387
|
-
attr_accessor :id
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
385
|
+
attr_accessor :id
|
386
|
+
attr_accessor :salesforce_id
|
387
|
+
attr_accessor :salesforce_account_id
|
388
|
+
attr_accessor :type
|
389
|
+
attr_accessor :status
|
390
|
+
attr_accessor :gender
|
391
|
+
attr_accessor :is_minor
|
392
|
+
attr_accessor :birthday
|
393
|
+
attr_reader :display_name, :first_and_last_name
|
394
|
+
attr_accessor :display_name_override
|
395
|
+
attr_accessor :years_as_participant, :years_as_organizer
|
396
|
+
attr_reader :league_status
|
397
|
+
attr_reader :name
|
392
398
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
393
399
|
entity_attr_accessor :addresses, 'SBF::Client::Person::Addresses'
|
394
400
|
entity_attr_accessor :phone_numbers, 'SBF::Client::Person::PhoneNumbers'
|
395
401
|
entity_attr_accessor :email_addresses, 'SBF::Client::Person::EmailAddresses'
|
396
|
-
entity_attr_accessor :occupation, 'SBF::Client::Person::Occupation', nil,
|
402
|
+
entity_attr_accessor :occupation, 'SBF::Client::Person::Occupation', nil, true
|
397
403
|
entity_attr_accessor :policies, 'SBF::Client::Person::Policies'
|
398
|
-
entity_attr_accessor :how_affected, 'SBF::Client::Person::HowAffected', nil,
|
399
|
-
entity_attr_accessor :opt_out_settings, 'SBF::Client::OptOutSettings', nil,
|
400
|
-
|
401
|
-
entity_attr_accessor :alternate_shipping_address, 'SBF::Client::AlternateShippingAddress', nil,
|
402
|
-
|
403
|
-
|
404
|
+
entity_attr_accessor :how_affected, 'SBF::Client::Person::HowAffected', nil, true
|
405
|
+
entity_attr_accessor :opt_out_settings, 'SBF::Client::OptOutSettings', nil, true
|
406
|
+
attr_accessor :selected_shipping_method
|
407
|
+
entity_attr_accessor :alternate_shipping_address, 'SBF::Client::AlternateShippingAddress', nil, true
|
408
|
+
attr_reader :created_at, :modified_at
|
409
|
+
attr_accessor :modified_by
|
410
|
+
attr_accessor :how_created
|
411
|
+
entity_attr_reader :totals, 'SBF::Client::Person::Totals', nil, true
|
404
412
|
|
405
413
|
def active?
|
406
414
|
status == SBF::Client::Person::Status::ACTIVE
|
@@ -9,7 +9,8 @@ module SBF
|
|
9
9
|
blacklist_action :update
|
10
10
|
blacklist_action :delete
|
11
11
|
|
12
|
-
attr_accessor :donations
|
12
|
+
attr_accessor :donations
|
13
|
+
attr_accessor :cumulative_total
|
13
14
|
attr_reader :modified_at
|
14
15
|
|
15
16
|
entity_attr_accessor :person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
@@ -26,8 +26,13 @@ module SBF
|
|
26
26
|
endpoint.send(:upload, *args)
|
27
27
|
end
|
28
28
|
|
29
|
-
attr_accessor :id
|
30
|
-
|
29
|
+
attr_accessor :id
|
30
|
+
attr_accessor :caption
|
31
|
+
attr_accessor :sort_order
|
32
|
+
attr_accessor :year
|
33
|
+
attr_accessor :category
|
34
|
+
attr_accessor :file
|
35
|
+
attr_accessor :filename
|
31
36
|
multitype_attr_accessor(
|
32
37
|
:model,
|
33
38
|
[
|
@@ -79,11 +84,12 @@ module SBF
|
|
79
84
|
],
|
80
85
|
optional: false
|
81
86
|
)
|
82
|
-
|
87
|
+
attr_accessor :base_photo_url
|
88
|
+
attr_reader :original_file_id
|
89
|
+
attr_reader :original_filename
|
83
90
|
|
84
91
|
def to_json(*a)
|
85
|
-
|
86
|
-
to_hash.reject { |k, _v| names.include? k }.to_json(*a)
|
92
|
+
to_hash.reject { |k, _v| %i(file filename).include? k }.to_json(*a)
|
87
93
|
end
|
88
94
|
|
89
95
|
module Category
|
@@ -168,7 +168,6 @@ module SBF
|
|
168
168
|
class Tribute < SBF::Client::BaseEntity
|
169
169
|
attr_accessor :type
|
170
170
|
attr_reader :name
|
171
|
-
|
172
171
|
entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
|
173
172
|
|
174
173
|
module Type
|
@@ -181,15 +180,24 @@ module SBF
|
|
181
180
|
class PartialRecurringGift < SBF::Client::RecurringGift
|
182
181
|
attr_accessor :id
|
183
182
|
end
|
184
|
-
|
185
183
|
class FullRecurringGift < SBF::Client::RecurringGift
|
186
|
-
attr_accessor :status
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
184
|
+
attr_accessor :status
|
185
|
+
attr_accessor :event_year
|
186
|
+
attr_accessor :amount
|
187
|
+
attr_accessor :fee_amount
|
188
|
+
attr_accessor :billing_day_of_month
|
189
|
+
attr_accessor :last_collected_at
|
190
|
+
attr_accessor :last_failed_at
|
191
|
+
attr_accessor :display_name
|
192
|
+
attr_accessor :display_name_override
|
193
|
+
attr_accessor :is_unrecognized
|
194
|
+
attr_accessor :promotional_code
|
195
|
+
attr_accessor :funding_type
|
196
|
+
attr_accessor :payment_gateway
|
197
|
+
attr_accessor :customer_id
|
198
|
+
attr_accessor :subscription_id
|
191
199
|
entity_collection_attr_accessor :donations, 'SBF::Client::FullDonation', 'SBF::Client::PartialDonation'
|
192
|
-
|
200
|
+
attr_accessor :created_at, :modified_at, :modified_by, :how_created, :how_created_id, :past_due_at
|
193
201
|
entity_attr_accessor :tribute, 'SBF::Client::RecurringGift::Tribute'
|
194
202
|
|
195
203
|
multitype_attr_accessor(
|
@@ -207,6 +215,10 @@ module SBF
|
|
207
215
|
->(v) { v[:type] == SBF::Client::Payment::Type::GOOGLEPAY },
|
208
216
|
'SBF::Client::Payment::GooglePayDetails'
|
209
217
|
],
|
218
|
+
[
|
219
|
+
->(v) { v[:type] == SBF::Client::Payment::Type::VENMO },
|
220
|
+
'SBF::Client::Payment::VenmoDetails'
|
221
|
+
],
|
210
222
|
[
|
211
223
|
->(v) { v[:type] == SBF::Client::Payment::Type::NONCE },
|
212
224
|
'SBF::Client::Payment::NonceDetails'
|
@@ -279,12 +291,12 @@ module SBF
|
|
279
291
|
|
280
292
|
def amount=(value)
|
281
293
|
amount_will_change!
|
282
|
-
@amount = value.to_s.gsub(/[^0-9
|
294
|
+
@amount = value.to_s.gsub(/[^0-9\.]/, '').to_f
|
283
295
|
end
|
284
296
|
|
285
297
|
def fee_amount=(value)
|
286
298
|
fee_amount_will_change!
|
287
|
-
@fee_amount = value.to_s.gsub(/[^0-9
|
299
|
+
@fee_amount = value.to_s.gsub(/[^0-9\.]/, '').to_f
|
288
300
|
end
|
289
301
|
end
|
290
302
|
end
|
@@ -39,57 +39,195 @@ module SBF
|
|
39
39
|
end
|
40
40
|
|
41
41
|
class Fund < SBF::Client::BaseEntity
|
42
|
-
attr_reader :fund_id
|
43
|
-
|
42
|
+
attr_reader :fund_id
|
43
|
+
attr_reader :slug
|
44
|
+
attr_reader :name
|
45
|
+
attr_reader :website
|
46
|
+
attr_reader :disabled
|
47
|
+
attr_reader :event_year
|
48
|
+
attr_reader :total_donations
|
49
|
+
attr_reader :total_events
|
50
|
+
attr_reader :total_participants
|
51
|
+
attr_reader :total_shavees
|
52
|
+
attr_reader :mypage_url
|
53
|
+
attr_reader :default_photo_url
|
54
|
+
attr_reader :avatar_photo_url
|
44
55
|
end
|
45
56
|
|
46
57
|
class Campaign < SBF::Client::BaseEntity
|
47
|
-
attr_reader :campaign_id
|
48
|
-
|
58
|
+
attr_reader :campaign_id
|
59
|
+
attr_reader :slug
|
60
|
+
attr_reader :name
|
61
|
+
attr_reader :website
|
62
|
+
attr_reader :disabled
|
63
|
+
attr_reader :event_year
|
64
|
+
attr_reader :total_donations
|
65
|
+
attr_reader :total_events
|
66
|
+
attr_reader :total_participants
|
67
|
+
attr_reader :total_shavees
|
68
|
+
attr_reader :mypage_url
|
49
69
|
end
|
50
70
|
|
51
71
|
class Event < SBF::Client::BaseEntity
|
52
|
-
attr_reader :venue_name
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
72
|
+
attr_reader :venue_name
|
73
|
+
attr_reader :event_title
|
74
|
+
attr_reader :zip_code
|
75
|
+
attr_reader :address1
|
76
|
+
attr_reader :city
|
77
|
+
attr_reader :state
|
78
|
+
attr_reader :state_full
|
79
|
+
attr_reader :country
|
80
|
+
attr_reader :country_full
|
81
|
+
attr_reader :address2
|
82
|
+
attr_reader :event_access_type_id
|
83
|
+
attr_reader :event_date
|
84
|
+
attr_reader :event_year
|
85
|
+
attr_reader :event_id
|
86
|
+
attr_reader :is_website_allowed
|
87
|
+
attr_reader :is_expired
|
88
|
+
attr_reader :start_time
|
89
|
+
attr_reader :end_time
|
90
|
+
attr_reader :status_id
|
91
|
+
attr_reader :website_url
|
92
|
+
attr_reader :total_donations
|
93
|
+
attr_reader :total_participants
|
94
|
+
attr_reader :total_shavees
|
95
|
+
attr_reader :icon
|
96
|
+
attr_reader :mypage_url
|
97
|
+
attr_reader :default_photo_url
|
98
|
+
attr_reader :avatar_photo_url
|
99
|
+
attr_reader :closed_roles
|
57
100
|
end
|
58
101
|
|
59
102
|
class Team < SBF::Client::BaseEntity
|
60
|
-
attr_reader :team_name
|
61
|
-
|
62
|
-
|
63
|
-
|
103
|
+
attr_reader :team_name
|
104
|
+
attr_reader :venue_name
|
105
|
+
attr_reader :event_title
|
106
|
+
attr_reader :zip_code
|
107
|
+
attr_reader :address1
|
108
|
+
attr_reader :city
|
109
|
+
attr_reader :state
|
110
|
+
attr_reader :state_full
|
111
|
+
attr_reader :country_full
|
112
|
+
attr_reader :country
|
113
|
+
attr_reader :event_date
|
114
|
+
attr_reader :event_id
|
115
|
+
attr_reader :event_year
|
116
|
+
attr_reader :event_status_id
|
117
|
+
attr_reader :team_id
|
118
|
+
attr_reader :is_website_allowed
|
119
|
+
attr_reader :status_id
|
120
|
+
attr_reader :total_donations
|
121
|
+
attr_reader :total_participants
|
122
|
+
attr_reader :total_shavees
|
123
|
+
attr_reader :icon
|
124
|
+
attr_reader :mypage_url
|
125
|
+
attr_reader :default_photo_url
|
126
|
+
attr_reader :avatar_photo_url
|
64
127
|
end
|
65
128
|
|
66
129
|
class Participant < SBF::Client::BaseEntity
|
67
|
-
attr_reader :participant_id
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
130
|
+
attr_reader :participant_id
|
131
|
+
attr_reader :event_year
|
132
|
+
attr_reader :raw_display_name
|
133
|
+
attr_reader :display_name
|
134
|
+
attr_reader :team_name
|
135
|
+
attr_reader :venue_name
|
136
|
+
attr_reader :event_title
|
137
|
+
attr_reader :zip_code
|
138
|
+
attr_reader :city
|
139
|
+
attr_reader :state
|
140
|
+
attr_reader :state_full
|
141
|
+
attr_reader :participant_state
|
142
|
+
attr_reader :participant_state_full
|
143
|
+
attr_reader :country
|
144
|
+
attr_reader :country_full
|
145
|
+
attr_reader :participant_country
|
146
|
+
attr_reader :participant_country_full
|
147
|
+
attr_reader :event_date
|
148
|
+
attr_reader :event_id
|
149
|
+
attr_reader :is_website_allowed
|
150
|
+
attr_reader :profile_id
|
151
|
+
attr_reader :status_id
|
152
|
+
attr_reader :event_status_id
|
153
|
+
attr_reader :team_id
|
154
|
+
attr_reader :virtual_participation_date
|
155
|
+
attr_reader :total_donations
|
156
|
+
attr_reader :icon
|
157
|
+
attr_reader :mypage_url
|
158
|
+
attr_reader :default_photo_url
|
159
|
+
attr_reader :avatar_photo_url
|
73
160
|
end
|
74
161
|
|
75
162
|
class Fundraiser < SBF::Client::BaseEntity
|
76
|
-
attr_reader :fundraiser_id
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
163
|
+
attr_reader :fundraiser_id
|
164
|
+
attr_reader :event_year
|
165
|
+
attr_reader :event_id
|
166
|
+
attr_reader :event_status_id
|
167
|
+
attr_reader :event_title
|
168
|
+
attr_reader :team_id
|
169
|
+
attr_reader :title
|
170
|
+
attr_reader :status_id
|
171
|
+
attr_reader :profile_id
|
172
|
+
attr_reader :raw_display_name
|
173
|
+
attr_reader :display_name
|
174
|
+
attr_reader :start_date
|
175
|
+
attr_reader :start_time
|
176
|
+
attr_reader :end_date
|
177
|
+
attr_reader :end_time
|
178
|
+
attr_reader :zip_code
|
179
|
+
attr_reader :venue_name
|
180
|
+
attr_reader :team_name
|
181
|
+
attr_reader :event_venue_name
|
182
|
+
attr_reader :address1
|
183
|
+
attr_reader :address2
|
184
|
+
attr_reader :city
|
185
|
+
attr_reader :state
|
186
|
+
attr_reader :state_full
|
187
|
+
attr_reader :country
|
188
|
+
attr_reader :country_full
|
189
|
+
attr_reader :total_donations
|
190
|
+
attr_reader :icon
|
191
|
+
attr_reader :mypage_url
|
192
|
+
attr_reader :default_photo_url
|
193
|
+
attr_reader :avatar_photo_url
|
81
194
|
end
|
82
195
|
|
83
196
|
class Kid < SBF::Client::BaseEntity
|
84
|
-
attr_reader :kid_id
|
85
|
-
|
86
|
-
|
197
|
+
attr_reader :kid_id
|
198
|
+
attr_reader :display_name
|
199
|
+
attr_reader :city
|
200
|
+
attr_reader :state
|
201
|
+
attr_reader :state_full
|
202
|
+
attr_reader :country_full
|
203
|
+
attr_reader :country
|
204
|
+
attr_reader :diagnosis_slug
|
205
|
+
attr_reader :diagnosis_other
|
206
|
+
attr_reader :status_id
|
207
|
+
attr_reader :treatment_status_slug
|
208
|
+
attr_reader :treatment_status_other
|
209
|
+
attr_reader :mypage_url
|
210
|
+
attr_reader :default_photo_url
|
211
|
+
attr_reader :avatar_photo_url
|
87
212
|
end
|
88
213
|
|
89
214
|
class Memorial < SBF::Client::BaseEntity
|
90
|
-
attr_reader :memorial_id
|
91
|
-
|
92
|
-
|
215
|
+
attr_reader :memorial_id
|
216
|
+
attr_reader :tribute_name
|
217
|
+
attr_reader :display_name
|
218
|
+
attr_reader :status_id
|
219
|
+
attr_reader :city
|
220
|
+
attr_reader :state
|
221
|
+
attr_reader :state_full
|
222
|
+
attr_reader :country_full
|
223
|
+
attr_reader :country
|
224
|
+
attr_reader :tribute_birthday
|
225
|
+
attr_reader :tribute_date_of_passing
|
226
|
+
attr_reader :expiration_date
|
227
|
+
attr_reader :total_donations
|
228
|
+
attr_reader :mypage_url
|
229
|
+
attr_reader :default_photo_url
|
230
|
+
attr_reader :avatar_photo_url
|
93
231
|
end
|
94
232
|
end
|
95
233
|
end
|