stbaldricks 12.2.2.alpha.1 → 12.3.1.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6b06880d87b41ca451e513e1bac494a43a15105a05d52886c9366c82a01e11e
4
- data.tar.gz: 05bef7f96bea609148ca0fc3bbc0fd7cca1de61a238c060a1f2bdac7a42491d7
3
+ metadata.gz: 4bcf64a14b2d045c9189ab0a9731f2d95d9808b0cb879bf0db4d1130ba5fa404
4
+ data.tar.gz: b80570cb25f9e5abe79566c165941e89d4376b4498f1d861ae36f93feea6d80b
5
5
  SHA512:
6
- metadata.gz: f3bd0496ffe9f98050bd49a8ac7c03fbbc5d139d472894359cdb6d499a9d182099525f69d899b0e6e63afdb959629075e24a2ead98b2a9d37be80ec47c9255ff
7
- data.tar.gz: d5226ae54647c5006877663560dbdd2834e0a0cbb1f6324580635d53063e0f917a07a988bb1e5dc529bc842dd949c061b292a5ca152460b0d6f018f6c8e57596
6
+ metadata.gz: 8b7a415ead27a2159a70f9b81bbe834d73198a821ccb04bea55682e2619686bd338ceb54b2885ce8a27298b9a47f393cc4138ac083e825975d0c349914c197a9
7
+ data.tar.gz: 3e6c9c92d6460ccf74d3a47adc43201c0b4a280574fad34a073b91c637ee8d390c3c457d8fdf62403465d35060df697465cda5651c1632df5376b74e73b67b6d
@@ -0,0 +1,31 @@
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
@@ -0,0 +1,11 @@
1
+ require 'stbaldricks/endpoints/promo'
2
+
3
+ module SBF
4
+ module Client
5
+ class Promo < SBF::Client::TopLevelEntity
6
+ endpoint SBF::Client::PromoEndpoint
7
+ action :render_template
8
+ action :send_promo_email
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '12.2.2.alpha.1'.freeze
3
+ VERSION = '12.3.1.alpha.1'.freeze
4
4
  end
5
5
  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.2.2.alpha.1
4
+ version: 12.3.1.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-01-28 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -323,6 +323,7 @@ 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
326
327
  - lib/stbaldricks/endpoints/recurring_gift.rb
327
328
  - lib/stbaldricks/endpoints/search.rb
328
329
  - lib/stbaldricks/endpoints/shave_schedule.rb
@@ -415,6 +416,7 @@ files:
415
416
  - lib/stbaldricks/entities/person.rb
416
417
  - lib/stbaldricks/entities/person_donation_by_year_summary.rb
417
418
  - lib/stbaldricks/entities/photo.rb
419
+ - lib/stbaldricks/entities/promo.rb
418
420
  - lib/stbaldricks/entities/recurring_gift.rb
419
421
  - lib/stbaldricks/entities/response.rb
420
422
  - lib/stbaldricks/entities/search.rb
@@ -567,99 +569,99 @@ specification_version: 4
567
569
  summary: St. Baldrick's Foundation Ruby Client Library
568
570
  test_files:
569
571
  - lib/stbaldricks_factories.rb
570
- - spec/factories/participant/rankings.rb
571
- - spec/factories/participant/photos.rb
572
- - spec/factories/participant/roles/role.rb
573
- - spec/factories/participant/policies.rb
574
- - spec/factories/participant/totals.rb
575
- - spec/factories/participant/roles.rb
576
- - spec/factories/participant/rankings/ranking.rb
577
- - spec/factories/search_fundraiser.rb
578
- - spec/factories/newsletter_recipient.rb
579
- - spec/factories/phone.rb
580
- - spec/factories/contact_group.rb
581
- - spec/factories/fundraiser/photos.rb
582
- - spec/factories/fundraiser/policies.rb
583
- - spec/factories/fundraiser/totals.rb
584
- - spec/factories/team.rb
585
- - spec/factories/venue.rb
586
- - spec/factories/recurring_gift.rb
572
+ - spec/factories/organization/addresses.rb
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
587
577
  - spec/factories/donation/participant.rb
588
- - spec/factories/error.rb
589
- - spec/factories/grant_institution.rb
590
- - spec/factories/page.rb
591
- - spec/factories/grant.rb
592
- - spec/factories/search_team.rb
593
- - spec/factories/search_participant.rb
594
- - spec/factories/name_pieces.rb
595
- - spec/factories/researcher.rb
596
- - spec/factories/photos.rb
597
- - spec/factories/donor.rb
598
- - spec/factories/diagnosis.rb
578
+ - spec/factories/challenge.rb
599
579
  - spec/factories/kid_institution.rb
600
- - spec/factories/message.rb
601
- - spec/factories/search_event.rb
602
- - spec/factories/photo.rb
603
- - spec/factories/event.rb
604
- - spec/factories/organization.rb
605
- - spec/factories/campaign.rb
606
- - spec/factories/kid/custom_institution.rb
607
- - spec/factories/fundraising_page.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
608
584
  - spec/factories/contact.rb
