openstax_salesforce 4.11.0 → 5.2.0

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: 1d9c9cf19718d8dfb2986c3f24e0aa4b1d5cac65f945740f3a3829b0a251e5e8
4
- data.tar.gz: c6a7aeac7498ad448a2965248b298886b534b8aa649a8e6e5de2c126882c2846
3
+ metadata.gz: 35632105bc2969164fb54cc341630527af96aa068bc5f6aeffe74494eda5ed7c
4
+ data.tar.gz: f9f296498bffea3fb898a475701a3f95d6aed58986ee2e0aee81a5a1d2760e6a
5
5
  SHA512:
6
- metadata.gz: 44f4299a16d1c3ac7c7fc2580cd99cdacebb2331651c0664455d5f44f204ea248fd9b5a91da9e28bb3caea74d52594696927bba084efac846ade350186073380
7
- data.tar.gz: 8dc1202340ad2825a4cfbc9fce820b72ba726a9b5f3431d4eb29a1e18d3e55dc92644f2337b3e7cd1e7c6d6a2e3a580848ea08093683de42e252a2c10fe80165
6
+ metadata.gz: 9a61bc9e85178a8dc1ed5f89b6e9b3fc4babd151f37004edae6b78598fd69f9996a980d5d2883e622f492865bc189b4623df3e15d57f8302929d8074e08c7ebd
7
+ data.tar.gz: 3d77a62f23b8ea2c390d7c31ba696cd9d6f8e0822ef37c9aacf5fef5e9f858d87bb7352eb8a64dee18ddaf5225f12a2685ba58180170ab980f6befd076d31f3e
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OpenStax::Salesforce
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/openstax_salesforce.svg)](http://badge.fury.io/rb/openstax_salesforce)
4
- [![Build Status](https://travis-ci.org/openstax/openstax_salesforce.svg?branch=master)](https://travis-ci.org/openstax/openstax_salesforce)
4
+ [![Tests](https://github.com/openstax/openstax_salesforce/workflows/Tests/badge.svg)](https://github.com/openstax/openstax_salesforce/actions?query=workflow:Tests)
5
5
  [![Code Climate](https://codeclimate.com/github/openstax/openstax_salesforce/badges/gpa.svg)](https://codeclimate.com/github/openstax/openstax_salesforce)
6
6
 
7
7
  OpenStax::Salesforce is a Rails engine used by OpenStax projects to communicate
@@ -1,6 +1,7 @@
1
1
  module OpenStax::Salesforce::Remote
2
2
  class Book < ActiveForce::SObject
3
- field :name, from: "Name"
3
+ field :name, from: "Name"
4
+ field :annualization_number, from: "Annualization_number__c", as: :decimal
4
5
 
5
6
  self.table_name = 'Book__c'
6
7
  end
@@ -16,6 +16,9 @@ module OpenStax::Salesforce::Remote
16
16
  field :salutation, from: "Salutation"
17
17
  field :subject, from: "Subject__c"
18
18
  field :school, from: "Company"
19
+ field :city, from: "City"
20
+ field :state, from: "State"
21
+ field :state_code, from: "StateCode"
19
22
  field :phone, from: "Phone"
20
23
  field :website, from: "Website"
21
24
  field :status, from: "Status"
@@ -33,9 +36,14 @@ module OpenStax::Salesforce::Remote
33
36
  field :who_chooses_books, from: "who_chooses_books__c"
34
37
  field :verification_status, from: "FV_Status__c"
35
38
  field :finalize_educator_signup, from: "FV_Final__c", as: :boolean
36
- field :needs_cs_review, from: "Needs_CS_Review__c", as: :boolean
37
- field :b_r_i_marketing, from: "BRI_Marketing__c", as: :boolean # Bill of Rights Institute (book) marketing
38
- field :title_1_school, from: "Title_1_school__c", as: :boolean
39
+ field :needs_cs_review, from: "Needs_CS_Review__c", as: :boolean
40
+ field :b_r_i_marketing, from: "BRI_Marketing__c", as: :boolean # Bill of Rights Institute (book) marketing
41
+ field :title_1_school, from: "Title_1_school__c", as: :boolean
42
+ field :sheerid_school_name, from: "SheerID_School_Name__c"
43
+
44
+ # These 2 fields both hold the Account (School) ID, but have different data types and uses in SF
45
+ field :account_id, from: 'Account_ID__c'
46
+ field :school_id, from: 'School__c'
39
47
 
40
48
  validates(:last_name, presence: true)
41
49
  validates(:school, presence: true)
@@ -10,5 +10,9 @@ module OpenStax::Salesforce::Remote
10
10
  field :is_child_of_kip, from: 'child_of_kip__c', as: :boolean
11
11
 
12
12
  self.table_name = 'Account'
13
+
14
+ def self.query
15
+ super.where("RecordType.Name = 'School'")
16
+ end
13
17
  end
14
18
  end
@@ -43,5 +43,7 @@ module OpenStax::Salesforce::Remote
43
43
 
44
44
  STATUS_APPROVED = "Approved"
45
45
  STATUS_ARCHIVED = "ArchivedPeriod"
46
+ STATUS_DROPPED = "Dropped"
47
+ STATUS_PREVIEW = "Preview"
46
48
  end
47
49
  end
@@ -134,7 +134,9 @@ module OpenStax::Salesforce::SpecHelpers
134
134
  @books = OpenStax::Salesforce::Remote::Book.where(name: book_names).to_a
135
135
 
136
136
  (book_names - books.map(&:name)).each do |book_name|
137
- OpenStax::Salesforce::Remote::Book.new(name: book_name).save!
137
+ OpenStax::Salesforce::Remote::Book.new(
138
+ name: book_name, annualization_number: [ 1.4, 1.6 ].sample
139
+ ).save!
138
140
  end
139
141
  end
140
142
 
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Salesforce
3
- VERSION = '4.11.0'
3
+ VERSION = '5.2.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.11.0
4
+ version: 5.2.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: 2021-03-02 00:00:00.000000000 Z
12
+ date: 2021-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails