sentdm 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +11 -9
- data/lib/sentdm/client.rb +25 -0
- data/lib/sentdm/internal/calls_page.rb +115 -0
- data/lib/sentdm/models/api_response_of_call.rb +43 -0
- data/lib/sentdm/models/api_response_of_call_recordings.rb +43 -0
- data/lib/sentdm/models/api_response_of_calls_list.rb +42 -0
- data/lib/sentdm/models/call.rb +133 -0
- data/lib/sentdm/models/call_event.rb +72 -0
- data/lib/sentdm/models/call_event_payload.rb +102 -0
- data/lib/sentdm/models/call_hangup_params.rb +32 -0
- data/lib/sentdm/models/call_list_params.rb +83 -0
- data/lib/sentdm/models/call_list_recordings_params.rb +26 -0
- data/lib/sentdm/models/call_party.rb +31 -0
- data/lib/sentdm/models/call_record_params.rb +55 -0
- data/lib/sentdm/models/call_recording.rb +38 -0
- data/lib/sentdm/models/call_recordings.rb +24 -0
- data/lib/sentdm/models/call_retrieve_params.rb +26 -0
- data/lib/sentdm/models/call_timeline_entry.rb +26 -0
- data/lib/sentdm/models/calls/api_response_of_list_of_call_participant.rb +45 -0
- data/lib/sentdm/models/calls/call_participant.rb +60 -0
- data/lib/sentdm/models/calls/call_participant_target.rb +30 -0
- data/lib/sentdm/models/calls/participant_add_params.rb +66 -0
- data/lib/sentdm/models/calls/participant_list_params.rb +28 -0
- data/lib/sentdm/models/calls/participant_remove_all_params.rb +28 -0
- data/lib/sentdm/models/calls/participant_remove_params.rb +34 -0
- data/lib/sentdm/models/calls/participant_update_params.rb +64 -0
- data/lib/sentdm/models/calls_list.rb +26 -0
- data/lib/sentdm/models/channels/api_response_of_list_of_voice_number.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_callback_test.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_number.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_number_created.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_secret.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_token.rb +45 -0
- data/lib/sentdm/models/channels/voice_callback_test.rb +65 -0
- data/lib/sentdm/models/channels/voice_callback_test_error_info.rb +41 -0
- data/lib/sentdm/models/channels/voice_callback_test_request_info.rb +40 -0
- data/lib/sentdm/models/channels/voice_callback_test_response_info.rb +28 -0
- data/lib/sentdm/models/channels/voice_create_params.rb +86 -0
- data/lib/sentdm/models/channels/voice_create_token_params.rb +69 -0
- data/lib/sentdm/models/channels/voice_list_params.rb +22 -0
- data/lib/sentdm/models/channels/voice_number.rb +68 -0
- data/lib/sentdm/models/channels/voice_number_created.rb +26 -0
- data/lib/sentdm/models/channels/voice_retrieve_params.rb +28 -0
- data/lib/sentdm/models/channels/voice_rotate_secret_params.rb +34 -0
- data/lib/sentdm/models/channels/voice_secret.rb +25 -0
- data/lib/sentdm/models/channels/voice_test_params.rb +34 -0
- data/lib/sentdm/models/channels/voice_token.rb +44 -0
- data/lib/sentdm/models/channels/voice_update_params.rb +95 -0
- data/lib/sentdm/models/webhook_list_events_response.rb +4 -173
- data/lib/sentdm/models.rb +36 -0
- data/lib/sentdm/resources/calls/participants.rb +231 -0
- data/lib/sentdm/resources/calls.rb +235 -0
- data/lib/sentdm/resources/channels/voice.rb +381 -0
- data/lib/sentdm/resources/channels.rb +45 -0
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +50 -0
- data/rbi/sentdm/client.rbi +23 -0
- data/rbi/sentdm/internal/calls_page.rbi +71 -0
- data/rbi/sentdm/models/api_response_of_call.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_call_recordings.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_calls_list.rbi +74 -0
- data/rbi/sentdm/models/call.rbi +177 -0
- data/rbi/sentdm/models/call_event.rbi +114 -0
- data/rbi/sentdm/models/call_event_payload.rbi +135 -0
- data/rbi/sentdm/models/call_hangup_params.rbi +59 -0
- data/rbi/sentdm/models/call_list_params.rbi +112 -0
- data/rbi/sentdm/models/call_list_recordings_params.rbi +46 -0
- data/rbi/sentdm/models/call_party.rbi +41 -0
- data/rbi/sentdm/models/call_record_params.rbi +83 -0
- data/rbi/sentdm/models/call_recording.rbi +59 -0
- data/rbi/sentdm/models/call_recordings.rbi +39 -0
- data/rbi/sentdm/models/call_retrieve_params.rbi +46 -0
- data/rbi/sentdm/models/call_timeline_entry.rbi +40 -0
- data/rbi/sentdm/models/calls/api_response_of_list_of_call_participant.rbi +76 -0
- data/rbi/sentdm/models/calls/call_participant.rbi +92 -0
- data/rbi/sentdm/models/calls/call_participant_target.rbi +47 -0
- data/rbi/sentdm/models/calls/participant_add_params.rbi +98 -0
- data/rbi/sentdm/models/calls/participant_list_params.rbi +51 -0
- data/rbi/sentdm/models/calls/participant_remove_all_params.rbi +51 -0
- data/rbi/sentdm/models/calls/participant_remove_params.rbi +61 -0
- data/rbi/sentdm/models/calls/participant_update_params.rbi +94 -0
- data/rbi/sentdm/models/calls_list.rbi +47 -0
- data/rbi/sentdm/models/channels/api_response_of_list_of_voice_number.rbi +76 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_callback_test.rbi +83 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_number.rbi +81 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_number_created.rbi +83 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_secret.rbi +81 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_token.rbi +81 -0
- data/rbi/sentdm/models/channels/voice_callback_test.rbi +126 -0
- data/rbi/sentdm/models/channels/voice_callback_test_error_info.rbi +65 -0
- data/rbi/sentdm/models/channels/voice_callback_test_request_info.rbi +66 -0
- data/rbi/sentdm/models/channels/voice_callback_test_response_info.rbi +48 -0
- data/rbi/sentdm/models/channels/voice_create_params.rbi +127 -0
- data/rbi/sentdm/models/channels/voice_create_token_params.rbi +104 -0
- data/rbi/sentdm/models/channels/voice_list_params.rbi +40 -0
- data/rbi/sentdm/models/channels/voice_number.rbi +105 -0
- data/rbi/sentdm/models/channels/voice_number_created.rbi +42 -0
- data/rbi/sentdm/models/channels/voice_retrieve_params.rbi +51 -0
- data/rbi/sentdm/models/channels/voice_rotate_secret_params.rbi +64 -0
- data/rbi/sentdm/models/channels/voice_secret.rbi +35 -0
- data/rbi/sentdm/models/channels/voice_test_params.rbi +61 -0
- data/rbi/sentdm/models/channels/voice_token.rbi +76 -0
- data/rbi/sentdm/models/channels/voice_update_params.rbi +158 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +3 -269
- data/rbi/sentdm/models.rbi +36 -0
- data/rbi/sentdm/resources/calls/participants.rbi +199 -0
- data/rbi/sentdm/resources/calls.rbi +206 -0
- data/rbi/sentdm/resources/channels/voice.rbi +371 -0
- data/rbi/sentdm/resources/channels.rbi +42 -0
- data/sig/sentdm/client.rbs +4 -0
- data/sig/sentdm/internal/calls_page.rbs +41 -0
- data/sig/sentdm/models/api_response_of_call.rbs +39 -0
- data/sig/sentdm/models/api_response_of_call_recordings.rbs +39 -0
- data/sig/sentdm/models/api_response_of_calls_list.rbs +39 -0
- data/sig/sentdm/models/call.rbs +101 -0
- data/sig/sentdm/models/call_event.rbs +44 -0
- data/sig/sentdm/models/call_event_payload.rbs +68 -0
- data/sig/sentdm/models/call_hangup_params.rbs +38 -0
- data/sig/sentdm/models/call_list_params.rbs +67 -0
- data/sig/sentdm/models/call_list_recordings_params.rbs +30 -0
- data/sig/sentdm/models/call_party.rbs +17 -0
- data/sig/sentdm/models/call_record_params.rbs +54 -0
- data/sig/sentdm/models/call_recording.rbs +32 -0
- data/sig/sentdm/models/call_recordings.rbs +17 -0
- data/sig/sentdm/models/call_retrieve_params.rbs +30 -0
- data/sig/sentdm/models/call_timeline_entry.rbs +19 -0
- data/sig/sentdm/models/calls/api_response_of_list_of_call_participant.rbs +41 -0
- data/sig/sentdm/models/calls/call_participant.rbs +52 -0
- data/sig/sentdm/models/calls/call_participant_target.rbs +23 -0
- data/sig/sentdm/models/calls/participant_add_params.rbs +63 -0
- data/sig/sentdm/models/calls/participant_list_params.rbs +32 -0
- data/sig/sentdm/models/calls/participant_remove_all_params.rbs +34 -0
- data/sig/sentdm/models/calls/participant_remove_params.rbs +40 -0
- data/sig/sentdm/models/calls/participant_update_params.rbs +61 -0
- data/sig/sentdm/models/calls_list.rbs +26 -0
- data/sig/sentdm/models/channels/api_response_of_list_of_voice_number.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_callback_test.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_number.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_number_created.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_secret.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_token.rbs +41 -0
- data/sig/sentdm/models/channels/voice_callback_test.rbs +51 -0
- data/sig/sentdm/models/channels/voice_callback_test_error_info.rbs +28 -0
- data/sig/sentdm/models/channels/voice_callback_test_request_info.rbs +34 -0
- data/sig/sentdm/models/channels/voice_callback_test_response_info.rbs +20 -0
- data/sig/sentdm/models/channels/voice_create_params.rbs +64 -0
- data/sig/sentdm/models/channels/voice_create_token_params.rbs +61 -0
- data/sig/sentdm/models/channels/voice_list_params.rbs +27 -0
- data/sig/sentdm/models/channels/voice_number.rbs +57 -0
- data/sig/sentdm/models/channels/voice_number_created.rbs +17 -0
- data/sig/sentdm/models/channels/voice_retrieve_params.rbs +32 -0
- data/sig/sentdm/models/channels/voice_rotate_secret_params.rbs +40 -0
- data/sig/sentdm/models/channels/voice_secret.rbs +17 -0
- data/sig/sentdm/models/channels/voice_test_params.rbs +40 -0
- data/sig/sentdm/models/channels/voice_token.rbs +40 -0
- data/sig/sentdm/models/channels/voice_update_params.rbs +78 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +1 -107
- data/sig/sentdm/models.rbs +36 -0
- data/sig/sentdm/resources/calls/participants.rbs +50 -0
- data/sig/sentdm/resources/calls.rbs +50 -0
- data/sig/sentdm/resources/channels/voice.rbs +68 -0
- data/sig/sentdm/resources/channels.rbs +9 -0
- metadata +152 -2
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Channels
|
|
6
|
+
# The senders you send from, one per channel.
|
|
7
|
+
#
|
|
8
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
9
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
10
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
11
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
12
|
+
# number**: each number you hold can carry phone calls on its own
|
|
13
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
14
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
15
|
+
# and voice tokens are minted under `POST /v3/channels/voice/tokens`. Read your
|
|
16
|
+
# voice numbers with `GET /v3/channels/voice` and change one with
|
|
17
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
18
|
+
#
|
|
19
|
+
# ## Compliance lives on the market
|
|
20
|
+
#
|
|
21
|
+
# Adding a market records everything that market registers with, in its
|
|
22
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
23
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
24
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
25
|
+
# for none at all.
|
|
26
|
+
#
|
|
27
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
28
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
29
|
+
# `requirements` is the path into the body that clears it.
|
|
30
|
+
#
|
|
31
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
32
|
+
# before you hold it, with a body you can fill in and post.
|
|
33
|
+
class Voice
|
|
34
|
+
# Adds voice to one of the numbers you hold, or gives you a new one. Send `number`
|
|
35
|
+
# for a number that is already yours (see `GET /v3/channels`); leave it out to be
|
|
36
|
+
# given a new US number, optionally in a particular `area_code`. Sending both is
|
|
37
|
+
# refused. Nothing registers, so the number can carry calls as soon as this
|
|
38
|
+
# returns.
|
|
39
|
+
#
|
|
40
|
+
# What happens on a call is decided by your `callback_url`: when a call arrives on
|
|
41
|
+
# the number, or a caller presses a key on a menu, Sent POSTs a signed question
|
|
42
|
+
# there and follows the answer. The response carries the `callback_secret` the
|
|
43
|
+
# questions are signed with, the one time it is shown without rotating; verify a
|
|
44
|
+
# question the way you verify a webhook. `POST /v3/channels/voice/{number}/test`
|
|
45
|
+
# sends a test question and reports the verdict.
|
|
46
|
+
#
|
|
47
|
+
# Your first voice number becomes the line app-originated calls are placed from
|
|
48
|
+
# when a voice token names no number; send `default_for_app_calls: true` to give
|
|
49
|
+
# that role to another number. A number you turned off earlier is turned back on,
|
|
50
|
+
# and the same number with a different `callback_url` has its URL replaced and
|
|
51
|
+
# keeps its secret.
|
|
52
|
+
#
|
|
53
|
+
# Read the number's settings with `GET /v3/channels/voice` and change them with
|
|
54
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
55
|
+
#
|
|
56
|
+
# With `sandbox: true` the request is validated and a simulated number reported
|
|
57
|
+
# with `202`; nothing is written and no number is bought.
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
callback_url: String,
|
|
61
|
+
area_code: T.nilable(String),
|
|
62
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
63
|
+
number: T.nilable(String),
|
|
64
|
+
sandbox: T::Boolean,
|
|
65
|
+
idempotency_key: String,
|
|
66
|
+
x_profile_id: String,
|
|
67
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
68
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceNumberCreated)
|
|
69
|
+
end
|
|
70
|
+
def create(
|
|
71
|
+
# Body param: Where Sent asks what to do with each call on this number: an
|
|
72
|
+
# absolute HTTP or HTTPS URL on a public host. A signed question is POSTed here
|
|
73
|
+
# when a call arrives or a caller presses a key, and the answer decides the call.
|
|
74
|
+
# Every question is signed with the callback_secret the response returns, the same
|
|
75
|
+
# way your webhooks are signed. Turning the number on again with a different URL
|
|
76
|
+
# replaces it and keeps the secret.
|
|
77
|
+
callback_url:,
|
|
78
|
+
# Body param: The US area code a new number should be in, as 212. Only for a
|
|
79
|
+
# request that leaves number out — sending both says two different things about
|
|
80
|
+
# which number to use, and is refused. Omit it too and the number comes from
|
|
81
|
+
# anywhere in the country.
|
|
82
|
+
area_code: nil,
|
|
83
|
+
# Body param: Make this the line app-originated calls are placed from when a voice
|
|
84
|
+
# token names no number. Omit it and your first voice number takes that role; a
|
|
85
|
+
# later one leaves it where it is.
|
|
86
|
+
default_for_app_calls: nil,
|
|
87
|
+
# Body param: One of your phone numbers, in E.164 format. Leave the field out
|
|
88
|
+
# entirely to be given a new one instead; sending it empty is a refused request
|
|
89
|
+
# rather than a request for a new number.
|
|
90
|
+
number: nil,
|
|
91
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
92
|
+
# effects Useful for testing integrations without actual execution
|
|
93
|
+
sandbox: nil,
|
|
94
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
95
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
96
|
+
# hours per key per customer.
|
|
97
|
+
idempotency_key: nil,
|
|
98
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
99
|
+
# organization API keys can use this header. The profile must belong to the
|
|
100
|
+
# calling organization.
|
|
101
|
+
x_profile_id: nil,
|
|
102
|
+
request_options: {}
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Reads one of your voice numbers, active or inactive: its status, whether it is
|
|
107
|
+
# the default line for calls placed from your app, and its callback URL. The
|
|
108
|
+
# signing secret is not on this read.
|
|
109
|
+
#
|
|
110
|
+
# The same shape `GET /v3/channels/voice` lists, and the same shape `PATCH` on
|
|
111
|
+
# this path accepts and returns, so what comes back can be sent back.
|
|
112
|
+
#
|
|
113
|
+
# The number is the E.164 value in the path with the plus sign URL-encoded
|
|
114
|
+
# (`%2B`).
|
|
115
|
+
sig do
|
|
116
|
+
params(
|
|
117
|
+
number: String,
|
|
118
|
+
x_profile_id: String,
|
|
119
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
120
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceNumber)
|
|
121
|
+
end
|
|
122
|
+
def retrieve(
|
|
123
|
+
# The number in E.164 format with the plus sign URL-encoded, e.g. %2B12125550100
|
|
124
|
+
number,
|
|
125
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
126
|
+
# can use this header. The profile must belong to the calling organization.
|
|
127
|
+
x_profile_id: nil,
|
|
128
|
+
request_options: {}
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Changes one of your voice numbers and answers with the number as stored, the
|
|
133
|
+
# same shape `GET` on this path returns, so what comes back can be sent back.
|
|
134
|
+
#
|
|
135
|
+
# ## What it changes
|
|
136
|
+
#
|
|
137
|
+
# | Body | Effect |
|
|
138
|
+
# | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
# | `"status": "ACTIVE"` | turns calls on again for a number you turned off; the callback URL and the secret it had are kept |
|
|
140
|
+
# | `"status": "INACTIVE"` | turns calls off; the callback URL and the secret stay on the number |
|
|
141
|
+
# | `"default_for_app_calls": true` | makes this the line app-originated calls are placed from when a voice token names no number |
|
|
142
|
+
# | `"callback_url": "https://example.com/voice"` | replaces where Sent asks what to do with each call on the number; the signing secret is kept, and a number that was waiting for its first URL is turned on |
|
|
143
|
+
# | key omitted | left exactly as it is |
|
|
144
|
+
#
|
|
145
|
+
# `status` is matched ignoring case. Any combination is accepted:
|
|
146
|
+
# `status: "ACTIVE"` with `default_for_app_calls: true` turns a number on as the
|
|
147
|
+
# new default, and a `callback_url` sent with either status is written too. A body
|
|
148
|
+
# that names none of the three is refused.
|
|
149
|
+
#
|
|
150
|
+
# ## What it will refuse
|
|
151
|
+
#
|
|
152
|
+
# **`default_for_app_calls: false` is `400`.** An account with active voice
|
|
153
|
+
# numbers always has exactly one default, so the default moves by giving it to
|
|
154
|
+
# another number.
|
|
155
|
+
#
|
|
156
|
+
# **Turning the default line off is `409`** while other active voice numbers
|
|
157
|
+
# remain. Move the default to another number first. Turning off your last voice
|
|
158
|
+
# number is allowed; that turns phone calls off.
|
|
159
|
+
#
|
|
160
|
+
# **Making an inactive number the default is `400`.** Send `status: "ACTIVE"` in
|
|
161
|
+
# the same call.
|
|
162
|
+
#
|
|
163
|
+
# A number added without a `callback_url` is `INACTIVE` for that one reason, so
|
|
164
|
+
# sending it a `callback_url` turns it on by itself, and it becomes your default
|
|
165
|
+
# line if you have no other active voice number. A number you turned off while it
|
|
166
|
+
# had a URL stays off.
|
|
167
|
+
#
|
|
168
|
+
# **A number you never turned voice on for is `404`.** Add it with
|
|
169
|
+
# `POST /v3/channels/voice`.
|
|
170
|
+
#
|
|
171
|
+
# The number is the E.164 value in the path with the plus sign URL-encoded
|
|
172
|
+
# (`%2B`).
|
|
173
|
+
#
|
|
174
|
+
# With `sandbox: true` nothing is written: the request is validated against the
|
|
175
|
+
# stored number and the number is reported with `200` as it would read after the
|
|
176
|
+
# change.
|
|
177
|
+
sig do
|
|
178
|
+
params(
|
|
179
|
+
number: String,
|
|
180
|
+
callback_url: T.nilable(String),
|
|
181
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
182
|
+
sandbox: T::Boolean,
|
|
183
|
+
status:
|
|
184
|
+
T.nilable(Sentdm::Channels::VoiceUpdateParams::Status::OrSymbol),
|
|
185
|
+
idempotency_key: String,
|
|
186
|
+
x_profile_id: String,
|
|
187
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
188
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceNumber)
|
|
189
|
+
end
|
|
190
|
+
def update(
|
|
191
|
+
# Path param: The number in E.164 format with the plus sign URL-encoded, e.g.
|
|
192
|
+
# %2B12125550100
|
|
193
|
+
number,
|
|
194
|
+
# Body param: A new callback URL for the number, active or not: an absolute HTTP
|
|
195
|
+
# or HTTPS URL on a public host, where Sent asks what to do with each call. The
|
|
196
|
+
# signing secret is kept.
|
|
197
|
+
callback_url: nil,
|
|
198
|
+
# Body param: true makes this the line app-originated calls are placed from when a
|
|
199
|
+
# voice token names no number. false is refused: an account with active voice
|
|
200
|
+
# numbers always has exactly one default, so the default moves by giving it to
|
|
201
|
+
# another number.
|
|
202
|
+
default_for_app_calls: nil,
|
|
203
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
204
|
+
# effects Useful for testing integrations without actual execution
|
|
205
|
+
sandbox: nil,
|
|
206
|
+
# Body param: ACTIVE turns calls on for the number again, INACTIVE turns them off.
|
|
207
|
+
# Matched ignoring case. Turning the default line off is refused while other
|
|
208
|
+
# active voice numbers remain.
|
|
209
|
+
status: nil,
|
|
210
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
211
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
212
|
+
# hours per key per customer.
|
|
213
|
+
idempotency_key: nil,
|
|
214
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
215
|
+
# organization API keys can use this header. The profile must belong to the
|
|
216
|
+
# calling organization.
|
|
217
|
+
x_profile_id: nil,
|
|
218
|
+
request_options: {}
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Every number you turned phone calls on for, active or inactive, oldest first.
|
|
223
|
+
# Each entry carries the number's status, whether it is the default line for calls
|
|
224
|
+
# placed from your app, and its callback URL. The signing secret is never on a
|
|
225
|
+
# read; it is shown when voice is turned on and by
|
|
226
|
+
# `POST /v3/channels/voice/{number}/rotate-secret`.
|
|
227
|
+
#
|
|
228
|
+
# The same entries `GET /v3/channels` reports under `voice`, and the same shape
|
|
229
|
+
# `GET /v3/channels/voice/{number}` returns for one of them. Change a number with
|
|
230
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
231
|
+
sig do
|
|
232
|
+
params(
|
|
233
|
+
x_profile_id: String,
|
|
234
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
235
|
+
).returns(Sentdm::Channels::APIResponseOfListOfVoiceNumber)
|
|
236
|
+
end
|
|
237
|
+
def list(
|
|
238
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
239
|
+
# can use this header. The profile must belong to the calling organization.
|
|
240
|
+
x_profile_id: nil,
|
|
241
|
+
request_options: {}
|
|
242
|
+
)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Mints a short-lived token for one of your app users. Call this from your backend
|
|
246
|
+
# and return the token to your app, which passes it to the voice client SDK to
|
|
247
|
+
# register. The identity is bound to the given number, or to your default app-call
|
|
248
|
+
# number when omitted, and calls placed by that identity are routed through the
|
|
249
|
+
# bound number. Minting again re-binds the identity, so an identity can move
|
|
250
|
+
# between numbers.
|
|
251
|
+
sig do
|
|
252
|
+
params(
|
|
253
|
+
identity: String,
|
|
254
|
+
number: T.nilable(String),
|
|
255
|
+
sandbox: T::Boolean,
|
|
256
|
+
ttl: T.nilable(Integer),
|
|
257
|
+
idempotency_key: String,
|
|
258
|
+
x_profile_id: String,
|
|
259
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
260
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceToken)
|
|
261
|
+
end
|
|
262
|
+
def create_token(
|
|
263
|
+
# Body param: Your identifier for the app user, such as an agent or account id.
|
|
264
|
+
# Letters, digits, hyphens and underscores only, up to 200 characters.
|
|
265
|
+
identity: nil,
|
|
266
|
+
# Body param: One of your voice-enabled phone numbers in E.164 format. Calls
|
|
267
|
+
# placed by this identity are routed through that number. Omit to use your default
|
|
268
|
+
# app-call number.
|
|
269
|
+
number: nil,
|
|
270
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
271
|
+
# effects Useful for testing integrations without actual execution
|
|
272
|
+
sandbox: nil,
|
|
273
|
+
# Body param: Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
274
|
+
ttl: nil,
|
|
275
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
276
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
277
|
+
# hours per key per customer.
|
|
278
|
+
idempotency_key: nil,
|
|
279
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
280
|
+
# organization API keys can use this header. The profile must belong to the
|
|
281
|
+
# calling organization.
|
|
282
|
+
x_profile_id: nil,
|
|
283
|
+
request_options: {}
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Generates a new signing secret for the questions Sent sends to this number's
|
|
288
|
+
# callback URL and returns it. The previous secret stops signing immediately, so
|
|
289
|
+
# update your backend before the next call reaches it. The number is the E.164
|
|
290
|
+
# value in the path with the plus sign URL-encoded (`%2B`).
|
|
291
|
+
#
|
|
292
|
+
# With `sandbox: true` a secret is generated and returned with `202`, and nothing
|
|
293
|
+
# is written.
|
|
294
|
+
sig do
|
|
295
|
+
params(
|
|
296
|
+
number: String,
|
|
297
|
+
sandbox: T::Boolean,
|
|
298
|
+
idempotency_key: String,
|
|
299
|
+
x_profile_id: String,
|
|
300
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
301
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceSecret)
|
|
302
|
+
end
|
|
303
|
+
def rotate_secret(
|
|
304
|
+
# Path param: The voice number from the route, in E.164 format with the plus sign
|
|
305
|
+
# URL-encoded (%2B), for example /v3/channels/voice/%2B12025550123/rotate-secret.
|
|
306
|
+
number,
|
|
307
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
308
|
+
# effects Useful for testing integrations without actual execution
|
|
309
|
+
sandbox: nil,
|
|
310
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
311
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
312
|
+
# hours per key per customer.
|
|
313
|
+
idempotency_key: nil,
|
|
314
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
315
|
+
# organization API keys can use this header. The profile must belong to the
|
|
316
|
+
# calling organization.
|
|
317
|
+
x_profile_id: nil,
|
|
318
|
+
request_options: {}
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Sends a synthetic call.request question, flagged "test": true, to the number's
|
|
323
|
+
# callback URL, signed with that number's real secret, and reports what came back.
|
|
324
|
+
# Use it to build and debug your callback endpoint without placing calls: no call
|
|
325
|
+
# is placed, nothing is billed, and nothing is stored. One attempt with the same
|
|
326
|
+
# deadline as a live call, no retry. The outcome is ok when your endpoint answered
|
|
327
|
+
# 2xx with a valid answer; otherwise it is timeout, connection_failed, http_error
|
|
328
|
+
# or invalid_answer, with the reason and, for an invalid answer, the field at
|
|
329
|
+
# fault. The number is the E.164 value in the path with the plus sign URL-encoded
|
|
330
|
+
# (`%2B`).
|
|
331
|
+
#
|
|
332
|
+
# With `sandbox: true` nothing is sent: the verdict comes back ok with `202` and
|
|
333
|
+
# no request or response in it.
|
|
334
|
+
sig do
|
|
335
|
+
params(
|
|
336
|
+
number: String,
|
|
337
|
+
sandbox: T::Boolean,
|
|
338
|
+
idempotency_key: String,
|
|
339
|
+
x_profile_id: String,
|
|
340
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
341
|
+
).returns(Sentdm::Channels::APIResponseOfVoiceCallbackTest)
|
|
342
|
+
end
|
|
343
|
+
def test_(
|
|
344
|
+
# Path param: The voice number from the route, in E.164 format with the plus sign
|
|
345
|
+
# URL-encoded (%2B), for example /v3/channels/voice/%2B12025550123/test. The test
|
|
346
|
+
# question goes to this number's callback URL and is signed with this number's
|
|
347
|
+
# secret.
|
|
348
|
+
number,
|
|
349
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
350
|
+
# effects Useful for testing integrations without actual execution
|
|
351
|
+
sandbox: nil,
|
|
352
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
353
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
354
|
+
# hours per key per customer.
|
|
355
|
+
idempotency_key: nil,
|
|
356
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
357
|
+
# organization API keys can use this header. The profile must belong to the
|
|
358
|
+
# calling organization.
|
|
359
|
+
x_profile_id: nil,
|
|
360
|
+
request_options: {}
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# @api private
|
|
365
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
366
|
+
def self.new(client:)
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
end
|
|
370
|
+
end
|
|
371
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Channels
|
|
6
|
+
# The senders you send from, one per channel.
|
|
7
|
+
#
|
|
8
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
9
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
10
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
11
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
12
|
+
# number**: each number you hold can carry phone calls on its own
|
|
13
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
14
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
15
|
+
# and voice tokens are minted under `POST /v3/channels/voice/tokens`. Read your
|
|
16
|
+
# voice numbers with `GET /v3/channels/voice` and change one with
|
|
17
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
18
|
+
#
|
|
19
|
+
# ## Compliance lives on the market
|
|
20
|
+
#
|
|
21
|
+
# Adding a market records everything that market registers with, in its
|
|
22
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
23
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
24
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
25
|
+
# for none at all.
|
|
26
|
+
#
|
|
27
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
28
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
29
|
+
# `requirements` is the path into the body that clears it.
|
|
30
|
+
#
|
|
31
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
32
|
+
# before you hold it, with a body you can fill in and post.
|
|
33
|
+
sig { returns(Sentdm::Resources::Channels::Voice) }
|
|
34
|
+
attr_reader :voice
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
38
|
+
def self.new(client:)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
data/sig/sentdm/client.rbs
CHANGED
|
@@ -26,6 +26,10 @@ module Sentdm
|
|
|
26
26
|
|
|
27
27
|
attr_reader conversations: Sentdm::Resources::Conversations
|
|
28
28
|
|
|
29
|
+
attr_reader calls: Sentdm::Resources::Calls
|
|
30
|
+
|
|
31
|
+
attr_reader channels: Sentdm::Resources::Channels
|
|
32
|
+
|
|
29
33
|
attr_reader me: Sentdm::Resources::Me
|
|
30
34
|
|
|
31
35
|
private def auth_headers: -> ::Hash[String, String]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Internal
|
|
3
|
+
class CallsPage[Elem]
|
|
4
|
+
include Sentdm::Internal::Type::BasePage[Elem]
|
|
5
|
+
|
|
6
|
+
attr_accessor data: Data
|
|
7
|
+
|
|
8
|
+
def inspect: -> String
|
|
9
|
+
|
|
10
|
+
type data = { calls: ::Array[top], pagination: Data::Pagination }
|
|
11
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_reader calls: ::Array[top]?
|
|
13
|
+
|
|
14
|
+
def calls=: (::Array[top]) -> ::Array[top]
|
|
15
|
+
|
|
16
|
+
attr_reader pagination: Data::Pagination?
|
|
17
|
+
|
|
18
|
+
def pagination=: (Data::Pagination) -> Data::Pagination
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
?calls: ::Array[top],
|
|
22
|
+
?pagination: Data::Pagination
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> { calls: ::Array[top], pagination: Data::Pagination }
|
|
26
|
+
|
|
27
|
+
type pagination = { has_more: bool }
|
|
28
|
+
|
|
29
|
+
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
30
|
+
attr_reader has_more: bool?
|
|
31
|
+
|
|
32
|
+
def has_more=: (bool) -> bool
|
|
33
|
+
|
|
34
|
+
def initialize: (?has_more: bool) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> { has_more: bool }
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type api_response_of_call =
|
|
4
|
+
{
|
|
5
|
+
data: Sentdm::Call?,
|
|
6
|
+
error: Sentdm::ErrorDetail?,
|
|
7
|
+
meta: Sentdm::APIMeta,
|
|
8
|
+
success: bool
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class APIResponseOfCall < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor data: Sentdm::Call?
|
|
13
|
+
|
|
14
|
+
attr_accessor error: Sentdm::ErrorDetail?
|
|
15
|
+
|
|
16
|
+
attr_reader meta: Sentdm::APIMeta?
|
|
17
|
+
|
|
18
|
+
def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
|
|
19
|
+
|
|
20
|
+
attr_reader success: bool?
|
|
21
|
+
|
|
22
|
+
def success=: (bool) -> bool
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?data: Sentdm::Call?,
|
|
26
|
+
?error: Sentdm::ErrorDetail?,
|
|
27
|
+
?meta: Sentdm::APIMeta,
|
|
28
|
+
?success: bool
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
data: Sentdm::Call?,
|
|
33
|
+
error: Sentdm::ErrorDetail?,
|
|
34
|
+
meta: Sentdm::APIMeta,
|
|
35
|
+
success: bool
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type api_response_of_call_recordings =
|
|
4
|
+
{
|
|
5
|
+
data: Sentdm::CallRecordings?,
|
|
6
|
+
error: Sentdm::ErrorDetail?,
|
|
7
|
+
meta: Sentdm::APIMeta,
|
|
8
|
+
success: bool
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class APIResponseOfCallRecordings < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor data: Sentdm::CallRecordings?
|
|
13
|
+
|
|
14
|
+
attr_accessor error: Sentdm::ErrorDetail?
|
|
15
|
+
|
|
16
|
+
attr_reader meta: Sentdm::APIMeta?
|
|
17
|
+
|
|
18
|
+
def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
|
|
19
|
+
|
|
20
|
+
attr_reader success: bool?
|
|
21
|
+
|
|
22
|
+
def success=: (bool) -> bool
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?data: Sentdm::CallRecordings?,
|
|
26
|
+
?error: Sentdm::ErrorDetail?,
|
|
27
|
+
?meta: Sentdm::APIMeta,
|
|
28
|
+
?success: bool
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
data: Sentdm::CallRecordings?,
|
|
33
|
+
error: Sentdm::ErrorDetail?,
|
|
34
|
+
meta: Sentdm::APIMeta,
|
|
35
|
+
success: bool
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type api_response_of_calls_list =
|
|
4
|
+
{
|
|
5
|
+
data: Sentdm::CallsList?,
|
|
6
|
+
error: Sentdm::ErrorDetail?,
|
|
7
|
+
meta: Sentdm::APIMeta,
|
|
8
|
+
success: bool
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class APIResponseOfCallsList < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor data: Sentdm::CallsList?
|
|
13
|
+
|
|
14
|
+
attr_accessor error: Sentdm::ErrorDetail?
|
|
15
|
+
|
|
16
|
+
attr_reader meta: Sentdm::APIMeta?
|
|
17
|
+
|
|
18
|
+
def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
|
|
19
|
+
|
|
20
|
+
attr_reader success: bool?
|
|
21
|
+
|
|
22
|
+
def success=: (bool) -> bool
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?data: Sentdm::CallsList?,
|
|
26
|
+
?error: Sentdm::ErrorDetail?,
|
|
27
|
+
?meta: Sentdm::APIMeta,
|
|
28
|
+
?success: bool
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
data: Sentdm::CallsList?,
|
|
33
|
+
error: Sentdm::ErrorDetail?,
|
|
34
|
+
meta: Sentdm::APIMeta,
|
|
35
|
+
success: bool
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type call =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
answered_at: Time?,
|
|
7
|
+
direction: String,
|
|
8
|
+
duration_seconds: Integer?,
|
|
9
|
+
ended_at: Time?,
|
|
10
|
+
failure_reason: String?,
|
|
11
|
+
from: Sentdm::CallParty,
|
|
12
|
+
number: String,
|
|
13
|
+
price: Float?,
|
|
14
|
+
recording_available: bool,
|
|
15
|
+
started_at: Time,
|
|
16
|
+
status: String,
|
|
17
|
+
timeline: ::Array[Sentdm::CallTimelineEntry]?,
|
|
18
|
+
to: Sentdm::CallParty
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class Call < Sentdm::Internal::Type::BaseModel
|
|
22
|
+
attr_reader id: String?
|
|
23
|
+
|
|
24
|
+
def id=: (String) -> String
|
|
25
|
+
|
|
26
|
+
attr_accessor answered_at: Time?
|
|
27
|
+
|
|
28
|
+
attr_reader direction: String?
|
|
29
|
+
|
|
30
|
+
def direction=: (String) -> String
|
|
31
|
+
|
|
32
|
+
attr_accessor duration_seconds: Integer?
|
|
33
|
+
|
|
34
|
+
attr_accessor ended_at: Time?
|
|
35
|
+
|
|
36
|
+
attr_accessor failure_reason: String?
|
|
37
|
+
|
|
38
|
+
attr_reader from: Sentdm::CallParty?
|
|
39
|
+
|
|
40
|
+
def from=: (Sentdm::CallParty) -> Sentdm::CallParty
|
|
41
|
+
|
|
42
|
+
attr_reader number: String?
|
|
43
|
+
|
|
44
|
+
def number=: (String) -> String
|
|
45
|
+
|
|
46
|
+
attr_accessor price: Float?
|
|
47
|
+
|
|
48
|
+
attr_reader recording_available: bool?
|
|
49
|
+
|
|
50
|
+
def recording_available=: (bool) -> bool
|
|
51
|
+
|
|
52
|
+
attr_reader started_at: Time?
|
|
53
|
+
|
|
54
|
+
def started_at=: (Time) -> Time
|
|
55
|
+
|
|
56
|
+
attr_reader status: String?
|
|
57
|
+
|
|
58
|
+
def status=: (String) -> String
|
|
59
|
+
|
|
60
|
+
attr_accessor timeline: ::Array[Sentdm::CallTimelineEntry]?
|
|
61
|
+
|
|
62
|
+
attr_reader to: Sentdm::CallParty?
|
|
63
|
+
|
|
64
|
+
def to=: (Sentdm::CallParty) -> Sentdm::CallParty
|
|
65
|
+
|
|
66
|
+
def initialize: (
|
|
67
|
+
?id: String,
|
|
68
|
+
?answered_at: Time?,
|
|
69
|
+
?direction: String,
|
|
70
|
+
?duration_seconds: Integer?,
|
|
71
|
+
?ended_at: Time?,
|
|
72
|
+
?failure_reason: String?,
|
|
73
|
+
?from: Sentdm::CallParty,
|
|
74
|
+
?number: String,
|
|
75
|
+
?price: Float?,
|
|
76
|
+
?recording_available: bool,
|
|
77
|
+
?started_at: Time,
|
|
78
|
+
?status: String,
|
|
79
|
+
?timeline: ::Array[Sentdm::CallTimelineEntry]?,
|
|
80
|
+
?to: Sentdm::CallParty
|
|
81
|
+
) -> void
|
|
82
|
+
|
|
83
|
+
def to_hash: -> {
|
|
84
|
+
id: String,
|
|
85
|
+
answered_at: Time?,
|
|
86
|
+
direction: String,
|
|
87
|
+
duration_seconds: Integer?,
|
|
88
|
+
ended_at: Time?,
|
|
89
|
+
failure_reason: String?,
|
|
90
|
+
from: Sentdm::CallParty,
|
|
91
|
+
number: String,
|
|
92
|
+
price: Float?,
|
|
93
|
+
recording_available: bool,
|
|
94
|
+
started_at: Time,
|
|
95
|
+
status: String,
|
|
96
|
+
timeline: ::Array[Sentdm::CallTimelineEntry]?,
|
|
97
|
+
to: Sentdm::CallParty
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|