Class: Zernio::OwnedPhoneNumber
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::OwnedPhoneNumber
- Defined in:
- lib/zernio-sdk/models/owned_phone_number.rb
Overview
A number you bought or ported. Null fields are omitted, except socialAccountId and ownerAccountId. Credentials stored for the number (such as the SIP digest password) are never returned; sipAuthUsername is the only SIP credential field exposed.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_id ⇒ Object
Returns the value of attribute _id.
-
#activated_at ⇒ Object
Returns the value of attribute activated_at.
-
#blocked_callers ⇒ Object
Returns the value of attribute blocked_callers.
-
#business_hours ⇒ Object
Returns the value of attribute business_hours.
-
#business_hours_enabled ⇒ Object
Returns the value of attribute business_hours_enabled.
-
#business_hours_timezone ⇒ Object
Returns the value of attribute business_hours_timezone.
-
#call_icon_countries ⇒ Object
Returns the value of attribute call_icon_countries.
-
#caller_id_verified_at ⇒ Object
Returns the value of attribute caller_id_verified_at.
-
#calling_enabled ⇒ Object
Whether WhatsApp Business Calling is enabled on this number (manage via /v1/whatsapp/phone-numbers/id/calling).
-
#connected_at ⇒ Object
Returns the value of attribute connected_at.
-
#country ⇒ Object
Returns the value of attribute country.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#domestic_only ⇒ Object
True when the number can only text numbers in its own country.
-
#end_user_first_name ⇒ Object
Returns the value of attribute end_user_first_name.
-
#end_user_last_name ⇒ Object
Returns the value of attribute end_user_last_name.
-
#features ⇒ Object
Returns the value of attribute features.
-
#forward_caller_id ⇒ Object
Returns the value of attribute forward_caller_id.
-
#forward_to ⇒ Object
WhatsApp calling forward destination.
-
#hosted_by_zernio ⇒ Object
False for numbers you brought yourself (connected via Meta embedded signup).
-
#ivr_enabled ⇒ Object
Returns the value of attribute ivr_enabled.
-
#ivr_options ⇒ Object
Returns the value of attribute ivr_options.
-
#ivr_prompt ⇒ Object
Returns the value of attribute ivr_prompt.
-
#max_call_duration_seconds ⇒ Object
Returns the value of attribute max_call_duration_seconds.
-
#meta_preverified_id ⇒ Object
Returns the value of attribute meta_preverified_id.
-
#meta_verification_expires_at ⇒ Object
Returns the value of attribute meta_verification_expires_at.
-
#meta_verification_status ⇒ Object
Returns the value of attribute meta_verification_status.
-
#meta_verified_at ⇒ Object
Returns the value of attribute meta_verified_at.
-
#mms_capable ⇒ Object
Whether the number can send MMS.
-
#monthly_cents ⇒ Object
What this number bills each month, in cents.
-
#number_type ⇒ Object
For example local, mobile, national or toll_free.
-
#onfido_opened ⇒ Object
True once the verify link has been opened at least once.
-
#onfido_verification_url ⇒ Object
For regulated (Tier 3/4) numbers with an Onfido ID-verification step: the link to forward to the end user.
-
#owner_account_id ⇒ Object
The telephony account that owns Calls and SMS on the number.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#provisioned_at ⇒ Object
Returns the value of attribute provisioned_at.
-
#pstn_forward_to ⇒ Object
Returns the value of attribute pstn_forward_to.
-
#pstn_voice_enabled ⇒ Object
Whether Calls (PSTN voice) is on.
-
#recording_enabled ⇒ Object
Returns the value of attribute recording_enabled.
-
#registrant_name ⇒ Object
For regulated numbers, who it's registered for (company or person), set from the submitted KYC.
-
#regulatory_decline_reason ⇒ Object
Reviewer rejection reason when status is regulatory_declined.
-
#regulatory_info_status ⇒ Object
action_requiredwhen the reviewer is waiting on you. -
#regulatory_review_comment ⇒ Object
The latest reviewer comment on a regulated number still in review.
-
#released_at ⇒ Object
Returns the value of attribute released_at.
-
#signup_error ⇒ Object
Meta's Embedded Signup error from the last failed connect attempt (raw text, often localized).
-
#signup_error_at ⇒ Object
Returns the value of attribute signup_error_at.
-
#signup_error_step ⇒ Object
Returns the value of attribute signup_error_step.
-
#sip_auth_username ⇒ Object
SIP digest username for a sip: forward destination.
-
#sip_trunk_id ⇒ Object
SIP trunk the number is attached to; null when not trunked.
-
#sms_brand_name ⇒ Object
Brand of the 10DLC registration covering the number.
-
#sms_capable ⇒ Object
Whether the number can send SMS.
-
#sms_registration_pending ⇒ Object
True while a 10DLC registration covering this number is in review.
-
#sms_requested ⇒ Object
Returns the value of attribute sms_requested.
-
#sms_send_approved ⇒ Object
True when outbound SMS is unlocked: an approved 10DLC covers the number, or the number is outside the US.
-
#social_account_id ⇒ Object
The WhatsApp account the number is linked to; null when WhatsApp is not connected.
-
#status ⇒ Object
Returns the value of attribute status.
-
#suspended_at ⇒ Object
Returns the value of attribute suspended_at.
-
#telnyx_advanced_order_id ⇒ Object
Present on a pre-order: the carrier request placed for a number with no stock yet.
-
#telnyx_order_id ⇒ Object
Present once the number order has been placed (i.e. the requirement group was approved).
-
#transcription_enabled ⇒ Object
Returns the value of attribute transcription_enabled.
-
#transcription_language ⇒ Object
Returns the value of attribute transcription_language.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#verify_url ⇒ Object
Stable redirect to the live Onfido session.
-
#voicemail_enabled ⇒ Object
Returns the value of attribute voicemail_enabled.
-
#voicemail_greeting ⇒ Object
Returns the value of attribute voicemail_greeting.
-
#whats_app_requested ⇒ Object
False for a standalone phone bought for Calls or SMS only.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OwnedPhoneNumber
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ OwnedPhoneNumber
Initializes the object
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 373 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::OwnedPhoneNumber` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::OwnedPhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'_id') self._id = attributes[:'_id'] end if attributes.key?(:'phone_number') self.phone_number = attributes[:'phone_number'] end if attributes.key?(:'country') self.country = attributes[:'country'] end if attributes.key?(:'number_type') self.number_type = attributes[:'number_type'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'profile_id') self.profile_id = attributes[:'profile_id'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'telnyx_order_id') self.telnyx_order_id = attributes[:'telnyx_order_id'] end if attributes.key?(:'telnyx_advanced_order_id') self.telnyx_advanced_order_id = attributes[:'telnyx_advanced_order_id'] end if attributes.key?(:'registrant_name') self.registrant_name = attributes[:'registrant_name'] end if attributes.key?(:'end_user_first_name') self.end_user_first_name = attributes[:'end_user_first_name'] end if attributes.key?(:'end_user_last_name') self.end_user_last_name = attributes[:'end_user_last_name'] end if attributes.key?(:'regulatory_decline_reason') self.regulatory_decline_reason = attributes[:'regulatory_decline_reason'] end if attributes.key?(:'regulatory_review_comment') self.regulatory_review_comment = attributes[:'regulatory_review_comment'] end if attributes.key?(:'regulatory_info_status') self.regulatory_info_status = attributes[:'regulatory_info_status'] end if attributes.key?(:'onfido_verification_url') self.onfido_verification_url = attributes[:'onfido_verification_url'] end if attributes.key?(:'verify_url') self.verify_url = attributes[:'verify_url'] end if attributes.key?(:'onfido_opened') self.onfido_opened = attributes[:'onfido_opened'] end if attributes.key?(:'meta_preverified_id') self. = attributes[:'meta_preverified_id'] end if attributes.key?(:'meta_verification_status') self. = attributes[:'meta_verification_status'] end if attributes.key?(:'meta_verified_at') self. = attributes[:'meta_verified_at'] end if attributes.key?(:'meta_verification_expires_at') self. = attributes[:'meta_verification_expires_at'] end if attributes.key?(:'social_account_id') self. = attributes[:'social_account_id'] end if attributes.key?(:'owner_account_id') self.owner_account_id = attributes[:'owner_account_id'] end if attributes.key?(:'sip_trunk_id') self.sip_trunk_id = attributes[:'sip_trunk_id'] end if attributes.key?(:'whats_app_requested') self.whats_app_requested = attributes[:'whats_app_requested'] end if attributes.key?(:'sms_requested') self.sms_requested = attributes[:'sms_requested'] end if attributes.key?(:'provisioned_at') self.provisioned_at = attributes[:'provisioned_at'] end if attributes.key?(:'activated_at') self.activated_at = attributes[:'activated_at'] end if attributes.key?(:'connected_at') self.connected_at = attributes[:'connected_at'] end if attributes.key?(:'suspended_at') self.suspended_at = attributes[:'suspended_at'] end if attributes.key?(:'released_at') self.released_at = attributes[:'released_at'] end if attributes.key?(:'signup_error') self.signup_error = attributes[:'signup_error'] end if attributes.key?(:'signup_error_at') self.signup_error_at = attributes[:'signup_error_at'] end if attributes.key?(:'signup_error_step') self.signup_error_step = attributes[:'signup_error_step'] end if attributes.key?(:'monthly_cents') self.monthly_cents = attributes[:'monthly_cents'] end if attributes.key?(:'hosted_by_zernio') self.hosted_by_zernio = attributes[:'hosted_by_zernio'] end if attributes.key?(:'sms_capable') self.sms_capable = attributes[:'sms_capable'] end if attributes.key?(:'mms_capable') self.mms_capable = attributes[:'mms_capable'] end if attributes.key?(:'domestic_only') self.domestic_only = attributes[:'domestic_only'] end if attributes.key?(:'sms_registration_pending') self.sms_registration_pending = attributes[:'sms_registration_pending'] end if attributes.key?(:'sms_send_approved') self.sms_send_approved = attributes[:'sms_send_approved'] end if attributes.key?(:'sms_brand_name') self.sms_brand_name = attributes[:'sms_brand_name'] end if attributes.key?(:'features') self.features = attributes[:'features'] end if attributes.key?(:'calling_enabled') self.calling_enabled = attributes[:'calling_enabled'] end if attributes.key?(:'forward_to') self.forward_to = attributes[:'forward_to'] end if attributes.key?(:'sip_auth_username') self.sip_auth_username = attributes[:'sip_auth_username'] end if attributes.key?(:'caller_id_verified_at') self.caller_id_verified_at = attributes[:'caller_id_verified_at'] end if attributes.key?(:'max_call_duration_seconds') self.max_call_duration_seconds = attributes[:'max_call_duration_seconds'] end if attributes.key?(:'recording_enabled') self.recording_enabled = attributes[:'recording_enabled'] end if attributes.key?(:'transcription_enabled') self.transcription_enabled = attributes[:'transcription_enabled'] end if attributes.key?(:'transcription_language') self.transcription_language = attributes[:'transcription_language'] end if attributes.key?(:'call_icon_countries') if (value = attributes[:'call_icon_countries']).is_a?(Array) self.call_icon_countries = value end end if attributes.key?(:'forward_caller_id') self.forward_caller_id = attributes[:'forward_caller_id'] end if attributes.key?(:'pstn_voice_enabled') self.pstn_voice_enabled = attributes[:'pstn_voice_enabled'] end if attributes.key?(:'pstn_forward_to') self.pstn_forward_to = attributes[:'pstn_forward_to'] end if attributes.key?(:'voicemail_enabled') self.voicemail_enabled = attributes[:'voicemail_enabled'] end if attributes.key?(:'voicemail_greeting') self.voicemail_greeting = attributes[:'voicemail_greeting'] end if attributes.key?(:'business_hours_enabled') self.business_hours_enabled = attributes[:'business_hours_enabled'] end if attributes.key?(:'business_hours_timezone') self.business_hours_timezone = attributes[:'business_hours_timezone'] end if attributes.key?(:'business_hours') if (value = attributes[:'business_hours']).is_a?(Array) self.business_hours = value end end if attributes.key?(:'blocked_callers') if (value = attributes[:'blocked_callers']).is_a?(Array) self.blocked_callers = value end end if attributes.key?(:'ivr_enabled') self.ivr_enabled = attributes[:'ivr_enabled'] end if attributes.key?(:'ivr_prompt') self.ivr_prompt = attributes[:'ivr_prompt'] end if attributes.key?(:'ivr_options') if (value = attributes[:'ivr_options']).is_a?(Array) self. = value end end end |
Instance Attribute Details
#_id ⇒ Object
Returns the value of attribute _id.
19 20 21 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 19 def _id @_id end |
#activated_at ⇒ Object
Returns the value of attribute activated_at.
91 92 93 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 91 def activated_at @activated_at end |
#blocked_callers ⇒ Object
Returns the value of attribute blocked_callers.
170 171 172 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 170 def blocked_callers @blocked_callers end |
#business_hours ⇒ Object
Returns the value of attribute business_hours.
168 169 170 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 168 def business_hours @business_hours end |
#business_hours_enabled ⇒ Object
Returns the value of attribute business_hours_enabled.
164 165 166 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 164 def business_hours_enabled @business_hours_enabled end |
#business_hours_timezone ⇒ Object
Returns the value of attribute business_hours_timezone.
166 167 168 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 166 def business_hours_timezone @business_hours_timezone end |
#call_icon_countries ⇒ Object
Returns the value of attribute call_icon_countries.
151 152 153 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 151 def call_icon_countries @call_icon_countries end |
#caller_id_verified_at ⇒ Object
Returns the value of attribute caller_id_verified_at.
141 142 143 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 141 def caller_id_verified_at @caller_id_verified_at end |
#calling_enabled ⇒ Object
Whether WhatsApp Business Calling is enabled on this number (manage via /v1/whatsapp/phone-numbers/id/calling).
133 134 135 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 133 def calling_enabled @calling_enabled end |
#connected_at ⇒ Object
Returns the value of attribute connected_at.
93 94 95 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 93 def connected_at @connected_at end |
#country ⇒ Object
Returns the value of attribute country.
23 24 25 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 23 def country @country end |
#created_at ⇒ Object
Returns the value of attribute created_at.
32 33 34 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 32 def created_at @created_at end |
#domestic_only ⇒ Object
True when the number can only text numbers in its own country. Absent while unknown.
119 120 121 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 119 def domestic_only @domestic_only end |
#end_user_first_name ⇒ Object
Returns the value of attribute end_user_first_name.
45 46 47 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 45 def end_user_first_name @end_user_first_name end |
#end_user_last_name ⇒ Object
Returns the value of attribute end_user_last_name.
47 48 49 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 47 def end_user_last_name @end_user_last_name end |
#features ⇒ Object
Returns the value of attribute features.
130 131 132 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 130 def features @features end |
#forward_caller_id ⇒ Object
Returns the value of attribute forward_caller_id.
153 154 155 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 153 def forward_caller_id @forward_caller_id end |
#forward_to ⇒ Object
WhatsApp calling forward destination.
136 137 138 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 136 def forward_to @forward_to end |
#hosted_by_zernio ⇒ Object
False for numbers you brought yourself (connected via Meta embedded signup). They live on your own carrier, so SMS/Calls can't be enabled on them.
110 111 112 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 110 def hosted_by_zernio @hosted_by_zernio end |
#ivr_enabled ⇒ Object
Returns the value of attribute ivr_enabled.
172 173 174 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 172 def ivr_enabled @ivr_enabled end |
#ivr_options ⇒ Object
Returns the value of attribute ivr_options.
176 177 178 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 176 def end |
#ivr_prompt ⇒ Object
Returns the value of attribute ivr_prompt.
174 175 176 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 174 def ivr_prompt @ivr_prompt end |
#max_call_duration_seconds ⇒ Object
Returns the value of attribute max_call_duration_seconds.
143 144 145 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 143 def max_call_duration_seconds @max_call_duration_seconds end |
#meta_preverified_id ⇒ Object
Returns the value of attribute meta_preverified_id.
67 68 69 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 67 def end |
#meta_verification_expires_at ⇒ Object
Returns the value of attribute meta_verification_expires_at.
73 74 75 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 73 def end |
#meta_verification_status ⇒ Object
Returns the value of attribute meta_verification_status.
69 70 71 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 69 def end |
#meta_verified_at ⇒ Object
Returns the value of attribute meta_verified_at.
71 72 73 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 71 def end |
#mms_capable ⇒ Object
Whether the number can send MMS. Absent while unknown.
116 117 118 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 116 def mms_capable @mms_capable end |
#monthly_cents ⇒ Object
What this number bills each month, in cents. Stamped when the number was bought, so an existing number keeps its price when the rate card changes.
107 108 109 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 107 def monthly_cents @monthly_cents end |
#number_type ⇒ Object
For example local, mobile, national or toll_free.
26 27 28 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 26 def number_type @number_type end |
#onfido_opened ⇒ Object
True once the verify link has been opened at least once.
65 66 67 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 65 def onfido_opened @onfido_opened end |
#onfido_verification_url ⇒ Object
For regulated (Tier 3/4) numbers with an Onfido ID-verification step: the link to forward to the end user. Set once the order is placed; null otherwise. Poll this field after submitting KYC.
59 60 61 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 59 def onfido_verification_url @onfido_verification_url end |
#owner_account_id ⇒ Object
The telephony account that owns Calls and SMS on the number.
79 80 81 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 79 def owner_account_id @owner_account_id end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
21 22 23 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 21 def phone_number @phone_number end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
30 31 32 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 30 def profile_id @profile_id end |
#provisioned_at ⇒ Object
Returns the value of attribute provisioned_at.
89 90 91 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 89 def provisioned_at @provisioned_at end |
#pstn_forward_to ⇒ Object
Returns the value of attribute pstn_forward_to.
158 159 160 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 158 def pstn_forward_to @pstn_forward_to end |
#pstn_voice_enabled ⇒ Object
Whether Calls (PSTN voice) is on.
156 157 158 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 156 def pstn_voice_enabled @pstn_voice_enabled end |
#recording_enabled ⇒ Object
Returns the value of attribute recording_enabled.
145 146 147 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 145 def recording_enabled @recording_enabled end |
#registrant_name ⇒ Object
For regulated numbers, who it's registered for (company or person), set from the submitted KYC.
43 44 45 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 43 def registrant_name @registrant_name end |
#regulatory_decline_reason ⇒ Object
Reviewer rejection reason when status is regulatory_declined.
50 51 52 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 50 def regulatory_decline_reason @regulatory_decline_reason end |
#regulatory_info_status ⇒ Object
action_required when the reviewer is waiting on you.
56 57 58 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 56 def regulatory_info_status @regulatory_info_status end |
#regulatory_review_comment ⇒ Object
The latest reviewer comment on a regulated number still in review.
53 54 55 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 53 def regulatory_review_comment @regulatory_review_comment end |
#released_at ⇒ Object
Returns the value of attribute released_at.
97 98 99 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 97 def released_at @released_at end |
#signup_error ⇒ Object
Meta's Embedded Signup error from the last failed connect attempt (raw text, often localized).
100 101 102 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 100 def signup_error @signup_error end |
#signup_error_at ⇒ Object
Returns the value of attribute signup_error_at.
102 103 104 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 102 def signup_error_at @signup_error_at end |
#signup_error_step ⇒ Object
Returns the value of attribute signup_error_step.
104 105 106 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 104 def signup_error_step @signup_error_step end |
#sip_auth_username ⇒ Object
SIP digest username for a sip: forward destination. The password is never returned.
139 140 141 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 139 def sip_auth_username @sip_auth_username end |
#sip_trunk_id ⇒ Object
SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
82 83 84 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 82 def sip_trunk_id @sip_trunk_id end |
#sms_brand_name ⇒ Object
Brand of the 10DLC registration covering the number.
128 129 130 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 128 def sms_brand_name @sms_brand_name end |
#sms_capable ⇒ Object
Whether the number can send SMS. Absent while unknown.
113 114 115 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 113 def sms_capable @sms_capable end |
#sms_registration_pending ⇒ Object
True while a 10DLC registration covering this number is in review.
122 123 124 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 122 def sms_registration_pending @sms_registration_pending end |
#sms_requested ⇒ Object
Returns the value of attribute sms_requested.
87 88 89 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 87 def sms_requested @sms_requested end |
#sms_send_approved ⇒ Object
True when outbound SMS is unlocked: an approved 10DLC covers the number, or the number is outside the US.
125 126 127 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 125 def sms_send_approved @sms_send_approved end |
#social_account_id ⇒ Object
The WhatsApp account the number is linked to; null when WhatsApp is not connected.
76 77 78 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 76 def end |
#status ⇒ Object
Returns the value of attribute status.
28 29 30 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 28 def status @status end |
#suspended_at ⇒ Object
Returns the value of attribute suspended_at.
95 96 97 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 95 def suspended_at @suspended_at end |
#telnyx_advanced_order_id ⇒ Object
Present on a pre-order: the carrier request placed for a number with no stock yet.
40 41 42 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 40 def telnyx_advanced_order_id @telnyx_advanced_order_id end |
#telnyx_order_id ⇒ Object
Present once the number order has been placed (i.e. the requirement group was approved). Absent while still in identity review.
37 38 39 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 37 def telnyx_order_id @telnyx_order_id end |
#transcription_enabled ⇒ Object
Returns the value of attribute transcription_enabled.
147 148 149 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 147 def transcription_enabled @transcription_enabled end |
#transcription_language ⇒ Object
Returns the value of attribute transcription_language.
149 150 151 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 149 def transcription_language @transcription_language end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
34 35 36 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 34 def updated_at @updated_at end |
#verify_url ⇒ Object
Stable redirect to the live Onfido session. Prefer it over onfidoVerificationUrl, since it always resolves to a fresh session.
62 63 64 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 62 def verify_url @verify_url end |
#voicemail_enabled ⇒ Object
Returns the value of attribute voicemail_enabled.
160 161 162 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 160 def voicemail_enabled @voicemail_enabled end |
#voicemail_greeting ⇒ Object
Returns the value of attribute voicemail_greeting.
162 163 164 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 162 def voicemail_greeting @voicemail_greeting end |
#whats_app_requested ⇒ Object
False for a standalone phone bought for Calls or SMS only.
85 86 87 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 85 def whats_app_requested @whats_app_requested end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
273 274 275 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 273 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
278 279 280 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 278 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 201 def self.attribute_map { :'_id' => :'_id', :'phone_number' => :'phoneNumber', :'country' => :'country', :'number_type' => :'numberType', :'status' => :'status', :'profile_id' => :'profileId', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'telnyx_order_id' => :'telnyxOrderId', :'telnyx_advanced_order_id' => :'telnyxAdvancedOrderId', :'registrant_name' => :'registrantName', :'end_user_first_name' => :'endUserFirstName', :'end_user_last_name' => :'endUserLastName', :'regulatory_decline_reason' => :'regulatoryDeclineReason', :'regulatory_review_comment' => :'regulatoryReviewComment', :'regulatory_info_status' => :'regulatoryInfoStatus', :'onfido_verification_url' => :'onfidoVerificationUrl', :'verify_url' => :'verifyUrl', :'onfido_opened' => :'onfidoOpened', :'meta_preverified_id' => :'metaPreverifiedId', :'meta_verification_status' => :'metaVerificationStatus', :'meta_verified_at' => :'metaVerifiedAt', :'meta_verification_expires_at' => :'metaVerificationExpiresAt', :'social_account_id' => :'socialAccountId', :'owner_account_id' => :'ownerAccountId', :'sip_trunk_id' => :'sipTrunkId', :'whats_app_requested' => :'whatsAppRequested', :'sms_requested' => :'smsRequested', :'provisioned_at' => :'provisionedAt', :'activated_at' => :'activatedAt', :'connected_at' => :'connectedAt', :'suspended_at' => :'suspendedAt', :'released_at' => :'releasedAt', :'signup_error' => :'signupError', :'signup_error_at' => :'signupErrorAt', :'signup_error_step' => :'signupErrorStep', :'monthly_cents' => :'monthlyCents', :'hosted_by_zernio' => :'hostedByZernio', :'sms_capable' => :'smsCapable', :'mms_capable' => :'mmsCapable', :'domestic_only' => :'domesticOnly', :'sms_registration_pending' => :'smsRegistrationPending', :'sms_send_approved' => :'smsSendApproved', :'sms_brand_name' => :'smsBrandName', :'features' => :'features', :'calling_enabled' => :'callingEnabled', :'forward_to' => :'forwardTo', :'sip_auth_username' => :'sipAuthUsername', :'caller_id_verified_at' => :'callerIdVerifiedAt', :'max_call_duration_seconds' => :'maxCallDurationSeconds', :'recording_enabled' => :'recordingEnabled', :'transcription_enabled' => :'transcriptionEnabled', :'transcription_language' => :'transcriptionLanguage', :'call_icon_countries' => :'callIconCountries', :'forward_caller_id' => :'forwardCallerId', :'pstn_voice_enabled' => :'pstnVoiceEnabled', :'pstn_forward_to' => :'pstnForwardTo', :'voicemail_enabled' => :'voicemailEnabled', :'voicemail_greeting' => :'voicemailGreeting', :'business_hours_enabled' => :'businessHoursEnabled', :'business_hours_timezone' => :'businessHoursTimezone', :'business_hours' => :'businessHours', :'blocked_callers' => :'blockedCallers', :'ivr_enabled' => :'ivrEnabled', :'ivr_prompt' => :'ivrPrompt', :'ivr_options' => :'ivrOptions' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 811 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 355 def self.openapi_nullable Set.new([ :'telnyx_order_id', :'registrant_name', :'end_user_first_name', :'end_user_last_name', :'regulatory_decline_reason', :'onfido_verification_url', :'verify_url', :'social_account_id', :'owner_account_id', :'sip_trunk_id', :'sms_brand_name', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 283 def self.openapi_types { :'_id' => :'String', :'phone_number' => :'String', :'country' => :'String', :'number_type' => :'String', :'status' => :'String', :'profile_id' => :'OwnedPhoneNumberProfileId', :'created_at' => :'Time', :'updated_at' => :'Time', :'telnyx_order_id' => :'String', :'telnyx_advanced_order_id' => :'String', :'registrant_name' => :'String', :'end_user_first_name' => :'String', :'end_user_last_name' => :'String', :'regulatory_decline_reason' => :'String', :'regulatory_review_comment' => :'String', :'regulatory_info_status' => :'String', :'onfido_verification_url' => :'String', :'verify_url' => :'String', :'onfido_opened' => :'Boolean', :'meta_preverified_id' => :'String', :'meta_verification_status' => :'String', :'meta_verified_at' => :'Time', :'meta_verification_expires_at' => :'Time', :'social_account_id' => :'String', :'owner_account_id' => :'String', :'sip_trunk_id' => :'String', :'whats_app_requested' => :'Boolean', :'sms_requested' => :'Boolean', :'provisioned_at' => :'Time', :'activated_at' => :'Time', :'connected_at' => :'Time', :'suspended_at' => :'Time', :'released_at' => :'Time', :'signup_error' => :'String', :'signup_error_at' => :'Time', :'signup_error_step' => :'String', :'monthly_cents' => :'Integer', :'hosted_by_zernio' => :'Boolean', :'sms_capable' => :'Boolean', :'mms_capable' => :'Boolean', :'domestic_only' => :'Boolean', :'sms_registration_pending' => :'Boolean', :'sms_send_approved' => :'Boolean', :'sms_brand_name' => :'String', :'features' => :'OwnedPhoneNumberFeatures', :'calling_enabled' => :'Boolean', :'forward_to' => :'String', :'sip_auth_username' => :'String', :'caller_id_verified_at' => :'Time', :'max_call_duration_seconds' => :'Integer', :'recording_enabled' => :'Boolean', :'transcription_enabled' => :'Boolean', :'transcription_language' => :'String', :'call_icon_countries' => :'Array<String>', :'forward_caller_id' => :'String', :'pstn_voice_enabled' => :'Boolean', :'pstn_forward_to' => :'String', :'voicemail_enabled' => :'Boolean', :'voicemail_greeting' => :'String', :'business_hours_enabled' => :'Boolean', :'business_hours_timezone' => :'String', :'business_hours' => :'Array<EnableVoiceOnNumber200ResponseBusinessHoursInner>', :'blocked_callers' => :'Array<String>', :'ivr_enabled' => :'Boolean', :'ivr_prompt' => :'String', :'ivr_options' => :'Array<EnableVoiceOnNumber200ResponseIvrOptionsInner>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 725 def ==(o) return true if self.equal?(o) self.class == o.class && _id == o._id && phone_number == o.phone_number && country == o.country && number_type == o.number_type && status == o.status && profile_id == o.profile_id && created_at == o.created_at && updated_at == o.updated_at && telnyx_order_id == o.telnyx_order_id && telnyx_advanced_order_id == o.telnyx_advanced_order_id && registrant_name == o.registrant_name && end_user_first_name == o.end_user_first_name && end_user_last_name == o.end_user_last_name && regulatory_decline_reason == o.regulatory_decline_reason && regulatory_review_comment == o.regulatory_review_comment && regulatory_info_status == o.regulatory_info_status && onfido_verification_url == o.onfido_verification_url && verify_url == o.verify_url && onfido_opened == o.onfido_opened && == o. && == o. && == o. && == o. && == o. && owner_account_id == o.owner_account_id && sip_trunk_id == o.sip_trunk_id && whats_app_requested == o.whats_app_requested && sms_requested == o.sms_requested && provisioned_at == o.provisioned_at && activated_at == o.activated_at && connected_at == o.connected_at && suspended_at == o.suspended_at && released_at == o.released_at && signup_error == o.signup_error && signup_error_at == o.signup_error_at && signup_error_step == o.signup_error_step && monthly_cents == o.monthly_cents && hosted_by_zernio == o.hosted_by_zernio && sms_capable == o.sms_capable && mms_capable == o.mms_capable && domestic_only == o.domestic_only && sms_registration_pending == o.sms_registration_pending && sms_send_approved == o.sms_send_approved && sms_brand_name == o.sms_brand_name && features == o.features && calling_enabled == o.calling_enabled && forward_to == o.forward_to && sip_auth_username == o.sip_auth_username && caller_id_verified_at == o.caller_id_verified_at && max_call_duration_seconds == o.max_call_duration_seconds && recording_enabled == o.recording_enabled && transcription_enabled == o.transcription_enabled && transcription_language == o.transcription_language && call_icon_countries == o.call_icon_countries && forward_caller_id == o.forward_caller_id && pstn_voice_enabled == o.pstn_voice_enabled && pstn_forward_to == o.pstn_forward_to && voicemail_enabled == o.voicemail_enabled && voicemail_greeting == o.voicemail_greeting && business_hours_enabled == o.business_hours_enabled && business_hours_timezone == o.business_hours_timezone && business_hours == o.business_hours && blocked_callers == o.blocked_callers && ivr_enabled == o.ivr_enabled && ivr_prompt == o.ivr_prompt && == o. end |
#eql?(o) ⇒ Boolean
798 799 800 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 798 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
804 805 806 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 804 def hash [_id, phone_number, country, number_type, status, profile_id, created_at, updated_at, telnyx_order_id, telnyx_advanced_order_id, registrant_name, end_user_first_name, end_user_last_name, regulatory_decline_reason, regulatory_review_comment, regulatory_info_status, onfido_verification_url, verify_url, onfido_opened, , , , , , owner_account_id, sip_trunk_id, whats_app_requested, sms_requested, provisioned_at, activated_at, connected_at, suspended_at, released_at, signup_error, signup_error_at, signup_error_step, monthly_cents, hosted_by_zernio, sms_capable, mms_capable, domestic_only, sms_registration_pending, sms_send_approved, sms_brand_name, features, calling_enabled, forward_to, sip_auth_username, caller_id_verified_at, max_call_duration_seconds, recording_enabled, transcription_enabled, transcription_language, call_icon_countries, forward_caller_id, pstn_voice_enabled, pstn_forward_to, voicemail_enabled, voicemail_greeting, business_hours_enabled, business_hours_timezone, business_hours, blocked_callers, ivr_enabled, ivr_prompt, ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
662 663 664 665 666 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 662 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
833 834 835 836 837 838 839 840 841 842 843 844 845 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 833 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
670 671 672 673 674 675 676 677 678 679 680 681 |
# File 'lib/zernio-sdk/models/owned_phone_number.rb', line 670 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' status_validator = EnumAttributeValidator.new('String', ["pending_payment", "pending_regulatory", "regulatory_declined", "provisioning", "verifying", "active", "suspended", "releasing", "released"]) return false unless status_validator.valid?(@status) = EnumAttributeValidator.new('String', ["pending", "code_requested", "verified", "expired"]) return false unless .valid?() transcription_language_validator = EnumAttributeValidator.new('String', ["auto", "en", "es"]) return false unless transcription_language_validator.valid?(@transcription_language) forward_caller_id_validator = EnumAttributeValidator.new('String', ["business", "caller"]) return false unless forward_caller_id_validator.valid?(@forward_caller_id) true end |