stbaldricks 12.1.0.alpha.1 → 12.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stbaldricks/endpoints/participant.rb +0 -8
- data/lib/stbaldricks/entities/donation/promo_code.rb +3 -3
- data/lib/stbaldricks/entities/participant.rb +0 -1
- data/lib/stbaldricks/entities/person_donation_by_year_summary.rb +19 -0
- data/lib/stbaldricks/version.rb +1 -1
- data/spec/factories/event.rb +25 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1589618ca40e9b3f0188dcc567a12fa34eb044251d5527aed7bbd88332e6d162
|
4
|
+
data.tar.gz: a975d7550a1a313d9929de379e5b41ab06e4c440874d01dee9ae40a11b20dad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3297499769c5fc74d114b0b72e1c28fac2e1c6dd545975aa027187419c9ed252ec9af766711603c8d0a73ed2b0b4b241788d538af17033610edf62f6300c8526
|
7
|
+
data.tar.gz: 72e227b4f317171ac6cd680286339a06bab1a5ad0c4b0072e01b8f1344dbbdc9438d968f3074e1856b0c8a29e1821c66172b7391c91b9d8a0282e41bcba662ea
|
@@ -46,14 +46,6 @@ module SBF
|
|
46
46
|
SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
|
47
47
|
end
|
48
48
|
|
49
|
-
def delete_role(participant_id, role)
|
50
|
-
response = SBF::Client::Api::Request.post_request("#{base_uri}/delete_role", participant_id: participant_id, role: role)
|
51
|
-
|
52
|
-
error = SBF::Client::ErrorEntity.new(JSON.parse(response.body).symbolize!) unless ok?(response)
|
53
|
-
|
54
|
-
SBF::Client::Api::Response.new(http_code: response.code, data: nil, error: error)
|
55
|
-
end
|
56
|
-
|
57
49
|
def move_to_different_event(participant_id, new_event_id)
|
58
50
|
response = SBF::Client::Api::Request.post_request("#{base_uri}/move_to_different_event",
|
59
51
|
id: participant_id, new_event_id: new_event_id)
|
@@ -49,8 +49,8 @@ module SBF
|
|
49
49
|
APPEAL = 'appeal'
|
50
50
|
INSTAGRAM = 'instagram'
|
51
51
|
EMPLOYEE_GIVING = 'employee_giving'
|
52
|
-
|
53
|
-
|
52
|
+
SITE_TAKEOVER = 'site_takeover'
|
53
|
+
GENERAL_CORPORATE = 'general_corporate'
|
54
54
|
BLANK12 = 'blank12'
|
55
55
|
BLANK13 = 'blank13'
|
56
56
|
BLANK14 = 'blank14'
|
@@ -68,7 +68,7 @@ module SBF
|
|
68
68
|
GIVING_TUESDAY, SURVIVOR, SPONSORSHIP, LAPSED_LOW, LAPSED_MID, RMMEVENTS, YEAR_END_DG, LAPSED_DG, FB_FUNDRAISER,
|
69
69
|
MOBILE_CAUSE, INTERNATIONAL, ACS, HEAD_SHAVING, SPORT_CLIPS, TWENTIETH_ANNIVERSARY, DWYW, GRANTS, SUMMER,
|
70
70
|
ADVOCACY, MISSION, RECURRING_GIVING, ACSEVENTS, HS_TO_DONOR, WIRELESS_VISION, BMC, DUTCH_BROS, FADO, SAP, BRIGADE,
|
71
|
-
SCHICK, BATTLE, CCQR, QREVENTPRINTOUT, PDASHQR, APPEAL, INSTAGRAM, EMPLOYEE_GIVING,
|
71
|
+
SCHICK, BATTLE, CCQR, QREVENTPRINTOUT, PDASHQR, APPEAL, INSTAGRAM, EMPLOYEE_GIVING, SITE_TAKEOVER, GENERAL_CORPORATE, BLANK12, BLANK13,
|
72
72
|
BLANK14, BLANK15, BLANK16, BLANK17, BLANK18, BLANK19, BLANK20, BLANK21]
|
73
73
|
end
|
74
74
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'stbaldricks/entities/lib/top_level'
|
2
|
+
|
3
|
+
module SBF
|
4
|
+
module Client
|
5
|
+
class PersonDonationByYearSummary < SBF::Client::TopLevelEntity
|
6
|
+
actions DEFAULT_CRUD_ACTIONS
|
7
|
+
blacklist_action :get
|
8
|
+
blacklist_action :create
|
9
|
+
blacklist_action :update
|
10
|
+
blacklist_action :delete
|
11
|
+
|
12
|
+
attr_accessor :donations
|
13
|
+
attr_accessor :cumulative_total
|
14
|
+
attr_reader :modified_at
|
15
|
+
|
16
|
+
entity_attr_accessor :person, 'SBF::Client::FullPerson', 'SBF::Client::PartialPerson'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/stbaldricks/version.rb
CHANGED
data/spec/factories/event.rb
CHANGED
@@ -38,4 +38,29 @@ FactoryBot.define do
|
|
38
38
|
activity { random }
|
39
39
|
sort_order { 1 }
|
40
40
|
end
|
41
|
+
factory :past_event, class: SBF::Client::FullEvent do
|
42
|
+
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.create }
|
43
|
+
|
44
|
+
initialize_with do
|
45
|
+
new(attributes)
|
46
|
+
end
|
47
|
+
|
48
|
+
id { rand(1000) }
|
49
|
+
event_title { "#{Faker::Team.name} #{random}" }
|
50
|
+
year { Time.now.year - 5 }
|
51
|
+
date { Time.now.to_s }
|
52
|
+
fund_relationship_type { 'no_association' }
|
53
|
+
status { 'active' }
|
54
|
+
type { 'head_shaving' }
|
55
|
+
sub_type { 'community' }
|
56
|
+
how_created { 'admin_control_panel' }
|
57
|
+
fundraising_goal { rand(20) * 5000 }
|
58
|
+
is_private { false }
|
59
|
+
|
60
|
+
after :build do |event, evaluator|
|
61
|
+
event.venue = build(:event_venue) if unpopulated?(evaluator, :venue)
|
62
|
+
event.contacts = build(:event_contacts) if unpopulated?(evaluator, :contacts)
|
63
|
+
event.organizers = [build(:lead_organizer, person: build(:person))] if unpopulated?(evaluator, :organizers)
|
64
|
+
end
|
65
|
+
end
|
41
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stbaldricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -411,6 +411,7 @@ files:
|
|
411
411
|
- lib/stbaldricks/entities/page.rb
|
412
412
|
- lib/stbaldricks/entities/participant.rb
|
413
413
|
- lib/stbaldricks/entities/person.rb
|
414
|
+
- lib/stbaldricks/entities/person_donation_by_year_summary.rb
|
414
415
|
- lib/stbaldricks/entities/photo.rb
|
415
416
|
- lib/stbaldricks/entities/recurring_gift.rb
|
416
417
|
- lib/stbaldricks/entities/response.rb
|
@@ -554,9 +555,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
554
555
|
version: '0'
|
555
556
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
556
557
|
requirements:
|
557
|
-
- - "
|
558
|
+
- - ">="
|
558
559
|
- !ruby/object:Gem::Version
|
559
|
-
version:
|
560
|
+
version: '0'
|
560
561
|
requirements: []
|
561
562
|
rubygems_version: 3.0.3.1
|
562
563
|
signing_key:
|