stbaldricks 12.14.0.alpha.1 → 12.14.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
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 +11 -13
  10. data/lib/stbaldricks/endpoints/newsletter_recipient.rb +5 -11
  11. data/lib/stbaldricks/endpoints/participant.rb +3 -3
  12. data/lib/stbaldricks/endpoints/photo.rb +4 -5
  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 +5 -3
  16. data/lib/stbaldricks/entities/blog_post.rb +7 -1
  17. data/lib/stbaldricks/entities/campaign.rb +13 -6
  18. data/lib/stbaldricks/entities/challenge.rb +6 -4
  19. data/lib/stbaldricks/entities/challenger.rb +6 -4
  20. data/lib/stbaldricks/entities/concerns/entity_response_concern.rb +1 -1
  21. data/lib/stbaldricks/entities/config.rb +8 -3
  22. data/lib/stbaldricks/entities/contact.rb +7 -4
  23. data/lib/stbaldricks/entities/contact_group.rb +2 -2
  24. data/lib/stbaldricks/entities/deduplicator_history.rb +6 -1
  25. data/lib/stbaldricks/entities/deduplicator_match.rb +7 -4
  26. data/lib/stbaldricks/entities/disease.rb +5 -2
  27. data/lib/stbaldricks/entities/document_library.rb +8 -3
  28. data/lib/stbaldricks/entities/document_library_category.rb +4 -1
  29. data/lib/stbaldricks/entities/donation.rb +18 -12
  30. data/lib/stbaldricks/entities/donor.rb +5 -1
  31. data/lib/stbaldricks/entities/event.rb +44 -33
  32. data/lib/stbaldricks/entities/event_application.rb +10 -6
  33. data/lib/stbaldricks/entities/event_donation_summary.rb +5 -2
  34. data/lib/stbaldricks/entities/event_participant_summary.rb +3 -1
  35. data/lib/stbaldricks/entities/event_supporter.rb +3 -3
  36. data/lib/stbaldricks/entities/fund.rb +23 -6
  37. data/lib/stbaldricks/entities/fundraiser.rb +29 -16
  38. data/lib/stbaldricks/entities/grant.rb +25 -12
  39. data/lib/stbaldricks/entities/institution.rb +4 -3
  40. data/lib/stbaldricks/entities/international_partner.rb +16 -4
  41. data/lib/stbaldricks/entities/kid.rb +28 -11
  42. data/lib/stbaldricks/entities/kid_honor.rb +0 -1
  43. data/lib/stbaldricks/entities/kid_institution.rb +2 -2
  44. data/lib/stbaldricks/entities/lib/address.rb +6 -3
  45. data/lib/stbaldricks/entities/lib/alternate_shipping_address.rb +3 -1
  46. data/lib/stbaldricks/entities/lib/base.rb +39 -47
  47. data/lib/stbaldricks/entities/lib/collection.rb +2 -2
  48. data/lib/stbaldricks/entities/lib/email_address.rb +2 -1
  49. data/lib/stbaldricks/entities/lib/fundraising_page.rb +2 -1
  50. data/lib/stbaldricks/entities/lib/location.rb +0 -1
  51. data/lib/stbaldricks/entities/lib/milestone.rb +3 -1
  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 +4 -2
  55. data/lib/stbaldricks/entities/lib/phone.rb +3 -2
  56. data/lib/stbaldricks/entities/lib/third_party_media.rb +5 -1
  57. data/lib/stbaldricks/entities/lib/top_level.rb +1 -1
  58. data/lib/stbaldricks/entities/matching_gift_company.rb +39 -16
  59. data/lib/stbaldricks/entities/memorial.rb +14 -9
  60. data/lib/stbaldricks/entities/message.rb +15 -4
  61. data/lib/stbaldricks/entities/organization.rb +17 -11
  62. data/lib/stbaldricks/entities/page.rb +17 -9
  63. data/lib/stbaldricks/entities/participant.rb +28 -18
  64. data/lib/stbaldricks/entities/participant_donation_summary.rb +4 -2
  65. data/lib/stbaldricks/entities/person.rb +31 -22
  66. data/lib/stbaldricks/entities/person_donation_by_year_summary.rb +2 -1
  67. data/lib/stbaldricks/entities/photo.rb +11 -5
  68. data/lib/stbaldricks/entities/recurring_gift.rb +18 -10
  69. data/lib/stbaldricks/entities/response.rb +0 -1
  70. data/lib/stbaldricks/entities/search.rb +168 -30
  71. data/lib/stbaldricks/entities/section.rb +4 -1
  72. data/lib/stbaldricks/entities/shave_schedule.rb +13 -4
  73. data/lib/stbaldricks/entities/summary.rb +7 -1
  74. data/lib/stbaldricks/entities/team.rb +16 -12
  75. data/lib/stbaldricks/entities/team_donation_summary.rb +4 -2
  76. data/lib/stbaldricks/request.rb +2 -2
  77. data/lib/stbaldricks/version.rb +1 -1
  78. data/lib/stbaldricks_factories.rb +5 -0
  79. data/spec/factories/address.rb +14 -0
  80. data/spec/factories/campaign/totals.rb +9 -0
  81. data/spec/factories/campaign.rb +9 -0
  82. data/spec/factories/challenge.rb +19 -0
  83. data/spec/factories/challenger.rb +33 -0
  84. data/spec/factories/collection.rb +17 -0
  85. data/spec/factories/contact.rb +18 -0
  86. data/spec/factories/contact_group.rb +18 -0
  87. data/spec/factories/diagnosis.rb +12 -0
  88. data/spec/factories/disease.rb +11 -0
  89. data/spec/factories/donation/participant.rb +27 -0
  90. data/spec/factories/donation.rb +68 -0
  91. data/spec/factories/donor.rb +13 -0
  92. data/spec/factories/email_address.rb +11 -0
  93. data/spec/factories/error.rb +9 -0
  94. data/spec/factories/event/coach_tracking/coaching_interactions.rb +12 -0
  95. data/spec/factories/event/coach_tracking/plaque.rb +12 -0
  96. data/spec/factories/event/coach_tracking/proceeds.rb +12 -0
  97. data/spec/factories/event/coach_tracking.rb +18 -0
  98. data/spec/factories/event/contacts/contact.rb +17 -0
  99. data/spec/factories/event/contacts/name_pieces.rb +12 -0
  100. data/spec/factories/event/contacts.rb +16 -0
  101. data/spec/factories/event/photos.rb +12 -0
  102. data/spec/factories/event/totals.rb +15 -0
  103. data/spec/factories/event/venue/location.rb +18 -0
  104. data/spec/factories/event/venue/social.rb +16 -0
  105. data/spec/factories/event/venue.rb +16 -0
  106. data/spec/factories/event.rb +66 -0
  107. data/spec/factories/event_application.rb +34 -0
  108. data/spec/factories/event_supporter.rb +19 -0
  109. data/spec/factories/fund.rb +18 -0
  110. data/spec/factories/fundraiser/photos.rb +12 -0
  111. data/spec/factories/fundraiser/policies.rb +11 -0
  112. data/spec/factories/fundraiser/totals.rb +11 -0
  113. data/spec/factories/fundraiser.rb +24 -0
  114. data/spec/factories/fundraising_page.rb +29 -0
  115. data/spec/factories/grant.rb +22 -0
  116. data/spec/factories/grant_institution.rb +17 -0
  117. data/spec/factories/institution.rb +18 -0
  118. data/spec/factories/kid/custom_institution.rb +12 -0
  119. data/spec/factories/kid.rb +58 -0
  120. data/spec/factories/kid_honor.rb +16 -0
  121. data/spec/factories/kid_institution.rb +23 -0
  122. data/spec/factories/lib/faker_patch.rb +27 -0
  123. data/spec/factories/lib/helpers.rb +7 -0
  124. data/spec/factories/location.rb +17 -0
  125. data/spec/factories/memorial/photos.rb +14 -0
  126. data/spec/factories/memorial/totals.rb +11 -0
  127. data/spec/factories/memorial/tribute.rb +19 -0
  128. data/spec/factories/memorial.rb +22 -0
  129. data/spec/factories/message.rb +31 -0
  130. data/spec/factories/milestone.rb +15 -0
  131. data/spec/factories/name_pieces.rb +24 -0
  132. data/spec/factories/newsletter_recipient.rb +13 -0
  133. data/spec/factories/organization/addresses.rb +16 -0
  134. data/spec/factories/organization/email_addresses.rb +14 -0
  135. data/spec/factories/organization/phone_numbers.rb +14 -0
  136. data/spec/factories/organization.rb +34 -0
  137. data/spec/factories/page.rb +5 -0
  138. data/spec/factories/participant/photos.rb +14 -0
  139. data/spec/factories/participant/policies.rb +12 -0
  140. data/spec/factories/participant/rankings/ranking.rb +12 -0
  141. data/spec/factories/participant/rankings.rb +16 -0
  142. data/spec/factories/participant/roles/role.rb +154 -0
  143. data/spec/factories/participant/roles.rb +37 -0
  144. data/spec/factories/participant/totals.rb +11 -0
  145. data/spec/factories/participant.rb +95 -0
  146. data/spec/factories/payment.rb +13 -0
  147. data/spec/factories/permissions.rb +12 -0
  148. data/spec/factories/person/addresses.rb +16 -0
  149. data/spec/factories/person/email_addresses.rb +14 -0
  150. data/spec/factories/person/phone_numbers.rb +14 -0
  151. data/spec/factories/person/policies.rb +13 -0
  152. data/spec/factories/person.rb +22 -0
  153. data/spec/factories/phone.rb +11 -0
  154. data/spec/factories/photo.rb +11 -0
  155. data/spec/factories/photos.rb +9 -0
  156. data/spec/factories/recurring_gift.rb +22 -0
  157. data/spec/factories/researcher.rb +15 -0
  158. data/spec/factories/response.rb +38 -0
  159. data/spec/factories/search_event.rb +19 -0
  160. data/spec/factories/search_fundraiser.rb +15 -0
  161. data/spec/factories/search_kid.rb +13 -0
  162. data/spec/factories/search_participant.rb +15 -0
  163. data/spec/factories/search_team.rb +13 -0
  164. data/spec/factories/shave_schedule/time_selection_permissions.rb +12 -0
  165. data/spec/factories/shave_schedule.rb +33 -0
  166. data/spec/factories/team/photos.rb +12 -0
  167. data/spec/factories/team/rankings/ranking.rb +12 -0
  168. data/spec/factories/team/rankings.rb +15 -0
  169. data/spec/factories/team/totals.rb +14 -0
  170. data/spec/factories/team.rb +43 -0
  171. data/spec/factories/third_party_media.rb +12 -0
  172. data/spec/factories/treatment_status.rb +10 -0
  173. data/spec/factories/user.rb +14 -0
  174. data/spec/factories/venue.rb +15 -0
  175. metadata +275 -81
