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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14c81d5276f1b4546a71576f11a51bcbbece688179ecece3c1a16eb5ce1e0505
4
- data.tar.gz: b36cd9baf5221bafdcf0249af842f652bd6b14cf17c95baa93d6204d73834bc6
3
+ metadata.gz: 4af4bba63b1345bb56d81997d7aa50a8f6c54a8543231cf1404200e0aa9e57cf
4
+ data.tar.gz: 854d11cc4dbb4e5ba190ef12f4973c4c2712c3ec3c9790795d8660ca1bb5826f
5
5
  SHA512:
6
- metadata.gz: 0fe8bf95df2a47a2e418559209e369eeab624349b24f27458a8851d1970ce69957970d2f643fc8d1375912438c91494e80be5eaa9f1ee92b2b542e9420f25825
7
- data.tar.gz: df0905acc8e78cc28482d55cceb0a637a5b7502ef01905a7cd87ee90be2dd1722e34055cce104242375eec7c5726ed870b9a41805f74dd0007a1b0fc7fda0206
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
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Salesforce
3
- VERSION = '4.3.0'
3
+ VERSION = '4.4.0'
4
4
  end
5
5
  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.3.0
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-02 00:00:00.000000000 Z
12
+ date: 2020-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails