telnyx-porting-in-ruby
Original:🇺🇸 English
Translated
Port phone numbers into Telnyx. Check portability, create port orders, upload LOA documents, and track porting status. This skill provides Ruby SDK examples.
2installs
Sourceteam-telnyx/skills
Added on
NPX Install
npx skill4agent add team-telnyx/skills telnyx-porting-in-rubyTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
— Required:
Telnyx Porting In - Ruby
Installation
bash
gem install telnyxSetup
ruby
require "telnyx"
client = Telnyx::Client.new(
api_key: ENV["TELNYX_API_KEY"], # This is the default and can be omitted
)All examples below assume is already initialized as shown above.
clientError Handling
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
ruby
begin
result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello")
rescue Telnyx::Errors::APIConnectionError
puts "Network error — check connectivity and retry"
rescue Telnyx::Errors::RateLimitError
# 429: rate limited — wait and retry with exponential backoff
sleep(1) # Check Retry-After header for actual delay
rescue Telnyx::Errors::APIStatusError => e
puts "API error #{e.status}: #{e.message}"
if e.status == 422
puts "Validation error — check required fields and formats"
end
endCommon error codes: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429Important Notes
- Phone numbers must be in E.164 format (e.g., ). Include the
+13125550001prefix and country code. No spaces, dashes, or parentheses.+ - Pagination: Use for automatic iteration:
.auto_paging_each.page.auto_paging_each { |item| puts item.id }
Run a portability check
Runs a portability check, returning the results immediately.
POST /portability_checksOptional: (array[string])
phone_numbersruby
response = client.portability_checks.run(phone_numbers: ["+18005550101"])
puts(response)Returns: (boolean), (string), (string), (boolean), (string)
fast_portablenot_portable_reasonphone_numberportablerecord_typeList all porting events
Returns a list of all porting events.
GET /porting/eventsruby
page = client.porting.events.list
puts(page)Returns: (array[string]), (enum: porting_order.deleted), (uuid), (object), (enum: created, completed), (uuid)
available_notification_methodsevent_typeidpayloadpayload_statusporting_order_idShow a porting event
Show a specific porting event.
GET /porting/events/{id}ruby
event = client.porting.events.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(event)Returns: (array[string]), (enum: porting_order.deleted), (uuid), (object), (enum: created, completed), (uuid)
available_notification_methodsevent_typeidpayloadpayload_statusporting_order_idRepublish a porting event
Republish a specific porting event.
POST /porting/events/{id}/republishruby
result = client.porting.events.republish("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(result)List LOA configurations
List the LOA configurations.
GET /porting/loa_configurationsruby
page = client.porting.loa_configurations.list
puts(page)Returns: (object), (string), (object), (date-time), (uuid), (object), (string), (string), (string), (date-time)
addresscompany_namecontactcreated_atidlogonameorganization_idrecord_typeupdated_atCreate a LOA configuration
Create a LOA configuration.
POST /porting/loa_configurationsruby
loa_configuration = client.porting.loa_configurations.create(
address: {city: "Austin", country_code: "US", state: "TX", street_address: "600 Congress Avenue", zip_code: "78701"},
company_name: "Telnyx",
contact: {email: "testing@client.com", phone_number: "+12003270001"},
logo: {document_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
name: "My LOA Configuration"
)
puts(loa_configuration)Returns: (object), (string), (object), (date-time), (uuid), (object), (string), (string), (string), (date-time)
addresscompany_namecontactcreated_atidlogonameorganization_idrecord_typeupdated_atPreview the LOA configuration parameters
Preview the LOA template that would be generated without need to create LOA configuration.
POST /porting/loa_configurations/previewruby
response = client.porting.loa_configurations.preview(
address: {city: "Austin", country_code: "US", state: "TX", street_address: "600 Congress Avenue", zip_code: "78701"},
company_name: "Telnyx",
contact: {email: "testing@client.com", phone_number: "+12003270001"},
logo: {document_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
name: "My LOA Configuration"
)
puts(response)Retrieve a LOA configuration
Retrieve a specific LOA configuration.
GET /porting/loa_configurations/{id}ruby
loa_configuration = client.porting.loa_configurations.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(loa_configuration)Returns: (object), (string), (object), (date-time), (uuid), (object), (string), (string), (string), (date-time)
addresscompany_namecontactcreated_atidlogonameorganization_idrecord_typeupdated_atUpdate a LOA configuration
Update a specific LOA configuration.
PATCH /porting/loa_configurations/{id}ruby
loa_configuration = client.porting.loa_configurations.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
address: {city: "Austin", country_code: "US", state: "TX", street_address: "600 Congress Avenue", zip_code: "78701"},
company_name: "Telnyx",
contact: {email: "testing@client.com", phone_number: "+12003270001"},
logo: {document_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
name: "My LOA Configuration"
)
puts(loa_configuration)Returns: (object), (string), (object), (date-time), (uuid), (object), (string), (string), (string), (date-time)
addresscompany_namecontactcreated_atidlogonameorganization_idrecord_typeupdated_atDelete a LOA configuration
Delete a specific LOA configuration.
DELETE /porting/loa_configurations/{id}ruby
result = client.porting.loa_configurations.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(result)Preview a LOA configuration
Preview a specific LOA configuration.
GET /porting/loa_configurations/{id}/previewruby
response = client.porting.loa_configurations.preview_1("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)List porting related reports
List the reports generated about porting operations.
GET /porting/reportsruby
page = client.porting.reports.list
puts(page)Returns: (date-time), (uuid), (uuid), (object), (string), (enum: export_porting_orders_csv), (enum: pending, completed), (date-time)
created_atdocument_ididparamsrecord_typereport_typestatusupdated_atCreate a porting related report
Generate reports about porting operations.
POST /porting/reportsruby
report = client.porting.reports.create(params: {filters: {}}, report_type: :export_porting_orders_csv)
puts(report)Returns: (date-time), (uuid), (uuid), (object), (string), (enum: export_porting_orders_csv), (enum: pending, completed), (date-time)
created_atdocument_ididparamsrecord_typereport_typestatusupdated_atRetrieve a report
Retrieve a specific report generated.
GET /porting/reports/{id}ruby
report = client.porting.reports.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(report)Returns: (date-time), (uuid), (uuid), (object), (string), (enum: export_porting_orders_csv), (enum: pending, completed), (date-time)
created_atdocument_ididparamsrecord_typereport_typestatusupdated_atList available carriers in the UK
List available carriers in the UK.
GET /porting/uk_carriersruby
response = client.porting.list_uk_carriers
puts(response)Returns: (array[string]), (date-time), (string), (uuid), (string), (string), (date-time)
alternative_cupidscreated_atcupididnamerecord_typeupdated_atList all porting orders
Returns a list of your porting order.
GET /porting_ordersruby
page = client.porting_orders.list
puts(page)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlCreate a porting order
Creates a new porting order object.
POST /porting_ordersphone_numbersOptional: (string), (string | null)
customer_group_referencecustomer_referenceruby
porting_order = client.porting_orders.create(phone_numbers: ["+13035550000", "+13035550001", "+13035550002"])
puts(porting_order)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlList all exception types
Returns a list of all possible exception types for a porting order.
GET /porting_orders/exception_typesruby
response = client.porting_orders.retrieve_exception_types
puts(response)Returns: (enum: ACCOUNT_NUMBER_MISMATCH, AUTH_PERSON_MISMATCH, BTN_ATN_MISMATCH, ENTITY_NAME_MISMATCH, FOC_EXPIRED, FOC_REJECTED, LOCATION_MISMATCH, LSR_PENDING, MAIN_BTN_PORTING, OSP_IRRESPONSIVE, OTHER, PASSCODE_PIN_INVALID, PHONE_NUMBER_HAS_SPECIAL_FEATURE, PHONE_NUMBER_MISMATCH, PHONE_NUMBER_NOT_PORTABLE, PORT_TYPE_INCORRECT, PORTING_ORDER_SPLIT_REQUIRED, POSTAL_CODE_MISMATCH, RATE_CENTER_NOT_PORTABLE, SV_CONFLICT, SV_UNKNOWN_FAILURE), (string)
codedescriptionList all phone number configurations
Returns a list of phone number configurations paginated.
GET /porting_orders/phone_number_configurationsruby
page = client.porting_orders.phone_number_configurations.list
puts(page)Returns: (date-time), (uuid), (uuid), (string), (date-time), (uuid)
created_atidporting_phone_number_idrecord_typeupdated_atuser_bundle_idCreate a list of phone number configurations
Creates a list of phone number configurations.
POST /porting_orders/phone_number_configurationsruby
phone_number_configuration = client.porting_orders.phone_number_configurations.create
puts(phone_number_configuration)Returns: (date-time), (uuid), (uuid), (string), (date-time), (uuid)
created_atidporting_phone_number_idrecord_typeupdated_atuser_bundle_idRetrieve a porting order
Retrieves the details of an existing porting order.
GET /porting_orders/{id}ruby
porting_order = client.porting_orders.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(porting_order)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlEdit a porting order
Edits the details of an existing porting order. Any or all of a porting orders attributes may be included in the resource object included in a PATCH request. If a request does not include all of the attributes for a resource, the system will interpret the missing attributes as if they were included with their current values.
PATCH /porting_orders/{id}Optional: (object), (string), (string), (object), (object), (object), (object), (object), (uuid), (array[object]), (object), (uri)
activation_settingscustomer_group_referencecustomer_referencedocumentsend_usermessagingmiscphone_number_configurationrequirement_group_idrequirementsuser_feedbackwebhook_urlruby
porting_order = client.porting_orders.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(porting_order)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlDelete a porting order
Deletes an existing porting order. This operation is restrict to porting orders in draft state.
DELETE /porting_orders/{id}ruby
result = client.porting_orders.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(result)Activate every number in a porting order asynchronously.
Activate each number in a porting order asynchronously. This operation is limited to US FastPort orders only.
POST /porting_orders/{id}/actions/activateruby
response = client.porting_orders.actions.activate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (date-time), (enum: scheduled, on-demand), (array[object]), (date-time), (uuid), (string), (enum: created, in-process, completed, failed), (date-time)
activate_atactivation_typeactivation_windowscreated_atidrecord_typestatusupdated_atCancel a porting order
POST /porting_orders/{id}/actions/cancelruby
response = client.porting_orders.actions.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlSubmit a porting order.
Confirm and submit your porting order.
POST /porting_orders/{id}/actions/confirmruby
response = client.porting_orders.actions.confirm("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (object), (array[string]), (date-time), (string | null), (string | null), (string), (object), (object), (uuid), (object), (object), (string), (string | null), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (array[object]), (integer), (string), (array[object]), (boolean), (object), (string | null), (date-time), (object), (uuid), (uri)
activation_settingsadditional_stepscreated_atcustomer_group_referencecustomer_referencedescriptiondocumentsend_useridmessagingmiscold_service_provider_ocnparent_support_keyphone_number_configurationphone_number_typephone_numbersporting_phone_numbers_countrecord_typerequirementsrequirements_metstatussupport_keyupdated_atuser_feedbackuser_idwebhook_urlShare a porting order
Creates a sharing token for a porting order. The token can be used to share the porting order with non-Telnyx users.
POST /porting_orders/{id}/actions/shareruby
response = client.porting_orders.actions.share("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (date-time), (date-time), (integer), (uuid), (array[string]), (uuid), (string), (string)
created_atexpires_atexpires_in_secondsidpermissionsporting_order_idrecord_typetokenList all porting activation jobs
Returns a list of your porting activation jobs.
GET /porting_orders/{id}/activation_jobsruby
page = client.porting_orders.activation_jobs.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (date-time), (enum: scheduled, on-demand), (array[object]), (date-time), (uuid), (string), (enum: created, in-process, completed, failed), (date-time)
activate_atactivation_typeactivation_windowscreated_atidrecord_typestatusupdated_atRetrieve a porting activation job
Returns a porting activation job.
GET /porting_orders/{id}/activation_jobs/{activationJobId}ruby
activation_job = client.porting_orders.activation_jobs.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(activation_job)Returns: (date-time), (enum: scheduled, on-demand), (array[object]), (date-time), (uuid), (string), (enum: created, in-process, completed, failed), (date-time)
activate_atactivation_typeactivation_windowscreated_atidrecord_typestatusupdated_atUpdate a porting activation job
Updates the activation time of a porting activation job.
PATCH /porting_orders/{id}/activation_jobs/{activationJobId}ruby
activation_job = client.porting_orders.activation_jobs.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(activation_job)Returns: (date-time), (enum: scheduled, on-demand), (array[object]), (date-time), (uuid), (string), (enum: created, in-process, completed, failed), (date-time)
activate_atactivation_typeactivation_windowscreated_atidrecord_typestatusupdated_atList additional documents
Returns a list of additional documents for a porting order.
GET /porting_orders/{id}/additional_documentsruby
page = client.porting_orders.additional_documents.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (string), (date-time), (uuid), (enum: loa, invoice, csr, other), (string), (uuid), (uuid), (string), (date-time)
content_typecreated_atdocument_iddocument_typefilenameidporting_order_idrecord_typeupdated_atCreate a list of additional documents
Creates a list of additional documents for a porting order.
POST /porting_orders/{id}/additional_documentsruby
additional_document = client.porting_orders.additional_documents.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(additional_document)Returns: (string), (date-time), (uuid), (enum: loa, invoice, csr, other), (string), (uuid), (uuid), (string), (date-time)
content_typecreated_atdocument_iddocument_typefilenameidporting_order_idrecord_typeupdated_atDelete an additional document
Deletes an additional document for a porting order.
DELETE /porting_orders/{id}/additional_documents/{additional_document_id}ruby
result = client.porting_orders.additional_documents.delete(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(result)List allowed FOC dates
Returns a list of allowed FOC dates for a porting order.
GET /porting_orders/{id}/allowed_foc_windowsruby
response = client.porting_orders.retrieve_allowed_foc_windows("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (date-time), (string), (date-time)
ended_atrecord_typestarted_atList all comments of a porting order
Returns a list of all comments of a porting order.
GET /porting_orders/{id}/commentsruby
page = client.porting_orders.comments.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (string), (date-time), (uuid), (uuid), (string), (enum: admin, user, system)
bodycreated_atidporting_order_idrecord_typeuser_typeCreate a comment for a porting order
Creates a new comment for a porting order.
POST /porting_orders/{id}/commentsOptional: (string)
bodyruby
comment = client.porting_orders.comments.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(comment)Returns: (string), (date-time), (uuid), (uuid), (string), (enum: admin, user, system)
bodycreated_atidporting_order_idrecord_typeuser_typeDownload a porting order loa template
GET /porting_orders/{id}/loa_templateruby
response = client.porting_orders.retrieve_loa_template("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)List porting order requirements
Returns a list of all requirements based on country/number type for this porting order.
GET /porting_orders/{id}/requirementsruby
page = client.porting_orders.retrieve_requirements("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (enum: document, textual), (string), (string), (string), (object)
field_typefield_valuerecord_typerequirement_statusrequirement_typeRetrieve the associated V1 sub_request_id and port_request_id
GET /porting_orders/{id}/sub_requestruby
response = client.porting_orders.retrieve_sub_request("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (string), (string)
port_request_idsub_request_idList verification codes
Returns a list of verification codes for a porting order.
GET /porting_orders/{id}/verification_codesruby
page = client.porting_orders.verification_codes.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (date-time), (uuid), (string), (uuid), (string), (date-time), (boolean)
created_atidphone_numberporting_order_idrecord_typeupdated_atverifiedSend the verification codes
Send the verification code for all porting phone numbers.
POST /porting_orders/{id}/verification_codes/sendruby
result = client.porting_orders.verification_codes.send_("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(result)Verify the verification code for a list of phone numbers
Verifies the verification code for a list of phone numbers.
POST /porting_orders/{id}/verification_codes/verifyruby
response = client.porting_orders.verification_codes.verify("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)Returns: (date-time), (uuid), (string), (uuid), (string), (date-time), (boolean)
created_atidphone_numberporting_order_idrecord_typeupdated_atverifiedList action requirements for a porting order
Returns a list of action requirements for a specific porting order.
GET /porting_orders/{porting_order_id}/action_requirementsruby
page = client.porting_orders.action_requirements.list("porting_order_id")
puts(page)Returns: (string), (string | null), (string | null), (date-time), (string), (string), (enum: porting_action_requirement), (string), (enum: created, pending, completed, cancelled, failed), (date-time)
action_typeaction_urlcancel_reasoncreated_atidporting_order_idrecord_typerequirement_type_idstatusupdated_atInitiate an action requirement
Initiates a specific action requirement for a porting order.
POST /porting_orders/{porting_order_id}/action_requirements/{id}/initiateruby
response = client.porting_orders.action_requirements.initiate(
"id",
porting_order_id: "550e8400-e29b-41d4-a716-446655440000",
params: {first_name: "John", last_name: "Doe"}
)
puts(response)Returns: (string), (string | null), (string | null), (date-time), (string), (string), (enum: porting_action_requirement), (string), (enum: created, pending, completed, cancelled, failed), (date-time)
action_typeaction_urlcancel_reasoncreated_atidporting_order_idrecord_typerequirement_type_idstatusupdated_atList all associated phone numbers
Returns a list of all associated phone numbers for a porting order. Associated phone numbers are used for partial porting in GB to specify which phone numbers should be kept or disconnected.
GET /porting_orders/{porting_order_id}/associated_phone_numbersruby
page = client.porting_orders.associated_phone_numbers.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (enum: keep, disconnect), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (uuid), (string), (date-time)
actioncountry_codecreated_atidphone_number_rangephone_number_typeporting_order_idrecord_typeupdated_atCreate an associated phone number
Creates a new associated phone number for a porting order. This is used for partial porting in GB to specify which phone numbers should be kept or disconnected.
POST /porting_orders/{porting_order_id}/associated_phone_numbersruby
associated_phone_number = client.porting_orders.associated_phone_numbers.create(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
action: :keep,
phone_number_range: {}
)
puts(associated_phone_number)Returns: (enum: keep, disconnect), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (uuid), (string), (date-time)
actioncountry_codecreated_atidphone_number_rangephone_number_typeporting_order_idrecord_typeupdated_atDelete an associated phone number
Deletes an associated phone number from a porting order.
DELETE /porting_orders/{porting_order_id}/associated_phone_numbers/{id}ruby
associated_phone_number = client.porting_orders.associated_phone_numbers.delete(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
porting_order_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(associated_phone_number)Returns: (enum: keep, disconnect), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (uuid), (string), (date-time)
actioncountry_codecreated_atidphone_number_rangephone_number_typeporting_order_idrecord_typeupdated_atList all phone number blocks
Returns a list of all phone number blocks of a porting order.
GET /porting_orders/{porting_order_id}/phone_number_blocksruby
page = client.porting_orders.phone_number_blocks.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (array[object]), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (string), (date-time)
activation_rangescountry_codecreated_atidphone_number_rangephone_number_typerecord_typeupdated_atCreate a phone number block
Creates a new phone number block.
POST /porting_orders/{porting_order_id}/phone_number_blocksruby
phone_number_block = client.porting_orders.phone_number_blocks.create(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
activation_ranges: [{end_at: "+4930244999910", start_at: "+4930244999901"}],
phone_number_range: {end_at: "+4930244999910", start_at: "+4930244999901"}
)
puts(phone_number_block)Returns: (array[object]), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (string), (date-time)
activation_rangescountry_codecreated_atidphone_number_rangephone_number_typerecord_typeupdated_atDelete a phone number block
Deletes a phone number block.
DELETE /porting_orders/{porting_order_id}/phone_number_blocks/{id}ruby
phone_number_block = client.porting_orders.phone_number_blocks.delete(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
porting_order_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(phone_number_block)Returns: (array[object]), (string), (date-time), (uuid), (object), (enum: landline, local, mobile, national, shared_cost, toll_free), (string), (date-time)
activation_rangescountry_codecreated_atidphone_number_rangephone_number_typerecord_typeupdated_atList all phone number extensions
Returns a list of all phone number extensions of a porting order.
GET /porting_orders/{porting_order_id}/phone_number_extensionsruby
page = client.porting_orders.phone_number_extensions.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(page)Returns: (array[object]), (date-time), (object), (uuid), (uuid), (string), (date-time)
activation_rangescreated_atextension_rangeidporting_phone_number_idrecord_typeupdated_atCreate a phone number extension
Creates a new phone number extension.
POST /porting_orders/{porting_order_id}/phone_number_extensionsruby
phone_number_extension = client.porting_orders.phone_number_extensions.create(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
activation_ranges: [{end_at: 10, start_at: 1}],
extension_range: {end_at: 10, start_at: 1},
porting_phone_number_id: "f24151b6-3389-41d3-8747-7dd8c681e5e2"
)
puts(phone_number_extension)Returns: (array[object]), (date-time), (object), (uuid), (uuid), (string), (date-time)
activation_rangescreated_atextension_rangeidporting_phone_number_idrecord_typeupdated_atDelete a phone number extension
Deletes a phone number extension.
DELETE /porting_orders/{porting_order_id}/phone_number_extensions/{id}ruby
phone_number_extension = client.porting_orders.phone_number_extensions.delete(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
porting_order_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(phone_number_extension)Returns: (array[object]), (date-time), (object), (uuid), (uuid), (string), (date-time)
activation_rangescreated_atextension_rangeidporting_phone_number_idrecord_typeupdated_atList all porting phone numbers
Returns a list of your porting phone numbers.
GET /porting_phone_numbersruby
page = client.porting_phone_numbers.list
puts(page)Returns: (enum: New, Pending, Conflict, Cancel Pending, Failed, Concurred, Activate RDY, Disconnect Pending, Concurrence Sent, Old, Sending, Active, Cancelled), (string), (enum: landline, local, mobile, national, shared_cost, toll_free), (enum: pending, confirmed, provisional), (uuid), (enum: draft, in-process, submitted, exception, foc-date-confirmed, cancel-pending, ported, cancelled), (string), (enum: requirement-info-pending, requirement-info-under-review, requirement-info-exception, approved), (string)
activation_statusphone_numberphone_number_typeportability_statusporting_order_idporting_order_statusrecord_typerequirements_statussupport_key