stbaldricks 1.6.0.pre1 → 2.0.0

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
  SHA1:
3
- metadata.gz: 257c29a1139f9a1486d403e70b1d647cabef9eb9
4
- data.tar.gz: 3e1e225cf8d0eb220367b5d01d756268bfc94ced
3
+ metadata.gz: 0c9f977d559eb6673088a334c867ff50c451448f
4
+ data.tar.gz: a0071771ddc843096931b23b1983464539515758
5
5
  SHA512:
6
- metadata.gz: 91880d76132a917995c759b87774c173e896c8ffc1ed20907267f9e5bc8b6c50a072debc8f4b8706de4cbd11b12040c8e685eca847180b5cabfb89d1c523eeb9
7
- data.tar.gz: 70f03b38d07eea3309f2e195073cc8413045236fb0a07748fd50da7fae2ad6ac9a9fc823593603ddfccc820444c511e47a008b121564184df28760bb742c38f8
6
+ metadata.gz: bbe4d25fd2375c6f7771e5cb58a2a00af36322693b786ee5603beff5c8623bf1aa25748511a841fc40f924f94e3c09b9a2fe0d6fd52d1f582f20ba509a7b582a
7
+ data.tar.gz: 0d8062c561e8559e343ed3197e3cf2ab22cddaf2fb380b2fb7f5afd5e7bfd6faded3923556401cead150dfbf5eb155616aa501eca752405ccbcd7ff699c7e8b8
@@ -0,0 +1,12 @@
1
+ require 'stbaldricks/api'
2
+ require 'stbaldricks/endpoints/lib/entity'
3
+
4
+ module SBF
5
+ module Client
6
+ class MatchingGiftCompanyEndpoint < SBF::Client::EntityEndpoint
7
+ def base_uri
8
+ "/#{SBF::Client::Api::VERSION}/matching_gift_company"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,28 @@
1
+ require 'stbaldricks/entities/lib/base'
2
+ require 'stbaldricks/entities/lib/top_level'
3
+ require 'stbaldricks/entities/challenger'
4
+ require 'stbaldricks/entities/lib/default_cacheable'
5
+
6
+ module SBF
7
+ module Client
8
+ class Challenge < SBF::Client::TopLevelEntity
9
+ include Entities::DefaultCacheable
10
+ actions DEFAULT_CRUD_ACTIONS
11
+
12
+ module Status
13
+ PENDING = 'pending'
14
+ ACCEPTED = 'accepted'
15
+ CANCELLED = 'cancelled'
16
+ DECLINED = 'declined'
17
+ end
18
+
19
+ attr_accessor :id
20
+ attr_accessor :status
21
+ attr_accessor :end_date
22
+ entity_attr_accessor :challenger, 'SBF::Client::Challenger', nil, true
23
+ entity_attr_accessor :challengee, 'SBF::Client::Challenger', nil, true
24
+ attr_reader :created_at, :modified_at
25
+ attr_accessor :modified_by
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,125 @@
1
+ require 'stbaldricks/entities/event'
2
+ require 'stbaldricks/entities/team'
3
+ require 'stbaldricks/entities/participant'
4
+ require 'stbaldricks/entities/fundraiser'
5
+ require 'stbaldricks/entities/lib/base'
6
+ require 'stbaldricks/entities/lib/top_level'
7
+ require 'stbaldricks/entities/lib/default_cacheable'
8
+ require 'stbaldricks/entities/challenger/model_type'
9
+
10
+ module SBF
11
+ module Client
12
+ class Challenger < SBF::Client::TopLevelEntity
13
+ include Entities::DefaultCacheable
14
+ actions DEFAULT_CRUD_ACTIONS
15
+ blacklist_action :delete
16
+ blacklist_action :create
17
+
18
+ module Type
19
+ CHALLENGER = 'challenger'
20
+ CHALLENGEE = 'challengee'
21
+ end
22
+
23
+ class Totals < SBF::Client::BaseEntity
24
+ attr_reader :amount_raised
25
+ end
26
+
27
+ class FullParticipant < SBF::Client::FullParticipant
28
+ attr_reader :type
29
+
30
+ def type
31
+ SBF::Client::Challenger::ModelType::PARTICIPANT
32
+ end
33
+ end
34
+
35
+ class PartialParticipant < SBF::Client::PartialParticipant
36
+ attr_reader :type
37
+
38
+ def type
39
+ SBF::Client::Challenger::ModelType::PARTICIPANT
40
+ end
41
+ end
42
+
43
+ class FullFundraiser < SBF::Client::FullFundraiser
44
+ attr_reader :type
45
+
46
+ def type
47
+ SBF::Client::Challenger::ModelType::FUNDRAISER
48
+ end
49
+ end
50
+
51
+ class PartialFundraiser < SBF::Client::PartialFundraiser
52
+ attr_reader :type
53
+
54
+ def type
55
+ SBF::Client::Challenger::ModelType::FUNDRAISER
56
+ end
57
+ end
58
+
59
+ class FullTeam < SBF::Client::FullTeam
60
+ attr_reader :type
61
+
62
+ def type
63
+ SBF::Client::Challenger::ModelType::TEAM
64
+ end
65
+ end
66
+
67
+ class PartialTeam < SBF::Client::PartialTeam
68
+ attr_reader :type
69
+
70
+ def type
71
+ SBF::Client::Challenger::ModelType::TEAM
72
+ end
73
+ end
74
+
75
+ class FullEvent < SBF::Client::FullEvent
76
+ attr_reader :type
77
+
78
+ def type
79
+ SBF::Client::Challenger::ModelType::EVENT
80
+ end
81
+ end
82
+
83
+ class PartialEvent < SBF::Client::PartialEvent
84
+ attr_reader :type
85
+
86
+ def type
87
+ SBF::Client::Challenger::ModelType::EVENT
88
+ end
89
+ end
90
+
91
+ attr_accessor :id
92
+ attr_accessor :challenge_id
93
+ attr_accessor :type
94
+ attr_accessor :is_accepted
95
+ entity_attr_reader :totals, 'SBF::Client::Challenger::Totals', nil, true
96
+
97
+ multitype_attr_accessor(
98
+ :entity,
99
+ [
100
+ [
101
+ ->(v) { v[:type] == SBF::Client::Challenger::ModelType::PARTICIPANT },
102
+ 'SBF::Client::Challenger::FullParticipant',
103
+ 'SBF::Client::Challenger::PartialParticipant'
104
+ ],
105
+ [
106
+ ->(v) { v[:type] == SBF::Client::Challenger::ModelType::FUNDRAISER },
107
+ 'SBF::Client::Challenger::FullFundraiser',
108
+ 'SBF::Client::Challenger::PartialFundraiser'
109
+ ],
110
+ [
111
+ ->(v) { v[:type] == SBF::Client::Challenger::ModelType::TEAM },
112
+ 'SBF::Client::Challenger::FullTeam',
113
+ 'SBF::Client::Challenger::PartialTeam'
114
+ ],
115
+ [
116
+ ->(v) { v[:type] == SBF::Client::Challenger::ModelType::EVENT },
117
+ 'SBF::Client::Challenger::FullEvent',
118
+ 'SBF::Client::Challenger::PartialEvent'
119
+ ]
120
+ ],
121
+ true
122
+ )
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,14 @@
1
+ require 'stbaldricks/entities/lib/top_level'
2
+
3
+ module SBF
4
+ module Client
5
+ class Challenger < SBF::Client::TopLevelEntity
6
+ module ModelType
7
+ EVENT = 'event'
8
+ TEAM = 'team'
9
+ PARTICIPANT = 'participant'
10
+ FUNDRAISER = 'fundraiser'
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ require 'stbaldricks/entities/lib/top_level'
2
+ require 'stbaldricks/entities/lib/default_cacheable'
3
+
4
+ module SBF
5
+ module Client
6
+ class Disease < SBF::Client::TopLevelEntity
7
+ include Entities::DefaultCacheable
8
+
9
+ actions DEFAULT_CRUD_ACTIONS
10
+ blacklist_action :create
11
+ blacklist_action :update
12
+ blacklist_action :delete
13
+
14
+ disallow_instantiation
15
+
16
+ attr_accessor :id
17
+ attr_accessor :name
18
+ attr_accessor :description
19
+ attr_reader :created_at
20
+ attr_reader :modified_at
21
+ end
22
+ end
23
+ end
@@ -11,10 +11,11 @@ module SBF
11
11
  SEPTEMBER = 'september'
