bitrix_webhook 0.2.2 → 0.2.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd436509daee8213dc2f06d78fc04cd23013a905
|
4
|
+
data.tar.gz: 76488786b72228ccfacf00604bd9cda5d5bf19d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1369117774c7ae55ee1c136fef27be4991e7cfb3647fc9344dd4cd8156d93de4a1a7913c6e1f891128c3704b214ba443a6a25647ffebf6ebf5dc03482eefee56
|
7
|
+
data.tar.gz: 9bdcb4a5b1c57afa12df29458fcc0979c7aee30c7f902ac0690b59b82a7a684b3f67615c0480b39b05cb634aff28cab0e8434622bd8f23b7826d82ec84429986
|
data/README.md
CHANGED
@@ -40,14 +40,14 @@ You get https://your-portal/rest/your-webhook-id/your-webhook-key/profile/
|
|
40
40
|
|
41
41
|
config.bitrix24_url = your-portal.bitrix24.ru
|
42
42
|
config.hook = zdfmoz6nub3uacft
|
43
|
-
config.
|
43
|
+
config.webhook_user = 2
|
44
44
|
|
45
45
|
|
46
46
|
```ruby
|
47
47
|
BitrixWebhook.configuration do |config|
|
48
48
|
config.bitrix24_url = 'URL' # Like this b21-6l64i7.bitrix24.ru
|
49
49
|
config.hook = 'Hook' # Like this ak75dm93k5eq8215
|
50
|
-
config.
|
50
|
+
config.webhook_user = 'id' # Like this 1
|
51
51
|
end
|
52
52
|
```
|
53
53
|
|
@@ -7,12 +7,12 @@ module BitrixWebhook
|
|
7
7
|
lname: '',
|
8
8
|
status_id: 'NEW',
|
9
9
|
opened: 'Y',
|
10
|
-
assigned_by_id: BitrixWebhook.
|
10
|
+
assigned_by_id: BitrixWebhook.webhook_user,
|
11
11
|
register_sonet_event: 'Y',
|
12
12
|
}
|
13
13
|
|
14
14
|
def self.base_url(method)
|
15
|
-
"https://#{BitrixWebhook.bitrix24_url}/rest/#{BitrixWebhook.
|
15
|
+
"https://#{BitrixWebhook.bitrix24_url}/rest/#{BitrixWebhook.webhook_user}/#{ BitrixWebhook.hook}/crm.lead.#{method}.json?"
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.add(options = {})
|
@@ -12,12 +12,12 @@ module BitrixWebhook; class Config
|
|
12
12
|
class Configuration
|
13
13
|
attr_accessor :bitrix24_url
|
14
14
|
attr_accessor :hook
|
15
|
-
attr_accessor :
|
15
|
+
attr_accessor :webhook_user
|
16
16
|
|
17
17
|
def initialize
|
18
18
|
@bitrix24_url= 'bitrix24_url'
|
19
19
|
@hook = 'hook'
|
20
|
-
@
|
20
|
+
@webhook_user = 'id'
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end; end
|
data/lib/bitrix_webhook.rb
CHANGED