stbaldricks 12.3.1 → 12.4.0.alpha.1
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/message.rb +18 -0
- data/lib/stbaldricks/entities/message.rb +1 -0
- data/lib/stbaldricks/enums/contact_us_subjects.rb +35 -0
- data/lib/stbaldricks/version.rb +1 -1
- metadata +84 -85
- data/lib/stbaldricks/endpoints/promo.rb +0 -31
- data/lib/stbaldricks/entities/promo.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0399d45f772ba00c4c57be1425f323a8709f538aa71aa833a8e55b9f491ec6e
|
4
|
+
data.tar.gz: 57ee2d0d2d7e70ececb26dd446f9e43d1015babd3c83d89c3d9b3cb697756b4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ddc0e18e2b0e124d2fcb59e8a70d0c3077c22ba6ca046ac9db530374cde2d2b9e2d07a7925eab02867444678fe468ffbb668a7689f991c3311586e38d564749
|
7
|
+
data.tar.gz: 314c643eec66e8a73b3c1e169245f10019ec66dd5bcbaccad8dfa3eab9fbdc06c8860bc0f5bd969c66a691c1d1c3babeca1f0fd000aba3703d591bea1c85d948
|
@@ -22,6 +22,24 @@ module SBF
|
|
22
22
|
|
23
23
|
SBF::Client::Api::Response.new(http_code: response.code, data: response, error: error)
|
24
24
|
end
|
25
|
+
|
26
|
+
# rubocop:disable Metrics/ParameterLists
|
27
|
+
def send_contact_us_message(name, sender_email, phone, subject, body, sender_profile_id)
|
28
|
+
response = SBF::Client::Api::Request.post_request(
|
29
|
+
"#{base_uri}/send_contact_us_message",
|
30
|
+
name: name,
|
31
|
+
sender_email: sender_email,
|
32
|
+
phone: phone,
|
33
|
+
subject: subject,
|
34
|
+
body: body,
|
35
|
+
sender_profile_id: sender_profile_id
|
36
|
+
)
|
37
|
+
|
38
|
+
error = SBF::Client::ErrorEntity.new(response) unless ok?(response)
|
39
|
+
|
40
|
+
SBF::Client::Api::Response.new(http_code: response.code, data: response, error: error)
|
41
|
+
end
|
42
|
+
# rubocop:enable Metrics/ParameterLists
|
25
43
|
end
|
26
44
|
end
|
27
45
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SBF
|
4
|
+
module Client
|
5
|
+
module ContactUsSubjects
|
6
|
+
MY_DONATION = 'MY_DONATION'
|
7
|
+
MY_REGISTRATION = 'MY_REGISTRATION'
|
8
|
+
THE_WEBSITE = 'THE_WEBSITE'
|
9
|
+
ORGANIZING_AN_EVENT = 'ORGANIZING_AN_EVENT'
|
10
|
+
AN_HONORED_CHILD = 'AN_HONORED_CHILD'
|
11
|
+
A_MEDIA_INQUIRY = 'A_MEDIA_INQUIRY'
|
12
|
+
GENERAL_INFORMATION = 'GENERAL_INFORMATION'
|
13
|
+
GRANTS = 'GRANTS'
|
14
|
+
PARTNERSHIPS = 'PARTNERSHIPS'
|
15
|
+
MISSING_DATA = 'MISSING_DATA'
|
16
|
+
|
17
|
+
@list = {
|
18
|
+
MY_DONATION => 'My Donation',
|
19
|
+
MY_REGISTRATION => 'My Registration',
|
20
|
+
THE_WEBSITE => 'The Website',
|
21
|
+
ORGANIZING_AN_EVENT => 'Organizing an event',
|
22
|
+
AN_HONORED_CHILD => 'An Honored Child',
|
23
|
+
A_MEDIA_INQUIRY => 'A Media Inquiry',
|
24
|
+
GENERAL_INFORMATION => 'General Information',
|
25
|
+
GRANTS => 'Grants',
|
26
|
+
PARTNERSHIPS => 'Partnerships',
|
27
|
+
MISSING_DATA => 'Missing Data'
|
28
|
+
}.freeze
|
29
|
+
|
30
|
+
class << self
|
31
|
+
attr_reader :list
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/stbaldricks/version.rb
CHANGED
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.4.0.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -323,7 +323,6 @@ files:
|
|
323
323
|
- lib/stbaldricks/endpoints/newsletter_recipient.rb
|
324
324
|
- lib/stbaldricks/endpoints/participant.rb
|
325
325
|
- lib/stbaldricks/endpoints/photo.rb
|
326
|
-
- lib/stbaldricks/endpoints/promo.rb
|
327
326
|
- lib/stbaldricks/endpoints/recurring_gift.rb
|
328
327
|
- lib/stbaldricks/endpoints/search.rb
|
329
328
|
- lib/stbaldricks/endpoints/shave_schedule.rb
|
@@ -416,7 +415,6 @@ files:
|
|
416
415
|
- lib/stbaldricks/entities/person.rb
|
417
416
|
- lib/stbaldricks/entities/person_donation_by_year_summary.rb
|
418
417
|
- lib/stbaldricks/entities/photo.rb
|
419
|
-
- lib/stbaldricks/entities/promo.rb
|
420
418
|
- lib/stbaldricks/entities/recurring_gift.rb
|
421
419
|
- lib/stbaldricks/entities/response.rb
|
422
420
|
- lib/stbaldricks/entities/search.rb
|
@@ -426,6 +424,7 @@ files:
|
|
426
424
|
- lib/stbaldricks/entities/team.rb
|
427
425
|
- lib/stbaldricks/entities/user.rb
|
428
426
|
- lib/stbaldricks/enums/cancer_types.rb
|
427
|
+
- lib/stbaldricks/enums/contact_us_subjects.rb
|
429
428
|
- lib/stbaldricks/enums/country.rb
|
430
429
|
- lib/stbaldricks/enums/feature.rb
|
431
430
|
- lib/stbaldricks/enums/league_status.rb
|
@@ -559,9 +558,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
559
558
|
version: '0'
|
560
559
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
561
560
|
requirements:
|
562
|
-
- - "
|
561
|
+
- - ">"
|
563
562
|
- !ruby/object:Gem::Version
|
564
|
-
version:
|
563
|
+
version: 1.3.1
|
565
564
|
requirements: []
|
566
565
|
rubygems_version: 3.0.3.1
|
567
566
|
signing_key:
|
@@ -569,99 +568,99 @@ specification_version: 4
|
|
569
568
|
summary: St. Baldrick's Foundation Ruby Client Library
|
570
569
|
test_files:
|
571
570
|
- lib/stbaldricks_factories.rb
|
572
|
-
- spec/factories/
|
573
|
-
- spec/factories/organization/email_addresses.rb
|
574
|
-
- spec/factories/organization/phone_numbers.rb
|
575
|
-
- spec/factories/payment.rb
|
576
|
-
- spec/factories/fundraising_page.rb
|
577
|
-
- spec/factories/donation/participant.rb
|
578
|
-
- spec/factories/challenge.rb
|
579
|
-
- spec/factories/kid_institution.rb
|
580
|
-
- spec/factories/memorial/totals.rb
|
581
|
-
- spec/factories/memorial/photos.rb
|
582
|
-
- spec/factories/memorial/tribute.rb
|
583
|
-
- spec/factories/search_kid.rb
|
584
|
-
- spec/factories/contact.rb
|
585
|
-
- spec/factories/researcher.rb
|
586
|
-
- spec/factories/photos.rb
|
587
|
-
- spec/factories/challenger.rb
|
588
|
-
- spec/factories/name_pieces.rb
|
589
|
-
- spec/factories/milestone.rb
|
590
|
-
- spec/factories/person/policies.rb
|
591
|
-
- spec/factories/person/addresses.rb
|
592
|
-
- spec/factories/person/email_addresses.rb
|
593
|
-
- spec/factories/person/phone_numbers.rb
|
594
|
-
- spec/factories/participant/policies.rb
|
595
|
-
- spec/factories/participant/totals.rb
|
571
|
+
- spec/factories/participant/rankings.rb
|
596
572
|
- spec/factories/participant/photos.rb
|
597
573
|
- spec/factories/participant/roles/role.rb
|
598
|
-
- spec/factories/participant/
|
599
|
-
- spec/factories/participant/
|
574
|
+
- spec/factories/participant/policies.rb
|
575
|
+
- spec/factories/participant/totals.rb
|
600
576
|
- spec/factories/participant/roles.rb
|
601
|
-
- spec/factories/
|
602
|
-
- spec/factories/
|
603
|
-
- spec/factories/
|
604
|
-
- spec/factories/
|
605
|
-
- spec/factories/
|
606
|
-
- spec/factories/
|
607
|
-
- spec/factories/
|
577
|
+
- spec/factories/participant/rankings/ranking.rb
|
578
|
+
- spec/factories/search_fundraiser.rb
|
579
|
+
- spec/factories/newsletter_recipient.rb
|
580
|
+
- spec/factories/phone.rb
|
581
|
+
- spec/factories/contact_group.rb
|
582
|
+
- spec/factories/fundraiser/photos.rb
|
583
|
+
- spec/factories/fundraiser/policies.rb
|
584
|
+
- spec/factories/fundraiser/totals.rb
|
585
|
+
- spec/factories/team.rb
|
586
|
+
- spec/factories/venue.rb
|
587
|
+
- spec/factories/recurring_gift.rb
|
588
|
+
- spec/factories/donation/participant.rb
|
589
|
+
- spec/factories/error.rb
|
590
|
+
- spec/factories/grant_institution.rb
|
591
|
+
- spec/factories/page.rb
|
608
592
|
- spec/factories/grant.rb
|
609
|
-
- spec/factories/
|
610
|
-
- spec/factories/email_address.rb
|
611
|
-
- spec/factories/disease.rb
|
612
|
-
- spec/factories/participant.rb
|
613
|
-
- spec/factories/kid.rb
|
593
|
+
- spec/factories/search_team.rb
|
614
594
|
- spec/factories/search_participant.rb
|
615
|
-
- spec/factories/
|
616
|
-
- spec/factories/
|
595
|
+
- spec/factories/name_pieces.rb
|
596
|
+
- spec/factories/researcher.rb
|
597
|
+
- spec/factories/photos.rb
|
598
|
+
- spec/factories/donor.rb
|
599
|
+
- spec/factories/diagnosis.rb
|
600
|
+
- spec/factories/kid_institution.rb
|
617
601
|
- spec/factories/message.rb
|
618
|
-
- spec/factories/response.rb
|
619
602
|
- spec/factories/search_event.rb
|
603
|
+
- spec/factories/photo.rb
|
604
|
+
- spec/factories/event.rb
|
605
|
+
- spec/factories/organization.rb
|
606
|
+
- spec/factories/campaign.rb
|
607
|
+
- spec/factories/kid/custom_institution.rb
|
608
|
+
- spec/factories/fundraising_page.rb
|
609
|
+
- spec/factories/contact.rb
|
620
610
|
- spec/factories/event_application.rb
|
611
|
+
- spec/factories/location.rb
|
612
|
+
- spec/factories/response.rb
|
613
|
+
- spec/factories/kid.rb
|
614
|
+
- spec/factories/challenger.rb
|
615
|
+
- spec/factories/treatment_status.rb
|
616
|
+
- spec/factories/institution.rb
|
617
|
+
- spec/factories/lib/helpers.rb
|
618
|
+
- spec/factories/lib/faker_patch.rb
|
619
|
+
- spec/factories/shave_schedule.rb
|
620
|
+
- spec/factories/address.rb
|
621
|
+
- spec/factories/shave_schedule/time_selection_permissions.rb
|
622
|
+
- spec/factories/person/phone_numbers.rb
|
623
|
+
- spec/factories/person/policies.rb
|
624
|
+
- spec/factories/person/addresses.rb
|
625
|
+
- spec/factories/person/email_addresses.rb
|
626
|
+
- spec/factories/collection.rb
|
621
627
|
- spec/factories/fundraiser.rb
|
622
|
-
- spec/factories/
|
623
|
-
- spec/factories/
|
624
|
-
- spec/factories/
|
625
|
-
- spec/factories/
|
628
|
+
- spec/factories/email_address.rb
|
629
|
+
- spec/factories/third_party_media.rb
|
630
|
+
- spec/factories/donation.rb
|
631
|
+
- spec/factories/person.rb
|
632
|
+
- spec/factories/team/rankings.rb
|
626
633
|
- spec/factories/team/photos.rb
|
634
|
+
- spec/factories/team/totals.rb
|
627
635
|
- spec/factories/team/rankings/ranking.rb
|
628
|
-
- spec/factories/
|
629
|
-
- spec/factories/
|
630
|
-
- spec/factories/
|
631
|
-
- spec/factories/
|
636
|
+
- spec/factories/kid_honor.rb
|
637
|
+
- spec/factories/disease.rb
|
638
|
+
- spec/factories/payment.rb
|
639
|
+
- spec/factories/search_kid.rb
|
640
|
+
- spec/factories/user.rb
|
632
641
|
- spec/factories/campaign/totals.rb
|
633
|
-
- spec/factories/
|
634
|
-
- spec/factories/
|
635
|
-
- spec/factories/
|
636
|
-
- spec/factories/
|
637
|
-
- spec/factories/
|
638
|
-
- spec/factories/
|
639
|
-
- spec/factories/
|
640
|
-
- spec/factories/
|
641
|
-
- spec/factories/
|
642
|
-
- spec/factories/fundraiser/totals.rb
|
643
|
-
- spec/factories/fundraiser/photos.rb
|
644
|
-
- spec/factories/venue.rb
|
645
|
-
- spec/factories/search_fundraiser.rb
|
646
|
-
- spec/factories/institution.rb
|
647
|
-
- spec/factories/grant_institution.rb
|
648
|
-
- spec/factories/address.rb
|
649
|
-
- spec/factories/phone.rb
|
650
|
-
- spec/factories/event/totals.rb
|
651
|
-
- spec/factories/event/photos.rb
|
652
|
-
- spec/factories/event/contacts/contact.rb
|
653
|
-
- spec/factories/event/contacts/name_pieces.rb
|
654
|
-
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
642
|
+
- spec/factories/organization/phone_numbers.rb
|
643
|
+
- spec/factories/organization/addresses.rb
|
644
|
+
- spec/factories/organization/email_addresses.rb
|
645
|
+
- spec/factories/fund.rb
|
646
|
+
- spec/factories/milestone.rb
|
647
|
+
- spec/factories/memorial.rb
|
648
|
+
- spec/factories/challenge.rb
|
649
|
+
- spec/factories/event/contacts.rb
|
650
|
+
- spec/factories/event/venue.rb
|
655
651
|
- spec/factories/event/coach_tracking/proceeds.rb
|
656
652
|
- spec/factories/event/coach_tracking/plaque.rb
|
653
|
+
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
654
|
+
- spec/factories/event/photos.rb
|
657
655
|
- spec/factories/event/coach_tracking.rb
|
656
|
+
- spec/factories/event/contacts/name_pieces.rb
|
657
|
+
- spec/factories/event/contacts/contact.rb
|
658
658
|
- spec/factories/event/venue/location.rb
|
659
659
|
- spec/factories/event/venue/social.rb
|
660
|
-
- spec/factories/event/
|
661
|
-
- spec/factories/
|
662
|
-
- spec/factories/
|
663
|
-
- spec/factories/
|
664
|
-
- spec/factories/
|
665
|
-
- spec/factories/
|
666
|
-
- spec/factories/
|
667
|
-
- spec/factories/kid_honor.rb
|
660
|
+
- spec/factories/event/totals.rb
|
661
|
+
- spec/factories/participant.rb
|
662
|
+
- spec/factories/event_supporter.rb
|
663
|
+
- spec/factories/memorial/photos.rb
|
664
|
+
- spec/factories/memorial/totals.rb
|
665
|
+
- spec/factories/memorial/tribute.rb
|
666
|
+
- spec/factories/permissions.rb
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'stbaldricks/endpoints/lib/entity'
|
2
|
-
|
3
|
-
module SBF
|
4
|
-
module Client
|
5
|
-
class PromoEndpoint < SBF::Client::EntityEndpoint
|
6
|
-
def render_template(body, donation_id)
|
7
|
-
response = SBF::Client::Api::Request.post_request("#{base_uri}/render_email", body: body, donation_id: donation_id)
|
8
|
-
|
9
|
-
if ok?(response)
|
10
|
-
data = response.body
|
11
|
-
else
|
12
|
-
error = SBF::Client::ErrorEntity.new(JSON.parse(response.body).symbolize!)
|
13
|
-
end
|
14
|
-
|
15
|
-
SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
|
16
|
-
end
|
17
|
-
|
18
|
-
def send_promo_email(recipient, body, donation_id)
|
19
|
-
response = SBF::Client::Api::Request.post_request("#{base_uri}/send_promo_email", recipient: recipient, body: body, donation_id: donation_id)
|
20
|
-
|
21
|
-
if ok?(response)
|
22
|
-
data = response.body
|
23
|
-
else
|
24
|
-
error = SBF::Client::ErrorEntity.new(JSON.parse(response.body).symbolize!)
|
25
|
-
end
|
26
|
-
|
27
|
-
SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|