12
12
  FALL_IMPACT = 'fall_impact'
13
13
  GIVING_TUESDAY = 'giving_tuesday'
14
+ SURVIVOR = 'survivor'
14
15
 
15
16
  def self.to_a
16
17
  # Defining the array explicitly, in order rather than const_getting since some things in website-ruby depend on the order
17
- [HOLIDAY_GIVING, IN_PLAY, MOTHERS_DAY, PHINEAS, SEPTEMBER, FALL_IMPACT, GIVING_TUESDAY]
18
+ [HOLIDAY_GIVING, IN_PLAY, MOTHERS_DAY, PHINEAS, SEPTEMBER, FALL_IMPACT, GIVING_TUESDAY, SURVIVOR]
18
19
  end
19
20
  end
20
21
  end
@@ -0,0 +1,75 @@
1
+ require 'stbaldricks/entities/disease'
2
+ require 'stbaldricks/entities/institution'
3
+ require 'stbaldricks/entities/lib/name'
4
+ require 'stbaldricks/entities/lib/top_level'
5
+ require 'stbaldricks/entities/lib/base'
6
+ require 'stbaldricks/entities/lib/default_cacheable'
7
+
8
+ module SBF
9
+ module Client
10
+ class Grant < SBF::Client::TopLevelEntity
11
+ include Entities::DefaultCacheable
12
+
13
+ actions DEFAULT_CRUD_ACTIONS
14
+ blacklist_action :create
15
+ blacklist_action :update
16
+ blacklist_action :delete
17
+
18
+ disallow_instantiation
19
+
20
+ class PartialResearcher < SBF::Client::BaseEntity
21
+ attr_accessor :id
22
+ end
23
+
24
+ class FullResearcher < SBF::Client::BaseEntity
25
+ attr_accessor :id
26
+ attr_reader :display_name
27
+ attr_accessor :description
28
+ attr_accessor :photo_url
29
+ entity_attr_accessor :name_pieces, 'SBF::Client::NamePieces'
30
+ attr_reader :created_at
31
+ attr_reader :modified_at
32
+ end
33
+
34
+ class PartialFundingType < SBF::Client::BaseEntity
35
+ attr_accessor :id
36
+ end
37
+
38
+ 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
44
+ end
45
+
46
+ class PartialInstitution < SBF::Client::PartialInstitution; end
47
+
48
+ class FullInstitution < SBF::Client::FullInstitution; end
49
+
50
+ class Disease < SBF::Client::Disease; end
51
+ end
52
+
53
+ class PartialGrant < SBF::Client::Grant
54
+ attr_accessor :id
55
+ end
56
+
57
+ 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
+ attr_accessor :description
66
+ entity_attr_accessor :researcher, 'SBF::Client::Grant::FullResearcher', 'SBF::Client::Grant::PartialResearcher', true
67
+ entity_attr_accessor :institution, 'SBF::Client::Grant::FullInstitution', 'SBF::Client::Grant::PartialInstitution', true
68
+ entity_attr_accessor :funding_type, 'SBF::Client::Grant::FullFundingType', 'SBF::Client::Grant::PartialFundingType', true
69
+ entity_collection_attr_accessor :diseases, 'SBF::Client::Grant::Disease', nil, true
70
+ attr_reader :photo_url
71
+ attr_reader :created_at
72
+ attr_reader :modified_at
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,18 @@
1
+ require 'stbaldricks/entities/lib/base'
2
+ require 'stbaldricks/entities/lib/address'
3
+
4
+ module SBF
5
+ module Client
6
+ class PartialInstitution < SBF::Client::BaseEntity
7
+ attr_accessor :id
8
+ end
9
+
10
+ class FullInstitution < SBF::Client::BaseEntity
11
+ attr_accessor :id
12
+ attr_accessor :name
13
+ entity_attr_accessor :address, 'SBF::Client::Address'
14
+ attr_reader :created_at
15
+ attr_reader :modified_at
16
+ end
17
+ end
18
+ end
@@ -2,6 +2,7 @@ require 'stbaldricks/endpoints/kid'
2
2
  require 'stbaldricks/entities/lib/address'
