Class: Amocrm::Models::UnsortedLeadCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/amocrm/models/unsorted_lead_create_forms_params.rb,
sig/amocrm/models/unsorted_lead_create_forms_params.rbs

Defined Under Namespace

Modules: Value

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(value:, enum_code: nil, enum_id: nil) ⇒ Object

Parameters:

  • value (String, Integer, Boolean)
  • enum_code (String) (defaults to: nil) —

    Option code for list/select custom fields (if you use code instead of id)

  • enum_id (Integer) (defaults to: nil) —

    Option id for list/select custom fields (one of predefined options)



805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
# File 'lib/amocrm/models/unsorted_lead_create_forms_params.rb', line 805

class Value < Amocrm::Internal::Type::BaseModel
  # @!attribute value
  #
  #   @return [String, Integer, Boolean]
  required :value,
           union: -> { Amocrm::UnsortedLeadCreateFormsParams::Body::Embedded::Lead::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::UnsortedLeadCreateFormsParams::Body::Embedded::Lead::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

Instance Attribute Details

#enum_code ⇒ String?

Option code for list/select custom fields (if you use code instead of id)

Parameters:

  • (String)

Returns:

  • (String, nil)


816
# File 'lib/amocrm/models/unsorted_lead_create_forms_params.rb', line 816

optional :enum_code, String

#enum_id ⇒ Integer?

Option id for list/select custom fields (one of predefined options)

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


822
# File 'lib/amocrm/models/unsorted_lead_create_forms_params.rb', line 822

optional :enum_id, Integer

#value ⇒ String, ...

Parameters:

  • value (Amocrm::Models::UnsortedLeadCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value::value)

Returns:

  • (String, Integer, Boolean)


809
810
# File 'lib/amocrm/models/unsorted_lead_create_forms_params.rb', line 809

required :value,
union: -> { Amocrm::UnsortedLeadCreateFormsParams::Body::Embedded::Lead::CustomFieldsValue::Value::Value }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


872
# File 'sig/amocrm/models/unsorted_lead_create_forms_params.rbs', line 872

def to_hash: -> {