openstax_salesforce 4.3.0 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openstax/salesforce/remote/lead.rb +45 -0
- data/lib/openstax/salesforce/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4af4bba63b1345bb56d81997d7aa50a8f6c54a8543231cf1404200e0aa9e57cf
|
4
|
+
data.tar.gz: 854d11cc4dbb4e5ba190ef12f4973c4c2712c3ec3c9790795d8660ca1bb5826f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f4506420c7f30b59896e6fba242aff72ef55dec86270fbbb0b4089d9b3bbe725c2be6c8b3584e5a36906b5b043f547b9cd4676e0cb093ed6e24a357f97650fd
|
7
|
+
data.tar.gz: 2f5a63de18f7deaaf7aa8d08608c3cd686af132ab542bf67bafff851c38d61dbd71e1571dd8f953664daff0beb3e7912b747a00a4c13f91664939cc8f87694f1
|
@@ -1,5 +1,19 @@
|
|
1
1
|
module OpenStax::Salesforce::Remote
|
2
2
|
class Lead < ActiveForce::SObject
|
3
|
+
|
4
|
+
VALID_VERIFICATION_STATUSES = %w[pending_faculty confirmed_faculty rejected_faculty].freeze
|
5
|
+
VALID_ROLES = %w[
|
6
|
+
student
|
7
|
+
faculty
|
8
|
+
other
|
9
|
+
administrator
|
10
|
+
librarian
|
11
|
+
adjunct\ faculty
|
12
|
+
instructional\ designer
|
13
|
+
home\ school\ teacher
|
14
|
+
].freeze
|
15
|
+
VALID_WHO_CHOOSES_BOOKS = %w[instructor committee coordinator].freeze
|
16
|
+
|
3
17
|
field :name, from: "Name"
|
4
18
|
field :first_name, from: "FirstName"
|
5
19
|
field :last_name, from: "LastName"
|
@@ -19,7 +33,38 @@ module OpenStax::Salesforce::Remote
|
|
19
33
|
field :accounts_uuid, from: "accounts_uuid_c__c"
|
20
34
|
field :application_source, from: "Application_Source__c"
|
21
35
|
field :role, from: "Role__c"
|
36
|
+
field :who_chooses_books, from: "who_chooses_books__c"
|
37
|
+
field :verification_status, from: "FV_Status__c"
|
38
|
+
field :finalize_educator_signup, from: "FV_Final__c", as: :boolean
|
39
|
+
|
40
|
+
validates(
|
41
|
+
:role,
|
42
|
+
allow_blank: true,
|
43
|
+
inclusion: {
|
44
|
+
in: VALID_ROLES,
|
45
|
+
message: "must be either #{VALID_ROLES.join(' or ')}"
|
46
|
+
}
|
47
|
+
)
|
48
|
+
|
49
|
+
validates(
|
50
|
+
:verification_status,
|
51
|
+
allow_blank: true,
|
52
|
+
inclusion: {
|
53
|
+
in: VALID_VERIFICATION_STATUSES,
|
54
|
+
message: "must be either #{VALID_VERIFICATION_STATUSES.join(' or ')}"
|
55
|
+
}
|
56
|
+
)
|
57
|
+
|
58
|
+
validates(
|
59
|
+
:who_chooses_books,
|
60
|
+
allow_blank: true,
|
61
|
+
inclusion: {
|
62
|
+
in: VALID_WHO_CHOOSES_BOOKS,
|
63
|
+
message: "must be either #{VALID_WHO_CHOOSES_BOOKS.join(' or ')}"
|
64
|
+
}
|
65
|
+
)
|
22
66
|
|
23
67
|
self.table_name = 'Lead'
|
68
|
+
|
24
69
|
end
|
25
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_salesforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-07-
|
12
|
+
date: 2020-07-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|