3
3
  require 'stbaldricks/entities/lib/name'
4
4
  require 'stbaldricks/entities/lib/fundraising_page'
5
+ require 'stbaldricks/entities/institution'
5
6
  require 'stbaldricks/entities/person'
6
7
  require 'stbaldricks/entities/lib/base'
7
8
  require 'stbaldricks/entities/lib/default_cacheable'
@@ -88,16 +89,7 @@ module SBF
88
89
  attr_reader :avatar, :default
89
90
  end
90
91
 
91
- class KidInstitution < SBF::Client::BaseEntity
92
- attr_reader :id
93
- attr_reader :display_name
94
- attr_reader :city
95
- attr_reader :state
96
- attr_reader :zip_code
97
- attr_reader :country
98
- attr_reader :created_at
99
- attr_reader :modified_at
100
- end
92
+ class KidInstitution < SBF::Client::FullInstitution; end
101
93
 
102
94
  class Kid < SBF::Client::TopLevelEntity
103
95
  include Entities::DefaultCacheable
@@ -0,0 +1,82 @@
1
+ require 'stbaldricks/endpoints/matching_gift_company'
2
+
3
+ module SBF
4
+ module Client
5
+ module MatchingGift
6
+ class Company < SBF::Client::TopLevelEntity
7
+ endpoint SBF::Client::MatchingGiftCompanyEndpoint
8
+ action :get
9
+ action :find
10
+
11
+ disallow_instantiation
12
+
13
+ class Contact < SBF::Client::BaseEntity
14
+ attr_reader :title
15
+ attr_reader :name
16
+ entity_attr_reader :name_pieces, 'SBF::Client::NamePieces'
17
+ entity_attr_reader :address, 'SBF::Client::Address'
18
+ entity_attr_reader :phone, 'SBF::Client::Phone'
19
+ entity_attr_reader :email, 'SBF::Client::Email'
20
+ attr_reader :websites
21
+ end
22
+
23
+ class GiftRatio < SBF::Client::BaseEntity
24
+ attr_reader :match_ratio
25
+ attr_reader :minimum_matched
26
+ attr_reader :maximum_matched
27
+ attr_reader :total_matched_per_employee
28
+ attr_reader :fiscal_year
29
+ attr_reader :deadline
30
+ end
31
+
32
+ class EmployeeEligibility < SBF::Client::BaseEntity
33
+ attr_reader :full_time
34
+ attr_reader :part_time
35
+ attr_reader :retired
36
+ attr_reader :spouse
37
+ attr_reader :board
38
+ end
39
+
40
+ class Procedure < SBF::Client::BaseEntity
41
+ attr_reader :officer_certification
42
+ attr_reader :fax
43
+ attr_reader :website
44
+ attr_reader :phone
45
+ attr_reader :presenting_evidence
46
+ attr_reader :sending_check
47
+ attr_reader :sending_letter
48
+ end
49
+
50
+ class Requirements < SBF::Client::BaseEntity
51
+ attr_reader :gift_receipt
52
+ attr_reader :ack_letter
53
+ end
54
+
55
+ class Restrictions < SBF::Client::BaseEntity
56
+ attr_reader :follow_donor_designation
57
+ attr_reader :match_unrestricted
58
+ end
59
+ end
60
+
61
+ class PartialCompany < Company
62
+ attr_reader :name
63
+ attr_reader :id
64
+ end
65
+
66
+ class FullCompany < Company
67
+ attr_reader :id
68
+ attr_reader :name
69
+ attr_reader :matching_gift_forms
70
+ attr_reader :special_comments
71
+ attr_reader :last_updated
72
+
73
+ entity_attr_reader :contact_info, 'SBF::Client::MatchingGift::Company::Contact', nil, true
74
+ entity_attr_reader :match_info, 'SBF::Client::MatchingGift::Company::Company::GiftRatio', nil, true
75
+ entity_attr_reader :employee_eligibility, 'SBF::Client::MatchingGift::Company::EmployeeEligibility', nil, true
76
+ entity_attr_reader :procedures, 'SBF::Client::MatchingGift::Company::Procedures', nil, true
77
+ entity_attr_reader :requirements, 'SBF::Client::MatchingGift::Company::Requirements', nil, true
78
+ entity_attr_reader :restrictions, 'SBF::Client::MatchingGift::Company::Restrictions', nil, true
79
+ end
80
+ end
81
+ end
82
+ end
@@ -54,7 +54,7 @@ module SBF
54
54
  ITALY = 'Italy'
