Class: Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/amocrm/models/customer_list_response.rb

Defined Under Namespace

Classes: CustomFieldsValue, Embedded

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, color: nil, name: nil) ⇒ Object

Parameters:

  • id (Integer) (defaults to: nil)
  • color (String) (defaults to: nil)
  • name (String) (defaults to: nil)


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/amocrm/models/customer_list_response.rb', line 45

class Customer < Amocrm::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [Integer, nil]
  optional :id, Integer

  # @!attribute _embedded
  #
  #   @return [Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded, nil]
  optional :_embedded,
           -> { Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded }

  # @!attribute _links
  #
  #   @return [Object, nil]
  optional :_links, Amocrm::Internal::Type::Unknown

  # @!attribute account_id
  #
  #   @return [Integer, nil]
  optional :account_id, Integer

  # @!attribute average_check
  #
  #   @return [Integer, nil]
  optional :average_check, Integer

  # @!attribute closest_task_at
  #
  #   @return [Integer, nil]
  optional :closest_task_at, Integer

  # @!attribute created_at
  #
  #   @return [Integer, nil]
  optional :created_at, Integer

  # @!attribute created_by
  #
  #   @return [Integer, nil]
  optional :created_by, Integer

  # @!attribute custom_fields_values
  #
  #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue>, nil]
  optional :custom_fields_values,
           -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue] },
           nil?: true

  # @!attribute group_id
  #
  #   @return [Integer, nil]
  optional :group_id, Integer

  # @!attribute is_deleted
  #
  #   @return [Boolean, nil]
  optional :is_deleted, Amocrm::Internal::Type::Boolean

  # @!attribute ltv
  #
  #   @return [Integer, nil]
  optional :ltv, Integer

  # @!attribute main_user_id
  #
  #   @return [Integer, nil]
  optional :main_user_id, Integer

  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String

  # @!attribute next_date
  #
  #   @return [Integer, nil]
  optional :next_date, Integer

  # @!attribute next_price
  #
  #   @return [Integer, nil]
  optional :next_price, Integer

  # @!attribute periodicity
  #
  #   @return [Integer, nil]
  optional :periodicity, Integer

  # @!attribute purchases_count
  #
  #   @return [Integer, nil]
  optional :purchases_count, Integer

  # @!attribute responsible_user_id
  #
  #   @return [Integer, nil]
  optional :responsible_user_id, Integer

  # @!attribute status_id
  #
  #   @return [Integer, nil]
  optional :status_id, Integer

  # @!attribute updated_at
  #
  #   @return [Integer, nil]
  optional :updated_at, Integer

  # @!attribute updated_by
  #
  #   @return [Integer, nil]
  optional :updated_by, Integer

  # @!method initialize(id: nil, _embedded: nil, _links: nil, account_id: nil, average_check: nil, closest_task_at: nil, created_at: nil, created_by: nil, custom_fields_values: nil, group_id: nil, is_deleted: nil, ltv: nil, main_user_id: nil, name: nil, next_date: nil, next_price: nil, periodicity: nil, purchases_count: nil, responsible_user_id: nil, status_id: nil, updated_at: nil, updated_by: nil)
  #   @param id [Integer]
  #   @param _embedded [Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded]
  #   @param _links [Object]
  #   @param account_id [Integer]
  #   @param average_check [Integer]
  #   @param closest_task_at [Integer]
  #   @param created_at [Integer]
  #   @param created_by [Integer]
  #   @param custom_fields_values [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue>, nil]
  #   @param group_id [Integer]
  #   @param is_deleted [Boolean]
  #   @param ltv [Integer]
  #   @param main_user_id [Integer]
  #   @param name [String]
  #   @param next_date [Integer]
  #   @param next_price [Integer]
  #   @param periodicity [Integer]
  #   @param purchases_count [Integer]
  #   @param responsible_user_id [Integer]
  #   @param status_id [Integer]
  #   @param updated_at [Integer]
  #   @param updated_by [Integer]

  # @see Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer#_embedded
  class Embedded < Amocrm::Internal::Type::BaseModel
    # @!attribute catalog_elements
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::CatalogElement>, nil]
    optional :catalog_elements,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::CatalogElement] }

    # @!attribute companies
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Company>, nil]
    optional :companies,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Company] }

    # @!attribute contacts
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Contact>, nil]
    optional :contacts,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Contact] }

    # @!attribute segments
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Segment>, nil]
    optional :segments,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Segment] }

    # @!attribute tags
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Tag>, nil]
    optional :tags,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Tag] }

    # @!method initialize(catalog_elements: nil, companies: nil, contacts: nil, segments: nil, tags: nil)
    #   @param catalog_elements [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::CatalogElement>]
    #   @param companies [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Company>]
    #   @param contacts [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Contact>]
    #   @param segments [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Segment>]
    #   @param tags [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::Embedded::Tag>]

    class CatalogElement < Amocrm::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [Integer, nil]
      optional :id, Integer

      # @!attribute _links
      #
      #   @return [Object, nil]
      optional :_links, Amocrm::Internal::Type::Unknown

      # @!method initialize(id: nil, _links: nil)
      #   @param id [Integer]
      #   @param _links [Object]
    end

    class Company < Amocrm::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [Integer, nil]
      optional :id, Integer

      # @!attribute _links
      #
      #   @return [Object, nil]
      optional :_links, Amocrm::Internal::Type::Unknown

      # @!method initialize(id: nil, _links: nil)
      #   @param id [Integer]
      #   @param _links [Object]
    end

    class Contact < Amocrm::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [Integer, nil]
      optional :id, Integer

      # @!attribute _links
      #
      #   @return [Object, nil]
      optional :_links, Amocrm::Internal::Type::Unknown

      # @!method initialize(id: nil, _links: nil)
      #   @param id [Integer]
      #   @param _links [Object]
    end

    class Segment < Amocrm::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [Integer, nil]
      optional :id, Integer

      # @!attribute _links
      #
      #   @return [Object, nil]
      optional :_links, Amocrm::Internal::Type::Unknown

      # @!method initialize(id: nil, _links: nil)
      #   @param id [Integer]
      #   @param _links [Object]
    end

    class Tag < Amocrm::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [Integer, nil]
      optional :id, Integer

      # @!attribute color
      #
      #   @return [String, nil]
      optional :color, String

      # @!attribute name
      #
      #   @return [String, nil]
      optional :name, String

      # @!method initialize(id: nil, color: nil, name: nil)
      #   @param id [Integer]
      #   @param color [String]
      #   @param name [String]
    end
  end

  class CustomFieldsValue < Amocrm::Internal::Type::BaseModel
    # @!attribute values
    #   Values for the field (multiple values allowed)
    #
    #   @return [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue::Value>]
    required :values,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue::Value] }

    # @!attribute field_code
    #   Field code (e.g. PHONE/EMAIL)
    #
    #   @return [String, nil]
    optional :field_code, String

    # @!attribute field_id
    #   Use either field_id or field_code (e.g. PHONE/EMAIL)
    #
    #   @return [Integer, nil]
    optional :field_id, Integer

    # @!method initialize(values:, field_code: nil, field_id: nil)
    #   @param values [Array<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue::Value>] Values for the field (multiple values allowed)
    #
    #   @param field_code [String] Field code (e.g. PHONE/EMAIL)
    #
    #   @param field_id [Integer] Use either field_id or field_code (e.g. PHONE/EMAIL)

    class Value < Amocrm::Internal::Type::BaseModel
      # @!attribute value
      #
      #   @return [String, Integer, Boolean]
      required :value,
               union: -> { Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue::Value::Value }

      # @!attribute enum_code
      #   Option code for list/select custom fields (if you use code instead of id)
      #
      #   @return [String, nil]
      optional :enum_code, String

      # @!attribute enum_id
      #   Option id for list/select custom fields (one of predefined options)
      #
      #   @return [Integer, nil]
      optional :enum_id, Integer

      # @!method initialize(value:, enum_code: nil, enum_id: nil)
      #   @param value [String, Integer, Boolean]
      #
      #   @param enum_code [String] Option code for list/select custom fields (if you use code instead of id)
      #
      #   @param enum_id [Integer] Option id for list/select custom fields (one of predefined options)

      # @see Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue::Value#value
      module Value
        extend Amocrm::Internal::Type::Union

        variant String

        variant Integer

        variant Amocrm::Internal::Type::Boolean

        # @!method self.variants
        #   @return [Array(String, Integer, Boolean)]
      end
    end
  end
