Class: Amocrm::Models::CompanyCreateParams::Body

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

Defined Under Namespace

Classes: CustomFieldsValue, Embedded, TagsToAdd

Instance Attribute Summary collapse

Class Method 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)


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
# File 'lib/amocrm/models/company_create_params.rb', line 19

class Body < Amocrm::Internal::Type::BaseModel
  # @!attribute _embedded
  #   Embedded entities
  #
  #   @return [Amocrm::Models::CompanyCreateParams::Body::Embedded, nil]
  optional :_embedded, -> { Amocrm::CompanyCreateParams::Body::Embedded }

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

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

  # @!attribute custom_fields_values
  #   Custom fields payload
  #
  #   @return [Array<Amocrm::Models::CompanyCreateParams::Body::CustomFieldsValue>, nil]
  optional :custom_fields_values,
           -> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::CustomFieldsValue] }

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

  # @!attribute request_id
  #   Client-side request id
  #
  #   @return [String, nil]
  optional :request_id, String

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

  # @!attribute tags_to_add
  #   Tags to attach
  #
  #   @return [Array<Amocrm::Models::CompanyCreateParams::Body::TagsToAdd>, nil]
  optional :tags_to_add,
           -> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::TagsToAdd] }

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

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

  # @!method initialize(_embedded: nil, created_at: nil, created_by: nil, custom_fields_values: nil, name: nil, request_id: nil, responsible_user_id: nil, tags_to_add: nil, updated_at: nil, updated_by: nil)
  #   @param _embedded [Amocrm::Models::CompanyCreateParams::Body::Embedded] Embedded entities
  #
  #   @param created_at [Integer]
  #
  #   @param created_by [Integer]
  #
  #   @param custom_fields_values [Array<Amocrm::Models::CompanyCreateParams::Body::CustomFieldsValue>] Custom fields payload
  #
  #   @param name [String]
  #
  #   @param request_id [String] Client-side request id
  #
  #   @param responsible_user_id [Integer]
  #
  #   @param tags_to_add [Array<Amocrm::Models::CompanyCreateParams::Body::TagsToAdd>] Tags to attach
  #
  #   @param updated_at [Integer]
  #
  #   @param updated_by [Integer]

  # @see Amocrm::Models::CompanyCreateParams::Body#_embedded
  class Embedded < Amocrm::Internal::Type::BaseModel
    # @!attribute tags
    #
    #   @return [Array<Amocrm::Models::CompanyCreateParams::Body::Embedded::Tag>, nil]
    optional :tags, -> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::Embedded::Tag] }

    # @!method initialize(tags: nil)
    #   Embedded entities
    #
    #   @param tags [Array<Amocrm::Models::CompanyCreateParams::Body::Embedded::Tag>]

    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::CompanyCreateParams::Body::CustomFieldsValue::Value>]
    required :values,
             -> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::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::CompanyCreateParams::Body::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::CompanyCreateParams::Body::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::CompanyCreateParams::Body::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

  class TagsToAdd < 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

Instance Attribute Details

#_embeddedAmocrm::Models::CompanyCreateParams::Body::Embedded?

Embedded entities



24
# File 'lib/amocrm/models/company_create_params.rb', line 24

optional :_embedded, -> { Amocrm::CompanyCreateParams::Body::Embedded }

#created_atInteger?

Returns:

  • (Integer, nil)


29
# File 'lib/amocrm/models/company_create_params.rb', line 29

optional :created_at, Integer

#created_byInteger?

Returns:

  • (Integer, nil)


34
# File 'lib/amocrm/models/company_create_params.rb', line 34

optional :created_by, Integer

#custom_fields_valuesArray<Amocrm::Models::CompanyCreateParams::Body::CustomFieldsValue>?

Custom fields payload



40
41
# File 'lib/amocrm/models/company_create_params.rb', line 40

optional :custom_fields_values,
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::CustomFieldsValue] }

#nameString?

Returns:

  • (String, nil)


46
# File 'lib/amocrm/models/company_create_params.rb', line 46

optional :name, String

#request_idString?

Client-side request id

Returns:

  • (String, nil)


52
# File 'lib/amocrm/models/company_create_params.rb', line 52

optional :request_id, String

#responsible_user_idInteger?

Returns:

  • (Integer, nil)


57
# File 'lib/amocrm/models/company_create_params.rb', line 57

optional :responsible_user_id, Integer

#tags_to_addArray<Amocrm::Models::CompanyCreateParams::Body::TagsToAdd>?

Tags to attach



63
64
# File 'lib/amocrm/models/company_create_params.rb', line 63

optional :tags_to_add,
-> { Amocrm::Internal::Type::ArrayOf[Amocrm::CompanyCreateParams::Body::TagsToAdd] }

#updated_atInteger?

Returns:

  • (Integer, nil)


69
# File 'lib/amocrm/models/company_create_params.rb', line 69

optional :updated_at, Integer

#updated_byInteger?

Returns:

  • (Integer, nil)


74
# File 'lib/amocrm/models/company_create_params.rb', line 74

optional :updated_by, Integer

Class Method Details

.variantsArray(String, Integer, Boolean)

Returns:

  • (Array(String, Integer, Boolean))


# File 'lib/amocrm/models/company_create_params.rb', line 194