55
55
  JAMAICA = 'Jamaica'
56
56
  JAPAN = 'Japan'
57
- KENYA = 'KE'
57
+ KENYA = 'Kenya'
58
58
  KUWAIT = 'Kuwait'
59
59
  LEBANON = 'Lebanon'
60
60
  LUXEMBOURG = 'Luxembourg'
@@ -123,6 +123,10 @@ module SBF
123
123
  MEMORIAL_VIEW = 3001
124
124
  MEMORIAL_MANAGE = 3002
125
125
 
126
+ # Challenge Permissions
127
+ CHALLENGE_VIEW = 3101
128
+ CHALLENGE_MANAGE = 3102
129
+
126
130
  @list = {
127
131
  PUBLIC_ACCESS => :PUBLIC_ACCESS,
128
132
  ADMIN => :ADMIN,
@@ -212,7 +216,10 @@ module SBF
212
216
  TEAM_TEAM_CAPTAIN => :TEAM_TEAM_CAPTAIN,
213
217
  #Memorial Permissions
214
218
  MEMORIAL_VIEW => :MEMORIAL_VIEW,
215
- MEMORIAL_MANAGE => :MEMORIAL_MANAGE
219
+ MEMORIAL_MANAGE => :MEMORIAL_MANAGE,
220
+ # Challenge Permissions
221
+ CHALLENGE_VIEW => :CHALLENGE_VIEW,
222
+ CHALLENGE_MANAGE => :CHALLENGE_MANAGE
216
223
  }.freeze
