openstax_salesforce 5.0.0 → 5.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: e5b8e4d9af7d7344ed9ea21342c5b816277b21038838b4412bf168b4513eef3a
4
- data.tar.gz: bfebea77ea2c6d39161196e8449bb5a21125c0e0f28a630959c514926e227876
3
+ metadata.gz: fafb7a66d1b9d467a4cb83840c8c7e7b7f2bf8905523bc45c949682f708986f8
4
+ data.tar.gz: 78cccae14aed1a6809c945d5cc8205b29b457ba890b91bb268c074bf7b9e3bfd
5
5
  SHA512:
6
- metadata.gz: 5f6a9ab9ecc3af36da60410fecf0b3e13ad6c8f0b4a95bd5270dff3190f9b393b2599ed6e727727b392c3a928fffb3dce986c4d4df476d97c219ac3ab0ce7c57
7
- data.tar.gz: c42e20005baa14d45380a39fa1168dfe037aa272daded1b63f04f427652648062d95ca931f583343a9a313e1c1cde8a23587532f2e16118ed14f9e1d3ece2ac8
6
+ metadata.gz: d3b733a4fe66f2ab5c6479728cbd7d61aeceb4f52afd3b260846842acbdc532aea3eede295ceaded1bcf13e8882509412fe2363307e10698329ae52c8affbe97
7
+ data.tar.gz: 81270ddc4c0475f0660dc463a250bfa4ca7511bca8ff463fdd2337ef7f96e256c9c8d21cabecdf48eb9f84ac6afb83e70fe6a1e9470977ca3c7225ea8f08234c
@@ -0,0 +1,15 @@
1
+ module OpenStax::Salesforce::Remote
2
+ class AccountContactRelation < ActiveForce::SObject
3
+ belongs_to :school, foreign_key: :school_id,
4
+ model: OpenStax::Salesforce::Remote::School
5
+
6
+ belongs_to :contact, foreign_key: :contact_id,
7
+ model: OpenStax::Salesforce::Remote::Contact
8
+
9
+ field :contact_id, from: 'ContactId'
10
+ field :primary, from: 'IsDirect', as: :boolean
11
+ field :school_id, from: 'AccountId'
12
+
13
+ self.table_name = 'AccountContactRelation'
14
+ end
15
+ end
@@ -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
@@ -18,6 +18,8 @@ module OpenStax::Salesforce::Remote
18
18
  field :school, from: "Company"
19
19
  field :city, from: "City"
20
20
  field :state, from: "State"
21
+ field :state_code, from: "StateCode"
22
+ field :country, from: "Country"
21
23
  field :phone, from: "Phone"
22
24
  field :website, from: "Website"
23
25
  field :status, from: "Status"
@@ -3,6 +3,7 @@ module OpenStax::Salesforce::Remote
3
3
  field :name, from: 'Name'
4
4
  field :city, from: 'BillingCity'
5
5
  field :state, from: 'BillingState'
6
+ field :country, from: 'BillingCountry'
6
7
  field :type, from: 'Type'
7
8
  field :school_location, from: 'School_Location__c'
8
9
  field :sheerid_school_name, from: 'SheerID_School_Name__c'
@@ -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 = '5.0.0'
3
+ VERSION = '5.4.0'
4
4
  end
5
5
  end
@@ -15,6 +15,7 @@ require "openstax/salesforce/remote/contact"
15
15
  require "openstax/salesforce/remote/lead"
16
16
  require "openstax/salesforce/remote/campaign"
17
17
  require "openstax/salesforce/remote/campaign_member"
18
+ require "openstax/salesforce/remote/account_contact_relation"
18
19
 
19
20
  module OpenStax
20
21
  module Salesforce
@@ -32,7 +33,7 @@ module OpenStax
32
33
  attr_accessor :username, :password, :security_token, :consumer_key, :consumer_secret
33
34
 
34
35
  def api_version
35
- @api_version ||= '37.0'
36
+ @api_version ||= '51.0'
36
37
  end
37
38
 
38
39
  def login_domain
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: 5.0.0
4
+ version: 5.4.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-12 00:00:00.000000000 Z
12
+ date: 2021-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -117,6 +117,7 @@ files:
117
117
  - lib/openstax/salesforce/active_force.rb
118
118
  - lib/openstax/salesforce/client.rb
119
119
  - lib/openstax/salesforce/engine.rb
120
+ - lib/openstax/salesforce/remote/account_contact_relation.rb
120
121
  - lib/openstax/salesforce/remote/book.rb
121
122
  - lib/openstax/salesforce/remote/campaign.rb
122
123
  - lib/openstax/salesforce/remote/campaign_member.rb
@@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  - !ruby/object:Gem::Version
150
151
  version: '0'
151
152
  requirements: []
152
- rubygems_version: 3.2.7
153
+ rubygems_version: 3.1.4
153
154
  signing_key:
154
155
  specification_version: 4
155
156
  summary: Interface gem for accessing OpenStax's Salesforce instance