end

Instance Attribute Details

Returns:

  • (Object, nil)


60
# File 'lib/amocrm/models/customer_list_response.rb', line 60

optional :_links, Amocrm::Internal::Type::Unknown

#account_idInteger?

Returns:

  • (Integer, nil)


65
# File 'lib/amocrm/models/customer_list_response.rb', line 65

optional :account_id, Integer

#average_checkInteger?

Returns:

  • (Integer, nil)


70
# File 'lib/amocrm/models/customer_list_response.rb', line 70

optional :average_check, Integer

#closest_task_atInteger?

Returns:

  • (Integer, nil)


75
# File 'lib/amocrm/models/customer_list_response.rb', line 75

optional :closest_task_at, Integer

#created_atInteger?

Returns:

  • (Integer, nil)


80
# File 'lib/amocrm/models/customer_list_response.rb', line 80

optional :created_at, Integer

#created_byInteger?

Returns:

  • (Integer, nil)


85
# File 'lib/amocrm/models/customer_list_response.rb', line 85

optional :created_by, Integer

#custom_fields_valuesArray<Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue>?



90
91
92
# File 'lib/amocrm/models/customer_list_response.rb', line 90

optional :custom_fields_values,
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::Models::CustomerListResponse::CustomerListResponse::Embedded::Customer::CustomFieldsValue] },
nil?: true

