amorail 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rubocop.yml +61 -0
  4. data/.travis.yml +9 -0
  5. data/Gemfile +5 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +245 -0
  8. data/Rakefile +15 -0
  9. data/amorail.gemspec +33 -0
  10. data/lib/amorail.rb +49 -0
  11. data/lib/amorail/client.rb +101 -0
  12. data/lib/amorail/config.rb +17 -0
  13. data/lib/amorail/entities/company.rb +23 -0
  14. data/lib/amorail/entities/contact.rb +29 -0
  15. data/lib/amorail/entities/contact_link.rb +32 -0
  16. data/lib/amorail/entities/elementable.rb +37 -0
  17. data/lib/amorail/entities/lead.rb +26 -0
  18. data/lib/amorail/entities/leadable.rb +29 -0
  19. data/lib/amorail/entities/note.rb +17 -0
  20. data/lib/amorail/entities/task.rb +18 -0
  21. data/lib/amorail/entities/webhook.rb +42 -0
  22. data/lib/amorail/entity.rb +128 -0
  23. data/lib/amorail/entity/finders.rb +67 -0
  24. data/lib/amorail/entity/params.rb +95 -0
  25. data/lib/amorail/entity/persistence.rb +66 -0
  26. data/lib/amorail/exceptions.rb +25 -0
  27. data/lib/amorail/property.rb +130 -0
  28. data/lib/amorail/railtie.rb +8 -0
  29. data/lib/amorail/version.rb +4 -0
  30. data/lib/tasks/amorail.rake +6 -0
  31. data/spec/client_spec.rb +123 -0
  32. data/spec/company_spec.rb +82 -0
  33. data/spec/contact_link_spec.rb +40 -0
  34. data/spec/contact_spec.rb +187 -0
  35. data/spec/entity_spec.rb +55 -0
  36. data/spec/fixtures/accounts/response_1.json +344 -0
  37. data/spec/fixtures/accounts/response_2.json +195 -0
  38. data/spec/fixtures/amorail_test.yml +3 -0
  39. data/spec/fixtures/contacts/create.json +13 -0
  40. data/spec/fixtures/contacts/find_many.json +57 -0
  41. data/spec/fixtures/contacts/find_one.json +41 -0
  42. data/spec/fixtures/contacts/links.json +16 -0
  43. data/spec/fixtures/contacts/my_contact_find.json +47 -0
  44. data/spec/fixtures/contacts/update.json +13 -0
  45. data/spec/fixtures/leads/create.json +13 -0
  46. data/spec/fixtures/leads/find_many.json +73 -0
  47. data/spec/fixtures/leads/links.json +16 -0
  48. data/spec/fixtures/leads/update.json +13 -0
  49. data/spec/fixtures/leads/update_errors.json +12 -0
  50. data/spec/fixtures/webhooks/list.json +24 -0
  51. data/spec/fixtures/webhooks/subscribe.json +17 -0
  52. data/spec/fixtures/webhooks/unsubscribe.json +17 -0
  53. data/spec/helpers/webmock_helpers.rb +279 -0
  54. data/spec/lead_spec.rb +101 -0
  55. data/spec/my_contact_spec.rb +48 -0
  56. data/spec/note_spec.rb +26 -0
  57. data/spec/property_spec.rb +45 -0
  58. data/spec/spec_helper.rb +20 -0
  59. data/spec/support/elementable_example.rb +52 -0
  60. data/spec/support/entity_class_example.rb +15 -0
  61. data/spec/support/leadable_example.rb +33 -0
  62. data/spec/support/my_contact.rb +3 -0
  63. data/spec/support/my_entity.rb +4 -0
  64. data/spec/task_spec.rb +49 -0
  65. data/spec/webhook_spec.rb +59 -0
  66. metadata +319 -0