609
- - spec/factories/event_application.rb
610
- - spec/factories/location.rb
611
- - spec/factories/response.rb
612
- - spec/factories/kid.rb
585
+ - spec/factories/researcher.rb
586
+ - spec/factories/photos.rb
613
587
  - spec/factories/challenger.rb
614
- - spec/factories/treatment_status.rb
615
- - spec/factories/institution.rb
616
- - spec/factories/lib/helpers.rb
617
- - spec/factories/lib/faker_patch.rb
618
- - spec/factories/shave_schedule.rb
619
- - spec/factories/address.rb
620
- - spec/factories/shave_schedule/time_selection_permissions.rb
621
- - spec/factories/person/phone_numbers.rb
588
+ - spec/factories/name_pieces.rb
589
+ - spec/factories/milestone.rb
622
590
  - spec/factories/person/policies.rb
623
591
  - spec/factories/person/addresses.rb
624
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
596
+ - spec/factories/participant/photos.rb
597
+ - spec/factories/participant/roles/role.rb
598
+ - spec/factories/participant/rankings/ranking.rb
599
+ - spec/factories/participant/rankings.rb
600
+ - spec/factories/participant/roles.rb
601
+ - spec/factories/donation.rb
602
+ - spec/factories/third_party_media.rb
603
+ - spec/factories/search_team.rb
604
+ - spec/factories/permissions.rb
605
+ - spec/factories/photo.rb
625
606
  - spec/factories/collection.rb
626
- - spec/factories/fundraiser.rb
607
+ - spec/factories/campaign.rb
608
+ - spec/factories/grant.rb
609
+ - spec/factories/location.rb
627
610
  - spec/factories/email_address.rb
628
- - spec/factories/third_party_media.rb
629
- - spec/factories/donation.rb
630
- - spec/factories/person.rb
631
- - spec/factories/team/rankings.rb
632
- - spec/factories/team/photos.rb
611
+ - spec/factories/disease.rb
612
+ - spec/factories/participant.rb
613
+ - spec/factories/kid.rb
614
+ - spec/factories/search_participant.rb
615
+ - spec/factories/event_supporter.rb
616
+ - spec/factories/page.rb
617
+ - spec/factories/message.rb
618
+ - spec/factories/response.rb
619
+ - spec/factories/search_event.rb
620
+ - spec/factories/event_application.rb
621
+ - spec/factories/fundraiser.rb
622
+ - spec/factories/team.rb
623
+ - spec/factories/memorial.rb
624
+ - spec/factories/diagnosis.rb
633
625
  - spec/factories/team/totals.rb
626
+ - spec/factories/team/photos.rb
634
627
  - spec/factories/team/rankings/ranking.rb
635
- - spec/factories/kid_honor.rb
636
- - spec/factories/disease.rb
637
- - spec/factories/payment.rb
638
- - spec/factories/search_kid.rb
639
- - spec/factories/user.rb
628
+ - spec/factories/team/rankings.rb
629
+ - spec/factories/newsletter_recipient.rb
630
+ - spec/factories/shave_schedule.rb
631
+ - spec/factories/organization.rb
640
632
  - spec/factories/campaign/totals.rb
641
- - spec/factories/organization/phone_numbers.rb
642
- - spec/factories/organization/addresses.rb
643
- - spec/factories/organization/email_addresses.rb
644
- - spec/factories/fund.rb
645
- - spec/factories/milestone.rb
646
- - spec/factories/memorial.rb
647
- - spec/factories/challenge.rb
648
- - spec/factories/event/contacts.rb
649
- - spec/factories/event/venue.rb
633
+ - spec/factories/lib/helpers.rb
634
+ - spec/factories/lib/faker_patch.rb
635
+ - spec/factories/error.rb
636
+ - spec/factories/donor.rb
637
+ - spec/factories/contact_group.rb
638
+ - spec/factories/recurring_gift.rb
639
+ - spec/factories/person.rb
640
+ - spec/factories/treatment_status.rb
641
+ - spec/factories/fundraiser/policies.rb
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
650
655
  - spec/factories/event/coach_tracking/proceeds.rb
651
656
  - spec/factories/event/coach_tracking/plaque.rb
652
- - spec/factories/event/coach_tracking/coaching_interactions.rb
653
- - spec/factories/event/photos.rb
654
657
  - spec/factories/event/coach_tracking.rb
655
- - spec/factories/event/contacts/name_pieces.rb
656
- - spec/factories/event/contacts/contact.rb
657
658
  - spec/factories/event/venue/location.rb
658
659
  - spec/factories/event/venue/social.rb
659
- - spec/factories/event/totals.rb
660
- - spec/factories/participant.rb
661
- - spec/factories/event_supporter.rb
662
- - spec/factories/memorial/photos.rb
663
- - spec/factories/memorial/totals.rb
664
- - spec/factories/memorial/tribute.rb
665
- - spec/factories/permissions.rb
660
+ - spec/factories/event/contacts.rb
661
+ - spec/factories/event/venue.rb
662
+ - spec/factories/fund.rb
663
+ - spec/factories/event.rb
664
+ - spec/factories/kid/custom_institution.rb
665
+ - spec/factories/shave_schedule/time_selection_permissions.rb
666
+ - spec/factories/user.rb
667
+ - spec/factories/kid_honor.rb