@@ -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, :direct_to_fund_donations_only
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 = ((country.to_sym == SBF::Client::Country.list[SBF::Client::Country::UNITED_STATES]) ? person.addresses.primary.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 = ((country.to_sym == SBF::Client::Country.list[SBF::Client::Country::UNITED_STATES]) ? person.addresses.primary.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, :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
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.]/, '').to_f
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.]/, '').to_f
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, :amount, :count, :donation_created_at, :donation_collected_at
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
- entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', optional: true
68
- attr_accessor :start_time, :end_time, :activity, :sort_order
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,16 +83,16 @@ 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, :current_year_ytd, :previous_year_ytd, :previous_year_total,
93
- :current_year_shavees_ytd, :previous_year_shavees_ytd, :previous_year_shavees_total, :cumulative_number_of_participants,
94
- :cumulative_number_of_shavees, :cumulative_fundraising, :number_of_active_event_years
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
95
+ attr_reader :cumulative_number_of_participants, :cumulative_number_of_shavees, :cumulative_fundraising, :number_of_active_event_years
95
96
  end
96
97
 
97
98
  class Agreement < SBF::Client::BaseEntity
@@ -111,7 +112,6 @@ module SBF
111
112
  end
112
113
 
113
114
  attr_accessor :agreement_received_date