#group_idInteger?

Returns:

  • (Integer, nil)


97
# File 'lib/amocrm/models/customer_list_response.rb', line 97

optional :group_id, Integer

#idInteger?

Returns:

  • (Integer, nil)


49
# File 'lib/amocrm/models/customer_list_response.rb', line 49

optional :id, Integer

#is_deletedBoolean?

Returns:

  • (Boolean, nil)


102
# File 'lib/amocrm/models/customer_list_response.rb', line 102

optional :is_deleted, Amocrm::Internal::Type::Boolean

#ltvInteger?

Returns:

  • (Integer, nil)


107
# File 'lib/amocrm/models/customer_list_response.rb', line 107

optional :ltv, Integer

#main_user_idInteger?

Returns:

  • (Integer, nil)


112
# File 'lib/amocrm/models/customer_list_response.rb', line 112

optional :main_user_id, Integer

#nameString?

Returns:

  • (String, nil)


117
# File 'lib/amocrm/models/customer_list_response.rb', line 117

optional :name, String

#next_dateInteger?

Returns:

  • (Integer, nil)


122
# File 'lib/amocrm/models/customer_list_response.rb', line 122

optional :next_date, Integer

#next_priceInteger?

Returns:

  • (Integer, nil)


127
# File 'lib/amocrm/models/customer_list_response.rb', line 127

optional :next_price, Integer

#periodicityInteger?

Returns:

  • (Integer, nil)


132
# File 'lib/amocrm/models/customer_list_response.rb', line 132

optional :periodicity, Integer

#purchases_countInteger?

Returns:

  • (Integer, nil)


137
# File 'lib/amocrm/models/customer_list_response.rb', line 137

optional :purchases_count, Integer

#responsible_user_idInteger?

Returns:

  • (Integer, nil)


142
# File 'lib/amocrm/models/customer_list_response.rb', line 142

optional :responsible_user_id, Integer

#status_idInteger?

Returns:

  • (Integer, nil)


147
# File 'lib/amocrm/models/customer_list_response.rb', line 147

optional :status_id, Integer

#updated_atInteger?

Returns:

  • (Integer, nil)


152
# File 'lib/amocrm/models/customer_list_response.rb', line 152

optional :updated_at, Integer

#updated_byInteger?

Returns:

  • (Integer, nil)


157
# File 'lib/amocrm/models/customer_list_response.rb', line 157

optional :updated_by, Integer