Class: Amocrm::Models::CatalogCreateParams::Body

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

Defined Under Namespace

Modules: Type

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(name:, can_add_elements: nil, can_link_multiple: nil, request_id: nil, sort: nil, type: nil) ⇒ Object

Parameters:

  • name (String)
  • can_add_elements (Boolean) (defaults to: nil)
  • can_link_multiple (Boolean) (defaults to: nil)
  • request_id (String) (defaults to: nil)
  • sort (Integer) (defaults to: nil)
  • type (Symbol, String, Amocrm::Models::CatalogCreateParams::Body::Type) (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
# File 'lib/amocrm/models/catalog_create_params.rb', line 19

class Body < Amocrm::Internal::Type::BaseModel
  # @!attribute name
  #
  #   @return [String]
  required :name, String

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

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

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

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

  # @!attribute type
  #
  #   @return [Symbol, String, Amocrm::Models::CatalogCreateParams::Body::Type, nil]
  optional :type, union: -> { Amocrm::CatalogCreateParams::Body::Type }

  # @!method initialize(name:, can_add_elements: nil, can_link_multiple: nil, request_id: nil, sort: nil, type: nil)
  #   @param name [String]
  #   @param can_add_elements [Boolean]
  #   @param can_link_multiple [Boolean]
  #   @param request_id [String]
  #   @param sort [Integer]
  #   @param type [Symbol, String, Amocrm::Models::CatalogCreateParams::Body::Type]

  # @see Amocrm::Models::CatalogCreateParams::Body#type
  module Type
    extend Amocrm::Internal::Type::Union

    variant const: -> { Amocrm::Models::CatalogCreateParams::Body::Type::REGULAR }

    variant const: -> { Amocrm::Models::CatalogCreateParams::Body::Type::INVOICES }

    variant const: -> { Amocrm::Models::CatalogCreateParams::Body::Type::PRODUCTS }

    variant String

    # @!method self.variants
    #   @return [Array(Symbol, String)]

    define_sorbet_constant!(:Variants) do
      T.type_alias { T.any(Amocrm::CatalogCreateParams::Body::Type::TaggedSymbol, String) }
    end

    # @!group

    REGULAR = :regular
    INVOICES = :invoices
    PRODUCTS = :products

    # @!endgroup
  end
end

Instance Attribute Details

#can_add_elementsBoolean?

Returns:

  • (Boolean, nil)


28
# File 'lib/amocrm/models/catalog_create_params.rb', line 28

optional :can_add_elements, Amocrm::Internal::Type::Boolean

Returns:

  • (Boolean, nil)


33
# File 'lib/amocrm/models/catalog_create_params.rb', line 33

optional :can_link_multiple, Amocrm::Internal::Type::Boolean

#nameString

Returns:

  • (String)


23
# File 'lib/amocrm/models/catalog_create_params.rb', line 23

required :name, String

#request_idString?

Returns:

  • (String, nil)


38
# File 'lib/amocrm/models/catalog_create_params.rb', line 38

optional :request_id, String

#sortInteger?

Returns:

  • (Integer, nil)


43
# File 'lib/amocrm/models/catalog_create_params.rb', line 43

optional :sort, Integer

#typeSymbol, ...

Returns:



48
# File 'lib/amocrm/models/catalog_create_params.rb', line 48

optional :type, union: -> { Amocrm::CatalogCreateParams::Body::Type }