openstax_salesforce 7.4.2 → 7.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9723c405964d86192d90c1f886775450d53baf4fc4174b017cf4e75f6d16759d
|
4
|
+
data.tar.gz: b72ddfde5c016ff10e332342edb3f7211f6bcf4f3f9e077d38dc8153b95c8912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1df136b53b9312574f8d8f7e6f860e42ba604937cc567065de76019ba3b0e6848de33c80275fbbc524a7c66be2a93c254d35774bb066271c908a853323c05199
|
7
|
+
data.tar.gz: 42610dcecdd6677df7faefeda5296b26be7a54e67ffe8d2a96ebc4cfd4660490e42823133f9f1f2900fe0f2a2272a217ba88d345aeb7cc414722f3e0f3d2e1c3
|
@@ -5,10 +5,16 @@ module OpenStax
|
|
5
5
|
module Remote
|
6
6
|
# Book object from Salesforce
|
7
7
|
class Book < ActiveForce::SObject
|
8
|
-
field :
|
8
|
+
field :id, from: 'Id'
|
9
|
+
field :name, from: 'Name'
|
10
|
+
field :official_name, from: 'Official_Name__c'
|
9
11
|
field :annualization_number, from: 'Annualization_number__c', as: :decimal
|
10
12
|
|
11
13
|
self.table_name = 'Book__c'
|
14
|
+
|
15
|
+
def self.query
|
16
|
+
super.where('Active__c = True AND Official_Name__c != NULL')
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -5,18 +5,6 @@ module OpenStax
|
|
5
5
|
module Remote
|
6
6
|
# Lead object from Salesforce
|
7
7
|
class Lead < ActiveForce::SObject
|
8
|
-
|
9
|
-
VALID_VERIFICATION_STATUSES = %w[
|
10
|
-
pending_faculty
|
11
|
-
confirmed_faculty
|
12
|
-
rejected_faculty
|
13
|
-
pending_sheerid
|
14
|
-
rejected_by_sheerid
|
15
|
-
incomplete_signup
|
16
|
-
].freeze
|
17
|
-
|
18
|
-
VALID_WHO_CHOOSES_BOOKS = %w[instructor committee coordinator].freeze
|
19
|
-
|
20
8
|
field :id, from: 'Id'
|
21
9
|
field :name, from: 'Name'
|
22
10
|
field :first_name, from: 'FirstName'
|
@@ -58,23 +46,6 @@ module OpenStax
|
|
58
46
|
|
59
47
|
validates(:last_name, presence: true)
|
60
48
|
validates(:school, presence: true)
|
61
|
-
validates(
|
62
|
-
:verification_status,
|
63
|
-
allow_blank: true,
|
64
|
-
inclusion: {
|
65
|
-
in: VALID_VERIFICATION_STATUSES,
|
66
|
-
message: "must be either #{VALID_VERIFICATION_STATUSES.join(' or ')}"
|
67
|
-
}
|
68
|
-
)
|
69
|
-
|
70
|
-
validates(
|
71
|
-
:who_chooses_books,
|
72
|
-
allow_blank: true,
|
73
|
-
inclusion: {
|
74
|
-
in: VALID_WHO_CHOOSES_BOOKS,
|
75
|
-
message: "must be either #{VALID_WHO_CHOOSES_BOOKS.join(' or ')}"
|
76
|
-
}
|
77
|
-
)
|
78
49
|
|
79
50
|
self.table_name = 'Lead'
|
80
51
|
|
@@ -8,9 +8,6 @@ module OpenStax
|
|
8
8
|
belongs_to :contact, foreign_key: :salesforce_contact_id, model: OpenStax::Salesforce::Remote::Contact
|
9
9
|
belongs_to :lead, foreign_key: :salesforce_lead_id, model: OpenStax::Salesforce::Remote::Lead
|
10
10
|
|
11
|
-
VALID_ROLE_NAME = %w[Unknown Instructor Student Administrator Other].freeze
|
12
|
-
VALID_ENV_NAME = %w[production staging qa dev local].freeze
|
13
|
-
|
14
11
|
field :id, from: 'Id'
|
15
12
|
field :account_id, from: 'Account_ID__c'
|
16
13
|
field :account_uuid, from: 'Account_UUID__c'
|
@@ -20,24 +17,6 @@ module OpenStax
|
|
20
17
|
field :signup_date, from: 'Signup_Date__c', as: :datetime
|
21
18
|
field :account_environment, from: 'Environment__c'
|
22
19
|
|
23
|
-
validates(
|
24
|
-
:account_role,
|
25
|
-
allow_blank: false,
|
26
|
-
inclusion: {
|
27
|
-
in: VALID_ROLE_NAME,
|
28
|
-
message: "Role must be either #{VALID_ROLE_NAME.join(' or ')}"
|
29
|
-
}
|
30
|
-
)
|
31
|
-
|
32
|
-
validates(
|
33
|
-
:account_environment,
|
34
|
-
allow_blank: false,
|
35
|
-
inclusion: {
|
36
|
-
in: VALID_ENV_NAME,
|
37
|
-
message: "Environment must be either #{VALID_ENV_NAME.join(' or ')}"
|
38
|
-
}
|
39
|
-
)
|
40
|
-
|
41
20
|
self.table_name = 'OpenStax_Account__c'
|
42
21
|
end
|
43
22
|
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: 7.4.
|
4
|
+
version: 7.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|