contactforce 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e49694c5baf7c9af3528d8ab8ac0aa3f58877978
4
+ data.tar.gz: 6a86b00970eb8ba2261235765db39e5b5a1356a7
5
+ SHA512:
6
+ metadata.gz: 31584cd8378b50797f0316ce314697f27bdf8b860e6b2bd998a79ff946db4305f17a8e86e2f7b73856b004876c5a7f8fa1a479633beccac49729080d11a44805
7
+ data.tar.gz: 3e1189635159512c8f5ea5bdf4ebe98802a3ee100a1a533e1993454a6d4913e914bc1248566a45c9ca845bdf5761a3ead4d0e407ac00741fbe9feebf49131d99
@@ -0,0 +1,6 @@
1
+ class Contactforce
2
+ end
3
+
4
+ require 'contactforce/account'
5
+ require 'contactforce/contact'
6
+ require 'contactforce/salesforce_api'
@@ -0,0 +1,3 @@
1
+ class Account
2
+ attr_accessor :username, :password
3
+ end
@@ -0,0 +1,3 @@
1
+ class Contact
2
+ attr_accessor :name, :last_name, :email, :company, :job_title, :phone, :website
3
+ end
@@ -0,0 +1,12 @@
1
+ require 'soapforce'
2
+
3
+ class SalesforceAPI
4
+ def create_contact(contact)
5
+ @connection.create('Contact', { FirstName: contact.name, LastName: contact.last_name, Email: contact.email, Title: contact.job_title, Phone: contact.phone, Web_site__c: contact.website })
6
+ end
7
+
8
+ def connect(account)
9
+ @connection = Soapforce::Client.new
10
+ @connection.authenticate(:username => account.username, :password => account.password)
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: contactforce
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Felipe Duarte Silveira
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Contact creation using SOAP based on the attributes of a person from
14
+ the RD platform.
15
+ email: sduartefelipe@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/contactforce.rb
21
+ - lib/contactforce/account.rb
22
+ - lib/contactforce/contact.rb
23
+ - lib/contactforce/salesforce_api.rb
24
+ homepage: http://rubygems.org/gems/contactforce
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.4.5
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: Contact creation within a Salesforce account
48
+ test_files: []