openstax_salesforce 7.2.0 → 7.4.1

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: f305554cb17a19145e4707924c76cc2603923227330e0761b5062d3589bff4a5
4
- data.tar.gz: 190ff6e1adceffb8125824ef3c463878a7eebf8cac6bfc2930da9b30538667a7
3
+ metadata.gz: 4e9a75d4e734968b3726f2b91032122c41de4e788293090fb716c442b04746eb
4
+ data.tar.gz: 3fc81c5189b28b44df3901e0a86a77058706e3f047146fe585781d9a51dd8578
5
5
  SHA512:
6
- metadata.gz: 02f2f94e56a0097fa2cf3247305518977c4a02c7c49f8cfcb956890ed29251ac54b59872a236205ecc97f16e450f43091023b135d6eb4727118d86280d7403aa
7
- data.tar.gz: 9cd640909d82cb4d33fea693ad9cccb0d0af8ec808a3d9c689ab9c3c1e18b48202f9ab0dfb5ca486209ac0c70467fe5bff12c4dbcea7be6ad7d73dcf9ad65de0
6
+ metadata.gz: 2a3b5ad16bf5af3964347f91acccc69124a08d1348056ee08c099743dd99cdd436fc5229a8fce59dfe200d0ab828e90a26b80d16921f11564115903f578e760d
7
+ data.tar.gz: c0b461f4c5b14d4f0b35f81b107598bc2e094060b63e3808ebfe82bd6744075904746f0ac428292d2491cff1b4d4c949b0308269f47c0a0a2963046a004492b3
@@ -28,7 +28,7 @@ module OpenStax
28
28
  field :title_1_school, from: 'Title_1_school__c', as: :boolean
29
29
  field :accounts_uuid, from: 'Accounts_UUID__c'
30
30
  field :lead_source, from: 'LeadSource'
31
- field :signup_date, from: 'Signup_Date__C'
31
+ field :signup_date, from: 'Signup_Date__c', as: :datetime
32
32
 
33
33
  self.table_name = 'Contact'
34
34
  end
@@ -47,7 +47,7 @@ module OpenStax
47
47
  field :title_1_school, from: 'Title_1_school__c', as: :boolean
48
48
  field :sheerid_school_name, from: 'SheerID_School_Name__c'
49
49
  field :instant_conversion, from: 'Instant_Conversion__c', as: :boolean
50
- field :signup_date, from: 'Signup_Date__C'
50
+ field :signup_date, from: 'Signup_Date__c', as: :datetime
51
51
 
52
52
  # These 2 fields both hold the Account (School) ID, but have different data types and uses in SF
53
53
  field :account_id, from: 'Account_ID__c'
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenStax
4
+ module Salesforce
5
+ module Remote
6
+ # OpenStax Account object from Salesforce
7
+ class OpenStaxAccount < ActiveForce::SObject
8
+ belongs_to :contact, foreign_key: :salesforce_contact_id, model: OpenStax::Salesforce::Remote::Contact
9
+ belongs_to :lead, foreign_key: :salesforce_lead_id, model: OpenStax::Salesforce::Remote::Lead
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
+ field :id, from: 'Id'
15
+ field :account_id, from: 'Account_ID__c'
16
+ field :account_uuid, from: 'Account_UUID__c'
17
+ field :account_role, from: 'Account_Role__c'
18
+ field :salesforce_contact_id, from: 'Contact__c'
19
+ field :salesforce_lead_id, from: 'Lead__c'
20
+ field :signup_date, from: 'Signup_Date__c', as: :datetime
21
+ field :account_environment, from: 'Environment__c'
22
+
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
+ self.table_name = 'OpenStax_Account__c'
42
+ end
43
+ end
44
+ end
45
+ end
@@ -30,8 +30,8 @@ module OpenStax
30
30
  field :number_of_students, from: 'Students__c'
31
31
  field :student_number_status, from: 'Student_No_Status__c'
32
32
  field :time_period, from: 'Time_Period__c'
33
- field :class_start_date, from: 'Class_Start_Date__c', as: :datetime
34
- field :renewal_class_start_date, from: 'CSDInput__c', as: :datetime
33
+ field :class_start_date, from: 'Class_Start_Date__c', as: :datetime
34
+ field :renewal_class_start_date, from: 'CSDInput__c', as: :datetime
35
35
  field :school_id, from: 'AccountId'
36
36
  field :book_id, from: 'Book__c'
37
37
  field :contact_id, from: 'Contact__c'
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Salesforce
3
- VERSION = '7.2.0'
3
+ VERSION = '7.4.1'
4
4
  end
5
5
  end
@@ -17,6 +17,7 @@ require "openstax/salesforce/remote/lead"
17
17
  require "openstax/salesforce/remote/campaign"
18
18
  require "openstax/salesforce/remote/campaign_member"
19
19
  require "openstax/salesforce/remote/account_contact_relation"
20
+ require "openstax/salesforce/remote/openstax_account"
20
21
 
21
22
  module OpenStax
22
23
  module Salesforce
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_salesforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 7.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  - Dante Soares
9
9
  - Michael Harrison
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-28 00:00:00.000000000 Z
13
+ date: 2022-03-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -152,6 +152,7 @@ files:
152
152
  - lib/openstax/salesforce/remote/campaign_member.rb
153
153
  - lib/openstax/salesforce/remote/contact.rb
154
154
  - lib/openstax/salesforce/remote/lead.rb
155
+ - lib/openstax/salesforce/remote/openstax_account.rb
155
156
  - lib/openstax/salesforce/remote/opportunity.rb
156
157
  - lib/openstax/salesforce/remote/record_type.rb
157
158
  - lib/openstax/salesforce/remote/school.rb
@@ -165,7 +166,7 @@ homepage: https://github.com/openstax/openstax_salesforce
165
166
  licenses:
166
167
  - MIT
167
168
  metadata: {}
168
- post_install_message:
169
+ post_install_message:
169
170
  rdoc_options: []
170
171
  require_paths:
171
172
  - lib
@@ -180,8 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
181
  - !ruby/object:Gem::Version
181
182
  version: '0'
182
183
  requirements: []
183
- rubygems_version: 3.2.22
184
- signing_key:
184
+ rubygems_version: 3.2.33
185
+ signing_key:
185
186
  specification_version: 4
186
187
  summary: Interface gem for accessing OpenStax's Salesforce instance
187
188
  test_files: []