amocrm 0.6.1 → 0.6.2
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/amocrm/models/custom_field_get_by_id_response.rb +4 -4
- data/lib/amocrm/models/entity_note_create_params.rb +6 -6
- data/lib/amocrm/models/entity_note_get_by_id_response.rb +6 -6
- data/lib/amocrm/models/entity_note_list_response.rb +6 -6
- data/lib/amocrm/models/entity_note_update_by_id_params.rb +6 -6
- data/lib/amocrm/models/entity_note_update_params.rb +6 -6
- data/lib/amocrm/models/entity_notes_by_parent_create_by_parent_params.rb +6 -6
- data/lib/amocrm/models/entity_notes_by_parent_get_by_parent_id_response.rb +6 -6
- data/lib/amocrm/models/entity_notes_by_parent_list_by_parent_response.rb +6 -6
- data/lib/amocrm/models/entity_notes_by_parent_update_by_parent_id_params.rb +6 -6
- data/lib/amocrm/models/entity_notes_by_parent_update_by_parent_params.rb +6 -6
- data/lib/amocrm/models/note_params.rb +243 -0
- data/lib/amocrm/models/note_type.rb +24 -0
- data/lib/amocrm/models.rb +4 -0
- data/lib/amocrm/resources/entity_notes.rb +2 -2
- data/lib/amocrm/resources/entity_notes_by_parent.rb +2 -2
- data/lib/amocrm/version.rb +1 -1
- data/lib/amocrm.rb +2 -0
- data/rbi/amocrm/models/custom_field_get_by_id_response.rbi +6 -6
- data/rbi/amocrm/models/entity_note_create_params.rbi +38 -7
- data/rbi/amocrm/models/entity_note_get_by_id_response.rbi +39 -8
- data/rbi/amocrm/models/entity_note_list_response.rbi +39 -8
- data/rbi/amocrm/models/entity_note_update_by_id_params.rbi +39 -8
- data/rbi/amocrm/models/entity_note_update_params.rbi +39 -8
- data/rbi/amocrm/models/entity_notes_by_parent_create_by_parent_params.rbi +38 -7
- data/rbi/amocrm/models/entity_notes_by_parent_get_by_parent_id_response.rbi +39 -8
- data/rbi/amocrm/models/entity_notes_by_parent_list_by_parent_response.rbi +39 -8
- data/rbi/amocrm/models/entity_notes_by_parent_update_by_parent_id_params.rbi +39 -8
- data/rbi/amocrm/models/entity_notes_by_parent_update_by_parent_params.rbi +39 -8
- data/rbi/amocrm/models/note_params.rbi +374 -0
- data/rbi/amocrm/models/note_type.rbi +29 -0
- data/rbi/amocrm/models.rbi +4 -0
- data/rbi/amocrm/resources/entity_notes.rbi +11 -2
- data/rbi/amocrm/resources/entity_notes_by_parent.rbi +11 -2
- data/sig/amocrm/models/custom_field_get_by_id_response.rbs +8 -8
- data/sig/amocrm/models/entity_note_create_params.rbs +11 -9
- data/sig/amocrm/models/entity_note_get_by_id_response.rbs +12 -10
- data/sig/amocrm/models/entity_note_list_response.rbs +14 -10
- data/sig/amocrm/models/entity_note_update_by_id_params.rbs +10 -10
- data/sig/amocrm/models/entity_note_update_params.rbs +12 -10
- data/sig/amocrm/models/entity_notes_by_parent_create_by_parent_params.rbs +11 -9
- data/sig/amocrm/models/entity_notes_by_parent_get_by_parent_id_response.rbs +12 -10
- data/sig/amocrm/models/entity_notes_by_parent_list_by_parent_response.rbs +14 -10
- data/sig/amocrm/models/entity_notes_by_parent_update_by_parent_id_params.rbs +10 -10
- data/sig/amocrm/models/entity_notes_by_parent_update_by_parent_params.rbs +12 -10
- data/sig/amocrm/models/note_params.rbs +188 -0
- data/sig/amocrm/models/note_type.rbs +32 -0
- data/sig/amocrm/models.rbs +4 -0
- data/sig/amocrm/resources/entity_notes.rbs +2 -2
- data/sig/amocrm/resources/entity_notes_by_parent.rbs +2 -2
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2893b9e2b5d1f24473d7de79ed31fcec9d958e595907a1d578148da906968fc4
|
|
4
|
+
data.tar.gz: ef1d79dbce97b178eb2c66e05eb6bf95f4656801faa98ea283db397446368325
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5f437a393de65be6f913e42fee544689d5450199eb6b3499501e77c159fcd1edbefe68f5a70d2aafb14d1bedd7d5c0447f8f55ce1df30919021c08c4171c52e
|
|
7
|
+
data.tar.gz: 9fbad848f63281b7757af8c42a3e388a60e639b7aca3bb28e704d333ee6b59d95d12227c263983c184d0786cb703c44743ad476b2988a73dd17a7129f4c11946
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.2](https://github.com/Hexlet/amocrm-ruby/compare/v0.6.1...v0.6.2) (2026-10-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* accept null code and group_id in the custom field response ([#22](https://github.com/Hexlet/amocrm-ruby/issues/22)) ([87c1991](https://github.com/Hexlet/amocrm-ruby/commit/87c1991a33f61daece10f58022ab079dda166dd9))
|
|
9
|
+
* type note_type and note params ([#20](https://github.com/Hexlet/amocrm-ruby/issues/20)) ([0a0796f](https://github.com/Hexlet/amocrm-ruby/commit/0a0796f19edac1dd2f7c4cc3ba71b9974922ce0e))
|
|
10
|
+
|
|
3
11
|
## 0.6.1 (2026-06-17)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.6.0...v0.6.1](https://github.com/Hexlet/amocrm-ruby/compare/v0.6.0...v0.6.1)
|
data/README.md
CHANGED
|
@@ -19,7 +19,7 @@ module Amocrm
|
|
|
19
19
|
# @!attribute code
|
|
20
20
|
#
|
|
21
21
|
# @return [String, nil]
|
|
22
|
-
optional :code, String
|
|
22
|
+
optional :code, String, nil?: true
|
|
23
23
|
|
|
24
24
|
# @!attribute entity_type
|
|
25
25
|
#
|
|
@@ -34,7 +34,7 @@ module Amocrm
|
|
|
34
34
|
# @!attribute group_id
|
|
35
35
|
#
|
|
36
36
|
# @return [Integer, nil]
|
|
37
|
-
optional :group_id, Integer
|
|
37
|
+
optional :group_id, Integer, nil?: true
|
|
38
38
|
|
|
39
39
|
# @!attribute is_deletable
|
|
40
40
|
#
|
|
@@ -78,10 +78,10 @@ module Amocrm
|
|
|
78
78
|
|
|
79
79
|
# @!method initialize(id: nil, code: nil, entity_type: nil, enums: nil, group_id: nil, is_deletable: nil, is_multiple: nil, is_required: nil, is_visible: nil, name: nil, settings: nil, sort: nil, type: nil)
|
|
80
80
|
# @param id [Integer]
|
|
81
|
-
# @param code [String]
|
|
81
|
+
# @param code [String, nil]
|
|
82
82
|
# @param entity_type [String]
|
|
83
83
|
# @param enums [Array<Object>]
|
|
84
|
-
# @param group_id [Integer]
|
|
84
|
+
# @param group_id [Integer, nil]
|
|
85
85
|
# @param is_deletable [Boolean]
|
|
86
86
|
# @param is_multiple [Boolean]
|
|
87
87
|
# @param is_required [Boolean]
|
|
@@ -37,8 +37,8 @@ module Amocrm
|
|
|
37
37
|
class Body < Amocrm::Internal::Type::BaseModel
|
|
38
38
|
# @!attribute note_type
|
|
39
39
|
#
|
|
40
|
-
# @return [
|
|
41
|
-
required :note_type,
|
|
40
|
+
# @return [Symbol, Amocrm::Models::NoteType]
|
|
41
|
+
required :note_type, enum: -> { Amocrm::NoteType }
|
|
42
42
|
|
|
43
43
|
# @!attribute created_at
|
|
44
44
|
#
|
|
@@ -62,8 +62,8 @@ module Amocrm
|
|
|
62
62
|
|
|
63
63
|
# @!attribute params
|
|
64
64
|
#
|
|
65
|
-
# @return [
|
|
66
|
-
optional :params, Amocrm::
|
|
65
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
66
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
67
67
|
|
|
68
68
|
# @!attribute request_id
|
|
69
69
|
# Client-side request id
|
|
@@ -82,7 +82,7 @@ module Amocrm
|
|
|
82
82
|
optional :updated_by, Integer
|
|
83
83
|
|
|
84
84
|
# @!method initialize(note_type:, created_at: nil, created_by: nil, entity_id: nil, is_need_to_trigger_digital_pipeline: nil, params: nil, request_id: nil, responsible_user_id: nil, updated_by: nil)
|
|
85
|
-
# @param note_type [
|
|
85
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
86
86
|
#
|
|
87
87
|
# @param created_at [Integer]
|
|
88
88
|
#
|
|
@@ -92,7 +92,7 @@ module Amocrm
|
|
|
92
92
|
#
|
|
93
93
|
# @param is_need_to_trigger_digital_pipeline [Boolean]
|
|
94
94
|
#
|
|
95
|
-
# @param params [
|
|
95
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
96
96
|
#
|
|
97
97
|
# @param request_id [String] Client-side request id
|
|
98
98
|
#
|
|
@@ -53,13 +53,13 @@ module Amocrm
|
|
|
53
53
|
|
|
54
54
|
# @!attribute note_type
|
|
55
55
|
#
|
|
56
|
-
# @return [
|
|
57
|
-
optional :note_type,
|
|
56
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
57
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
58
58
|
|
|
59
59
|
# @!attribute params
|
|
60
60
|
#
|
|
61
|
-
# @return [
|
|
62
|
-
optional :params, Amocrm::
|
|
61
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
62
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
63
63
|
|
|
64
64
|
# @!attribute responsible_user_id
|
|
65
65
|
#
|
|
@@ -85,8 +85,8 @@ module Amocrm
|
|
|
85
85
|
# @param entity_id [Integer]
|
|
86
86
|
# @param group_id [Integer]
|
|
87
87
|
# @param is_pinned [Boolean]
|
|
88
|
-
# @param note_type [
|
|
89
|
-
# @param params [
|
|
88
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
89
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
90
90
|
# @param responsible_user_id [Integer]
|
|
91
91
|
# @param updated_at [Integer]
|
|
92
92
|
# @param updated_by [Integer]
|
|
@@ -85,13 +85,13 @@ module Amocrm
|
|
|
85
85
|
|
|
86
86
|
# @!attribute note_type
|
|
87
87
|
#
|
|
88
|
-
# @return [
|
|
89
|
-
optional :note_type,
|
|
88
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
89
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
90
90
|
|
|
91
91
|
# @!attribute params
|
|
92
92
|
#
|
|
93
|
-
# @return [
|
|
94
|
-
optional :params, Amocrm::
|
|
93
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
94
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
95
95
|
|
|
96
96
|
# @!attribute responsible_user_id
|
|
97
97
|
#
|
|
@@ -117,8 +117,8 @@ module Amocrm
|
|
|
117
117
|
# @param entity_id [Integer]
|
|
118
118
|
# @param group_id [Integer]
|
|
119
119
|
# @param is_pinned [Boolean]
|
|
120
|
-
# @param note_type [
|
|
121
|
-
# @param params [
|
|
120
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
121
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
122
122
|
# @param responsible_user_id [Integer]
|
|
123
123
|
# @param updated_at [Integer]
|
|
124
124
|
# @param updated_by [Integer]
|
|
@@ -24,13 +24,13 @@ module Amocrm
|
|
|
24
24
|
|
|
25
25
|
# @!attribute note_type
|
|
26
26
|
#
|
|
27
|
-
# @return [
|
|
28
|
-
optional :note_type,
|
|
27
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
28
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
29
29
|
|
|
30
30
|
# @!attribute params
|
|
31
31
|
#
|
|
32
|
-
# @return [
|
|
33
|
-
optional :params, Amocrm::
|
|
32
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
33
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
34
34
|
|
|
35
35
|
# @!attribute updated_at
|
|
36
36
|
#
|
|
@@ -46,8 +46,8 @@ module Amocrm
|
|
|
46
46
|
# @param entity_type [Symbol, Amocrm::Models::EntityNoteUpdateByIDParams::EntityType]
|
|
47
47
|
# @param id [Integer]
|
|
48
48
|
# @param entity_id [Integer]
|
|
49
|
-
# @param note_type [
|
|
50
|
-
# @param params [
|
|
49
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
50
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
51
51
|
# @param updated_at [Integer]
|
|
52
52
|
# @param updated_by [Integer]
|
|
53
53
|
# @param request_options [Amocrm::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -48,13 +48,13 @@ module Amocrm
|
|
|
48
48
|
|
|
49
49
|
# @!attribute note_type
|
|
50
50
|
#
|
|
51
|
-
# @return [
|
|
52
|
-
optional :note_type,
|
|
51
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
52
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
53
53
|
|
|
54
54
|
# @!attribute params
|
|
55
55
|
#
|
|
56
|
-
# @return [
|
|
57
|
-
optional :params, Amocrm::
|
|
56
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
57
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
58
58
|
|
|
59
59
|
# @!attribute updated_at
|
|
60
60
|
#
|
|
@@ -71,9 +71,9 @@ module Amocrm
|
|
|
71
71
|
#
|
|
72
72
|
# @param entity_id [Integer]
|
|
73
73
|
#
|
|
74
|
-
# @param note_type [
|
|
74
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
75
75
|
#
|
|
76
|
-
# @param params [
|
|
76
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
77
77
|
#
|
|
78
78
|
# @param updated_at [Integer]
|
|
79
79
|
#
|
|
@@ -44,8 +44,8 @@ module Amocrm
|
|
|
44
44
|
class Body < Amocrm::Internal::Type::BaseModel
|
|
45
45
|
# @!attribute note_type
|
|
46
46
|
#
|
|
47
|
-
# @return [
|
|
48
|
-
required :note_type,
|
|
47
|
+
# @return [Symbol, Amocrm::Models::NoteType]
|
|
48
|
+
required :note_type, enum: -> { Amocrm::NoteType }
|
|
49
49
|
|
|
50
50
|
# @!attribute created_at
|
|
51
51
|
#
|
|
@@ -69,8 +69,8 @@ module Amocrm
|
|
|
69
69
|
|
|
70
70
|
# @!attribute params
|
|
71
71
|
#
|
|
72
|
-
# @return [
|
|
73
|
-
optional :params, Amocrm::
|
|
72
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
73
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
74
74
|
|
|
75
75
|
# @!attribute request_id
|
|
76
76
|
# Client-side request id
|
|
@@ -89,7 +89,7 @@ module Amocrm
|
|
|
89
89
|
optional :updated_by, Integer
|
|
90
90
|
|
|
91
91
|
# @!method initialize(note_type:, created_at: nil, created_by: nil, entity_id: nil, is_need_to_trigger_digital_pipeline: nil, params: nil, request_id: nil, responsible_user_id: nil, updated_by: nil)
|
|
92
|
-
# @param note_type [
|
|
92
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
93
93
|
#
|
|
94
94
|
# @param created_at [Integer]
|
|
95
95
|
#
|
|
@@ -99,7 +99,7 @@ module Amocrm
|
|
|
99
99
|
#
|
|
100
100
|
# @param is_need_to_trigger_digital_pipeline [Boolean]
|
|
101
101
|
#
|
|
102
|
-
# @param params [
|
|
102
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
103
103
|
#
|
|
104
104
|
# @param request_id [String] Client-side request id
|
|
105
105
|
#
|
|
@@ -53,13 +53,13 @@ module Amocrm
|
|
|
53
53
|
|
|
54
54
|
# @!attribute note_type
|
|
55
55
|
#
|
|
56
|
-
# @return [
|
|
57
|
-
optional :note_type,
|
|
56
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
57
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
58
58
|
|
|
59
59
|
# @!attribute params
|
|
60
60
|
#
|
|
61
|
-
# @return [
|
|
62
|
-
optional :params, Amocrm::
|
|
61
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
62
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
63
63
|
|
|
64
64
|
# @!attribute responsible_user_id
|
|
65
65
|
#
|
|
@@ -85,8 +85,8 @@ module Amocrm
|
|
|
85
85
|
# @param entity_id [Integer]
|
|
86
86
|
# @param group_id [Integer]
|
|
87
87
|
# @param is_pinned [Boolean]
|
|
88
|
-
# @param note_type [
|
|
89
|
-
# @param params [
|
|
88
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
89
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
90
90
|
# @param responsible_user_id [Integer]
|
|
91
91
|
# @param updated_at [Integer]
|
|
92
92
|
# @param updated_by [Integer]
|
|
@@ -86,13 +86,13 @@ module Amocrm
|
|
|
86
86
|
|
|
87
87
|
# @!attribute note_type
|
|
88
88
|
#
|
|
89
|
-
# @return [
|
|
90
|
-
optional :note_type,
|
|
89
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
90
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
91
91
|
|
|
92
92
|
# @!attribute params
|
|
93
93
|
#
|
|
94
|
-
# @return [
|
|
95
|
-
optional :params, Amocrm::
|
|
94
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
95
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
96
96
|
|
|
97
97
|
# @!attribute responsible_user_id
|
|
98
98
|
#
|
|
@@ -118,8 +118,8 @@ module Amocrm
|
|
|
118
118
|
# @param entity_id [Integer]
|
|
119
119
|
# @param group_id [Integer]
|
|
120
120
|
# @param is_pinned [Boolean]
|
|
121
|
-
# @param note_type [
|
|
122
|
-
# @param params [
|
|
121
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
122
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
123
123
|
# @param responsible_user_id [Integer]
|
|
124
124
|
# @param updated_at [Integer]
|
|
125
125
|
# @param updated_by [Integer]
|
|
@@ -29,13 +29,13 @@ module Amocrm
|
|
|
29
29
|
|
|
30
30
|
# @!attribute note_type
|
|
31
31
|
#
|
|
32
|
-
# @return [
|
|
33
|
-
optional :note_type,
|
|
32
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
33
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
34
34
|
|
|
35
35
|
# @!attribute params
|
|
36
36
|
#
|
|
37
|
-
# @return [
|
|
38
|
-
optional :params, Amocrm::
|
|
37
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
38
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
39
39
|
|
|
40
40
|
# @!attribute updated_at
|
|
41
41
|
#
|
|
@@ -52,8 +52,8 @@ module Amocrm
|
|
|
52
52
|
# @param path_entity_id [Integer]
|
|
53
53
|
# @param note_id [Integer]
|
|
54
54
|
# @param body_entity_id [Integer]
|
|
55
|
-
# @param note_type [
|
|
56
|
-
# @param params [
|
|
55
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
56
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
57
57
|
# @param updated_at [Integer]
|
|
58
58
|
# @param updated_by [Integer]
|
|
59
59
|
# @param request_options [Amocrm::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -55,13 +55,13 @@ module Amocrm
|
|
|
55
55
|
|
|
56
56
|
# @!attribute note_type
|
|
57
57
|
#
|
|
58
|
-
# @return [
|
|
59
|
-
optional :note_type,
|
|
58
|
+
# @return [Symbol, Amocrm::Models::NoteType, nil]
|
|
59
|
+
optional :note_type, enum: -> { Amocrm::NoteType }
|
|
60
60
|
|
|
61
61
|
# @!attribute params
|
|
62
62
|
#
|
|
63
|
-
# @return [
|
|
64
|
-
optional :params, Amocrm::
|
|
63
|
+
# @return [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment, nil]
|
|
64
|
+
optional :params, union: -> { Amocrm::NoteParams }
|
|
65
65
|
|
|
66
66
|
# @!attribute updated_at
|
|
67
67
|
#
|
|
@@ -78,9 +78,9 @@ module Amocrm
|
|
|
78
78
|
#
|
|
79
79
|
# @param entity_id [Integer]
|
|
80
80
|
#
|
|
81
|
-
# @param note_type [
|
|
81
|
+
# @param note_type [Symbol, Amocrm::Models::NoteType]
|
|
82
82
|
#
|
|
83
|
-
# @param params [
|
|
83
|
+
# @param params [Amocrm::Models::NoteParams::Common, Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Attachment]
|
|
84
84
|
#
|
|
85
85
|
# @param updated_at [Integer]
|
|
86
86
|
#
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Amocrm
|
|
4
|
+
module Models
|
|
5
|
+
# Параметры примечания: состав зависит от его типа (`note_type`).
|
|
6
|
+
module NoteParams
|
|
7
|
+
extend Amocrm::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
variant -> { Amocrm::NoteParams::Call }
|
|
10
|
+
|
|
11
|
+
variant -> { Amocrm::NoteParams::Geolocation }
|
|
12
|
+
|
|
13
|
+
variant -> { Amocrm::NoteParams::Attachment }
|
|
14
|
+
|
|
15
|
+
variant -> { Amocrm::NoteParams::MessageCashier }
|
|
16
|
+
|
|
17
|
+
variant -> { Amocrm::NoteParams::ServiceMessage }
|
|
18
|
+
|
|
19
|
+
variant -> { Amocrm::NoteParams::Sms }
|
|
20
|
+
|
|
21
|
+
variant -> { Amocrm::NoteParams::Common }
|
|
22
|
+
|
|
23
|
+
# Параметры примечания call_in, call_out.
|
|
24
|
+
class Call < Amocrm::Internal::Type::BaseModel
|
|
25
|
+
# @!attribute uniq
|
|
26
|
+
# Уникальный идентификатор звонка.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :uniq, String
|
|
30
|
+
|
|
31
|
+
# @!attribute duration
|
|
32
|
+
# Длительность звонка в секундах.
|
|
33
|
+
#
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
required :duration, Integer
|
|
36
|
+
|
|
37
|
+
# @!attribute source
|
|
38
|
+
# Источник звонка.
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :source, String
|
|
42
|
+
|
|
43
|
+
# @!attribute link
|
|
44
|
+
# Ссылка на запись звонка.
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
required :link, String
|
|
48
|
+
|
|
49
|
+
# @!attribute phone
|
|
50
|
+
# Номер телефона.
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :phone, String
|
|
54
|
+
|
|
55
|
+
# @!attribute call_responsible
|
|
56
|
+
# Ответственный за звонок: имя или ID пользователя.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, Integer]
|
|
59
|
+
required :call_responsible, union: -> { Amocrm::NoteParams::Call::CallResponsible }
|
|
60
|
+
|
|
61
|
+
# @!method initialize(uniq:, duration:, source:, link:, phone:, call_responsible:)
|
|
62
|
+
# @param uniq [String] Уникальный идентификатор звонка.
|
|
63
|
+
#
|
|
64
|
+
# @param duration [Integer] Длительность звонка в секундах.
|
|
65
|
+
#
|
|
66
|
+
# @param source [String] Источник звонка.
|
|
67
|
+
#
|
|
68
|
+
# @param link [String] Ссылка на запись звонка.
|
|
69
|
+
#
|
|
70
|
+
# @param phone [String] Номер телефона.
|
|
71
|
+
#
|
|
72
|
+
# @param call_responsible [String, Integer] Ответственный за звонок: имя или ID пользователя.
|
|
73
|
+
|
|
74
|
+
# Ответственный за звонок: имя или ID пользователя.
|
|
75
|
+
#
|
|
76
|
+
# @see Amocrm::Models::NoteParams::Call#call_responsible
|
|
77
|
+
module CallResponsible
|
|
78
|
+
extend Amocrm::Internal::Type::Union
|
|
79
|
+
|
|
80
|
+
variant String
|
|
81
|
+
|
|
82
|
+
variant Integer
|
|
83
|
+
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(String, Integer)]
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Параметры примечания geolocation.
|
|
90
|
+
class Geolocation < Amocrm::Internal::Type::BaseModel
|
|
91
|
+
# @!attribute text
|
|
92
|
+
# Текст примечания.
|
|
93
|
+
#
|
|
94
|
+
# @return [String]
|
|
95
|
+
required :text, String
|
|
96
|
+
|
|
97
|
+
# @!attribute address
|
|
98
|
+
# Адрес.
|
|
99
|
+
#
|
|
100
|
+
# @return [String]
|
|
101
|
+
required :address, String
|
|
102
|
+
|
|
103
|
+
# @!attribute longitude
|
|
104
|
+
# Долгота.
|
|
105
|
+
#
|
|
106
|
+
# @return [String]
|
|
107
|
+
required :longitude, String
|
|
108
|
+
|
|
109
|
+
# @!attribute latitude
|
|
110
|
+
# Широта.
|
|
111
|
+
#
|
|
112
|
+
# @return [String]
|
|
113
|
+
required :latitude, String
|
|
114
|
+
|
|
115
|
+
# @!method initialize(text:, address:, longitude:, latitude:)
|
|
116
|
+
# @param text [String] Текст примечания.
|
|
117
|
+
#
|
|
118
|
+
# @param address [String] Адрес.
|
|
119
|
+
#
|
|
120
|
+
# @param longitude [String] Долгота.
|
|
121
|
+
#
|
|
122
|
+
# @param latitude [String] Широта.
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Параметры примечания attachment.
|
|
126
|
+
class Attachment < Amocrm::Internal::Type::BaseModel
|
|
127
|
+
# @!attribute file_uuid
|
|
128
|
+
# UUID файла.
|
|
129
|
+
#
|
|
130
|
+
# @return [String]
|
|
131
|
+
required :file_uuid, String
|
|
132
|
+
|
|
133
|
+
# @!attribute file_name
|
|
134
|
+
# Название файла, которое отображается в примечании.
|
|
135
|
+
#
|
|
136
|
+
# @return [String]
|
|
137
|
+
required :file_name, String
|
|
138
|
+
|
|
139
|
+
# @!attribute version_uuid
|
|
140
|
+
# Версия файла; без неё берётся последняя.
|
|
141
|
+
#
|
|
142
|
+
# @return [String, nil]
|
|
143
|
+
optional :version_uuid, String
|
|
144
|
+
|
|
145
|
+
# @!method initialize(file_uuid:, file_name:, version_uuid: nil)
|
|
146
|
+
# @param file_uuid [String] UUID файла.
|
|
147
|
+
#
|
|
148
|
+
# @param file_name [String] Название файла, которое отображается в примечании.
|
|
149
|
+
#
|
|
150
|
+
# @param version_uuid [String] Версия файла; без неё берётся последняя.
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Параметры примечания message_cashier.
|
|
154
|
+
class MessageCashier < Amocrm::Internal::Type::BaseModel
|
|
155
|
+
# @!attribute status
|
|
156
|
+
# Статус сообщения.
|
|
157
|
+
#
|
|
158
|
+
# @return [Symbol, Amocrm::Models::NoteParams::MessageCashier::Status]
|
|
159
|
+
required :status, enum: -> { Amocrm::NoteParams::MessageCashier::Status }
|
|
160
|
+
|
|
161
|
+
# @!attribute text
|
|
162
|
+
# Текст примечания.
|
|
163
|
+
#
|
|
164
|
+
# @return [String]
|
|
165
|
+
required :text, String
|
|
166
|
+
|
|
167
|
+
# @!method initialize(status:, text:)
|
|
168
|
+
# @param status [Symbol, Amocrm::Models::NoteParams::MessageCashier::Status] Статус сообщения.
|
|
169
|
+
#
|
|
170
|
+
# @param text [String] Текст примечания.
|
|
171
|
+
|
|
172
|
+
# Статус сообщения кассиру.
|
|
173
|
+
#
|
|
174
|
+
# @see Amocrm::Models::NoteParams::MessageCashier#status
|
|
175
|
+
module Status
|
|
176
|
+
extend Amocrm::Internal::Type::Enum
|
|
177
|
+
|
|
178
|
+
CREATED = :created
|
|
179
|
+
SHOWN = :shown
|
|
180
|
+
CANCELED = :canceled
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Параметры примечания service_message, extended_service_message.
|
|
188
|
+
class ServiceMessage < Amocrm::Internal::Type::BaseModel
|
|
189
|
+
# @!attribute service
|
|
190
|
+
# Название сервиса.
|
|
191
|
+
#
|
|
192
|
+
# @return [String]
|
|
193
|
+
required :service, String
|
|
194
|
+
|
|
195
|
+
# @!attribute text
|
|
196
|
+
# Текст примечания.
|
|
197
|
+
#
|
|
198
|
+
# @return [String]
|
|
199
|
+
required :text, String
|
|
200
|
+
|
|
201
|
+
# @!method initialize(service:, text:)
|
|
202
|
+
# @param service [String] Название сервиса.
|
|
203
|
+
#
|
|
204
|
+
# @param text [String] Текст примечания.
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Параметры примечания sms_in, sms_out.
|
|
208
|
+
class Sms < Amocrm::Internal::Type::BaseModel
|
|
209
|
+
# @!attribute text
|
|
210
|
+
# Текст сообщения.
|
|
211
|
+
#
|
|
212
|
+
# @return [String]
|
|
213
|
+
required :text, String
|
|
214
|
+
|
|
215
|
+
# @!attribute phone
|
|
216
|
+
# Номер телефона.
|
|
217
|
+
#
|
|
218
|
+
# @return [String]
|
|
219
|
+
required :phone, String
|
|
220
|
+
|
|
221
|
+
# @!method initialize(text:, phone:)
|
|
222
|
+
# @param text [String] Текст сообщения.
|
|
223
|
+
#
|
|
224
|
+
# @param phone [String] Номер телефона.
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Параметры примечания common.
|
|
228
|
+
class Common < Amocrm::Internal::Type::BaseModel
|
|
229
|
+
# @!attribute text
|
|
230
|
+
# Текст примечания.
|
|
231
|
+
#
|
|
232
|
+
# @return [String]
|
|
233
|
+
required :text, String
|
|
234
|
+
|
|
235
|
+
# @!method initialize(text:)
|
|
236
|
+
# @param text [String] Текст примечания.
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# @!method self.variants
|
|
240
|
+
# @return [Array(Amocrm::Models::NoteParams::Call, Amocrm::Models::NoteParams::Geolocation, Amocrm::Models::NoteParams::Attachment, Amocrm::Models::NoteParams::MessageCashier, Amocrm::Models::NoteParams::ServiceMessage, Amocrm::Models::NoteParams::Sms, Amocrm::Models::NoteParams::Common)]
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Amocrm
|
|
4
|
+
module Models
|
|
5
|
+
# Тип примечания.
|
|
6
|
+
module NoteType
|
|
7
|
+
extend Amocrm::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
COMMON = :common
|
|
10
|
+
CALL_IN = :call_in
|
|
11
|
+
CALL_OUT = :call_out
|
|
12
|
+
SERVICE_MESSAGE = :service_message
|
|
13
|
+
MESSAGE_CASHIER = :message_cashier
|
|
14
|
+
GEOLOCATION = :geolocation
|
|
15
|
+
SMS_IN = :sms_in
|
|
16
|
+
SMS_OUT = :sms_out
|
|
17
|
+
EXTENDED_SERVICE_MESSAGE = :extended_service_message
|
|
18
|
+
ATTACHMENT = :attachment
|
|
19
|
+
|
|
20
|
+
# @!method self.values
|
|
21
|
+
# @return [Array<Symbol>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/amocrm/models.rb
CHANGED
|
@@ -211,6 +211,10 @@ module Amocrm
|
|
|
211
211
|
|
|
212
212
|
LeadUpdateParams = Amocrm::Models::LeadUpdateParams
|
|
213
213
|
|
|
214
|
+
NoteParams = Amocrm::Models::NoteParams
|
|
215
|
+
|
|
216
|
+
NoteType = Amocrm::Models::NoteType
|
|
217
|
+
|
|
214
218
|
PipelineCreateParams = Amocrm::Models::PipelineCreateParams
|
|
215
219
|
|
|
216
220
|
PipelineDeleteByIDParams = Amocrm::Models::PipelineDeleteByIDParams
|