openstax_salesforce 7.1.0 → 7.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: 583953eef38f7cb4d3cc7c69d4186c8ce70c40d0a1d4cfe2deffb4532a30f3db
4
- data.tar.gz: 7aa95b1f58e8b39dc4b2b5adfff5fb59a6d4b8f3acc5c11aaead9d6931707c9a
3
+ metadata.gz: 4999efb0bbb885057a7fee567eb22945e281fbd0dfd4427ba10cfaf778017a45
4
+ data.tar.gz: 7def6e796f4c0272e96f23a4ec3cf9e89f14d02d76920ad1db547292ca683a6e
5
5
  SHA512:
6
- metadata.gz: 8be9b66e18b856f8e381e23ba2d60f45a94920bc1a736b9da5996423ca4069ba6b9c8f38370d97cf1272395119096d2f865f3df285b337fff557331932261360
7
- data.tar.gz: 2ac6a4b94054d6f8346da25022710890a92d28ab8515cd9213be0719caad7b6a8f84807fd2682debade62f62061461e0b136fb4c86c25b7a3e01b6881253a443
6
+ metadata.gz: 1395eda9b165f04b34886b1cb3445d987dbbda117eeafd10dd532d49c5e56b37c234307f605793a1747aa91305eb3c4df3623ed77e06d95757835d0b99aec377
7
+ data.tar.gz: 408b9a96b6fd42c7e486d1626afbda1b192f35c2b21cb3ffca7f34427ca4de3b74339451d58da6138a35d44df8b8a6e93f232aaa934021f964739f11f65c39e2
@@ -28,6 +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', as: :datetime
31
32
 
32
33
  self.table_name = 'Contact'
33
34
  end
@@ -47,6 +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', as: :datetime
50
51
 
51
52
  # These 2 fields both hold the Account (School) ID, but have different data types and uses in SF
52
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].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.1.0'
3
+ VERSION = '7.4.0'
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.1.0
4
+ version: 7.4.0
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-22 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: []