114
-
115
115
  entity_collection_attr_accessor :questions, 'SBF::Client::Event::Agreement::Question'
116
116
  end
117
117
 
@@ -134,13 +134,13 @@ module SBF
134
134
  HYBRID = 'hybrid'.freeze
135
135
  end
136
136
 
137
- attr_accessor :type, :type_other
137
+ attr_accessor :type
138
+ attr_accessor :type_other
138
139
  end
139
140
 
140
141
  entity_attr_accessor :location, 'SBF::Client::Event::Venue::Location'
141
142
  entity_attr_accessor :phone, 'SBF::Client::Phone'
142
143
  attr_accessor :website_url
143
-
144
144
  entity_attr_accessor :social, 'SBF::Client::Event::Venue::Social'
145
145
  end
146
146
  end
@@ -158,32 +158,43 @@ module SBF
158
158
  extend Forwardable
159
159
  def_delegator :@photos, :avatar, :avatar_photo_url
160
160
 
161
- attr_accessor :id, :year, :status, :event_title, :type, :type_other, :sub_type, :is_private, :date,
162
- :is_date_confirmed, :start_time, :end_time, :is_time_confirmed, :is_open_for_registration,
163
- :is_open_for_fast_registration, :offline_donation_uuid, :offline_donation_form, :fundraising_goal,
164
- :fundraising_message, :modified_by, :how_created, :promotional_code, :fund_relationship_type
165
- attr_reader :display_name, :created_at, :modified_at
166
-
161
+ attr_accessor :id, :year
162
+ attr_accessor :status
163
+ attr_reader :display_name
164
+ attr_accessor :event_title
165
+ attr_accessor :type
166
+ attr_accessor :type_other
167
+ attr_accessor :sub_type
168
+ attr_accessor :is_private
169
+ attr_accessor :date, :is_date_confirmed
170
+ attr_accessor :start_time, :end_time, :is_time_confirmed
171
+ attr_accessor :is_open_for_registration, :is_open_for_fast_registration
172
+ attr_accessor :offline_donation_uuid, :offline_donation_form
173
+ attr_accessor :fundraising_goal, :fundraising_message
167
174
  entity_attr_accessor :geo_location, 'SBF::Client::GeoLocation'
168
- entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, optional: true
169
- entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign', optional: true
170
- entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', optional: true
175
+ entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
176
+ entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign', true
177
+ entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
171
178
  entity_attr_accessor :venue, 'SBF::Client::Event::Venue'
172
179
  entity_attr_accessor :photos, 'SBF::Client::Event::Photos'
173
- entity_attr_accessor :contacts, 'SBF::Client::Event::Contacts', nil, optional: true
180
+ entity_attr_accessor :contacts, 'SBF::Client::Event::Contacts', nil, true
174
181
  entity_attr_accessor :coach_tracking, 'SBF::Client::Event::CoachTracking'
175
- entity_attr_accessor :shave_schedule, 'SBF::Client::ShaveSchedule', nil, optional: true
176
- entity_attr_reader :totals, 'SBF::Client::Event::Totals', nil, optional: true
177
- entity_collection_attr_accessor :coaches, 'SBF::Client::FullPerson', nil, optional: true
178
- entity_collection_attr_accessor :closed_roles, 'SBF::Client::Participant::Roles::Type', nil, optional: true
179
-
180
- entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, optional: true
181
- entity_attr_reader :agreement, 'SBF::Client::Event::Agreement', nil, optional: true
182
- entity_collection_attr_accessor :organizers, 'SBF::Client::FullParticipant', nil, optional: true
183
- entity_collection_attr_accessor :treasurers, 'SBF::Client::FullParticipant', nil, optional: true
184
- entity_collection_attr_accessor :activities, 'SBF::Client::Event::Activity', nil, optional: true
185
- entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, optional: true
186
- entity_collection_attr_accessor :supporters, 'SBF::Client::FullEventSupporter', nil, optional: true
182
+ entity_attr_accessor :shave_schedule, 'SBF::Client::ShaveSchedule', nil, true
183
+ entity_attr_reader :totals, 'SBF::Client::Event::Totals', nil, true
184
+ entity_collection_attr_accessor :coaches, 'SBF::Client::FullPerson', nil, true
185
+ entity_collection_attr_accessor :closed_roles, 'SBF::Client::Participant::Roles::Type', nil, true
186
+ attr_reader :created_at, :modified_at
187
+ attr_accessor :modified_by
188
+ attr_accessor :how_created
189
+ attr_accessor :promotional_code
190
+ entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
191
+ entity_attr_reader :agreement, 'SBF::Client::Event::Agreement', nil, true
192
+ entity_collection_attr_accessor :organizers, 'SBF::Client::FullParticipant', nil, true
193
+ entity_collection_attr_accessor :treasurers, 'SBF::Client::FullParticipant', nil, true
194
+ entity_collection_attr_accessor :activities, 'SBF::Client::Event::Activity', nil, true
195
+ entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
196
+ entity_collection_attr_accessor :supporters, 'SBF::Client::FullEventSupporter', nil, true
197
+ attr_accessor :fund_relationship_type
187
198
 
188
199
  def active?
189
200
  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, :requested_event_title, :status, :is_archived, :no_conversion_reason, :promotional_code, :created_at, :modified_at
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', 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
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, :donations, :direct_amount_raised, :direct_donations
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, optional: true
17
+ entity_attr_reader :event, 'SBF::Client::FullEvent', nil, true
15
18
  end
16
19
  end
17
20
  end
@@ -9,7 +9,9 @@ module SBF
9
9
  blacklist_action :update
10
10
  blacklist_action :delete
11
11
 
12
- attr_accessor :shavees, :non_shavees, :participants
12
+ attr_accessor :shavees
13
+ attr_accessor :non_shavees
14
+ attr_accessor :participants
13
15
  end
14
16
  end
15
17
  end
@@ -15,10 +15,10 @@ module SBF
15
15
  end
16
16
 
17
17
  class FullEventSupporter < EventSupporter
