Module: Telnyx
- Defined in:
- lib/telnyx.rb,
lib/telnyx/ip.rb,
lib/telnyx/fax.rb,
lib/telnyx/wdr.rb,
lib/telnyx/call.rb,
lib/telnyx/enum.rb,
lib/telnyx/fqdn.rb,
lib/telnyx/room.rb,
lib/telnyx/util.rb,
lib/telnyx/brand.rb,
lib/telnyx/event.rb,
lib/telnyx/media.rb,
lib/telnyx/queue.rb,
lib/telnyx/errors.rb,
lib/telnyx/region.rb,
lib/telnyx/address.rb,
lib/telnyx/balance.rb,
lib/telnyx/comment.rb,
lib/telnyx/message.rb,
lib/telnyx/network.rb,
lib/telnyx/portout.rb,
lib/telnyx/summary.rb,
lib/telnyx/version.rb,
lib/telnyx/webhook.rb,
lib/telnyx/campaign.rb,
lib/telnyx/document.rb,
lib/telnyx/sim_card.rb,
lib/telnyx/embedding.rb,
lib/telnyx/global_ip.rb,
lib/telnyx/inference.rb,
lib/telnyx/call_event.rb,
lib/telnyx/conference.rb,
lib/telnyx/connection.rb,
lib/telnyx/ota_update.rb,
lib/telnyx/public_key.rb,
lib/telnyx/queue_call.rb,
lib/telnyx/short_code.rb,
lib/telnyx/list_object.rb,
lib/telnyx/requirement.rb,
lib/telnyx/api_resource.rb,
lib/telnyx/channel_zone.rb,
lib/telnyx/csv_download.rb,
lib/telnyx/number_order.rb,
lib/telnyx/phone_number.rb,
lib/telnyx/room_session.rb,
lib/telnyx/verification.rb,
lib/telnyx/billing_group.rb,
lib/telnyx/bulk_creation.rb,
lib/telnyx/detail_record.rb,
lib/telnyx/ip_connection.rb,
lib/telnyx/number_lookup.rb,
lib/telnyx/porting_order.rb,
lib/telnyx/telnyx_client.rb,
lib/telnyx/telnyx_object.rb,
lib/telnyx/call_recording.rb,
lib/telnyx/room_recording.rb,
lib/telnyx/sim_card_group.rb,
lib/telnyx/sim_card_order.rb,
lib/telnyx/verify_profile.rb,
lib/telnyx/wireguard_peer.rb,
lib/telnyx/access_ip_range.rb,
lib/telnyx/bulk_credential.rb,
lib/telnyx/fax_application.rb,
lib/telnyx/fqdn_connection.rb,
lib/telnyx/global_ip_usage.rb,
lib/telnyx/managed_account.rb,
lib/telnyx/sim_card_action.rb,
lib/telnyx/telnyx_response.rb,
lib/telnyx/batch_mdr_report.rb,
lib/telnyx/cdr_usage_report.rb,
lib/telnyx/mdr_usage_report.rb,
lib/telnyx/partner_campaign.rb,
lib/telnyx/requirement_type.rb,
lib/telnyx/room_composition.rb,
lib/telnyx/room_participant.rb,
lib/telnyx/access_control_ip.rb,
lib/telnyx/global_ip_latency.rb,
lib/telnyx/messaging_profile.rb,
lib/telnyx/portability_check.rb,
lib/telnyx/texml_application.rb,
lib/telnyx/webhook_deliverie.rb,
lib/telnyx/business_identitie.rb,
lib/telnyx/global_ip_protocol.rb,
lib/telnyx/inventory_coverage.rb,
lib/telnyx/notification_event.rb,
lib/telnyx/number_block_order.rb,
lib/telnyx/number_reservation.rb,
lib/telnyx/api_operations/list.rb,
lib/telnyx/api_operations/save.rb,
lib/telnyx/message_number_pool.rb,
lib/telnyx/wireguard_interface.rb,
lib/telnyx/bulk_sim_card_action.rb,
lib/telnyx/global_ip_assignment.rb,
lib/telnyx/messaging_url_domain.rb,
lib/telnyx/notification_channel.rb,
lib/telnyx/notification_profile.rb,
lib/telnyx/notification_setting.rb,
lib/telnyx/telephony_credential.rb,
lib/telnyx/api_operations/create.rb,
lib/telnyx/api_operations/delete.rb,
lib/telnyx/credential_connection.rb,
lib/telnyx/dialogflow_connection.rb,
lib/telnyx/number_order_document.rb,
lib/telnyx/sim_card_group_action.rb,
lib/telnyx/virtual_cross_connect.rb,
lib/telnyx/alphanumeric_sender_id.rb,
lib/telnyx/api_operations/request.rb,
lib/telnyx/available_phone_number.rb,
lib/telnyx/global_ip_allowed_port.rb,
lib/telnyx/messaging_phone_number.rb,
lib/telnyx/mobile_push_credential.rb,
lib/telnyx/outbound_voice_profile.rb,
lib/telnyx/phone_number_block_job.rb,
lib/telnyx/phone_number_campaigns.rb,
lib/telnyx/regulatory_requirement.rb,
lib/telnyx/singleton_api_resource.rb,
lib/telnyx/messaging_hosted_number.rb,
lib/telnyx/mobile_operator_network.rb,
lib/telnyx/public_internet_gateway.rb,
lib/telnyx/authentication_providers.rb,
lib/telnyx/call_control_application.rb,
lib/telnyx/private_wireless_gateway.rb,
lib/telnyx/custom_storage_credential.rb,
lib/telnyx/dynamic_emergency_address.rb,
lib/telnyx/bulk_phone_number_campaign.rb,
lib/telnyx/dynamic_emergency_endpoint.rb,
lib/telnyx/global_ip_assignment_usage.rb,
lib/telnyx/global_ip_assignment_health.rb,
lib/telnyx/ledger_billing_group_report.rb,
lib/telnyx/api_operations/param_wrapper.rb,
lib/telnyx/notification_event_condition.rb,
lib/telnyx/virtual_cross_connect_region.rb,
lib/telnyx/messaging_hosted_number_order.rb,
lib/telnyx/api_operations/nested_resource.rb,
lib/telnyx/verified_calls_display_profile.rb,
lib/telnyx/wireless_detail_records_report.rb,
lib/telnyx/messaging_tollfree_verification.rb,
lib/telnyx/sim_card_data_usage_notification.rb,
lib/telnyx/phone_number_regulatory_requirement.rb
Defined Under Namespace
Modules: APIOperations, Util, Webhook Classes: APIConnectionError, APIError, APIResource, AccessIPAddress, AccessIPRange, Address, AlphanumericSenderId, AuthenticationError, AuthenticationProviders, AvailablePhoneNumber, BatchMdrReport, BillingGroup, Brand, BulkCreation, BulkCredential, BulkSimCardAction, BusinessIdentitie, Call, CallControlApplication, CallEvent, CallRecording, Campaign, CdrUsageReport, ChannelZone, Comment, Conference, Connection, CredentialConnection, CsvDownload, CustomStorageCredential, DetailRecord, DialogflowConnection, Documents, DynamicEmergencyEndpoint, Embedding, Enum, Event, FQDN, FQDNConnection, Fax, FaxApplication, GlobalIp, GlobalIpAllowedPort, GlobalIpAssignment, GlobalIpAssignmentHealth, GlobalIpAssignmentUsage, GlobalIpLatency, GlobalIpProtocol, GlobalIpUsage, IP, IPConnection, Inference, InvalidParametersError, InvalidRequestError, InventoryCoverage, LedgerBillingGroupReport, ListObject, ManagedAccount, MdrUsageReport, Media, Message, MessageNumberPool, MessagingHostedNumber, MessagingHostedNumberOrder, MessagingPhoneNumber, MessagingProfile, MessagingTollfreeVerification, MessagingUrlDomain, MethodNotSupportedError, MobileOperatorNetwork, MobilePushCredential, Network, NotificationChannel, NotificationEvent, NotificationEventCondition, NotificationProfile, NotificationSetting, NumberBlockOrder, NumberLookup, NumberOrder, NumberOrderDocument, NumberReservation, OtaUpdate, OutboundVoiceProfile, PartnerCampaign, PermissionError, PhoneNumber, PhoneNumberAssignmentByProfile, PhoneNumberBlockJob, PhoneNumberCampaign, PhoneNumberRegulatoryRequirement, PortabilityCheck, PortingOrder, Portout, PrivateWirelessGateway, PublicInternetGateway, PublicKey, Queue, QueueCall, RateLimitError, Region, RegulatoryRequirement, Requirement, RequirementType, ResourceNotFoundError, Room, RoomComposition, RoomParticipant, RoomRecording, RoomSession, ServiceUnavailableError, ShortCode, SignatureVerificationError, SimCard, SimCardAction, SimCardDataUsageNotification, SimCardGroup, SimCardGroupAction, SimCardOrder, SingletonAPIResource, Summary, TelephonyCredential, TelnyxClient, TelnyxError, TelnyxObject, TelnyxResponse, TexmlApplication, TimeoutError, UnsupportedMediaTypeError, Verification, VerifiedCallsDisplayProfile, VerifyProfile, VirtualCrossConnect, VirtualCrossConnectRegion, Wdr, WebhookDeliverie, WireguardInterface, WireguardPeer, WirelessDetailRecordsReport
Constant Summary collapse
- LEVEL_DEBUG =
map to the same values as the standard library’s logger
Logger::DEBUG
- LEVEL_ERROR =
Logger::ERROR
- LEVEL_INFO =
Logger::INFO
- VERSION =
"3.0.4".freeze
- Conferences =
Name change without breaking existing code
Conference
Class Attribute Summary collapse
-
.api_base ⇒ Object
Returns the value of attribute api_base.
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.api_version ⇒ Object
Returns the value of attribute api_version.
-
.client_id ⇒ Object
Returns the value of attribute client_id.
-
.initial_network_retry_delay ⇒ Object
readonly
Returns the value of attribute initial_network_retry_delay.
-
.max_network_retry_delay ⇒ Object
readonly
Returns the value of attribute max_network_retry_delay.
-
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
.telnyx_account ⇒ Object
Returns the value of attribute telnyx_account.
-
.verify_ssl_certs ⇒ Object
Returns the value of attribute verify_ssl_certs.
Class Method Summary collapse
-
.app_info ⇒ Object
Gets the application for a plugin that’s identified some.
- .app_info=(info) ⇒ Object
-
.log_level ⇒ Object
When set prompts the library to log some extra information to $stdout and $stderr about what it’s doing.
- .log_level=(val) ⇒ Object
-
.logger ⇒ Object
Sets a logger to which logging output will be sent.
- .logger=(val) ⇒ Object
- .max_network_retries ⇒ Object
- .max_network_retries=(val) ⇒ Object
-
.set_app_info(name, partner_id: nil, url: nil, version: nil) ⇒ Object
Sets some basic information about the running application that’s sent along with API requests.
Class Attribute Details
.api_base ⇒ Object
Returns the value of attribute api_base.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def api_base @api_base end |
.api_key ⇒ Object
Returns the value of attribute api_key.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def api_key @api_key end |
.api_version ⇒ Object
Returns the value of attribute api_version.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def api_version @api_version end |
.client_id ⇒ Object
Returns the value of attribute client_id.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def client_id @client_id end |
.initial_network_retry_delay ⇒ Object (readonly)
Returns the value of attribute initial_network_retry_delay.
165 166 167 |
# File 'lib/telnyx.rb', line 165 def initial_network_retry_delay @initial_network_retry_delay end |
.max_network_retry_delay ⇒ Object (readonly)
Returns the value of attribute max_network_retry_delay.
165 166 167 |
# File 'lib/telnyx.rb', line 165 def max_network_retry_delay @max_network_retry_delay end |
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def open_timeout @open_timeout end |
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def read_timeout @read_timeout end |
.telnyx_account ⇒ Object
Returns the value of attribute telnyx_account.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def telnyx_account @telnyx_account end |
.verify_ssl_certs ⇒ Object
Returns the value of attribute verify_ssl_certs.
162 163 164 |
# File 'lib/telnyx.rb', line 162 def verify_ssl_certs @verify_ssl_certs end |
Class Method Details
.app_info ⇒ Object
Gets the application for a plugin that’s identified some. See #set_app_info.
170 171 172 |
# File 'lib/telnyx.rb', line 170 def self.app_info @app_info end |
.app_info=(info) ⇒ Object
174 175 176 |
# File 'lib/telnyx.rb', line 174 def self.app_info=(info) @app_info = info end |
.log_level ⇒ Object
When set prompts the library to log some extra information to $stdout and $stderr about what it’s doing. For example, it’ll produce information about requests, responses, and errors that are received. Valid log levels are ‘debug` and `info`, with `debug` being a little more verbose in places.
Use of this configuration is only useful when ‘.logger` is not set. When it is, the decision what levels to print is entirely deferred to the logger.
190 191 192 |
# File 'lib/telnyx.rb', line 190 def self.log_level @log_level end |
.log_level=(val) ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/telnyx.rb', line 194 def self.log_level=(val) # Backwards compatibility for values that we briefly allowed if val == "debug" val = LEVEL_DEBUG elsif val == "info" val = LEVEL_INFO end if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val) raise ArgumentError, "log_level should only be set to `nil`, `debug` or `info`" end @log_level = val end |
.logger ⇒ Object
Sets a logger to which logging output will be sent. The logger should support the same interface as the ‘Logger` class that’s part of Ruby’s standard library (hint, anything in ‘Rails.logger` will likely be suitable).
If ‘.logger` is set, the value of `.log_level` is ignored. The decision on what levels to print is entirely deferred to the logger.
215 216 217 |
# File 'lib/telnyx.rb', line 215 def self.logger @logger end |
.logger=(val) ⇒ Object
219 220 221 |
# File 'lib/telnyx.rb', line 219 def self.logger=(val) @logger = val end |
.max_network_retries ⇒ Object
223 224 225 |
# File 'lib/telnyx.rb', line 223 def self.max_network_retries @max_network_retries end |
.max_network_retries=(val) ⇒ Object
227 228 229 |
# File 'lib/telnyx.rb', line 227 def self.max_network_retries=(val) @max_network_retries = val.to_i end |
.set_app_info(name, partner_id: nil, url: nil, version: nil) ⇒ Object
Sets some basic information about the running application that’s sent along with API requests. Useful for plugin authors to identify their plugin when communicating with Telnyx.
Takes a name and optional partner program ID, plugin URL, and version.
236 237 238 239 240 241 242 243 |
# File 'lib/telnyx.rb', line 236 def self.set_app_info(name, partner_id: nil, url: nil, version: nil) @app_info = { name: name, partner_id: partner_id, url: url, version: version, } end |