amocrm 0.1.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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +19 -0
- data/README.md +233 -0
- data/SECURITY.md +23 -0
- data/lib/amocrm/client.rb +65 -0
- data/lib/amocrm/errors.rb +228 -0
- data/lib/amocrm/file_part.rb +58 -0
- data/lib/amocrm/internal/transport/base_client.rb +567 -0
- data/lib/amocrm/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/amocrm/internal/type/array_of.rb +168 -0
- data/lib/amocrm/internal/type/base_model.rb +523 -0
- data/lib/amocrm/internal/type/base_page.rb +55 -0
- data/lib/amocrm/internal/type/boolean.rb +77 -0
- data/lib/amocrm/internal/type/converter.rb +327 -0
- data/lib/amocrm/internal/type/enum.rb +131 -0
- data/lib/amocrm/internal/type/file_input.rb +111 -0
- data/lib/amocrm/internal/type/hash_of.rb +188 -0
- data/lib/amocrm/internal/type/request_parameters.rb +42 -0
- data/lib/amocrm/internal/type/union.rb +248 -0
- data/lib/amocrm/internal/type/unknown.rb +81 -0
- data/lib/amocrm/internal/util.rb +920 -0
- data/lib/amocrm/internal.rb +20 -0
- data/lib/amocrm/models/v4/leads/unsorted_accept_params.rb +34 -0
- data/lib/amocrm/models/v4/leads/unsorted_accept_response.rb +172 -0
- data/lib/amocrm/models/v4/leads/unsorted_create_forms_params.rb +883 -0
- data/lib/amocrm/models/v4/leads/unsorted_create_forms_response.rb +204 -0
- data/lib/amocrm/models/v4/leads/unsorted_decline_params.rb +26 -0
- data/lib/amocrm/models/v4/leads/unsorted_decline_response.rb +172 -0
- data/lib/amocrm/models.rb +43 -0
- data/lib/amocrm/request_options.rb +77 -0
- data/lib/amocrm/resources/v4/leads/unsorted.rb +83 -0
- data/lib/amocrm/resources/v4/leads.rb +20 -0
- data/lib/amocrm/resources/v4.rb +18 -0
- data/lib/amocrm/version.rb +5 -0
- data/lib/amocrm.rb +64 -0
- data/manifest.yaml +17 -0
- data/rbi/amocrm/client.rbi +44 -0
- data/rbi/amocrm/errors.rbi +205 -0
- data/rbi/amocrm/file_part.rbi +37 -0
- data/rbi/amocrm/internal/transport/base_client.rbi +292 -0
- data/rbi/amocrm/internal/transport/pooled_net_requester.rbi +82 -0
- data/rbi/amocrm/internal/type/array_of.rbi +104 -0
- data/rbi/amocrm/internal/type/base_model.rbi +299 -0
- data/rbi/amocrm/internal/type/base_page.rbi +42 -0
- data/rbi/amocrm/internal/type/boolean.rbi +58 -0
- data/rbi/amocrm/internal/type/converter.rbi +204 -0
- data/rbi/amocrm/internal/type/enum.rbi +82 -0
- data/rbi/amocrm/internal/type/file_input.rbi +59 -0
- data/rbi/amocrm/internal/type/hash_of.rbi +104 -0
- data/rbi/amocrm/internal/type/request_parameters.rbi +29 -0
- data/rbi/amocrm/internal/type/union.rbi +126 -0
- data/rbi/amocrm/internal/type/unknown.rbi +58 -0
- data/rbi/amocrm/internal/util.rbi +484 -0
- data/rbi/amocrm/internal.rbi +16 -0
- data/rbi/amocrm/models/v4/leads/unsorted_accept_params.rbi +64 -0
- data/rbi/amocrm/models/v4/leads/unsorted_accept_response.rbi +441 -0
- data/rbi/amocrm/models/v4/leads/unsorted_create_forms_params.rbi +1927 -0
- data/rbi/amocrm/models/v4/leads/unsorted_create_forms_response.rbi +502 -0
- data/rbi/amocrm/models/v4/leads/unsorted_decline_params.rbi +50 -0
- data/rbi/amocrm/models/v4/leads/unsorted_decline_response.rbi +441 -0
- data/rbi/amocrm/models.rbi +5 -0
- data/rbi/amocrm/request_options.rbi +55 -0
- data/rbi/amocrm/resources/v4/leads/unsorted.rbi +67 -0
- data/rbi/amocrm/resources/v4/leads.rbi +17 -0
- data/rbi/amocrm/resources/v4.rbi +15 -0
- data/rbi/amocrm/version.rbi +5 -0
- data/sig/amocrm/client.rbs +24 -0
- data/sig/amocrm/errors.rbs +117 -0
- data/sig/amocrm/file_part.rbs +21 -0
- data/sig/amocrm/internal/transport/base_client.rbs +131 -0
- data/sig/amocrm/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/amocrm/internal/type/array_of.rbs +48 -0
- data/sig/amocrm/internal/type/base_model.rbs +102 -0
- data/sig/amocrm/internal/type/base_page.rbs +24 -0
- data/sig/amocrm/internal/type/boolean.rbs +26 -0
- data/sig/amocrm/internal/type/converter.rbs +79 -0
- data/sig/amocrm/internal/type/enum.rbs +32 -0
- data/sig/amocrm/internal/type/file_input.rbs +25 -0
- data/sig/amocrm/internal/type/hash_of.rbs +48 -0
- data/sig/amocrm/internal/type/request_parameters.rbs +17 -0
- data/sig/amocrm/internal/type/union.rbs +52 -0
- data/sig/amocrm/internal/type/unknown.rbs +26 -0
- data/sig/amocrm/internal/util.rbs +185 -0
- data/sig/amocrm/internal.rbs +9 -0
- data/sig/amocrm/models/v4/leads/unsorted_accept_params.rbs +36 -0
- data/sig/amocrm/models/v4/leads/unsorted_accept_response.rbs +203 -0
- data/sig/amocrm/models/v4/leads/unsorted_create_forms_params.rbs +920 -0
- data/sig/amocrm/models/v4/leads/unsorted_create_forms_response.rbs +237 -0
- data/sig/amocrm/models/v4/leads/unsorted_decline_params.rbs +29 -0
- data/sig/amocrm/models/v4/leads/unsorted_decline_response.rbs +203 -0
- data/sig/amocrm/models.rbs +3 -0
- data/sig/amocrm/request_options.rbs +34 -0
- data/sig/amocrm/resources/v4/leads/unsorted.rbs +29 -0
- data/sig/amocrm/resources/v4/leads.rbs +11 -0
- data/sig/amocrm/resources/v4.rbs +9 -0
- data/sig/amocrm/version.rbs +3 -0
- metadata +169 -0
|
@@ -0,0 +1,883 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Amocrm
|
|
4
|
+
module Models
|
|
5
|
+
module V4
|
|
6
|
+
module Leads
|
|
7
|
+
# @see Amocrm::Resources::V4::Leads::Unsorted#create_forms
|
|
8
|
+
class UnsortedCreateFormsParams < Amocrm::Internal::Type::BaseModel
|
|
9
|
+
extend Amocrm::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Amocrm::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute body
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body>]
|
|
15
|
+
required :body, -> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(body:, request_options: {})
|
|
18
|
+
# @param body [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body>]
|
|
19
|
+
# @param request_options [Amocrm::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
|
|
21
|
+
class Body < Amocrm::Internal::Type::BaseModel
|
|
22
|
+
# @!attribute metadata
|
|
23
|
+
# Form metadata
|
|
24
|
+
#
|
|
25
|
+
# @return [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Metadata]
|
|
26
|
+
required :metadata, -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Metadata }
|
|
27
|
+
|
|
28
|
+
# @!attribute source_name
|
|
29
|
+
# Human-readable source name shown in amoCRM (e.g. "Website form", "Landing page")
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :source_name, String
|
|
33
|
+
|
|
34
|
+
# @!attribute source_uid
|
|
35
|
+
# Your stable id of the source: site/form/widget/integration that sent the lead
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
required :source_uid, String
|
|
39
|
+
|
|
40
|
+
# @!attribute _embedded
|
|
41
|
+
# Embedded entities (lead/contact/company)
|
|
42
|
+
#
|
|
43
|
+
# @return [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded, nil]
|
|
44
|
+
optional :_embedded, -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded }
|
|
45
|
+
|
|
46
|
+
# @!attribute created_at
|
|
47
|
+
# Unix timestamp (seconds) when the form entry was created
|
|
48
|
+
#
|
|
49
|
+
# @return [Integer, nil]
|
|
50
|
+
optional :created_at, Integer
|
|
51
|
+
|
|
52
|
+
# @!attribute pipeline_id
|
|
53
|
+
# Pipeline id to place the created lead into
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer, nil]
|
|
56
|
+
optional :pipeline_id, Integer
|
|
57
|
+
|
|
58
|
+
# @!attribute request_id
|
|
59
|
+
# Your request id to match request items with response items
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :request_id, String
|
|
63
|
+
|
|
64
|
+
# @!method initialize(metadata:, source_name:, source_uid:, _embedded: nil, created_at: nil, pipeline_id: nil, request_id: nil)
|
|
65
|
+
# Some parameter documentations has been truncated, see
|
|
66
|
+
# {Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body} for more details.
|
|
67
|
+
#
|
|
68
|
+
# @param metadata [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Metadata] Form metadata
|
|
69
|
+
#
|
|
70
|
+
# @param source_name [String] Human-readable source name shown in amoCRM (e.g. "Website form", "Landing page")
|
|
71
|
+
#
|
|
72
|
+
# @param source_uid [String] Your stable id of the source: site/form/widget/integration that sent the lead
|
|
73
|
+
#
|
|
74
|
+
# @param _embedded [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded] Embedded entities (lead/contact/company)
|
|
75
|
+
#
|
|
76
|
+
# @param created_at [Integer] Unix timestamp (seconds) when the form entry was created
|
|
77
|
+
#
|
|
78
|
+
# @param pipeline_id [Integer] Pipeline id to place the created lead into
|
|
79
|
+
#
|
|
80
|
+
# @param request_id [String] Your request id to match request items with response items
|
|
81
|
+
|
|
82
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body#metadata
|
|
83
|
+
class Metadata < Amocrm::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute form_id
|
|
85
|
+
# Form id in your system (string or numeric)
|
|
86
|
+
#
|
|
87
|
+
# @return [String, Integer, nil]
|
|
88
|
+
optional :form_id, union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Metadata::FormID }
|
|
89
|
+
|
|
90
|
+
# @!attribute form_name
|
|
91
|
+
# Form name (shown in amoCRM)
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :form_name, String
|
|
95
|
+
|
|
96
|
+
# @!attribute form_page
|
|
97
|
+
# Page URL where form lives
|
|
98
|
+
#
|
|
99
|
+
# @return [String, nil]
|
|
100
|
+
optional :form_page, String
|
|
101
|
+
|
|
102
|
+
# @!attribute form_sent_at
|
|
103
|
+
# Unix timestamp (seconds) when the form was submitted
|
|
104
|
+
#
|
|
105
|
+
# @return [Integer, nil]
|
|
106
|
+
optional :form_sent_at, Integer
|
|
107
|
+
|
|
108
|
+
# @!attribute form_type
|
|
109
|
+
# Form type code from amoCRM, use only if you know it
|
|
110
|
+
#
|
|
111
|
+
# @return [Integer, nil]
|
|
112
|
+
optional :form_type, Integer
|
|
113
|
+
|
|
114
|
+
# @!attribute ip
|
|
115
|
+
# IP address of the submitter
|
|
116
|
+
#
|
|
117
|
+
# @return [String, nil]
|
|
118
|
+
optional :ip, String
|
|
119
|
+
|
|
120
|
+
# @!attribute referer
|
|
121
|
+
# Referrer URL
|
|
122
|
+
#
|
|
123
|
+
# @return [String, nil]
|
|
124
|
+
optional :referer, String
|
|
125
|
+
|
|
126
|
+
# @!attribute visitor_uid
|
|
127
|
+
# Visitor uid from tracking, if you have it
|
|
128
|
+
#
|
|
129
|
+
# @return [String, nil]
|
|
130
|
+
optional :visitor_uid, String
|
|
131
|
+
|
|
132
|
+
# @!method initialize(form_id: nil, form_name: nil, form_page: nil, form_sent_at: nil, form_type: nil, ip: nil, referer: nil, visitor_uid: nil)
|
|
133
|
+
# Form metadata
|
|
134
|
+
#
|
|
135
|
+
# @param form_id [String, Integer] Form id in your system (string or numeric)
|
|
136
|
+
#
|
|
137
|
+
# @param form_name [String] Form name (shown in amoCRM)
|
|
138
|
+
#
|
|
139
|
+
# @param form_page [String] Page URL where form lives
|
|
140
|
+
#
|
|
141
|
+
# @param form_sent_at [Integer] Unix timestamp (seconds) when the form was submitted
|
|
142
|
+
#
|
|
143
|
+
# @param form_type [Integer] Form type code from amoCRM, use only if you know it
|
|
144
|
+
#
|
|
145
|
+
# @param ip [String] IP address of the submitter
|
|
146
|
+
#
|
|
147
|
+
# @param referer [String] Referrer URL
|
|
148
|
+
#
|
|
149
|
+
# @param visitor_uid [String] Visitor uid from tracking, if you have it
|
|
150
|
+
|
|
151
|
+
# Form id in your system (string or numeric)
|
|
152
|
+
#
|
|
153
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Metadata#form_id
|
|
154
|
+
module FormID
|
|
155
|
+
extend Amocrm::Internal::Type::Union
|
|
156
|
+
|
|
157
|
+
variant String
|
|
158
|
+
|
|
159
|
+
variant Integer
|
|
160
|
+
|
|
161
|
+
# @!method self.variants
|
|
162
|
+
# @return [Array(String, Integer)]
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body#_embedded
|
|
167
|
+
class Embedded < Amocrm::Internal::Type::BaseModel
|
|
168
|
+
# @!attribute companies
|
|
169
|
+
#
|
|
170
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Company>, nil]
|
|
171
|
+
optional :companies,
|
|
172
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Company] }
|
|
173
|
+
|
|
174
|
+
# @!attribute contacts
|
|
175
|
+
#
|
|
176
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact>, nil]
|
|
177
|
+
optional :contacts,
|
|
178
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact] }
|
|
179
|
+
|
|
180
|
+
# @!attribute leads
|
|
181
|
+
# Create related entities together with unsorted (lead/contact/company)
|
|
182
|
+
#
|
|
183
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead>, nil]
|
|
184
|
+
optional :leads,
|
|
185
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead] }
|
|
186
|
+
|
|
187
|
+
# @!method initialize(companies: nil, contacts: nil, leads: nil)
|
|
188
|
+
# Embedded entities (lead/contact/company)
|
|
189
|
+
#
|
|
190
|
+
# @param companies [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Company>]
|
|
191
|
+
#
|
|
192
|
+
# @param contacts [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact>]
|
|
193
|
+
#
|
|
194
|
+
# @param leads [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead>] Create related entities together with unsorted (lead/contact/company)
|
|
195
|
+
|
|
196
|
+
class Company < Amocrm::Internal::Type::BaseModel
|
|
197
|
+
# @!attribute id
|
|
198
|
+
#
|
|
199
|
+
# @return [Integer, nil]
|
|
200
|
+
optional :id, Integer
|
|
201
|
+
|
|
202
|
+
# @!attribute name
|
|
203
|
+
#
|
|
204
|
+
# @return [String, nil]
|
|
205
|
+
optional :name, String
|
|
206
|
+
|
|
207
|
+
# @!method initialize(id: nil, name: nil)
|
|
208
|
+
# @param id [Integer]
|
|
209
|
+
# @param name [String]
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
class Contact < Amocrm::Internal::Type::BaseModel
|
|
213
|
+
# @!attribute id
|
|
214
|
+
#
|
|
215
|
+
# @return [Integer, nil]
|
|
216
|
+
optional :id, Integer
|
|
217
|
+
|
|
218
|
+
# @!attribute custom_fields_values
|
|
219
|
+
# Custom fields payload (same as contact create API)
|
|
220
|
+
#
|
|
221
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue>, nil]
|
|
222
|
+
optional :custom_fields_values,
|
|
223
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue] }
|
|
224
|
+
|
|
225
|
+
# @!attribute first_name
|
|
226
|
+
#
|
|
227
|
+
# @return [String, nil]
|
|
228
|
+
optional :first_name, String
|
|
229
|
+
|
|
230
|
+
# @!attribute last_name
|
|
231
|
+
#
|
|
232
|
+
# @return [String, nil]
|
|
233
|
+
optional :last_name, String
|
|
234
|
+
|
|
235
|
+
# @!attribute name
|
|
236
|
+
#
|
|
237
|
+
# @return [String, nil]
|
|
238
|
+
optional :name, String
|
|
239
|
+
|
|
240
|
+
# @!method initialize(id: nil, custom_fields_values: nil, first_name: nil, last_name: nil, name: nil)
|
|
241
|
+
# @param id [Integer]
|
|
242
|
+
#
|
|
243
|
+
# @param custom_fields_values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue>] Custom fields payload (same as contact create API)
|
|
244
|
+
#
|
|
245
|
+
# @param first_name [String]
|
|
246
|
+
#
|
|
247
|
+
# @param last_name [String]
|
|
248
|
+
#
|
|
249
|
+
# @param name [String]
|
|
250
|
+
|
|
251
|
+
class CustomFieldsValue < Amocrm::Internal::Type::BaseModel
|
|
252
|
+
# @!attribute values
|
|
253
|
+
# Values for the field (multiple values allowed)
|
|
254
|
+
#
|
|
255
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue::Value>]
|
|
256
|
+
required :values,
|
|
257
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue::Value] }
|
|
258
|
+
|
|
259
|
+
# @!attribute field_code
|
|
260
|
+
# Field code (e.g. PHONE/EMAIL)
|
|
261
|
+
#
|
|
262
|
+
# @return [String, nil]
|
|
263
|
+
optional :field_code, String
|
|
264
|
+
|
|
265
|
+
# @!attribute field_id
|
|
266
|
+
# Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
267
|
+
#
|
|
268
|
+
# @return [Integer, nil]
|
|
269
|
+
optional :field_id, Integer
|
|
270
|
+
|
|
271
|
+
# @!method initialize(values:, field_code: nil, field_id: nil)
|
|
272
|
+
# @param values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue::Value>] Values for the field (multiple values allowed)
|
|
273
|
+
#
|
|
274
|
+
# @param field_code [String] Field code (e.g. PHONE/EMAIL)
|
|
275
|
+
#
|
|
276
|
+
# @param field_id [Integer] Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
277
|
+
|
|
278
|
+
class Value < Amocrm::Internal::Type::BaseModel
|
|
279
|
+
# @!attribute value
|
|
280
|
+
#
|
|
281
|
+
# @return [String, Integer, Boolean]
|
|
282
|
+
required :value,
|
|
283
|
+
union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue::Value::Value }
|
|
284
|
+
|
|
285
|
+
# @!attribute enum_code
|
|
286
|
+
# Option code for list/select custom fields (if you use code instead of id)
|
|
287
|
+
#
|
|
288
|
+
# @return [String, nil]
|
|
289
|
+
optional :enum_code, String
|
|
290
|
+
|
|
291
|
+
# @!attribute enum_id
|
|
292
|
+
# Option id for list/select custom fields (one of predefined options)
|
|
293
|
+
#
|
|
294
|
+
# @return [Integer, nil]
|
|
295
|
+
optional :enum_id, Integer
|
|
296
|
+
|
|
297
|
+
# @!method initialize(value:, enum_code: nil, enum_id: nil)
|
|
298
|
+
# @param value [String, Integer, Boolean]
|
|
299
|
+
#
|
|
300
|
+
# @param enum_code [String] Option code for list/select custom fields (if you use code instead of id)
|
|
301
|
+
#
|
|
302
|
+
# @param enum_id [Integer] Option id for list/select custom fields (one of predefined options)
|
|
303
|
+
|
|
304
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Contact::CustomFieldsValue::Value#value
|
|
305
|
+
module Value
|
|
306
|
+
extend Amocrm::Internal::Type::Union
|
|
307
|
+
|
|
308
|
+
variant String
|
|
309
|
+
|
|
310
|
+
variant Integer
|
|
311
|
+
|
|
312
|
+
variant Amocrm::Internal::Type::Boolean
|
|
313
|
+
|
|
314
|
+
# @!method self.variants
|
|
315
|
+
# @return [Array(String, Integer, Boolean)]
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
class Lead < Amocrm::Internal::Type::BaseModel
|
|
322
|
+
# @!attribute _embedded
|
|
323
|
+
# Embedded entities (lead/contact/company/source)
|
|
324
|
+
#
|
|
325
|
+
# @return [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded, nil]
|
|
326
|
+
optional :_embedded, -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded }
|
|
327
|
+
|
|
328
|
+
# @!attribute closed_at
|
|
329
|
+
#
|
|
330
|
+
# @return [Integer, nil]
|
|
331
|
+
optional :closed_at, Integer
|
|
332
|
+
|
|
333
|
+
# @!attribute created_at
|
|
334
|
+
#
|
|
335
|
+
# @return [Integer, nil]
|
|
336
|
+
optional :created_at, Integer
|
|
337
|
+
|
|
338
|
+
# @!attribute created_by
|
|
339
|
+
#
|
|
340
|
+
# @return [Integer, nil]
|
|
341
|
+
optional :created_by, Integer
|
|
342
|
+
|
|
343
|
+
# @!attribute custom_fields_values
|
|
344
|
+
# Custom fields payload
|
|
345
|
+
#
|
|
346
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue>, nil]
|
|
347
|
+
optional :custom_fields_values,
|
|
348
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue] }
|
|
349
|
+
|
|
350
|
+
# @!attribute group_id
|
|
351
|
+
#
|
|
352
|
+
# @return [Integer, nil]
|
|
353
|
+
optional :group_id, Integer
|
|
354
|
+
|
|
355
|
+
# @!attribute loss_reason_id
|
|
356
|
+
#
|
|
357
|
+
# @return [Integer, nil]
|
|
358
|
+
optional :loss_reason_id, Integer
|
|
359
|
+
|
|
360
|
+
# @!attribute name
|
|
361
|
+
#
|
|
362
|
+
# @return [String, nil]
|
|
363
|
+
optional :name, String
|
|
364
|
+
|
|
365
|
+
# @!attribute pipeline_id
|
|
366
|
+
#
|
|
367
|
+
# @return [Integer, nil]
|
|
368
|
+
optional :pipeline_id, Integer
|
|
369
|
+
|
|
370
|
+
# @!attribute price
|
|
371
|
+
#
|
|
372
|
+
# @return [Integer, nil]
|
|
373
|
+
optional :price, Integer
|
|
374
|
+
|
|
375
|
+
# @!attribute request_id
|
|
376
|
+
# Client-side request id
|
|
377
|
+
#
|
|
378
|
+
# @return [String, nil]
|
|
379
|
+
optional :request_id, String
|
|
380
|
+
|
|
381
|
+
# @!attribute responsible_user_id
|
|
382
|
+
#
|
|
383
|
+
# @return [Integer, nil]
|
|
384
|
+
optional :responsible_user_id, Integer
|
|
385
|
+
|
|
386
|
+
# @!attribute status_id
|
|
387
|
+
#
|
|
388
|
+
# @return [Integer, nil]
|
|
389
|
+
optional :status_id, Integer
|
|
390
|
+
|
|
391
|
+
# @!attribute tags_to_add
|
|
392
|
+
# Tags to attach
|
|
393
|
+
#
|
|
394
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::TagsToAdd>, nil]
|
|
395
|
+
optional :tags_to_add,
|
|
396
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::TagsToAdd] }
|
|
397
|
+
|
|
398
|
+
# @!attribute updated_at
|
|
399
|
+
#
|
|
400
|
+
# @return [Integer, nil]
|
|
401
|
+
optional :updated_at, Integer
|
|
402
|
+
|
|
403
|
+
# @!attribute updated_by
|
|
404
|
+
#
|
|
405
|
+
# @return [Integer, nil]
|
|
406
|
+
optional :updated_by, Integer
|
|
407
|
+
|
|
408
|
+
# @!attribute visitor_uid
|
|
409
|
+
# Website visitor uid from tracking; links this lead to a site visit
|
|
410
|
+
#
|
|
411
|
+
# @return [String, nil]
|
|
412
|
+
optional :visitor_uid, String
|
|
413
|
+
|
|
414
|
+
# @!method initialize(_embedded: nil, closed_at: nil, created_at: nil, created_by: nil, custom_fields_values: nil, group_id: nil, loss_reason_id: nil, name: nil, pipeline_id: nil, price: nil, request_id: nil, responsible_user_id: nil, status_id: nil, tags_to_add: nil, updated_at: nil, updated_by: nil, visitor_uid: nil)
|
|
415
|
+
# @param _embedded [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded] Embedded entities (lead/contact/company/source)
|
|
416
|
+
#
|
|
417
|
+
# @param closed_at [Integer]
|
|
418
|
+
#
|
|
419
|
+
# @param created_at [Integer]
|
|
420
|
+
#
|
|
421
|
+
# @param created_by [Integer]
|
|
422
|
+
#
|
|
423
|
+
# @param custom_fields_values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue>] Custom fields payload
|
|
424
|
+
#
|
|
425
|
+
# @param group_id [Integer]
|
|
426
|
+
#
|
|
427
|
+
# @param loss_reason_id [Integer]
|
|
428
|
+
#
|
|
429
|
+
# @param name [String]
|
|
430
|
+
#
|
|
431
|
+
# @param pipeline_id [Integer]
|
|
432
|
+
#
|
|
433
|
+
# @param price [Integer]
|
|
434
|
+
#
|
|
435
|
+
# @param request_id [String] Client-side request id
|
|
436
|
+
#
|
|
437
|
+
# @param responsible_user_id [Integer]
|
|
438
|
+
#
|
|
439
|
+
# @param status_id [Integer]
|
|
440
|
+
#
|
|
441
|
+
# @param tags_to_add [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::TagsToAdd>] Tags to attach
|
|
442
|
+
#
|
|
443
|
+
# @param updated_at [Integer]
|
|
444
|
+
#
|
|
445
|
+
# @param updated_by [Integer]
|
|
446
|
+
#
|
|
447
|
+
# @param visitor_uid [String] Website visitor uid from tracking; links this lead to a site visit
|
|
448
|
+
|
|
449
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead#_embedded
|
|
450
|
+
class Embedded < Amocrm::Internal::Type::BaseModel
|
|
451
|
+
# @!attribute companies
|
|
452
|
+
#
|
|
453
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Company>, nil]
|
|
454
|
+
optional :companies,
|
|
455
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Company] }
|
|
456
|
+
|
|
457
|
+
# @!attribute contacts
|
|
458
|
+
#
|
|
459
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact>, nil]
|
|
460
|
+
optional :contacts,
|
|
461
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact] }
|
|
462
|
+
|
|
463
|
+
# @!attribute metadata
|
|
464
|
+
#
|
|
465
|
+
# @return [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata, nil]
|
|
466
|
+
optional :metadata,
|
|
467
|
+
-> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata }
|
|
468
|
+
|
|
469
|
+
# @!attribute source
|
|
470
|
+
#
|
|
471
|
+
# @return [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Source, nil]
|
|
472
|
+
optional :source,
|
|
473
|
+
-> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Source }
|
|
474
|
+
|
|
475
|
+
# @!attribute tags
|
|
476
|
+
#
|
|
477
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Tag>, nil]
|
|
478
|
+
optional :tags,
|
|
479
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Tag] }
|
|
480
|
+
|
|
481
|
+
# @!method initialize(companies: nil, contacts: nil, metadata: nil, source: nil, tags: nil)
|
|
482
|
+
# Embedded entities (lead/contact/company/source)
|
|
483
|
+
#
|
|
484
|
+
# @param companies [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Company>]
|
|
485
|
+
# @param contacts [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact>]
|
|
486
|
+
# @param metadata [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata]
|
|
487
|
+
# @param source [Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Source]
|
|
488
|
+
# @param tags [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Tag>]
|
|
489
|
+
|
|
490
|
+
class Company < Amocrm::Internal::Type::BaseModel
|
|
491
|
+
# @!attribute id
|
|
492
|
+
#
|
|
493
|
+
# @return [Integer, nil]
|
|
494
|
+
optional :id, Integer
|
|
495
|
+
|
|
496
|
+
# @!attribute name
|
|
497
|
+
#
|
|
498
|
+
# @return [String, nil]
|
|
499
|
+
optional :name, String
|
|
500
|
+
|
|
501
|
+
# @!method initialize(id: nil, name: nil)
|
|
502
|
+
# @param id [Integer]
|
|
503
|
+
# @param name [String]
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
class Contact < Amocrm::Internal::Type::BaseModel
|
|
507
|
+
# @!attribute id
|
|
508
|
+
#
|
|
509
|
+
# @return [Integer, nil]
|
|
510
|
+
optional :id, Integer
|
|
511
|
+
|
|
512
|
+
# @!attribute custom_fields_values
|
|
513
|
+
# Custom fields payload (same as contact create API)
|
|
514
|
+
#
|
|
515
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue>, nil]
|
|
516
|
+
optional :custom_fields_values,
|
|
517
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue] }
|
|
518
|
+
|
|
519
|
+
# @!attribute first_name
|
|
520
|
+
#
|
|
521
|
+
# @return [String, nil]
|
|
522
|
+
optional :first_name, String
|
|
523
|
+
|
|
524
|
+
# @!attribute last_name
|
|
525
|
+
#
|
|
526
|
+
# @return [String, nil]
|
|
527
|
+
optional :last_name, String
|
|
528
|
+
|
|
529
|
+
# @!attribute name
|
|
530
|
+
#
|
|
531
|
+
# @return [String, nil]
|
|
532
|
+
optional :name, String
|
|
533
|
+
|
|
534
|
+
# @!method initialize(id: nil, custom_fields_values: nil, first_name: nil, last_name: nil, name: nil)
|
|
535
|
+
# @param id [Integer]
|
|
536
|
+
#
|
|
537
|
+
# @param custom_fields_values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue>] Custom fields payload (same as contact create API)
|
|
538
|
+
#
|
|
539
|
+
# @param first_name [String]
|
|
540
|
+
#
|
|
541
|
+
# @param last_name [String]
|
|
542
|
+
#
|
|
543
|
+
# @param name [String]
|
|
544
|
+
|
|
545
|
+
class CustomFieldsValue < Amocrm::Internal::Type::BaseModel
|
|
546
|
+
# @!attribute values
|
|
547
|
+
# Values for the field (multiple values allowed)
|
|
548
|
+
#
|
|
549
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue::Value>]
|
|
550
|
+
required :values,
|
|
551
|
+
-> do
|
|
552
|
+
Amocrm::Internal::Type::ArrayOf[
|
|
553
|
+
Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue::Value
|
|
554
|
+
]
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# @!attribute field_code
|
|
558
|
+
# Field code (e.g. PHONE/EMAIL)
|
|
559
|
+
#
|
|
560
|
+
# @return [String, nil]
|
|
561
|
+
optional :field_code, String
|
|
562
|
+
|
|
563
|
+
# @!attribute field_id
|
|
564
|
+
# Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
565
|
+
#
|
|
566
|
+
# @return [Integer, nil]
|
|
567
|
+
optional :field_id, Integer
|
|
568
|
+
|
|
569
|
+
# @!method initialize(values:, field_code: nil, field_id: nil)
|
|
570
|
+
# @param values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue::Value>] Values for the field (multiple values allowed)
|
|
571
|
+
#
|
|
572
|
+
# @param field_code [String] Field code (e.g. PHONE/EMAIL)
|
|
573
|
+
#
|
|
574
|
+
# @param field_id [Integer] Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
575
|
+
|
|
576
|
+
class Value < Amocrm::Internal::Type::BaseModel
|
|
577
|
+
# @!attribute value
|
|
578
|
+
#
|
|
579
|
+
# @return [String, Integer, Boolean]
|
|
580
|
+
required :value,
|
|
581
|
+
union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue::Value::Value }
|
|
582
|
+
|
|
583
|
+
# @!attribute enum_code
|
|
584
|
+
# Option code for list/select custom fields (if you use code instead of id)
|
|
585
|
+
#
|
|
586
|
+
# @return [String, nil]
|
|
587
|
+
optional :enum_code, String
|
|
588
|
+
|
|
589
|
+
# @!attribute enum_id
|
|
590
|
+
# Option id for list/select custom fields (one of predefined options)
|
|
591
|
+
#
|
|
592
|
+
# @return [Integer, nil]
|
|
593
|
+
optional :enum_id, Integer
|
|
594
|
+
|
|
595
|
+
# @!method initialize(value:, enum_code: nil, enum_id: nil)
|
|
596
|
+
# @param value [String, Integer, Boolean]
|
|
597
|
+
#
|
|
598
|
+
# @param enum_code [String] Option code for list/select custom fields (if you use code instead of id)
|
|
599
|
+
#
|
|
600
|
+
# @param enum_id [Integer] Option id for list/select custom fields (one of predefined options)
|
|
601
|
+
|
|
602
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Contact::CustomFieldsValue::Value#value
|
|
603
|
+
module Value
|
|
604
|
+
extend Amocrm::Internal::Type::Union
|
|
605
|
+
|
|
606
|
+
variant String
|
|
607
|
+
|
|
608
|
+
variant Integer
|
|
609
|
+
|
|
610
|
+
variant Amocrm::Internal::Type::Boolean
|
|
611
|
+
|
|
612
|
+
# @!method self.variants
|
|
613
|
+
# @return [Array(String, Integer, Boolean)]
|
|
614
|
+
end
|
|
615
|
+
end
|
|
616
|
+
end
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded#metadata
|
|
620
|
+
class Metadata < Amocrm::Internal::Type::BaseModel
|
|
621
|
+
# @!attribute category
|
|
622
|
+
# Unsorted category
|
|
623
|
+
#
|
|
624
|
+
# @return [Symbol, Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata::Category, nil]
|
|
625
|
+
optional :category,
|
|
626
|
+
enum: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata::Category }
|
|
627
|
+
|
|
628
|
+
# @!attribute form_id
|
|
629
|
+
# Form id in your system (string or numeric)
|
|
630
|
+
#
|
|
631
|
+
# @return [String, Integer, nil]
|
|
632
|
+
optional :form_id,
|
|
633
|
+
union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata::FormID }
|
|
634
|
+
|
|
635
|
+
# @!attribute form_name
|
|
636
|
+
# Form name (shown in amoCRM)
|
|
637
|
+
#
|
|
638
|
+
# @return [String, nil]
|
|
639
|
+
optional :form_name, String
|
|
640
|
+
|
|
641
|
+
# @!attribute form_page
|
|
642
|
+
# Page URL where form lives
|
|
643
|
+
#
|
|
644
|
+
# @return [String, nil]
|
|
645
|
+
optional :form_page, String
|
|
646
|
+
|
|
647
|
+
# @!attribute form_sent_at
|
|
648
|
+
# Unix timestamp (seconds) when the form was submitted
|
|
649
|
+
#
|
|
650
|
+
# @return [Integer, nil]
|
|
651
|
+
optional :form_sent_at, Integer
|
|
652
|
+
|
|
653
|
+
# @!attribute form_type
|
|
654
|
+
# Form type code from amoCRM, use only if you know it
|
|
655
|
+
#
|
|
656
|
+
# @return [Integer, nil]
|
|
657
|
+
optional :form_type, Integer
|
|
658
|
+
|
|
659
|
+
# @!attribute ip
|
|
660
|
+
# IP address of the submitter
|
|
661
|
+
#
|
|
662
|
+
# @return [String, nil]
|
|
663
|
+
optional :ip, String
|
|
664
|
+
|
|
665
|
+
# @!attribute referer
|
|
666
|
+
# Referrer URL
|
|
667
|
+
#
|
|
668
|
+
# @return [String, nil]
|
|
669
|
+
optional :referer, String
|
|
670
|
+
|
|
671
|
+
# @!attribute visitor_uid
|
|
672
|
+
# Visitor uid from tracking, if you have it
|
|
673
|
+
#
|
|
674
|
+
# @return [String, nil]
|
|
675
|
+
optional :visitor_uid, String
|
|
676
|
+
|
|
677
|
+
# @!method initialize(category: nil, form_id: nil, form_name: nil, form_page: nil, form_sent_at: nil, form_type: nil, ip: nil, referer: nil, visitor_uid: nil)
|
|
678
|
+
# @param category [Symbol, Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata::Category] Unsorted category
|
|
679
|
+
#
|
|
680
|
+
# @param form_id [String, Integer] Form id in your system (string or numeric)
|
|
681
|
+
#
|
|
682
|
+
# @param form_name [String] Form name (shown in amoCRM)
|
|
683
|
+
#
|
|
684
|
+
# @param form_page [String] Page URL where form lives
|
|
685
|
+
#
|
|
686
|
+
# @param form_sent_at [Integer] Unix timestamp (seconds) when the form was submitted
|
|
687
|
+
#
|
|
688
|
+
# @param form_type [Integer] Form type code from amoCRM, use only if you know it
|
|
689
|
+
#
|
|
690
|
+
# @param ip [String] IP address of the submitter
|
|
691
|
+
#
|
|
692
|
+
# @param referer [String] Referrer URL
|
|
693
|
+
#
|
|
694
|
+
# @param visitor_uid [String] Visitor uid from tracking, if you have it
|
|
695
|
+
|
|
696
|
+
# Unsorted category
|
|
697
|
+
#
|
|
698
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata#category
|
|
699
|
+
module Category
|
|
700
|
+
extend Amocrm::Internal::Type::Enum
|
|
701
|
+
|
|
702
|
+
SIP = :sip
|
|
703
|
+
FORMS = :forms
|
|
704
|
+
CHATS = :chats
|
|
705
|
+
MAIL = :mail
|
|
706
|
+
|
|
707
|
+
# @!method self.values
|
|
708
|
+
# @return [Array<Symbol>]
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
# Form id in your system (string or numeric)
|
|
712
|
+
#
|
|
713
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Metadata#form_id
|
|
714
|
+
module FormID
|
|
715
|
+
extend Amocrm::Internal::Type::Union
|
|
716
|
+
|
|
717
|
+
variant String
|
|
718
|
+
|
|
719
|
+
variant Integer
|
|
720
|
+
|
|
721
|
+
# @!method self.variants
|
|
722
|
+
# @return [Array(String, Integer)]
|
|
723
|
+
end
|
|
724
|
+
end
|
|
725
|
+
|
|
726
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded#source
|
|
727
|
+
class Source < Amocrm::Internal::Type::BaseModel
|
|
728
|
+
# @!attribute external_id
|
|
729
|
+
# External id in your system
|
|
730
|
+
#
|
|
731
|
+
# @return [String, Integer, Boolean, nil]
|
|
732
|
+
optional :external_id,
|
|
733
|
+
union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Source::ExternalID }
|
|
734
|
+
|
|
735
|
+
# @!attribute type
|
|
736
|
+
# Source type
|
|
737
|
+
#
|
|
738
|
+
# @return [String, nil]
|
|
739
|
+
optional :type, String
|
|
740
|
+
|
|
741
|
+
# @!method initialize(external_id: nil, type: nil)
|
|
742
|
+
# @param external_id [String, Integer, Boolean] External id in your system
|
|
743
|
+
#
|
|
744
|
+
# @param type [String] Source type
|
|
745
|
+
|
|
746
|
+
# External id in your system
|
|
747
|
+
#
|
|
748
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::Embedded::Source#external_id
|
|
749
|
+
module ExternalID
|
|
750
|
+
extend Amocrm::Internal::Type::Union
|
|
751
|
+
|
|
752
|
+
variant String
|
|
753
|
+
|
|
754
|
+
variant Integer
|
|
755
|
+
|
|
756
|
+
variant Amocrm::Internal::Type::Boolean
|
|
757
|
+
|
|
758
|
+
# @!method self.variants
|
|
759
|
+
# @return [Array(String, Integer, Boolean)]
|
|
760
|
+
end
|
|
761
|
+
end
|
|
762
|
+
|
|
763
|
+
class Tag < Amocrm::Internal::Type::BaseModel
|
|
764
|
+
# @!attribute id
|
|
765
|
+
#
|
|
766
|
+
# @return [Integer, nil]
|
|
767
|
+
optional :id, Integer
|
|
768
|
+
|
|
769
|
+
# @!attribute color
|
|
770
|
+
#
|
|
771
|
+
# @return [String, nil]
|
|
772
|
+
optional :color, String
|
|
773
|
+
|
|
774
|
+
# @!attribute name
|
|
775
|
+
#
|
|
776
|
+
# @return [String, nil]
|
|
777
|
+
optional :name, String
|
|
778
|
+
|
|
779
|
+
# @!method initialize(id: nil, color: nil, name: nil)
|
|
780
|
+
# @param id [Integer]
|
|
781
|
+
# @param color [String]
|
|
782
|
+
# @param name [String]
|
|
783
|
+
end
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
class CustomFieldsValue < Amocrm::Internal::Type::BaseModel
|
|
787
|
+
# @!attribute values
|
|
788
|
+
# Values for the field (multiple values allowed)
|
|
789
|
+
#
|
|
790
|
+
# @return [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value>]
|
|
791
|
+
required :values,
|
|
792
|
+
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value] }
|
|
793
|
+
|
|
794
|
+
# @!attribute field_code
|
|
795
|
+
# Field code (e.g. PHONE/EMAIL)
|
|
796
|
+
#
|
|
797
|
+
# @return [String, nil]
|
|
798
|
+
optional :field_code, String
|
|
799
|
+
|
|
800
|
+
# @!attribute field_id
|
|
801
|
+
# Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
802
|
+
#
|
|
803
|
+
# @return [Integer, nil]
|
|
804
|
+
optional :field_id, Integer
|
|
805
|
+
|
|
806
|
+
# @!method initialize(values:, field_code: nil, field_id: nil)
|
|
807
|
+
# @param values [Array<Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value>] Values for the field (multiple values allowed)
|
|
808
|
+
#
|
|
809
|
+
# @param field_code [String] Field code (e.g. PHONE/EMAIL)
|
|
810
|
+
#
|
|
811
|
+
# @param field_id [Integer] Use either field_id or field_code (e.g. PHONE/EMAIL)
|
|
812
|
+
|
|
813
|
+
class Value < Amocrm::Internal::Type::BaseModel
|
|
814
|
+
# @!attribute value
|
|
815
|
+
#
|
|
816
|
+
# @return [String, Integer, Boolean]
|
|
817
|
+
required :value,
|
|
818
|
+
union: -> { Amocrm::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value::Value }
|
|
819
|
+
|
|
820
|
+
# @!attribute enum_code
|
|
821
|
+
# Option code for list/select custom fields (if you use code instead of id)
|
|
822
|
+
#
|
|
823
|
+
# @return [String, nil]
|
|
824
|
+
optional :enum_code, String
|
|
825
|
+
|
|
826
|
+
# @!attribute enum_id
|
|
827
|
+
# Option id for list/select custom fields (one of predefined options)
|
|
828
|
+
#
|
|
829
|
+
# @return [Integer, nil]
|
|
830
|
+
optional :enum_id, Integer
|
|
831
|
+
|
|
832
|
+
# @!method initialize(value:, enum_code: nil, enum_id: nil)
|
|
833
|
+
# @param value [String, Integer, Boolean]
|
|
834
|
+
#
|
|
835
|
+
# @param enum_code [String] Option code for list/select custom fields (if you use code instead of id)
|
|
836
|
+
#
|
|
837
|
+
# @param enum_id [Integer] Option id for list/select custom fields (one of predefined options)
|
|
838
|
+
|
|
839
|
+
# @see Amocrm::Models::V4::Leads::UnsortedCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value#value
|
|
840
|
+
module Value
|
|
841
|
+
extend Amocrm::Internal::Type::Union
|
|
842
|
+
|
|
843
|
+
variant String
|
|
844
|
+
|
|
845
|
+
variant Integer
|
|
846
|
+
|
|
847
|
+
variant Amocrm::Internal::Type::Boolean
|
|
848
|
+
|
|
849
|
+
# @!method self.variants
|
|
850
|
+
# @return [Array(String, Integer, Boolean)]
|
|
851
|
+
end
|
|
852
|
+
end
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
class TagsToAdd < Amocrm::Internal::Type::BaseModel
|
|
856
|
+
# @!attribute id
|
|
857
|
+
#
|
|
858
|
+
# @return [Integer, nil]
|
|
859
|
+
optional :id, Integer
|
|
860
|
+
|
|
861
|
+
# @!attribute color
|
|
862
|
+
#
|
|
863
|
+
# @return [String, nil]
|
|
864
|
+
optional :color, String
|
|
865
|
+
|
|
866
|
+
# @!attribute name
|
|
867
|
+
#
|
|
868
|
+
# @return [String, nil]
|
|
869
|
+
optional :name, String
|
|
870
|
+
|
|
871
|
+
# @!method initialize(id: nil, color: nil, name: nil)
|
|
872
|
+
# @param id [Integer]
|
|
873
|
+
# @param color [String]
|
|
874
|
+
# @param name [String]
|
|
875
|
+
end
|
|
876
|
+
end
|
|
877
|
+
end
|
|
878
|
+
end
|
|
879
|
+
end
|
|
880
|
+
end
|
|
881
|
+
end
|
|
882
|
+
end
|
|
883
|
+
end
|