@@ -0,0 +1,48 @@
1
+ require "spec_helper"
2
+
3
+ describe MyContact do
4
+ before { mock_api }
5
+
6
+ describe ".properties" do
7
+ subject { described_class.properties }
8
+
9
+ specify do
10
+ is_expected.to include(:email, :phone, :teachbase_id)
11
+ end
12
+ end
13
+
14
+ describe "#params" do
15
+ let(:company) do
16
+ described_class.new(
17
+ name: 'Test inc',
18
+ phone: '12345678',
19
+ email: 'test@mala.ru',
20
+ teachbase_id: 123
21
+ )
22
+ end
23
+
24
+ subject { company.params }
25
+
26
+ specify { is_expected.to include(:last_modified) }
27
+ specify { is_expected.to include(name: 'Test inc') }
28
+
29
+ it "contains custom property" do
30
+ prop = subject[:custom_fields].detect { |p| p[:id] == "116302" }
31
+ expect(prop).not_to be_nil
32
+ expect(prop[:values].first[:value]).to eq 123
33
+ end
34
+ end
35
+
36
+ describe ".find" do
37
+ before { my_contact_find_stub(Amorail.config.api_endpoint, 11) }
38
+
39
+ it "loads entity" do
40
+ obj = described_class.find(11)
41
+ expect(obj.id).to eq 11
42
+ expect(obj.company_name).to eq "Foo Inc."
43
+ expect(obj.email).to eq "foo@tb.com"
44
+ expect(obj.teachbase_id).to eq 1123
45
+ expect(obj.params[:id]).to eq 11
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,26 @@
1
+ require 'spec_helper'
2
+
3
+ describe Amorail::Note do
4
+ before { mock_api }
5
+
6
+ it_behaves_like 'elementable'
7
+
8
+ describe 'validations' do
9
+ it { is_expected.to validate_presence_of(:text) }
10
+ it { is_expected.to validate_presence_of(:note_type) }
11
+ it { is_expected.to validate_inclusion_of(:element_type).in_range(1..4) }
12
+ end
13
+
14
+ describe '.attributes' do
15
+ subject { described_class.attributes }
16
+
17
+ it_behaves_like 'entity_class'
18
+
19
+ specify do
20
+ is_expected.to include(
21
+ :text,
22
+ :note_type
23
+ )
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,45 @@
1
+ require "spec_helper"
2
+ require "webmock/rspec"
3
+
4
+ describe Amorail::Property do
5
+ before(:each) { mock_api }
6
+
7
+ let(:prop) { Amorail.properties }
8
+
9
+ it "should parse companies hash" do
10
+ expect(prop.company.phone.present?).to be_truthy
11
+ expect(prop.company.phone.is_a?(described_class::PropertyItem)).to be_truthy
12
+ expect(prop.company.phone.id.present?).to be_truthy
13
+ expect(prop.company.data["phone"].data["id"]).to eq prop.company.phone.id
14
+
15
+ expect(prop.company.phone.id).to eq "1460589"
16
+ expect(prop.company.address.id).to eq "1460597"
17
+ expect(prop.company.email.id).to eq "1460591"
18
+ expect(prop.company.web.id).to eq "1460593"
19
+ end
20
+
21
+ it "should parse contacts hash" do
22
+ expect(prop.contacts.email.present?).to be_truthy
23
+ expect(prop.contacts.im.is_a?(described_class::PropertyItem)).to be_truthy
24
+ expect(prop.contacts.im.id.present?).to be_truthy
25
+ expect(prop.contacts.data["im"].data["id"]).to eq prop.contacts.im.id
26
+
27
+ expect(prop.contacts.im.id).to eq "1460595"
28
+ expect(prop.contacts.position.id).to eq "1460587"
29
+ expect(prop.contacts.phone.id).to eq "1460589"
30
+ expect(prop.contacts.email.id).to eq "1460591"
31
+ expect(prop.contacts.teachbase_id.id).to eq "116302"
32
+ end
33
+
34
+ it "should parse leads hash" do
35
+ expect(prop.leads.textfield.id).to eq "484604"
36
+ expect(prop.leads.flag.id).to eq "484606"
37
+ expect(prop.leads.statuses["Первичный контакт"].id).to eq "8195972"
38
+ expect(prop.leads.statuses["Успешно реализовано"].id).to eq "142"
39
+ end
40
+
41
+ it "should parse task types" do
42
+ expect(prop.tasks.follow_up.id).to eq 1
43
+ expect(prop.tasks["CALL"].id).to eq 1
44
+ end
45
+ end
@@ -0,0 +1,20 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require 'rspec'
5
+ require 'amorail'
6
+ require 'pry-byebug'
7
+ require 'webmock/rspec'
8
+ require 'shoulda/matchers'
9
+ require 'helpers/webmock_helpers'
10
+
11
+ # Cleanup Amorail env
12
+ ENV.delete_if { |k, _| k =~ /amorail/i }
13
+ ENV["AMORAIL_CONF"] = File.expand_path("fixtures/amorail_test.yml", __dir__)
14
+
15
+ Dir[File.expand_path("support/**/*.rb", __dir__)].each { |f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ config.mock_with :rspec
19
+ include AmoWebMock
20
+ end
@@ -0,0 +1,52 @@
1
+ shared_examples 'elementable' do
2
+ describe 'validations' do
3
+ it { is_expected.to validate_presence_of(:element_id) }
4
+ it { is_expected.to validate_presence_of(:element_type) }
5
+ end
6
+
7
+ describe '.attributes' do
8
+ subject { described_class.attributes }
9
+
10
+ specify do
11
+ is_expected.to include(
12
+ :element_type,
13
+ :element_id
14
+ )
15
+ end
16
+ end
17
+
18
+ describe '#params' do
19
+ subject { elementable.params }
20
+
21
+ let(:elementable) do
22
+ described_class.new(
23
+ element_id: 1,
24
+ element_type: 2
25
+ )
26
+ end
27
+
28
+ it { is_expected.to include(element_id: 1) }
29
+ it { is_expected.to include(element_type: 2) }
30
+ end
31
+
32
+ describe 'element type behaviour' do
33
+ let(:elementable) { described_class.new }
34
+
35
+ it 'set element_type on initialize' do
36
+ expect(described_class.new(lead: true).element_type).to eq 2
37
+ expect(described_class.new(lead: false).element_type).to be_nil
38
+ expect(described_class.new(contact: true).contact?).to be_truthy
39
+ end
40
+
41
+ it 'set element_type with bang method' do
42
+ elementable.contact!
43
+ expect(elementable.element_type).to eq 1
44
+
45
+ elementable.lead!
46
+ expect(elementable.element_type).to eq 2
47
+
48
+ elementable.company!
49
+ expect(elementable.element_type).to eq 3
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ shared_examples 'entity_class' do
4
+ subject { described_class.attributes }
5
+
6
+ specify do
7
+ is_expected.to include(
8
+ :id,
9
+ :request_id,
10
+ :responsible_user_id,
11
+ :date_create,
12
+ :last_modified
13
+ )
14
+ end
15
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ shared_examples 'leadable' do
4
+ let(:leadable) { described_class.new }
5
+ subject { leadable.params }
6
+
7
+ specify { is_expected.not_to include(:linked_leads_id) }
8
+
9
+ context 'with leads' do
10
+ before { leadable.linked_leads_id << 100 }
11
+ specify { is_expected.to include(:linked_leads_id) }
12
+ specify { expect(subject.fetch(:linked_leads_id)).to include(100) }
13
+ end
14
+
15
+ describe "#leads" do
16
+ before { leads_stub(Amorail.config.api_endpoint, [1, 2]) }
17
+
18
+ let(:leadable) { described_class.new(linked_leads_id: ['1', '2']) }
19
+
20
+ it "loads leads" do
21
+ expect(leadable.leads.size).to eq 2
22
+ expect(leadable.leads.first).to be_a(Amorail::Lead)
23
+ expect(leadable.leads.first.name).to eq "Research new technologies"
24
+ end
25
+
26
+ it "cache results" do
27
+ url = URI.join(Amorail.config.api_endpoint, Amorail::Lead.remote_url('list'))
28
+ leadable.leads
29
+ leadable.leads
30
+ expect(WebMock).to have_requested(:get, url).with(query: { id: [1, 2] }).once
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,3 @@
1
+ class MyContact < Amorail::Contact # :nodoc:
2
+ amo_property :teachbase_id
3
+ end
@@ -0,0 +1,4 @@
1
+ # We only need this class to set Amo names for core Entity
2
+ class MyEntity < Amorail::Entity # :nodoc:
3
+ amo_names 'entity'
4
+ end
@@ -0,0 +1,49 @@
1
+ require "spec_helper"
2
+
3
+ describe Amorail::Task do
4
+ before { mock_api }
5
+
6
+ it_behaves_like 'elementable'
7
+
8
+ describe "validations" do
9
+ it { is_expected.to validate_presence_of(:text) }
10
+ it { is_expected.to validate_presence_of(:task_type) }
11
+ it { is_expected.to validate_presence_of(:complete_till) }
12
+ it { is_expected.to validate_inclusion_of(:element_type).in_range(1..3) }
13
+ end
14
+
15
+ describe ".attributes" do
16
+ subject { described_class.attributes }
17
+
18
+ it_behaves_like 'entity_class'
19
+
20
+ specify do
21
+ is_expected.to include(
22
+ :text,
23
+ :task_type,
24
+ :complete_till
25
+ )
26
+ end
27
+ end
28
+
29
+ describe "#params" do
30
+ let(:task) do
31
+ described_class.new(
32
+ text: 'Win the war',
33
+ task_type: 'test',
34
+ complete_till: '2015-05-09 12:00:00'
35
+ )
36
+ end
37
+
38
+ subject { task.params }
39
+
40
+ specify { is_expected.to include(:last_modified) }
41
+ specify { is_expected.to include(text: 'Win the war') }
42
+ specify { is_expected.to include(task_type: 'test') }
43
+ specify {
44
+ is_expected.to include(
45
+ complete_till: Time.local(2015, 5, 9, 12, 0, 0).to_i
46
+ )
47
+ }
48
+ end
49
+ end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+
3
+ describe Amorail::Webhook do
4
+ before { mock_api }
5
+
6
+ describe '.list' do
7
+ context 'there are some webhooks' do
8
+ before { webhooks_list_stub(Amorail.config.api_endpoint) }
9
+
10
+ it 'loads webhooks' do
11
+ res = described_class.list
12
+ expect(res.size).to eq 2
13
+ expect(res.first.id).to eq '1'
14
+ expect(res.first.url).to eq 'http://example.org'
15
+ expect(res.first.events).to eq ['add_contact']
16
+ expect(res.first.disabled).to eq false
17
+ expect(res.last.id).to eq '2'
18
+ expect(res.last.url).to eq 'http://example.com'
19
+ expect(res.last.events).to eq ['add_contact', 'add_company']
20
+ expect(res.last.disabled).to eq true
21
+ end
22
+ end
23
+
24
+ context 'there are not any webhooks' do
25
+ before { webhooks_list_stub(Amorail.config.api_endpoint, empty: true) }
26
+
27
+ it 'returns an empty array' do
28
+ res = described_class.list
29
+ expect(res).to eq []
30
+ end
31
+ end
32
+ end
33
+
34
+ describe '.subscribe' do
35
+ it 'creates webhooks' do
36
+ webhooks = [
37
+ { url: 'http://example.org', events: ['add_contact'] },
38
+ { url: 'http://example.com', events: ['add_contact', 'add_company'] }
39
+ ]
40
+ stub = webhooks_subscribe_stub(Amorail.config.api_endpoint, webhooks)
41
+ res = described_class.subscribe(webhooks)
42
+ expect(stub).to have_been_requested
43
+ expect(res.first.url).to eq 'http://example.org'
44
+ expect(res.last.url).to eq 'http://example.com'
45
+ end
46
+ end
47
+
48
+ describe '.unsubscribe' do
49
+ it 'removes webhooks' do
50
+ webhooks = [
51
+ { url: 'http://example.org', events: ['add_contact'] },
52
+ { url: 'http://example.com', events: ['add_contact', 'add_company'] }
53
+ ]
54
+ stub = webhooks_unsubscribe_stub(Amorail.config.api_endpoint, webhooks)
55
+ described_class.unsubscribe(webhooks)
56
+ expect(stub).to have_been_requested
57
+ end
58
+ end
59
+ end
metadata ADDED
@@ -0,0 +1,319 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amorail
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ platform: ruby
6
+ authors:
7
+ - alekseenkoss
8
+ - palkan
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2018-10-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.7'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.7'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '10.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '10.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.4'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.4'
56
+ - !ruby/object:Gem::Dependency
57
+ name: webmock
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: shoulda-matchers
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '2.0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '2.0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0.49'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0.49'
112
+ - !ruby/object:Gem::Dependency
113
+ name: anyway_config
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0.3'
122
+ type: :runtime
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0.3'
132
+ - !ruby/object:Gem::Dependency
133
+ name: faraday
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ type: :runtime
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ - !ruby/object:Gem::Dependency
147
+ name: faraday_middleware
148
+ requirement: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ type: :runtime
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ - !ruby/object:Gem::Dependency
161
+ name: activemodel
162
+ requirement: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ type: :runtime
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: json
176
+ requirement: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ type: :runtime
182
+ prerelease: false
183
+ version_requirements: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ description: Ruby API client for AmoCRM. You can integrate your system with it.
189
+ email:
190
+ - alekseenkoss@gmail.com
191
+ - dementiev.vm@gmail.com
192
+ executables: []
193
+ extensions: []
194
+ extra_rdoc_files: []
195
+ files:
196
+ - ".gitignore"
197
+ - ".rubocop.yml"
198
+ - ".travis.yml"
199
+ - Gemfile
200
+ - LICENSE.txt
201
+ - README.md
202
+ - Rakefile
203
+ - amorail.gemspec
204
+ - lib/amorail.rb
205
+ - lib/amorail/client.rb
206
+ - lib/amorail/config.rb
207
+ - lib/amorail/entities/company.rb
208
+ - lib/amorail/entities/contact.rb
209
+ - lib/amorail/entities/contact_link.rb
210
+ - lib/amorail/entities/elementable.rb
211
+ - lib/amorail/entities/lead.rb
212
+ - lib/amorail/entities/leadable.rb
213
+ - lib/amorail/entities/note.rb
214
+ - lib/amorail/entities/task.rb
215
+ - lib/amorail/entities/webhook.rb
216
+ - lib/amorail/entity.rb
217
+ - lib/amorail/entity/finders.rb
218
+ - lib/amorail/entity/params.rb
219
+ - lib/amorail/entity/persistence.rb
220
+ - lib/amorail/exceptions.rb
221
+ - lib/amorail/property.rb
222
+ - lib/amorail/railtie.rb
223
+ - lib/amorail/version.rb
224
+ - lib/tasks/amorail.rake
225
+ - spec/client_spec.rb
226
+ - spec/company_spec.rb
227
+ - spec/contact_link_spec.rb
228
+ - spec/contact_spec.rb
229
+ - spec/entity_spec.rb
230
+ - spec/fixtures/accounts/response_1.json
231
+ - spec/fixtures/accounts/response_2.json
232
+ - spec/fixtures/amorail_test.yml
233
+ - spec/fixtures/contacts/create.json
234
+ - spec/fixtures/contacts/find_many.json
235
+ - spec/fixtures/contacts/find_one.json
236
+ - spec/fixtures/contacts/links.json
237
+ - spec/fixtures/contacts/my_contact_find.json
238
+ - spec/fixtures/contacts/update.json
239
+ - spec/fixtures/leads/create.json
240
+ - spec/fixtures/leads/find_many.json
241
+ - spec/fixtures/leads/links.json
242
+ - spec/fixtures/leads/update.json
243
+ - spec/fixtures/leads/update_errors.json
244
+ - spec/fixtures/webhooks/list.json
245
+ - spec/fixtures/webhooks/subscribe.json
246
+ - spec/fixtures/webhooks/unsubscribe.json
247
+ - spec/helpers/webmock_helpers.rb
248
+ - spec/lead_spec.rb
249
+ - spec/my_contact_spec.rb
250
+ - spec/note_spec.rb
251
+ - spec/property_spec.rb
252
+ - spec/spec_helper.rb
253
+ - spec/support/elementable_example.rb
254
+ - spec/support/entity_class_example.rb
255
+ - spec/support/leadable_example.rb
256
+ - spec/support/my_contact.rb
257
+ - spec/support/my_entity.rb
258
+ - spec/task_spec.rb
259
+ - spec/webhook_spec.rb
260
+ homepage: ''
261
+ licenses:
262
+ - MIT
263
+ metadata: {}
264
+ post_install_message:
265
+ rdoc_options: []
266
+ require_paths:
267
+ - lib
268
+ required_ruby_version: !ruby/object:Gem::Requirement
269
+ requirements:
270
+ - - ">="
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
273
+ required_rubygems_version: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ requirements: []
279
+ rubyforge_project:
280
+ rubygems_version: 2.7.7
281
+ signing_key:
282
+ specification_version: 4
283
+ summary: Ruby API client for AmoCRM
284
+ test_files:
285
+ - spec/client_spec.rb
286
+ - spec/company_spec.rb
287
+ - spec/contact_link_spec.rb
288
+ - spec/contact_spec.rb
289
+ - spec/entity_spec.rb
290
+ - spec/fixtures/accounts/response_1.json
291
+ - spec/fixtures/accounts/response_2.json
292
+ - spec/fixtures/amorail_test.yml
293
+ - spec/fixtures/contacts/create.json
294
+ - spec/fixtures/contacts/find_many.json
295
+ - spec/fixtures/contacts/find_one.json
296
+ - spec/fixtures/contacts/links.json
297
+ - spec/fixtures/contacts/my_contact_find.json
298
+ - spec/fixtures/contacts/update.json
299
+ - spec/fixtures/leads/create.json
300
+ - spec/fixtures/leads/find_many.json
301
+ - spec/fixtures/leads/links.json
302
+ - spec/fixtures/leads/update.json
303
+ - spec/fixtures/leads/update_errors.json
304
+ - spec/fixtures/webhooks/list.json
305
+ - spec/fixtures/webhooks/subscribe.json
306
+ - spec/fixtures/webhooks/unsubscribe.json
307
+ - spec/helpers/webmock_helpers.rb
308
+ - spec/lead_spec.rb
309
+ - spec/my_contact_spec.rb
310
+ - spec/note_spec.rb
311
+ - spec/property_spec.rb
312
+ - spec/spec_helper.rb
313
+ - spec/support/elementable_example.rb
314
+ - spec/support/entity_class_example.rb
315
+ - spec/support/leadable_example.rb
316
+ - spec/support/my_contact.rb
317
+ - spec/support/my_entity.rb
318
+ - spec/task_spec.rb
319
+ - spec/webhook_spec.rb