openstax_salesforce 7.4.1 → 7.4.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7a05b6a85387ab615b68f4f8344eb736649c431896de6b25caea544f8e1fa75
|
4
|
+
data.tar.gz: b8dfa8ca1c56cac8f4a5ee0d7a5d7454c88bd259568ed49c506e9a0bc34e2f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5626b2b66ae5c49715763419431a7cb2fa0d5efff6388e247ff975aa8ab9bdedac0f6d0acfdafeaa613aa8501fb410afd14f3a56d96bd3dd06757b81d8dc4d6
|
7
|
+
data.tar.gz: d3fdac8636977594bc89df2301f729fc041175e81f4dade69c6f0e7dd29218524dace2cdc4e7940d051a58854dc0c0d8066e2128114afecfbc874255ae11addd
|
@@ -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
|
@@ -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: "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: "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.4
|
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-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|