landslider 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/{CHANGELOG.markdown → HISTORY.md} +4 -0
- data/README.md +108 -0
- data/VERSION.yml +1 -1
- data/bin/generate_api_key.rb +1 -1
- data/landslider.gemspec +41 -5
- data/lib/landslider/entities/ws_account.rb +32 -0
- data/lib/landslider/entities/ws_account_note.rb +13 -0
- data/lib/landslider/entities/ws_account_note_search.rb +23 -0
- data/lib/landslider/entities/ws_address.rb +17 -0
- data/lib/landslider/entities/ws_contact.rb +38 -0
- data/lib/landslider/entities/ws_contact_note.rb +13 -0
- data/lib/landslider/entities/ws_contact_note_search.rb +23 -0
- data/lib/landslider/entities/ws_contact_search.rb +28 -0
- data/lib/landslider/entities/ws_employee.rb +23 -0
- data/lib/landslider/entities/ws_entity.rb +15 -0
- data/lib/landslider/entities/ws_lead.rb +35 -0
- data/lib/landslider/entities/ws_lead_contact.rb +14 -0
- data/lib/landslider/entities/ws_lead_note.rb +14 -0
- data/lib/landslider/entities/ws_lead_note_search.rb +24 -0
- data/lib/landslider/entities/ws_lead_search.rb +31 -0
- data/lib/landslider/entities/ws_my_list.rb +20 -0
- data/lib/landslider/entities/ws_note.rb +21 -0
- data/lib/landslider/entities/ws_opportunity.rb +38 -0
- data/lib/landslider/entities/ws_opportunity_note.rb +13 -0
- data/lib/landslider/entities/ws_opportunity_note_search.rb +23 -0
- data/lib/landslider/entities/ws_opportunity_status.rb +17 -0
- data/lib/landslider/entities/ws_payment_term.rb +17 -0
- data/lib/landslider/entities/ws_pick_list_item.rb +14 -0
- data/lib/landslider/entities/ws_primary_entity.rb +11 -0
- data/lib/landslider/entities/ws_product.rb +35 -0
- data/lib/landslider/entities/ws_product_family.rb +17 -0
- data/lib/landslider/entities/ws_product_result.rb +12 -0
- data/lib/landslider/entities/ws_record_upsert_result.rb +13 -0
- data/lib/landslider/entities/ws_result.rb +16 -0
- data/lib/landslider/entities/ws_search.rb +55 -0
- data/lib/landslider/entities/ws_search_criterion.rb +121 -0
- data/lib/landslider/entities/ws_search_operator.rb +59 -0
- data/lib/landslider/entities/ws_selling_process.rb +17 -0
- data/lib/landslider/entities/ws_user.rb +10 -0
- data/lib/landslider/entities/ws_user_search.rb +20 -0
- data/lib/landslider/entities.rb +46 -0
- data/lib/landslider.rb +71 -116
- data/test/ws_search_test.rb +13 -0
- metadata +41 -5
- data/README.rdoc +0 -77
data/README.md
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
Landslider
|
2
|
+
==========
|
3
|
+
|
4
|
+
Ruby interface to Landslide's SOAP-based API
|
5
|
+
|
6
|
+
Introduction
|
7
|
+
------------
|
8
|
+
|
9
|
+
This gem can be used to communicate with Landslide's SOAP-based API using ruby code.
|
10
|
+
|
11
|
+
[WSDL](https://jaytest.api.landslide.com/webservices/SoapService?wsdl) endpoint url: [https://jaytest.api.landslide.com/webservices/SoapService?wsdl](https://jaytest.api.landslide.com/webservices/SoapService?wsdl)
|
12
|
+
|
13
|
+
If you already have a landslide account, contact support to enable the API. You can also start a 30-day trial account [here](http://www.landslide.com/~jayp/en/trial).
|
14
|
+
|
15
|
+
Dependencies
|
16
|
+
------------
|
17
|
+
|
18
|
+
$ gem install jeweler curb handsoap
|
19
|
+
|
20
|
+
Installation
|
21
|
+
------------
|
22
|
+
|
23
|
+
|
24
|
+
$ gem install landslider
|
25
|
+
|
26
|
+
Documentation
|
27
|
+
-------------
|
28
|
+
|
29
|
+
Read the [ruby doc](http://www.rubydoc.info/github/j4y/landslider/master/frames).
|
30
|
+
|
31
|
+
Configuration
|
32
|
+
-------------
|
33
|
+
|
34
|
+
See bin/genarate_api_key.rb for details on generating your API key
|
35
|
+
|
36
|
+
LS_INSTANCE_NAME = 'jaytest'
|
37
|
+
LS_API_USERNAME = 'jayp@landslide.com'
|
38
|
+
LS_API_KEY = '53308ccbdcb7f23fbd81a0b2ebcf12a4'
|
39
|
+
|
40
|
+
Usage
|
41
|
+
-----
|
42
|
+
|
43
|
+
This is calling login to get a session id which is then used to get a list of accounts.
|
44
|
+
|
45
|
+
require 'landslider'
|
46
|
+
response = Landslider.login('LOGINTOKEN=' + LS_INSTANCE_NAME)
|
47
|
+
response = Landslider.get_accounts(response[:session_id])
|
48
|
+
response[:accounts].each do |account|
|
49
|
+
puts "id: #{account[:account_id]} name: #{account[:account_name]}"
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
Testing
|
56
|
+
-------
|
57
|
+
|
58
|
+
The default rake task is set to run the tests.
|
59
|
+
|
60
|
+
$ rake
|
61
|
+
|
62
|
+
Tests are needed here because the API uses a specific XML structure for requests and responses.
|
63
|
+
|
64
|
+
|
65
|
+
Contributing
|
66
|
+
------------
|
67
|
+
|
68
|
+
1. Fork it.
|
69
|
+
2. Create a branch (`git checkout -b my_markup`)
|
70
|
+
3. Commit your changes (`git commit -am "Added Snarkdown"`)
|
71
|
+
4. Push to the branch (`git push origin my_markup`)
|
72
|
+
5. Create an [Issue][1] with a link to your branch
|
73
|
+
6. Enjoy a refreshing Diet Coke and wait
|
74
|
+
|
75
|
+
API methods
|
76
|
+
-----------
|
77
|
+
|
78
|
+
Here is a list of API methods that have been added:
|
79
|
+
|
80
|
+
* login
|
81
|
+
* getApiVersion
|
82
|
+
* getAccounts
|
83
|
+
* getAccountById
|
84
|
+
* getAccountCustomFields
|
85
|
+
* getAccountContacts
|
86
|
+
* getAccountNotes
|
87
|
+
* getAccountOpportunities
|
88
|
+
* getContacts
|
89
|
+
* getContactCustomFields
|
90
|
+
* getContactNotes
|
91
|
+
* getInstanceInformation
|
92
|
+
* getLeads
|
93
|
+
* getLeadCustomFields
|
94
|
+
* getLeadNotes
|
95
|
+
* getOpportunities
|
96
|
+
* getOpportunityCustomFields
|
97
|
+
* getOpportunityNotes
|
98
|
+
* getUserInformation
|
99
|
+
* getUserInformationById
|
100
|
+
|
101
|
+
TODO
|
102
|
+
----
|
103
|
+
|
104
|
+
* Modify configuration to be rails 3 friendly. The configuation was needed before the environment finished loading. See landslide-rails
|
105
|
+
* add more API calls
|
106
|
+
* use HTTP cookies to maintain session state. maybe something like http_request.headers.merge!({'cookie' => ["JSESSIONID=#{self.session_id}"]})
|
107
|
+
* eliminate slow inefficient XPath queries
|
108
|
+
* eliminate test data dependency on the jaytest instance
|
data/VERSION.yml
CHANGED
data/bin/generate_api_key.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'digest/md5'
|
3
3
|
|
4
4
|
LS_INSTANCE_NAME = 'jaytest'
|
5
|
-
LS_API_PASSWORD = '
|
5
|
+
LS_API_PASSWORD = 'letmein52`'
|
6
6
|
|
7
7
|
# the api key is an md5 hash of the user password + instance name
|
8
8
|
puts "LS_API_KEY = '#{Digest::MD5.hexdigest(LS_API_PASSWORD + LS_INSTANCE_NAME)}'"
|
data/landslider.gemspec
CHANGED
@@ -5,30 +5,66 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{landslider}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jay Prall"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-11}
|
13
13
|
s.default_executable = %q{generate_api_key.rb}
|
14
14
|
s.description = %q{Landslider is a ruby interface to the Landslide SOAP-based API}
|
15
15
|
s.email = %q{jay@j4y.net}
|
16
16
|
s.executables = ["generate_api_key.rb"]
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE",
|
19
|
-
"README.
|
19
|
+
"README.md"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
|
-
"CHANGELOG.markdown",
|
23
22
|
"Gemfile",
|
23
|
+
"HISTORY.md",
|
24
24
|
"LICENSE",
|
25
|
-
"README.
|
25
|
+
"README.md",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION.yml",
|
28
28
|
"bin/generate_api_key.rb",
|
29
29
|
"init.rb",
|
30
30
|
"landslider.gemspec",
|
31
31
|
"lib/landslider.rb",
|
32
|
+
"lib/landslider/entities.rb",
|
33
|
+
"lib/landslider/entities/ws_account.rb",
|
34
|
+
"lib/landslider/entities/ws_account_note.rb",
|
35
|
+
"lib/landslider/entities/ws_account_note_search.rb",
|
36
|
+
"lib/landslider/entities/ws_address.rb",
|
37
|
+
"lib/landslider/entities/ws_contact.rb",
|
38
|
+
"lib/landslider/entities/ws_contact_note.rb",
|
39
|
+
"lib/landslider/entities/ws_contact_note_search.rb",
|
40
|
+
"lib/landslider/entities/ws_contact_search.rb",
|
41
|
+
"lib/landslider/entities/ws_employee.rb",
|
42
|
+
"lib/landslider/entities/ws_entity.rb",
|
43
|
+
"lib/landslider/entities/ws_lead.rb",
|
44
|
+
"lib/landslider/entities/ws_lead_contact.rb",
|
45
|
+
"lib/landslider/entities/ws_lead_note.rb",
|
46
|
+
"lib/landslider/entities/ws_lead_note_search.rb",
|
47
|
+
"lib/landslider/entities/ws_lead_search.rb",
|
48
|
+
"lib/landslider/entities/ws_my_list.rb",
|
49
|
+
"lib/landslider/entities/ws_note.rb",
|
50
|
+
"lib/landslider/entities/ws_opportunity.rb",
|
51
|
+
"lib/landslider/entities/ws_opportunity_note.rb",
|
52
|
+
"lib/landslider/entities/ws_opportunity_note_search.rb",
|
53
|
+
"lib/landslider/entities/ws_opportunity_status.rb",
|
54
|
+
"lib/landslider/entities/ws_payment_term.rb",
|
55
|
+
"lib/landslider/entities/ws_pick_list_item.rb",
|
56
|
+
"lib/landslider/entities/ws_primary_entity.rb",
|
57
|
+
"lib/landslider/entities/ws_product.rb",
|
58
|
+
"lib/landslider/entities/ws_product_family.rb",
|
59
|
+
"lib/landslider/entities/ws_product_result.rb",
|
60
|
+
"lib/landslider/entities/ws_record_upsert_result.rb",
|
61
|
+
"lib/landslider/entities/ws_result.rb",
|
62
|
+
"lib/landslider/entities/ws_search.rb",
|
63
|
+
"lib/landslider/entities/ws_search_criterion.rb",
|
64
|
+
"lib/landslider/entities/ws_search_operator.rb",
|
65
|
+
"lib/landslider/entities/ws_selling_process.rb",
|
66
|
+
"lib/landslider/entities/ws_user.rb",
|
67
|
+
"lib/landslider/entities/ws_user_search.rb",
|
32
68
|
"test/landslider_test.rb",
|
33
69
|
"test/test_helper.rb",
|
34
70
|
"test/ws_account_note_search_test.rb",
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsAccount < WsEntity
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :account_id, :account_owner, :archived_by, :create_by, :update_by, :parent_account_id
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :account_name, :account_number, :division, :fax
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :phone, :source_id, :url
|
14
|
+
|
15
|
+
# @return [Date]
|
16
|
+
attr_reader :created_on, :updated_on
|
17
|
+
|
18
|
+
# @return [WsAccountType]
|
19
|
+
attr_reader :account_type
|
20
|
+
|
21
|
+
# @return [WsAddress]
|
22
|
+
attr_reader :billing_address, :main_address, :shipping_address
|
23
|
+
|
24
|
+
# @return [WsContact]
|
25
|
+
attr_reader :primary_contact
|
26
|
+
|
27
|
+
# @return WsAccountCustomField[]
|
28
|
+
attr_reader :custom_fields
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Landslider
|
2
|
+
|
3
|
+
class WsAccountNoteSearch < WsSearch
|
4
|
+
|
5
|
+
# @return [Integer]
|
6
|
+
attr_reader :account_id
|
7
|
+
|
8
|
+
# @param [Integer] account_id an account id
|
9
|
+
def initialize(account_id)
|
10
|
+
@account_id = account_id
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param [Handsoap::XmlMason::Node] msg
|
14
|
+
# @return [Handsoap::XmlMason::Node]
|
15
|
+
def soapify_for(msg)
|
16
|
+
msg.add('accountNoteSearch') { |crit|
|
17
|
+
crit.add 'accountId', @account_id
|
18
|
+
super(crit)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsAddress < WsEntity
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :address_id
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :address1, :address2, :address3, :address_node, :city
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :country, :state, :zip_postal
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class Landslider
|
2
|
+
class WsContact < WsEntity
|
3
|
+
|
4
|
+
# @return [Integer]
|
5
|
+
attr_reader :contact_id, :owner_id, :create_by, :update_by, :archived_by
|
6
|
+
|
7
|
+
# @return [String]
|
8
|
+
attr_reader :namae, :account_name, :description, :source_system_id
|
9
|
+
|
10
|
+
# @return [Date]
|
11
|
+
attr_reader :archived_on, :created_on, :updated_on
|
12
|
+
|
13
|
+
# @return [Boolean]
|
14
|
+
attr_reader :buyer
|
15
|
+
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :cell_phone, :comments, :company_name
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :department, :email, :fax, :first_name
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :home_phone, :last_name, :middle_initials, :suffix
|
24
|
+
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :source_system_id
|
27
|
+
|
28
|
+
# @return [WsContactType]
|
29
|
+
attr_reader :contact_type
|
30
|
+
|
31
|
+
# @return [WsAddress]
|
32
|
+
attr_reader :work_address
|
33
|
+
|
34
|
+
# @return [WsAccountContact]
|
35
|
+
attr_reader :account_contact
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Landslider
|
2
|
+
|
3
|
+
class WsContactNoteSearch < WsSearch
|
4
|
+
|
5
|
+
# @return [Integer]
|
6
|
+
attr_reader :contact_id
|
7
|
+
|
8
|
+
# @param [Integer] contact_id a contact id
|
9
|
+
def initialize(contact_id)
|
10
|
+
@contact_id = contact_id
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param [Handsoap::XmlMason::Node] msg
|
14
|
+
# @return [Handsoap::XmlMason::Node]
|
15
|
+
def soapify_for(msg)
|
16
|
+
msg.add('contactNote') { |crit|
|
17
|
+
crit.add 'contactId', @contact_id
|
18
|
+
super(crit)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
# search criteria for getContacts
|
5
|
+
class WsContactSearch < WsSearch
|
6
|
+
|
7
|
+
# @return [String]
|
8
|
+
attr_writer :city, :company_name, :email, :title, :first_name
|
9
|
+
|
10
|
+
# @return [String]
|
11
|
+
attr_writer :middle_initial, :last_name, :home_phone, :work_phone, :cell_phone
|
12
|
+
|
13
|
+
# @return [String]
|
14
|
+
attr_writer :other_phone, :state, :postal_code, :country
|
15
|
+
|
16
|
+
# @param [Handsoap::XmlMason::Node] msg
|
17
|
+
# @return [Handsoap::XmlMason::Node]
|
18
|
+
def soapify_for(msg)
|
19
|
+
super(crit)
|
20
|
+
crit.add 'firstName', @first_name unless @first_name.nil?
|
21
|
+
crit.add 'lastName', @last_name unless @last_name.nil?
|
22
|
+
crit.add 'email', @email unless @email.nil?
|
23
|
+
crit.add 'state', @state unless @state.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsEmployee < WsEntity
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :employee_id
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :cell_phone, :company_name, :email_address, :fax
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :first_name, :home_phone, :last_name, :office_phone
|
14
|
+
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :title, :user_id
|
17
|
+
|
18
|
+
# @return [Boolean]
|
19
|
+
attr_reader :administrator
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsLead < WsEntity
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :lead_id, :account_id, :target_id, :created_by, :primary_owner_id
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :name, :account_name, :description, :source_system_id
|
11
|
+
|
12
|
+
# @return [Boolean]
|
13
|
+
attr_reader :hot, :ok_to_call, :ok_to_email
|
14
|
+
|
15
|
+
# @return [WsLeadTarget]
|
16
|
+
attr_reader :lead_target
|
17
|
+
|
18
|
+
# @return [WsContact]
|
19
|
+
attr_reader :lead_contact
|
20
|
+
|
21
|
+
# @return [WsLeadRating]
|
22
|
+
attr_reader :lead_rating
|
23
|
+
|
24
|
+
# @return [WsLeadStatus]
|
25
|
+
attr_reader :lead_status
|
26
|
+
|
27
|
+
# @return [WsLeadSource]
|
28
|
+
attr_reader :lead_source
|
29
|
+
|
30
|
+
# @return [WsSellingProcess]
|
31
|
+
attr_reader :lead_selling_process
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class Landslider
|
2
|
+
|
3
|
+
class WsLeadNoteSearch < WsSearch
|
4
|
+
|
5
|
+
# @return [Integer]
|
6
|
+
attr_reader :lead_id
|
7
|
+
|
8
|
+
# @param [Integer] lead_id a lead id
|
9
|
+
def initialize(lead_id)
|
10
|
+
@lead_id = lead_id
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param [Handsoap::XmlMason::Node] msg
|
14
|
+
# @return [Handsoap::XmlMason::Node]
|
15
|
+
def soapify_for(msg)
|
16
|
+
msg.add('leadNote') { |crit|
|
17
|
+
crit.add 'leadId', @lead_id
|
18
|
+
super(crit)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
# search criteria for getLeads
|
5
|
+
class WsLeadSearch < WsSearch
|
6
|
+
|
7
|
+
# @return [Integer]
|
8
|
+
attr_writer :account_id, :company_id, :primary_owner_id, :status_id
|
9
|
+
|
10
|
+
# @return [Boolean]
|
11
|
+
attr_writer :hot
|
12
|
+
|
13
|
+
# @return [Date]
|
14
|
+
attr_writer :updated_on
|
15
|
+
|
16
|
+
# @return [String]
|
17
|
+
attr_writer :name
|
18
|
+
|
19
|
+
# @param [Handsoap::XmlMason::Node] msg
|
20
|
+
# @return [Handsoap::XmlMason::Node]
|
21
|
+
def soapify_for(msg)
|
22
|
+
super(msg)
|
23
|
+
msg.add 'name', @name unless @name.nil?
|
24
|
+
msg.add 'accountId', @account_id unless @account_id.nil?
|
25
|
+
msg.add 'companyId', @company_id unless @company_id.nil?
|
26
|
+
msg.add 'primaryOwnerId', @primary_owner_id unless @primary_owner_id.nil?
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsMyList < Object
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :my_list_id, :created_by
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :title, :description, :base_table
|
11
|
+
|
12
|
+
# @return [Date]
|
13
|
+
attr_reader :created_on
|
14
|
+
|
15
|
+
# @return [Boolean]
|
16
|
+
attr_reader :is_shared
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
# @todo Expose note type
|
5
|
+
class WsNote < WsEntity
|
6
|
+
|
7
|
+
# @return [Integer]
|
8
|
+
attr_reader :note_id, :archived_by, :created_by
|
9
|
+
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :note, :source_id
|
12
|
+
|
13
|
+
# @return [Boolean]
|
14
|
+
attr_reader :latest
|
15
|
+
|
16
|
+
# @return [Date]
|
17
|
+
attr_reader :created_on, :updated_on
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
class Landslider
|
3
|
+
|
4
|
+
class WsOpportunity < WsPrimaryEntity
|
5
|
+
|
6
|
+
# @return [Integer]
|
7
|
+
attr_reader :opportunity_id, :created_by, :archived_by, :current_phase_id
|
8
|
+
|
9
|
+
# @return [Integer]
|
10
|
+
attr_reader :confidence, :primary_owner_id
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :name, :account_name, :description, :current_phase_name
|
14
|
+
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :description, :source_system_id
|
17
|
+
|
18
|
+
# @return [WsLeadSource]
|
19
|
+
attr_reader :lead_source
|
20
|
+
|
21
|
+
# @return [WsSellingProcess]
|
22
|
+
attr_reader :selling_process
|
23
|
+
|
24
|
+
# @return [WsOpportunityStatus]
|
25
|
+
attr_reader :opportunity_status
|
26
|
+
|
27
|
+
# @return [WsOpportunityStatusReason]
|
28
|
+
attr_reader :opportunity_status_reason
|
29
|
+
|
30
|
+
# @return [Boolean]
|
31
|
+
attr_reader :hot
|
32
|
+
|
33
|
+
# @return [Date]
|
34
|
+
attr_reader :created_on, :updated_on
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Landslider
|
2
|
+
|
3
|
+
class WsOpportunityNoteSearch < WsSearch
|
4
|
+
|
5
|
+
# @return [Integer]
|
6
|
+
attr_reader :opportunity_id
|
7
|
+
|
8
|
+
# @param [Integer] opportunity_id an opportunity id
|
9
|
+
def initialize(opportunity_id)
|
10
|
+
@opportunity_id = opportunity_id
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param [Handsoap::XmlMason::Node] msg
|
14
|
+
# @return [Handsoap::XmlMason::Node]
|
15
|
+
def soapify_for(msg)
|
16
|
+
msg.add('opportunityNote') { |crit|
|
17
|
+
crit.add 'opportunityId', @opportunity_id
|
18
|
+
super(crit)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|