217
224
 
218
225
  class << self
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '1.6.0.pre1'
3
+ VERSION = '2.0.0'
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: 1.6.0.pre1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -89,6 +89,7 @@ files:
89
89
  - lib/stbaldricks/endpoints/kid.rb
90
90
  - lib/stbaldricks/endpoints/kid_honor.rb
91
91
  - lib/stbaldricks/endpoints/lib/entity.rb
92
+ - lib/stbaldricks/endpoints/matching_gift_company.rb
92
93
  - lib/stbaldricks/endpoints/message.rb
93
94
  - lib/stbaldricks/endpoints/newsletter_recipient.rb
94
95
  - lib/stbaldricks/endpoints/participant.rb
@@ -99,10 +100,14 @@ files:
99
100
  - lib/stbaldricks/endpoints/user.rb
100
101
  - lib/stbaldricks/entities/batch.rb
101
102
  - lib/stbaldricks/entities/campaign.rb
103
+ - lib/stbaldricks/entities/challenge.rb
104
+ - lib/stbaldricks/entities/challenger.rb
105
+ - lib/stbaldricks/entities/challenger/model_type.rb
102
106
  - lib/stbaldricks/entities/communicate.rb
103
107
  - lib/stbaldricks/entities/config.rb
104
108
  - lib/stbaldricks/entities/contact.rb
105
109
  - lib/stbaldricks/entities/contact_group.rb
110
+ - lib/stbaldricks/entities/disease.rb
106
111
  - lib/stbaldricks/entities/document_library.rb
107
112
  - lib/stbaldricks/entities/document_library_category.rb
108
113
  - lib/stbaldricks/entities/donation.rb
@@ -130,6 +135,8 @@ files:
130
135
  - lib/stbaldricks/entities/event_supporter.rb
131
136
  - lib/stbaldricks/entities/fund.rb
132
137
  - lib/stbaldricks/entities/fundraiser.rb
138
+ - lib/stbaldricks/entities/grant.rb
139
+ - lib/stbaldricks/entities/institution.rb
133
140
  - lib/stbaldricks/entities/international_partner.rb
134
141
  - lib/stbaldricks/entities/kid.rb
135
142
  - lib/stbaldricks/entities/kid_honor.rb
@@ -151,6 +158,7 @@ files:
151
158
  - lib/stbaldricks/entities/lib/third_party_media.rb
152
159
  - lib/stbaldricks/entities/lib/top_level.rb
153
160
  - lib/stbaldricks/entities/lib/venue.rb
161
+ - lib/stbaldricks/entities/matching_gift_company.rb
154
162
  - lib/stbaldricks/entities/memorial.rb
155
163
  - lib/stbaldricks/entities/message.rb
156
164
  - lib/stbaldricks/entities/newsletter_recipient.rb
@@ -203,9 +211,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
211
  version: '0'
204
212
  required_rubygems_version: !ruby/object:Gem::Requirement
205
213
  requirements:
206
- - - ">"
214
+ - - ">="
207
215
  - !ruby/object:Gem::Version
208
- version: 1.3.1
216
+ version: '0'
209
217
  requirements: []
210
218
  rubyforge_project:
211
219
  rubygems_version: 2.6.11