stbaldricks 12.10.0 → 12.11.0.alpha.2

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