18
- attr_accessor :photo_url, :name, :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, :fundraisers, :participants, :shavees, :non_shavees, :teams, :events, :amount_raised
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, :participants, :shavees, :non_shavees, :teams, :events, :amount_raised
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, :name, :disabled, :description, :kid_name, :offline_donation_uuid, :offline_donation_form
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, optional: true
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), clear_changes: false)
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, :donations
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: false)
96
- data = super(with_keys: 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, :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
111
+ attr_accessor :id
115
112
 
116
- entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, optional: true
117
- entity_attr_reader :rankings, 'SBF::Client::Fundraiser::Rankings', nil, optional: true
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', 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
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', optional: true
127
- entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, optional: true
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, optional: true
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, :description, :photo_url
26
- attr_reader :display_name, :created_at, :modified_at
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, :name, :description
37
- attr_reader :created_at, :modified_at
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, :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
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, :institution_info
23
-
22
+ attr_accessor :name
24
23
  entity_attr_accessor :address, 'SBF::Client::Address'
25
- attr_reader :created_at, :modified_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, :custom_url_segment
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, :text
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, :status, :year, :country, :country_name, :name, :message, :description, :donate_url, :base_photo_url, :created_at
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, :cancer_type, :other
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
@@ -36,7 +38,8 @@ module SBF
36
38
  end
37
39
 
38
40
  class TreatmentStatus < SBF::Client::BaseEntity
39
- attr_accessor :state, :other
41
+ attr_accessor :state
42
+ attr_accessor :other
40
43
 
41
44
  module SurvivorState
42
45
  IN_TREATMENT = 'in_treatment'.freeze
@@ -107,10 +110,11 @@ module SBF
107
110
  attr_accessor :is_editor
108
111
  end
109
112
 
110
- attr_accessor :kid_id, :type, :guardian_type, :is_submitter
111
-
113
+ attr_accessor :kid_id
112
114
  entity_attr_accessor :person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
113
-
115
+ attr_accessor :type
116
+ attr_accessor :guardian_type
117
+ attr_accessor :is_submitter
114
118
  entity_attr_accessor :permissions, 'SBF::Client::Kid::Relationship::Permissions'
115
119
  end
116
120
 
@@ -125,20 +129,33 @@ module SBF
125
129
  extend Forwardable
126
130
  def_delegator :@photos, :avatar, :avatar_photo_url
127
131
 
128
- attr_accessor :id, :status, :gender, :birthday, :ethnicity, :date_of_passing, :display_name, :display_name_override, :name, :ambassador_year,
129
- :date_activated, :date_packet_sent, :web_message, :created_at, :modified_at, :modified_by
130
-
132
+ attr_accessor :id
133
+ attr_accessor :status
134
+ attr_accessor :gender
135
+ attr_accessor :birthday
136
+ attr_accessor :ethnicity
137
+ attr_accessor :date_of_passing
138
+ attr_accessor :display_name
139
+ attr_accessor :display_name_override
140
+ attr_accessor :name
141
+ attr_accessor :ambassador_year
142
+ attr_accessor :date_activated
143
+ attr_accessor :date_packet_sent
131
144
  entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
132
145
  entity_attr_accessor :address, 'SBF::Client::Address'
133
146
  entity_attr_accessor :diagnosis, 'SBF::Client::Diagnosis'
134
147
  entity_attr_accessor :treatment_status, 'SBF::Client::TreatmentStatus'
135
-
148
+ attr_accessor :web_message
136
149
  entity_attr_accessor :photos, 'SBF::Client::Photos'
137
150
  entity_attr_accessor :web_page, 'SBF::Client::WebPage'
138
151
  entity_collection_attr_accessor :relationships, 'SBF::Client::Kid::Relationship'
139
152
  entity_collection_attr_accessor :urls, 'SBF::Client::KidURL'
140
- entity_collection_attr_accessor :custom_institutions, 'SBF::Client::Kid::CustomInstitution', nil, optional: true
141
- entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, optional: true
153
+ entity_collection_attr_accessor :custom_institutions, 'SBF::Client::Kid::CustomInstitution', nil, true
154
+ entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
155
+
156
+ attr_accessor :created_at
157
+ attr_accessor :modified_at
158
+ attr_accessor :modified_by
142
159
 
143
160
  def fundraising_page_url
144
161
  web_page&.url
@@ -16,7 +16,6 @@ module SBF
16
16
  blacklist_action :update
17
17
 
18
18
  attr_accessor :honored_on
19
-
20
19
  entity_attr_accessor :kid, 'SBF::Client::KidHonor::FullKid', 'SBF::Client::KidHonor::PartialKid'
21
20
  multitype_attr_accessor(
22
21
  :honorer,