Class: Amocrm::Models::CallCreateParams::Body

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

Defined Under Namespace

Modules: CallResponsible, Direction

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(direction:, duration:, phone:, source:, call_responsible: nil, call_result: nil, call_status: nil, created_at: nil, created_by: nil, link: nil, request_id: nil, responsible_user_id: nil, uniq: nil, updated_at: nil, updated_by: nil) ⇒ Object

Parameters:

  • direction (Symbol, String, Amocrm::Models::CallCreateParams::Body::Direction)
  • duration (Integer)
  • phone (String)
  • source (String)
  • call_responsible (String, Integer, nil) (defaults to: nil)
  • call_result (String) (defaults to: nil)
  • call_status (Integer) (defaults to: nil)
  • created_at (Integer) (defaults to: nil)
  • created_by (Integer) (defaults to: nil)
  • link (String) (defaults to: nil)
  • request_id (String) (defaults to: nil)
  • responsible_user_id (Integer) (defaults to: nil)
  • uniq (String) (defaults to: nil)
  • updated_at (Integer) (defaults to: nil)
  • updated_by (Integer) (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
# File 'lib/amocrm/models/call_create_params.rb', line 19

class Body < Amocrm::Internal::Type::BaseModel
  # @!attribute direction
  #
  #   @return [Symbol, String, Amocrm::Models::CallCreateParams::Body::Direction]
  required :direction, union: -> { Amocrm::CallCreateParams::Body::Direction }

  # @!attribute duration
  #
  #   @return [Integer]
  required :duration, Integer

  # @!attribute phone
  #
  #   @return [String]
  required :phone, String

  # @!attribute source
  #
  #   @return [String]
  required :source, String

  # @!attribute call_responsible
  #
  #   @return [String, Integer, nil]
  optional :call_responsible, union: -> { Amocrm::CallCreateParams::Body::CallResponsible }, nil?: true

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

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

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

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

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

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

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

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

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

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

  # @!method initialize(direction:, duration:, phone:, source:, call_responsible: nil, call_result: nil, call_status: nil, created_at: nil, created_by: nil, link: nil, request_id: nil, responsible_user_id: nil, uniq: nil, updated_at: nil, updated_by: nil)
  #   @param direction [Symbol, String, Amocrm::Models::CallCreateParams::Body::Direction]
  #   @param duration [Integer]
  #   @param phone [String]
  #   @param source [String]
  #   @param call_responsible [String, Integer, nil]
  #   @param call_result [String]
  #   @param call_status [Integer]
  #   @param created_at [Integer]
  #   @param created_by [Integer]
  #   @param link [String]
  #   @param request_id [String]
  #   @param responsible_user_id [Integer]
  #   @param uniq [String]
  #   @param updated_at [Integer]
  #   @param updated_by [Integer]

  # @see Amocrm::Models::CallCreateParams::Body#direction
  module Direction
    extend Amocrm::Internal::Type::Union

    variant const: -> { Amocrm::Models::CallCreateParams::Body::Direction::INBOUND }

    variant const: -> { Amocrm::Models::CallCreateParams::Body::Direction::OUTBOUND }

    variant String

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

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

    # @!group

    INBOUND = :inbound
    OUTBOUND = :outbound

    # @!endgroup
  end

  # @see Amocrm::Models::CallCreateParams::Body#call_responsible
  module CallResponsible
    extend Amocrm::Internal::Type::Union

    variant String

    variant Integer

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

Instance Attribute Details

#call_responsibleString, ...

Returns:

  • (String, Integer, nil)


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

optional :call_responsible, union: -> { Amocrm::CallCreateParams::Body::CallResponsible }, nil?: true

#call_resultString?

Returns:

  • (String, nil)


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

optional :call_result, String

#call_statusInteger?

Returns:

  • (Integer, nil)


53
# File 'lib/amocrm/models/call_create_params.rb', line 53

optional :call_status, Integer

#created_atInteger?

Returns:

  • (Integer, nil)


58
# File 'lib/amocrm/models/call_create_params.rb', line 58

optional :created_at, Integer

#created_byInteger?

Returns:

  • (Integer, nil)


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

optional :created_by, Integer

#directionSymbol, ...



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

required :direction, union: -> { Amocrm::CallCreateParams::Body::Direction }

#durationInteger

Returns:

  • (Integer)


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

required :duration, Integer

Returns:

  • (String, nil)


68
# File 'lib/amocrm/models/call_create_params.rb', line 68

optional :link, String

#phoneString

Returns:

  • (String)


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

required :phone, String

#request_idString?

Returns:

  • (String, nil)


73
# File 'lib/amocrm/models/call_create_params.rb', line 73

optional :request_id, String

#responsible_user_idInteger?

Returns:

  • (Integer, nil)


78
# File 'lib/amocrm/models/call_create_params.rb', line 78

optional :responsible_user_id, Integer

#sourceString

Returns:

  • (String)


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

required :source, String

#uniqString?

Returns:

  • (String, nil)


83
# File 'lib/amocrm/models/call_create_params.rb', line 83

optional :uniq, String

#updated_atInteger?

Returns:

  • (Integer, nil)


88
# File 'lib/amocrm/models/call_create_params.rb', line 88

optional :updated_at, Integer

#updated_byInteger?

Returns:

  • (Integer, nil)


93
# File 'lib/amocrm/models/call_create_params.rb', line 93

optional :updated_by, Integer