Class: Zernio::PhoneNumbersApi
- Inherits:
-
Object
- Object
- Zernio::PhoneNumbersApi
- Defined in:
- lib/zernio-sdk/api/phone_numbers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_phone_number_port_in(id, opts = {}) ⇒ CancelPhoneNumberPortIn200Response
Cancel a port-in Cancel an in-flight port (wrong number, staying with the old carrier).
-
#cancel_phone_number_port_in_with_http_info(id, opts = {}) ⇒ Array<(CancelPhoneNumberPortIn200Response, Integer, Hash)>
Cancel a port-in Cancel an in-flight port (wrong number, staying with the old carrier).
-
#check_phone_number_availability(country, opts = {}) ⇒ CheckPhoneNumberAvailability200Response
Check country availability Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days).
-
#check_phone_number_availability_with_http_info(country, opts = {}) ⇒ Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>
Check country availability Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days).
-
#check_phone_number_portability(check_phone_number_portability_request, opts = {}) ⇒ CheckPhoneNumberPortability200Response
Check portability Pre-flight portability check: whether each number can be ported in and whether it qualifies for FastPort, BEFORE the user commits to a port order (LOA, invoice, service address).
-
#check_phone_number_portability_with_http_info(check_phone_number_portability_request, opts = {}) ⇒ Array<(CheckPhoneNumberPortability200Response, Integer, Hash)>
Check portability Pre-flight portability check: whether each number can be ported in and whether it qualifies for FastPort, BEFORE the user commits to a port order (LOA, invoice, service address).
-
#create_phone_number_kyc_link(create_phone_number_kyc_link_request, opts = {}) ⇒ CreatePhoneNumberKycLink200Response
Create a hosted KYC link Create a single-use, 7-day hosted KYC link that your end customer completes WITHOUT a Zernio login — useful when the person who holds the ID and address is not your team.
-
#create_phone_number_kyc_link_with_http_info(create_phone_number_kyc_link_request, opts = {}) ⇒ Array<(CreatePhoneNumberKycLink200Response, Integer, Hash)>
Create a hosted KYC link Create a single-use, 7-day hosted KYC link that your end customer completes WITHOUT a Zernio login — useful when the person who holds the ID and address is not your team.
-
#create_phone_number_port_in(create_phone_number_port_in_request, opts = {}) ⇒ CreatePhoneNumberPortIn201Response
Port numbers in Submit a port-in for one or more existing numbers from another carrier.
-
#create_phone_number_port_in_with_http_info(create_phone_number_port_in_request, opts = {}) ⇒ Array<(CreatePhoneNumberPortIn201Response, Integer, Hash)>
Port numbers in Submit a port-in for one or more existing numbers from another carrier.
-
#create_phone_number_stock_watch(create_phone_number_stock_watch_request, opts = {}) ⇒ PhoneNumberStockWatch
Watch an out-of-stock country Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the
phone_number.stock_availablewebhook. -
#create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request, opts = {}) ⇒ Array<(PhoneNumberStockWatch, Integer, Hash)>
Watch an out-of-stock country Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook.
-
#delete_phone_number_stock_watch(id, opts = {}) ⇒ DeleteSmsSenderId200Response
Stop watching a country.
-
#delete_phone_number_stock_watch_with_http_info(id, opts = {}) ⇒ Array<(DeleteSmsSenderId200Response, Integer, Hash)>
Stop watching a country.
-
#get_phone_number(id, opts = {}) ⇒ GetPhoneNumber200Response
Get phone number Retrieve the current status of a purchased phone number.
-
#get_phone_number_kyc_form(country, opts = {}) ⇒ GetPhoneNumberKycForm200Response
Get KYC form spec For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.
-
#get_phone_number_kyc_form_with_http_info(country, opts = {}) ⇒ Array<(GetPhoneNumberKycForm200Response, Integer, Hash)>
Get KYC form spec For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.
-
#get_phone_number_port_in_order_requirements(id, opts = {}) ⇒ GetPhoneNumberPortInOrderRequirements200Response
A port-in order's pending requirements The live requirements on an EXISTING porting order: which are filled, which are still pending, and which bounced on review (
requirement-info-exception). -
#get_phone_number_port_in_order_requirements_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumberPortInOrderRequirements200Response, Integer, Hash)>
A port-in order's pending requirements The live requirements on an EXISTING porting order: which are filled, which are still pending, and which bounced on review (`requirement-info-exception`).
-
#get_phone_number_port_in_requirements(country, opts = {}) ⇒ GetPhoneNumberPortInRequirements200Response
Country porting requirements The country-specific information a port-in needs BEYOND the LOA, invoice, and account/address details — e.g.
-
#get_phone_number_port_in_requirements_with_http_info(country, opts = {}) ⇒ Array<(GetPhoneNumberPortInRequirements200Response, Integer, Hash)>
Country porting requirements The country-specific information a port-in needs BEYOND the LOA, invoice, and account/address details — e.g.
-
#get_phone_number_remediation(id, opts = {}) ⇒ GetPhoneNumberRemediation200Response
Get declined requirements For a number in
regulatory_declined, returns ONLY the requirements the reviewer flagged declined, as a form spec (same shape as the KYC form GET). -
#get_phone_number_remediation_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumberRemediation200Response, Integer, Hash)>
Get declined requirements For a number in `regulatory_declined`, returns ONLY the requirements the reviewer flagged declined, as a form spec (same shape as the KYC form GET).
-
#get_phone_number_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumber200Response, Integer, Hash)>
Get phone number Retrieve the current status of a purchased phone number.
-
#initialize(api_client = ApiClient.default) ⇒ PhoneNumbersApi
constructor
A new instance of PhoneNumbersApi.
-
#list_phone_number_countries(opts = {}) ⇒ ListPhoneNumberCountries200Response
List offerable number countries The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound).
-
#list_phone_number_countries_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberCountries200Response, Integer, Hash)>
List offerable number countries The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound).
-
#list_phone_number_port_ins(opts = {}) ⇒ ListPhoneNumberPortIns200Response
List port-in orders Your porting orders, newest first (max 50).
-
#list_phone_number_port_ins_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberPortIns200Response, Integer, Hash)>
List port-in orders Your porting orders, newest first (max 50).
-
#list_phone_number_stock_watches(opts = {}) ⇒ ListPhoneNumberStockWatches200Response
List stock watches.
-
#list_phone_number_stock_watches_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberStockWatches200Response, Integer, Hash)>
List stock watches.
-
#list_phone_numbers(opts = {}) ⇒ ListPhoneNumbers200Response
List phone numbers List all phone numbers purchased by the authenticated user.
-
#list_phone_numbers_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumbers200Response, Integer, Hash)>
List phone numbers List all phone numbers purchased by the authenticated user.
-
#purchase_phone_number(purchase_phone_number_request, opts = {}) ⇒ PurchasePhoneNumber200Response
Purchase phone number Payment-first: you do not pick a specific number, the system provisions one and auto-assigns it.
-
#purchase_phone_number_with_http_info(purchase_phone_number_request, opts = {}) ⇒ Array<(PurchasePhoneNumber200Response, Integer, Hash)>
Purchase phone number Payment-first: you do not pick a specific number, the system provisions one and auto-assigns it.
-
#release_phone_number(id, opts = {}) ⇒ ReleasePhoneNumber200Response
Release phone number Release a purchased phone number.
-
#release_phone_number_with_http_info(id, opts = {}) ⇒ Array<(ReleasePhoneNumber200Response, Integer, Hash)>
Release phone number Release a purchased phone number.
-
#remediate_phone_number(id, remediate_phone_number_request, opts = {}) ⇒ RemediatePhoneNumber200Response
Resubmit a declined number Submit corrected values/documents for the declined requirement(s).
-
#remediate_phone_number_with_http_info(id, remediate_phone_number_request, opts = {}) ⇒ Array<(RemediatePhoneNumber200Response, Integer, Hash)>
Resubmit a declined number Submit corrected values/documents for the declined requirement(s).
-
#reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request, opts = {}) ⇒ ReplyToPhoneNumberReviewer200Response
Reply to the regulatory reviewer Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. "is this personal or business?").
-
#reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts = {}) ⇒ Array<(ReplyToPhoneNumberReviewer200Response, Integer, Hash)>
Reply to the regulatory reviewer Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. "is this personal or business?").
-
#respond_to_phone_number_reviewer(id, respond_to_phone_number_reviewer_request, opts = {}) ⇒ RespondToPhoneNumberReviewer200Response
Respond to the regulatory reviewer (message + corrections) Send a single response to the reviewer on a number awaiting remediation: a free-text message and/or corrected requirement documents, in one call.
-
#respond_to_phone_number_reviewer_with_http_info(id, respond_to_phone_number_reviewer_request, opts = {}) ⇒ Array<(RespondToPhoneNumberReviewer200Response, Integer, Hash)>
Respond to the regulatory reviewer (message + corrections) Send a single response to the reviewer on a number awaiting remediation: a free-text message and/or corrected requirement documents, in one call.
-
#review_phone_number_kyc_packet(review_phone_number_kyc_packet_request, opts = {}) ⇒ ReviewPhoneNumberKycPacket200Response
Pre-review a KYC packet Advisory dry-run of a regulated-KYC packet before submitting: reviews the exact documents the regulator will see (referenced by the ids from POST /v1/phone-numbers/kyc/upload-document) against the declared values and address, and returns plain-language advisories for likely decline reasons (wrong document type, mismatched address, one-sided ID scans).
-
#review_phone_number_kyc_packet_with_http_info(review_phone_number_kyc_packet_request, opts = {}) ⇒ Array<(ReviewPhoneNumberKycPacket200Response, Integer, Hash)>
Pre-review a KYC packet Advisory dry-run of a regulated-KYC packet before submitting: reviews the exact documents the regulator will see (referenced by the ids from POST /v1/phone-numbers/kyc/upload-document) against the declared values and address, and returns plain-language advisories for likely decline reasons (wrong document type, mismatched address, one-sided ID scans).
-
#search_available_phone_numbers(opts = {}) ⇒ SearchAvailablePhoneNumbers200Response
Search available numbers Search the provider's inventory for numbers available to purchase in a country (default US).
-
#search_available_phone_numbers_with_http_info(opts = {}) ⇒ Array<(SearchAvailablePhoneNumbers200Response, Integer, Hash)>
Search available numbers Search the provider's inventory for numbers available to purchase in a country (default US).
-
#submit_phone_number_kyc(submit_phone_number_kyc_request, opts = {}) ⇒ SubmitPhoneNumberKyc200Response
Submit KYC Submit the end customer's KYC (textual values, uploaded documents, address) for a Tier 3/4 country.
-
#submit_phone_number_kyc_with_http_info(submit_phone_number_kyc_request, opts = {}) ⇒ Array<(SubmitPhoneNumberKyc200Response, Integer, Hash)>
Submit KYC Submit the end customer's KYC (textual values, uploaded documents, address) for a Tier 3/4 country.
-
#upload_phone_number_kyc_document(x_filename, body, opts = {}) ⇒ UploadPhoneNumberKycDocument200Response
Upload a KYC document Upload ONE document and get back its provider document id, to reference from POST /v1/phone-numbers/kyc via
documents[].documentId. -
#upload_phone_number_kyc_document_with_http_info(x_filename, body, opts = {}) ⇒ Array<(UploadPhoneNumberKycDocument200Response, Integer, Hash)>
Upload a KYC document Upload ONE document and get back its provider document id, to reference from POST /v1/phone-numbers/kyc via `documents.documentId`.
-
#upload_phone_number_port_in_document(file, opts = {}) ⇒ UploadPhoneNumberPortInDocument200Response
Upload a porting document Upload ONE porting document and get back its
documentId. -
#upload_phone_number_port_in_document_with_http_info(file, opts = {}) ⇒ Array<(UploadPhoneNumberPortInDocument200Response, Integer, Hash)>
Upload a porting document Upload ONE porting document and get back its `documentId`.
-
#validate_phone_number_kyc_address(validate_phone_number_kyc_address_request, opts = {}) ⇒ ValidatePhoneNumberKycAddress200Response
Pre-validate KYC address Optional early check for the address step of a Tier 4 (end-user identity) registration: validates a postal address for deliverability BEFORE the full KYC submit, so it can be corrected before any documents are uploaded.
-
#validate_phone_number_kyc_address_with_http_info(validate_phone_number_kyc_address_request, opts = {}) ⇒ Array<(ValidatePhoneNumberKycAddress200Response, Integer, Hash)>
Pre-validate KYC address Optional early check for the address step of a Tier 4 (end-user identity) registration: validates a postal address for deliverability BEFORE the full KYC submit, so it can be corrected before any documents are uploaded.
-
#view_phone_number_kyc_document(document_id, opts = {}) ⇒ File
View a KYC document on file Stream a document backing a reusable verification (the
documentIdvalues from GET /v1/phone-numbers/kycreusable.options[].details[]), so the account holder can see what's on file before reusing it. - #view_phone_number_kyc_document_with_http_info(document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PhoneNumbersApi
Returns a new instance of PhoneNumbersApi.
19 20 21 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_phone_number_port_in(id, opts = {}) ⇒ CancelPhoneNumberPortIn200Response
Cancel a port-in
Cancel an in-flight port (wrong number, staying with the old carrier). Only orders that haven't ported can be cancelled; a completed port is a normal number release instead. The carrier may report cancel-pending briefly while the losing carrier acknowledges; it settles to cancelled.
27 28 29 30 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 27 def cancel_phone_number_port_in(id, opts = {}) data, _status_code, _headers = cancel_phone_number_port_in_with_http_info(id, opts) data end |
#cancel_phone_number_port_in_with_http_info(id, opts = {}) ⇒ Array<(CancelPhoneNumberPortIn200Response, Integer, Hash)>
Cancel a port-in Cancel an in-flight port (wrong number, staying with the old carrier). Only orders that haven't ported can be cancelled; a completed port is a normal number release instead. The carrier may report `cancel-pending` briefly while the losing carrier acknowledges; it settles to `cancelled`.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 37 def cancel_phone_number_port_in_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.cancel_phone_number_port_in ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.cancel_phone_number_port_in" end # resource path local_var_path = '/v1/phone-numbers/port-in/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CancelPhoneNumberPortIn200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.cancel_phone_number_port_in", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#cancel_phone_number_port_in\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#check_phone_number_availability(country, opts = {}) ⇒ CheckPhoneNumberAvailability200Response
Check country availability
Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - addressConstraint: geo → the registered address MUST be in one of the returned areas (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - addressConstraint: country → any in-country address works. - addressConstraint: none → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.
92 93 94 95 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 92 def check_phone_number_availability(country, opts = {}) data, _status_code, _headers = check_phone_number_availability_with_http_info(country, opts) data end |
#check_phone_number_availability_with_http_info(country, opts = {}) ⇒ Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>
Check country availability Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 104 def check_phone_number_availability_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.check_phone_number_availability ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling PhoneNumbersApi.check_phone_number_availability" end allowable_values = ["local", "mobile", "national", "toll_free"] if @api_client.config.client_side_validation && opts[:'number_type'] && !allowable_values.include?(opts[:'number_type']) fail ArgumentError, "invalid value for \"number_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/phone-numbers/availability' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = country query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil? query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CheckPhoneNumberAvailability200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.check_phone_number_availability", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#check_phone_number_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#check_phone_number_portability(check_phone_number_portability_request, opts = {}) ⇒ CheckPhoneNumberPortability200Response
Check portability Pre-flight portability check: whether each number can be ported in and whether it qualifies for FastPort, BEFORE the user commits to a port order (LOA, invoice, service address). Read-only; creates no order and bills nothing.
164 165 166 167 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 164 def check_phone_number_portability(check_phone_number_portability_request, opts = {}) data, _status_code, _headers = check_phone_number_portability_with_http_info(check_phone_number_portability_request, opts) data end |
#check_phone_number_portability_with_http_info(check_phone_number_portability_request, opts = {}) ⇒ Array<(CheckPhoneNumberPortability200Response, Integer, Hash)>
Check portability Pre-flight portability check: whether each number can be ported in and whether it qualifies for FastPort, BEFORE the user commits to a port order (LOA, invoice, service address). Read-only; creates no order and bills nothing.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 174 def check_phone_number_portability_with_http_info(check_phone_number_portability_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.check_phone_number_portability ...' end # verify the required parameter 'check_phone_number_portability_request' is set if @api_client.config.client_side_validation && check_phone_number_portability_request.nil? fail ArgumentError, "Missing the required parameter 'check_phone_number_portability_request' when calling PhoneNumbersApi.check_phone_number_portability" end # resource path local_var_path = '/v1/phone-numbers/port-in/check' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(check_phone_number_portability_request) # return_type return_type = opts[:debug_return_type] || 'CheckPhoneNumberPortability200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.check_phone_number_portability", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#check_phone_number_portability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_phone_number_kyc_link(create_phone_number_kyc_link_request, opts = {}) ⇒ CreatePhoneNumberKycLink200Response
Create a hosted KYC link
Create a single-use, 7-day hosted KYC link that your end customer completes WITHOUT a Zernio login — useful when the person who holds the ID and address is not your team. They fill the regulated verification on a Zernio-hosted page; the number provisions under YOUR account once they submit. Only regulated (KYC) countries are valid: a country that does not require KYC returns 400. White-label the page with branding (your company name, logo, brand color). Supply redirect_url to send the end customer back to your own site after a successful submit (completion params are appended — see below). Listen for the whatsapp.number.kyc_submitted webhook to react when the form is completed.
232 233 234 235 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 232 def create_phone_number_kyc_link(create_phone_number_kyc_link_request, opts = {}) data, _status_code, _headers = create_phone_number_kyc_link_with_http_info(create_phone_number_kyc_link_request, opts) data end |
#create_phone_number_kyc_link_with_http_info(create_phone_number_kyc_link_request, opts = {}) ⇒ Array<(CreatePhoneNumberKycLink200Response, Integer, Hash)>
Create a hosted KYC link Create a single-use, 7-day hosted KYC link that your end customer completes WITHOUT a Zernio login — useful when the person who holds the ID and address is not your team. They fill the regulated verification on a Zernio-hosted page; the number provisions under YOUR account once they submit. Only regulated (KYC) countries are valid: a country that does not require KYC returns 400. White-label the page with `branding` (your company name, logo, brand color). Supply `redirect_url` to send the end customer back to your own site after a successful submit (completion params are appended — see below). Listen for the `whatsapp.number.kyc_submitted` webhook to react when the form is completed.
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 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 242 def create_phone_number_kyc_link_with_http_info(create_phone_number_kyc_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.create_phone_number_kyc_link ...' end # verify the required parameter 'create_phone_number_kyc_link_request' is set if @api_client.config.client_side_validation && create_phone_number_kyc_link_request.nil? fail ArgumentError, "Missing the required parameter 'create_phone_number_kyc_link_request' when calling PhoneNumbersApi.create_phone_number_kyc_link" end # resource path local_var_path = '/v1/phone-numbers/kyc/share' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_phone_number_kyc_link_request) # return_type return_type = opts[:debug_return_type] || 'CreatePhoneNumberKycLink200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.create_phone_number_kyc_link", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#create_phone_number_kyc_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_phone_number_port_in(create_phone_number_port_in_request, opts = {}) ⇒ CreatePhoneNumberPortIn201Response
Port numbers in
Submit a port-in for one or more existing numbers from another carrier. Creates the carrier order(s), attaches the end-user (current account) info plus the LOA and invoice documents, and submits to the losing carrier. The transfer PIN is forwarded to the carrier and never stored. Ported numbers arrive voice-ready (and SMS-ready where the order supports messaging). Run the portability check (POST /v1/phone-numbers/port-in/check) and upload the two documents (POST /v1/phone-numbers/port-in/documents) first — uploaded documents must be attached to an order within 30 minutes or the carrier deletes them, so upload right before this call. The carrier may split the numbers into several orders (by country, number type, losing carrier); orders carries per-order results, and a partial failure still returns 201 with the failed orders' error set (they stay as cancellable drafts). Non-US/CA numbers additionally need the country-specific values from GET /v1/phone-numbers/port-in/requirements, passed via requirements, and must be submitted one country per request. When required information is still missing after submission, the order is kept as a resumable draft whose error / declineReason names the gaps.
300 301 302 303 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 300 def create_phone_number_port_in(create_phone_number_port_in_request, opts = {}) data, _status_code, _headers = create_phone_number_port_in_with_http_info(create_phone_number_port_in_request, opts) data end |
#create_phone_number_port_in_with_http_info(create_phone_number_port_in_request, opts = {}) ⇒ Array<(CreatePhoneNumberPortIn201Response, Integer, Hash)>
Port numbers in Submit a port-in for one or more existing numbers from another carrier. Creates the carrier order(s), attaches the end-user (current account) info plus the LOA and invoice documents, and submits to the losing carrier. The transfer PIN is forwarded to the carrier and never stored. Ported numbers arrive voice-ready (and SMS-ready where the order supports messaging). Run the portability check (POST /v1/phone-numbers/port-in/check) and upload the two documents (POST /v1/phone-numbers/port-in/documents) first — uploaded documents must be attached to an order within 30 minutes or the carrier deletes them, so upload right before this call. The carrier may split the numbers into several orders (by country, number type, losing carrier); `orders` carries per-order results, and a partial failure still returns 201 with the failed orders' `error` set (they stay as cancellable drafts). Non-US/CA numbers additionally need the country-specific values from GET /v1/phone-numbers/port-in/requirements, passed via `requirements`, and must be submitted one country per request. When required information is still missing after submission, the order is kept as a resumable draft whose `error` / `declineReason` names the gaps.
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 353 354 355 356 357 358 359 360 361 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 310 def create_phone_number_port_in_with_http_info(create_phone_number_port_in_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.create_phone_number_port_in ...' end # verify the required parameter 'create_phone_number_port_in_request' is set if @api_client.config.client_side_validation && create_phone_number_port_in_request.nil? fail ArgumentError, "Missing the required parameter 'create_phone_number_port_in_request' when calling PhoneNumbersApi.create_phone_number_port_in" end # resource path local_var_path = '/v1/phone-numbers/port-in' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_phone_number_port_in_request) # return_type return_type = opts[:debug_return_type] || 'CreatePhoneNumberPortIn201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.create_phone_number_port_in", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#create_phone_number_port_in\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_phone_number_stock_watch(create_phone_number_stock_watch_request, opts = {}) ⇒ PhoneNumberStockWatch
Watch an out-of-stock country
Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the phone_number.stock_available webhook. Stock is re-checked every 6h. One watch per country; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 countries can be watched at once.
368 369 370 371 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 368 def create_phone_number_stock_watch(create_phone_number_stock_watch_request, opts = {}) data, _status_code, _headers = create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request, opts) data end |
#create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request, opts = {}) ⇒ Array<(PhoneNumberStockWatch, Integer, Hash)>
Watch an out-of-stock country Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 countries can be watched at once.
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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 378 def create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.create_phone_number_stock_watch ...' end # verify the required parameter 'create_phone_number_stock_watch_request' is set if @api_client.config.client_side_validation && create_phone_number_stock_watch_request.nil? fail ArgumentError, "Missing the required parameter 'create_phone_number_stock_watch_request' when calling PhoneNumbersApi.create_phone_number_stock_watch" end # resource path local_var_path = '/v1/phone-numbers/stock-watches' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_phone_number_stock_watch_request) # return_type return_type = opts[:debug_return_type] || 'PhoneNumberStockWatch' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.create_phone_number_stock_watch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#create_phone_number_stock_watch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_phone_number_stock_watch(id, opts = {}) ⇒ DeleteSmsSenderId200Response
Stop watching a country
435 436 437 438 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 435 def delete_phone_number_stock_watch(id, opts = {}) data, _status_code, _headers = delete_phone_number_stock_watch_with_http_info(id, opts) data end |
#delete_phone_number_stock_watch_with_http_info(id, opts = {}) ⇒ Array<(DeleteSmsSenderId200Response, Integer, Hash)>
Stop watching a country
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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 444 def delete_phone_number_stock_watch_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.delete_phone_number_stock_watch ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.delete_phone_number_stock_watch" end # resource path local_var_path = '/v1/phone-numbers/stock-watches/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteSmsSenderId200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.delete_phone_number_stock_watch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#delete_phone_number_stock_watch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number(id, opts = {}) ⇒ GetPhoneNumber200Response
Get phone number
Retrieve the current status of a purchased phone number. Poll this to track Meta pre-verification (US sync path) and, for regulated (Tier 3/4) numbers, the async lifecycle: pending_regulatory → active (or regulatory_declined). When a regulated number has an Onfido ID step, onfidoVerificationUrl appears here once the order is placed — forward it to the end user. (Or subscribe to the whatsapp.number.* webhooks instead of polling.)
497 498 499 500 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 497 def get_phone_number(id, opts = {}) data, _status_code, _headers = get_phone_number_with_http_info(id, opts) data end |
#get_phone_number_kyc_form(country, opts = {}) ⇒ GetPhoneNumberKycForm200Response
Get KYC form spec For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.
561 562 563 564 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 561 def get_phone_number_kyc_form(country, opts = {}) data, _status_code, _headers = get_phone_number_kyc_form_with_http_info(country, opts) data end |
#get_phone_number_kyc_form_with_http_info(country, opts = {}) ⇒ Array<(GetPhoneNumberKycForm200Response, Integer, Hash)>
Get KYC form spec For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.
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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 572 def get_phone_number_kyc_form_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_kyc_form ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling PhoneNumbersApi.get_phone_number_kyc_form" end allowable_values = ["local", "mobile", "national", "toll_free"] if @api_client.config.client_side_validation && opts[:'number_type'] && !allowable_values.include?(opts[:'number_type']) fail ArgumentError, "invalid value for \"number_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/phone-numbers/kyc' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = country query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPhoneNumberKycForm200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.get_phone_number_kyc_form", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_kyc_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number_port_in_order_requirements(id, opts = {}) ⇒ GetPhoneNumberPortInOrderRequirements200Response
A port-in order's pending requirements
The live requirements on an EXISTING porting order: which are filled, which are still pending, and which bounced on review (requirement-info-exception). Use it to fix and resubmit a rejected international port. Same field shape as the country-level requirements endpoint, plus per-requirement status.
631 632 633 634 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 631 def get_phone_number_port_in_order_requirements(id, opts = {}) data, _status_code, _headers = get_phone_number_port_in_order_requirements_with_http_info(id, opts) data end |
#get_phone_number_port_in_order_requirements_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumberPortInOrderRequirements200Response, Integer, Hash)>
A port-in order's pending requirements The live requirements on an EXISTING porting order: which are filled, which are still pending, and which bounced on review (`requirement-info-exception`). Use it to fix and resubmit a rejected international port. Same field shape as the country-level requirements endpoint, plus per-requirement status.
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 641 def get_phone_number_port_in_order_requirements_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_port_in_order_requirements ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.get_phone_number_port_in_order_requirements" end # resource path local_var_path = '/v1/phone-numbers/port-in/{id}/requirements'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPhoneNumberPortInOrderRequirements200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.get_phone_number_port_in_order_requirements", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_port_in_order_requirements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number_port_in_requirements(country, opts = {}) ⇒ GetPhoneNumberPortInRequirements200Response
Country porting requirements
The country-specific information a port-in needs BEYOND the LOA, invoice, and account/address details — e.g. an ID copy, proof of address, a tax id, or a porting code. Call it after the portability check (which returns each number's countryCode and phoneNumberType), render the fields, and pass the collected values as the create request's requirements. US/CA return an empty list.
695 696 697 698 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 695 def get_phone_number_port_in_requirements(country, opts = {}) data, _status_code, _headers = get_phone_number_port_in_requirements_with_http_info(country, opts) data end |
#get_phone_number_port_in_requirements_with_http_info(country, opts = {}) ⇒ Array<(GetPhoneNumberPortInRequirements200Response, Integer, Hash)>
Country porting requirements The country-specific information a port-in needs BEYOND the LOA, invoice, and account/address details — e.g. an ID copy, proof of address, a tax id, or a porting code. Call it after the portability check (which returns each number's `countryCode` and `phoneNumberType`), render the fields, and pass the collected values as the create request's `requirements`. US/CA return an empty list.
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 706 def get_phone_number_port_in_requirements_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_port_in_requirements ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling PhoneNumbersApi.get_phone_number_port_in_requirements" end if @api_client.config.client_side_validation && country.to_s.length > 2 fail ArgumentError, 'invalid value for "country" when calling PhoneNumbersApi.get_phone_number_port_in_requirements, the character length must be smaller than or equal to 2.' end if @api_client.config.client_side_validation && country.to_s.length < 2 fail ArgumentError, 'invalid value for "country" when calling PhoneNumbersApi.get_phone_number_port_in_requirements, the character length must be greater than or equal to 2.' end allowable_values = ["local", "mobile", "national", "toll_free"] if @api_client.config.client_side_validation && opts[:'number_type'] && !allowable_values.include?(opts[:'number_type']) fail ArgumentError, "invalid value for \"number_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/phone-numbers/port-in/requirements' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = country query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPhoneNumberPortInRequirements200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.get_phone_number_port_in_requirements", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_port_in_requirements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number_remediation(id, opts = {}) ⇒ GetPhoneNumberRemediation200Response
Get declined requirements
For a number in regulatory_declined, returns ONLY the requirements the reviewer flagged declined, as a form spec (same shape as the KYC form GET). The customer fixes just those — Telnyx supports correcting a declined requirement group and re-submitting it (no new number/group). Falls back to the full spec if the provider exposes no per-requirement flags.
773 774 775 776 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 773 def get_phone_number_remediation(id, opts = {}) data, _status_code, _headers = get_phone_number_remediation_with_http_info(id, opts) data end |
#get_phone_number_remediation_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumberRemediation200Response, Integer, Hash)>
Get declined requirements For a number in `regulatory_declined`, returns ONLY the requirements the reviewer flagged declined, as a form spec (same shape as the KYC form GET). The customer fixes just those — Telnyx supports correcting a declined requirement group and re-submitting it (no new number/group). Falls back to the full spec if the provider exposes no per-requirement flags.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 783 def get_phone_number_remediation_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_remediation ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.get_phone_number_remediation" end # resource path local_var_path = '/v1/phone-numbers/{id}/remediate'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPhoneNumberRemediation200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.get_phone_number_remediation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_remediation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number_with_http_info(id, opts = {}) ⇒ Array<(GetPhoneNumber200Response, Integer, Hash)>
Get phone number Retrieve the current status of a purchased phone number. Poll this to track Meta pre-verification (US sync path) and, for regulated (Tier 3/4) numbers, the async lifecycle: pending_regulatory → active (or regulatory_declined). When a regulated number has an Onfido ID step, `onfidoVerificationUrl` appears here once the order is placed — forward it to the end user. (Or subscribe to the whatsapp.number.* webhooks instead of polling.)
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 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 507 def get_phone_number_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.get_phone_number" end # resource path local_var_path = '/v1/phone-numbers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPhoneNumber200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.get_phone_number", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_phone_number_countries(opts = {}) ⇒ ListPhoneNumberCountries200Response
List offerable number countries The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled.
835 836 837 838 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 835 def list_phone_number_countries(opts = {}) data, _status_code, _headers = list_phone_number_countries_with_http_info(opts) data end |
#list_phone_number_countries_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberCountries200Response, Integer, Hash)>
List offerable number countries The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled.
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 844 def list_phone_number_countries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.list_phone_number_countries ...' end # resource path local_var_path = '/v1/phone-numbers/countries' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListPhoneNumberCountries200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.list_phone_number_countries", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#list_phone_number_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_phone_number_port_ins(opts = {}) ⇒ ListPhoneNumberPortIns200Response
List port-in orders Your porting orders, newest first (max 50). Poll this for port progress: pending, confirmed FOC date, exception reason, or ported.
892 893 894 895 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 892 def list_phone_number_port_ins(opts = {}) data, _status_code, _headers = list_phone_number_port_ins_with_http_info(opts) data end |
#list_phone_number_port_ins_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberPortIns200Response, Integer, Hash)>
List port-in orders Your porting orders, newest first (max 50). Poll this for port progress: pending, confirmed FOC date, exception reason, or ported.
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 901 def list_phone_number_port_ins_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.list_phone_number_port_ins ...' end # resource path local_var_path = '/v1/phone-numbers/port-in' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListPhoneNumberPortIns200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.list_phone_number_port_ins", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#list_phone_number_port_ins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_phone_number_stock_watches(opts = {}) ⇒ ListPhoneNumberStockWatches200Response
List stock watches
948 949 950 951 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 948 def list_phone_number_stock_watches(opts = {}) data, _status_code, _headers = list_phone_number_stock_watches_with_http_info(opts) data end |
#list_phone_number_stock_watches_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumberStockWatches200Response, Integer, Hash)>
List stock watches
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 956 def list_phone_number_stock_watches_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.list_phone_number_stock_watches ...' end # resource path local_var_path = '/v1/phone-numbers/stock-watches' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListPhoneNumberStockWatches200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.list_phone_number_stock_watches", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#list_phone_number_stock_watches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_phone_numbers(opts = {}) ⇒ ListPhoneNumbers200Response
List phone numbers
List all phone numbers purchased by the authenticated user. By default, released numbers are excluded. Connected (bring-your-own) WhatsApp numbers are returned in the separate connected array; they are not billed and have no provisioning lifecycle.
1006 1007 1008 1009 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1006 def list_phone_numbers(opts = {}) data, _status_code, _headers = list_phone_numbers_with_http_info(opts) data end |
#list_phone_numbers_with_http_info(opts = {}) ⇒ Array<(ListPhoneNumbers200Response, Integer, Hash)>
List phone numbers List all phone numbers purchased by the authenticated user. By default, released numbers are excluded. Connected (bring-your-own) WhatsApp numbers are returned in the separate `connected` array; they are not billed and have no provisioning lifecycle.
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1017 def list_phone_numbers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.list_phone_numbers ...' end allowable_values = ["provisioning", "verifying", "pending_payment", "pending_regulatory", "regulatory_declined", "active", "suspended", "releasing", "released"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/phone-numbers' # query parameters query_params = opts[:query_params] || {} query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListPhoneNumbers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.list_phone_numbers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#list_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#purchase_phone_number(purchase_phone_number_request, opts = {}) ⇒ PurchasePhoneNumber200Response
Purchase phone number
Payment-first: you do not pick a specific number, the system provisions one and auto-assigns it. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns 402 PAYMENT_REQUIRED; a regulated country returns 202 with status: \"kyc_required\" and a kycUrl. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
1072 1073 1074 1075 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1072 def purchase_phone_number(purchase_phone_number_request, opts = {}) data, _status_code, _headers = purchase_phone_number_with_http_info(purchase_phone_number_request, opts) data end |
#purchase_phone_number_with_http_info(purchase_phone_number_request, opts = {}) ⇒ Array<(PurchasePhoneNumber200Response, Integer, Hash)>
Purchase phone number Payment-first: you do not pick a specific number, the system provisions one and auto-assigns it. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1082 def purchase_phone_number_with_http_info(purchase_phone_number_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.purchase_phone_number ...' end # verify the required parameter 'purchase_phone_number_request' is set if @api_client.config.client_side_validation && purchase_phone_number_request.nil? fail ArgumentError, "Missing the required parameter 'purchase_phone_number_request' when calling PhoneNumbersApi.purchase_phone_number" end # resource path local_var_path = '/v1/phone-numbers/purchase' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(purchase_phone_number_request) # return_type return_type = opts[:debug_return_type] || 'PurchasePhoneNumber200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.purchase_phone_number", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#purchase_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#release_phone_number(id, opts = {}) ⇒ ReleasePhoneNumber200Response
Release phone number Release a purchased phone number. This will: 1. Disconnect any linked WhatsApp social account 2. Decrement the Stripe subscription quantity (or cancel if last number) 3. Release the number from Telnyx 4. Mark the number as released
1140 1141 1142 1143 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1140 def release_phone_number(id, opts = {}) data, _status_code, _headers = release_phone_number_with_http_info(id, opts) data end |
#release_phone_number_with_http_info(id, opts = {}) ⇒ Array<(ReleasePhoneNumber200Response, Integer, Hash)>
Release phone number Release a purchased phone number. This will: 1. Disconnect any linked WhatsApp social account 2. Decrement the Stripe subscription quantity (or cancel if last number) 3. Release the number from Telnyx 4. Mark the number as released
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1150 def release_phone_number_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.release_phone_number ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.release_phone_number" end # resource path local_var_path = '/v1/phone-numbers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ReleasePhoneNumber200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.release_phone_number", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#release_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remediate_phone_number(id, remediate_phone_number_request, opts = {}) ⇒ RemediatePhoneNumber200Response
Resubmit a declined number
Submit corrected values/documents for the declined requirement(s). We PATCH them onto the SAME requirement group and re-submit it for approval; the number goes regulatory_declined → pending_regulatory. No new number and no new billing. Body shape matches the KYC submit (values / documents / address) — send only the corrected fields.
1204 1205 1206 1207 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1204 def remediate_phone_number(id, remediate_phone_number_request, opts = {}) data, _status_code, _headers = remediate_phone_number_with_http_info(id, remediate_phone_number_request, opts) data end |
#remediate_phone_number_with_http_info(id, remediate_phone_number_request, opts = {}) ⇒ Array<(RemediatePhoneNumber200Response, Integer, Hash)>
Resubmit a declined number Submit corrected values/documents for the declined requirement(s). We PATCH them onto the SAME requirement group and re-submit it for approval; the number goes `regulatory_declined` → `pending_regulatory`. No new number and no new billing. Body shape matches the KYC submit (values / documents / address) — send only the corrected fields.
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1215 def remediate_phone_number_with_http_info(id, remediate_phone_number_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.remediate_phone_number ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.remediate_phone_number" end # verify the required parameter 'remediate_phone_number_request' is set if @api_client.config.client_side_validation && remediate_phone_number_request.nil? fail ArgumentError, "Missing the required parameter 'remediate_phone_number_request' when calling PhoneNumbersApi.remediate_phone_number" end # resource path local_var_path = '/v1/phone-numbers/{id}/remediate'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(remediate_phone_number_request) # return_type return_type = opts[:debug_return_type] || 'RemediatePhoneNumber200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.remediate_phone_number", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#remediate_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request, opts = {}) ⇒ ReplyToPhoneNumberReviewer200Response
Reply to the regulatory reviewer Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. "is this personal or business?"). Attachments are stored by us and their links are added to the reviewer's comment thread (the carrier's number order takes no loose files). A reply to a comment-style ask moves the number back to "in review"; a reply on a formal decline is supplementary and you must still resubmit the fix. Requires text or at least one attachment.
1278 1279 1280 1281 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1278 def reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request, opts = {}) data, _status_code, _headers = reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts) data end |
#reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts = {}) ⇒ Array<(ReplyToPhoneNumberReviewer200Response, Integer, Hash)>
Reply to the regulatory reviewer Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. "is this personal or business?"). Attachments are stored by us and their links are added to the reviewer's comment thread (the carrier's number order takes no loose files). A reply to a comment-style ask moves the number back to "in review"; a reply on a formal decline is supplementary and you must still resubmit the fix. Requires text or at least one attachment.
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1289 def reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.reply_to_phone_number_reviewer ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.reply_to_phone_number_reviewer" end # verify the required parameter 'reply_to_phone_number_reviewer_request' is set if @api_client.config.client_side_validation && reply_to_phone_number_reviewer_request.nil? fail ArgumentError, "Missing the required parameter 'reply_to_phone_number_reviewer_request' when calling PhoneNumbersApi.reply_to_phone_number_reviewer" end # resource path local_var_path = '/v1/phone-numbers/{id}/remediate/reply'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_to_phone_number_reviewer_request) # return_type return_type = opts[:debug_return_type] || 'ReplyToPhoneNumberReviewer200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.reply_to_phone_number_reviewer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#reply_to_phone_number_reviewer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#respond_to_phone_number_reviewer(id, respond_to_phone_number_reviewer_request, opts = {}) ⇒ RespondToPhoneNumberReviewer200Response
Respond to the regulatory reviewer (message + corrections)
Send a single response to the reviewer on a number awaiting remediation: a free-text message and/or corrected requirement documents, in one call. If corrections are present they are PATCHed onto the requirement group and re-submitted (the number goes back to "in review"); if a message or file attachments are present they are posted to the reviewer's comment thread. When both are present, your message is the thread comment and the resubmit drives the state change. At least one of message, corrections, or attachments is required. documents correct requirement slots; attachments are loose files (their links are added to your message).
1352 1353 1354 1355 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1352 def respond_to_phone_number_reviewer(id, respond_to_phone_number_reviewer_request, opts = {}) data, _status_code, _headers = respond_to_phone_number_reviewer_with_http_info(id, respond_to_phone_number_reviewer_request, opts) data end |
#respond_to_phone_number_reviewer_with_http_info(id, respond_to_phone_number_reviewer_request, opts = {}) ⇒ Array<(RespondToPhoneNumberReviewer200Response, Integer, Hash)>
Respond to the regulatory reviewer (message + corrections) Send a single response to the reviewer on a number awaiting remediation: a free-text message and/or corrected requirement documents, in one call. If corrections are present they are PATCHed onto the requirement group and re-submitted (the number goes back to "in review"); if a message or file attachments are present they are posted to the reviewer's comment thread. When both are present, your message is the thread comment and the resubmit drives the state change. At least one of message, corrections, or attachments is required. `documents` correct requirement slots; `attachments` are loose files (their links are added to your message).
1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1363 def respond_to_phone_number_reviewer_with_http_info(id, respond_to_phone_number_reviewer_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.respond_to_phone_number_reviewer ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.respond_to_phone_number_reviewer" end # verify the required parameter 'respond_to_phone_number_reviewer_request' is set if @api_client.config.client_side_validation && respond_to_phone_number_reviewer_request.nil? fail ArgumentError, "Missing the required parameter 'respond_to_phone_number_reviewer_request' when calling PhoneNumbersApi.respond_to_phone_number_reviewer" end # resource path local_var_path = '/v1/phone-numbers/{id}/remediate/respond'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(respond_to_phone_number_reviewer_request) # return_type return_type = opts[:debug_return_type] || 'RespondToPhoneNumberReviewer200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.respond_to_phone_number_reviewer", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#respond_to_phone_number_reviewer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#review_phone_number_kyc_packet(review_phone_number_kyc_packet_request, opts = {}) ⇒ ReviewPhoneNumberKycPacket200Response
Pre-review a KYC packet Advisory dry-run of a regulated-KYC packet before submitting: reviews the exact documents the regulator will see (referenced by the ids from POST /v1/phone-numbers/kyc/upload-document) against the declared values and address, and returns plain-language advisories for likely decline reasons (wrong document type, mismatched address, one-sided ID scans). Non-blocking: advisories are warnings, submitting anyway is always allowed, and any review failure degrades to an empty list.
1425 1426 1427 1428 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1425 def review_phone_number_kyc_packet(review_phone_number_kyc_packet_request, opts = {}) data, _status_code, _headers = review_phone_number_kyc_packet_with_http_info(review_phone_number_kyc_packet_request, opts) data end |
#review_phone_number_kyc_packet_with_http_info(review_phone_number_kyc_packet_request, opts = {}) ⇒ Array<(ReviewPhoneNumberKycPacket200Response, Integer, Hash)>
Pre-review a KYC packet Advisory dry-run of a regulated-KYC packet before submitting: reviews the exact documents the regulator will see (referenced by the ids from POST /v1/phone-numbers/kyc/upload-document) against the declared values and address, and returns plain-language advisories for likely decline reasons (wrong document type, mismatched address, one-sided ID scans). Non-blocking: advisories are warnings, submitting anyway is always allowed, and any review failure degrades to an empty list.
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1435 def review_phone_number_kyc_packet_with_http_info(review_phone_number_kyc_packet_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.review_phone_number_kyc_packet ...' end # verify the required parameter 'review_phone_number_kyc_packet_request' is set if @api_client.config.client_side_validation && review_phone_number_kyc_packet_request.nil? fail ArgumentError, "Missing the required parameter 'review_phone_number_kyc_packet_request' when calling PhoneNumbersApi.review_phone_number_kyc_packet" end # resource path local_var_path = '/v1/phone-numbers/kyc/review-packet' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(review_phone_number_kyc_packet_request) # return_type return_type = opts[:debug_return_type] || 'ReviewPhoneNumberKycPacket200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.review_phone_number_kyc_packet", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#review_phone_number_kyc_packet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_available_phone_numbers(opts = {}) ⇒ SearchAvailablePhoneNumbers200Response
Search available numbers
Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass sms=true to only see numbers that can also text (SMS support is per-number, not per-country).
1499 1500 1501 1502 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1499 def search_available_phone_numbers(opts = {}) data, _status_code, _headers = search_available_phone_numbers_with_http_info(opts) data end |
#search_available_phone_numbers_with_http_info(opts = {}) ⇒ Array<(SearchAvailablePhoneNumbers200Response, Integer, Hash)>
Search available numbers Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country).
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1515 def search_available_phone_numbers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.search_available_phone_numbers ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PhoneNumbersApi.search_available_phone_numbers, must be smaller than or equal to 100.' end # resource path local_var_path = '/v1/phone-numbers/available' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil? query_params[:'locality'] = opts[:'locality'] if !opts[:'locality'].nil? query_params[:'contains'] = opts[:'contains'] if !opts[:'contains'].nil? query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchAvailablePhoneNumbers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.search_available_phone_numbers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#search_available_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#submit_phone_number_kyc(submit_phone_number_kyc_request, opts = {}) ⇒ SubmitPhoneNumberKyc200Response
Submit KYC
Submit the end customer's KYC (textual values, uploaded documents, address) for a Tier 3/4 country. Documents are streamed straight to the number provider and are not stored by Zernio. Builds + submits a regulatory requirement group and claims a pending_regulatory slot; the number is ordered + activated once the provider approves (asynchronous). A customer may hold several same-country numbers in review at once; a double-submit of the SAME attempt is deduped via submissionId. For an ID-card document requirement, carriers commonly require BOTH sides: combine the front and back into a single file before uploading (the dashboard does this automatically). A one-sided ID is a common decline reason; fix it via POST /v1/phone-numbers/id/remediate. Before submitting, call GET /v1/phone-numbers/availability to check the country has deliverable inventory and, for geographic-match countries, which area the address must be in — otherwise the submission can pass review yet never be assignable a number.
1575 1576 1577 1578 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1575 def submit_phone_number_kyc(submit_phone_number_kyc_request, opts = {}) data, _status_code, _headers = submit_phone_number_kyc_with_http_info(submit_phone_number_kyc_request, opts) data end |
#submit_phone_number_kyc_with_http_info(submit_phone_number_kyc_request, opts = {}) ⇒ Array<(SubmitPhoneNumberKyc200Response, Integer, Hash)>
Submit KYC Submit the end customer's KYC (textual values, uploaded documents, address) for a Tier 3/4 country. Documents are streamed straight to the number provider and are not stored by Zernio. Builds + submits a regulatory requirement group and claims a pending_regulatory slot; the number is ordered + activated once the provider approves (asynchronous). A customer may hold several same-country numbers in review at once; a double-submit of the SAME attempt is deduped via `submissionId`. For an ID-card document requirement, carriers commonly require BOTH sides: combine the front and back into a single file before uploading (the dashboard does this automatically). A one-sided ID is a common decline reason; fix it via POST /v1/phone-numbers/id/remediate. Before submitting, call GET /v1/phone-numbers/availability to check the country has deliverable inventory and, for geographic-match countries, which area the address must be in — otherwise the submission can pass review yet never be assignable a number.
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1585 def submit_phone_number_kyc_with_http_info(submit_phone_number_kyc_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.submit_phone_number_kyc ...' end # verify the required parameter 'submit_phone_number_kyc_request' is set if @api_client.config.client_side_validation && submit_phone_number_kyc_request.nil? fail ArgumentError, "Missing the required parameter 'submit_phone_number_kyc_request' when calling PhoneNumbersApi.submit_phone_number_kyc" end # resource path local_var_path = '/v1/phone-numbers/kyc' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_phone_number_kyc_request) # return_type return_type = opts[:debug_return_type] || 'SubmitPhoneNumberKyc200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.submit_phone_number_kyc", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#submit_phone_number_kyc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_phone_number_kyc_document(x_filename, body, opts = {}) ⇒ UploadPhoneNumberKycDocument200Response
Upload a KYC document
Upload ONE document and get back its provider document id, to reference from POST /v1/phone-numbers/kyc via documents[].documentId. Send the RAW file bytes as the request body (not base64); put the filename in the X-Filename header. Uploading documents one-per-request keeps each request under the ~4.5MB body limit. The document streams straight to the number provider and is not stored by Zernio.
1644 1645 1646 1647 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1644 def upload_phone_number_kyc_document(x_filename, body, opts = {}) data, _status_code, _headers = upload_phone_number_kyc_document_with_http_info(x_filename, body, opts) data end |
#upload_phone_number_kyc_document_with_http_info(x_filename, body, opts = {}) ⇒ Array<(UploadPhoneNumberKycDocument200Response, Integer, Hash)>
Upload a KYC document Upload ONE document and get back its provider document id, to reference from POST /v1/phone-numbers/kyc via `documents.documentId`. Send the RAW file bytes as the request body (not base64); put the filename in the `X-Filename` header. Uploading documents one-per-request keeps each request under the ~4.5MB body limit. The document streams straight to the number provider and is not stored by Zernio.
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1655 def upload_phone_number_kyc_document_with_http_info(x_filename, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.upload_phone_number_kyc_document ...' end # verify the required parameter 'x_filename' is set if @api_client.config.client_side_validation && x_filename.nil? fail ArgumentError, "Missing the required parameter 'x_filename' when calling PhoneNumbersApi.upload_phone_number_kyc_document" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PhoneNumbersApi.upload_phone_number_kyc_document" end # resource path local_var_path = '/v1/phone-numbers/kyc/upload-document' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/octet-stream']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Filename'] = x_filename # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UploadPhoneNumberKycDocument200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.upload_phone_number_kyc_document", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#upload_phone_number_kyc_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_phone_number_port_in_document(file, opts = {}) ⇒ UploadPhoneNumberPortInDocument200Response
Upload a porting document
Upload ONE porting document and get back its documentId. For the signed LOA / carrier invoice the id goes to loaDocumentId / invoiceDocumentId; for a country-specific document requirement (international ports) it becomes that requirement's fieldValue. Requirement documents are normalized to PDF automatically (regulators reject raw images). PDF, JPEG, or PNG, 10MB max. Uploads must be attached to an order within 30 minutes or the carrier deletes them.
1719 1720 1721 1722 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1719 def upload_phone_number_port_in_document(file, opts = {}) data, _status_code, _headers = upload_phone_number_port_in_document_with_http_info(file, opts) data end |
#upload_phone_number_port_in_document_with_http_info(file, opts = {}) ⇒ Array<(UploadPhoneNumberPortInDocument200Response, Integer, Hash)>
Upload a porting document Upload ONE porting document and get back its `documentId`. For the signed LOA / carrier invoice the id goes to `loaDocumentId` / `invoiceDocumentId`; for a country-specific document requirement (international ports) it becomes that requirement's `fieldValue`. Requirement documents are normalized to PDF automatically (regulators reject raw images). PDF, JPEG, or PNG, 10MB max. Uploads must be attached to an order within 30 minutes or the carrier deletes them.
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1730 def upload_phone_number_port_in_document_with_http_info(file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.upload_phone_number_port_in_document ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling PhoneNumbersApi.upload_phone_number_port_in_document" end # resource path local_var_path = '/v1/phone-numbers/port-in/documents' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = file form_params['kind'] = opts[:'kind'] if !opts[:'kind'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UploadPhoneNumberPortInDocument200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.upload_phone_number_port_in_document", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#upload_phone_number_port_in_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_phone_number_kyc_address(validate_phone_number_kyc_address_request, opts = {}) ⇒ ValidatePhoneNumberKycAddress200Response
Pre-validate KYC address
Optional early check for the address step of a Tier 4 (end-user identity) registration: validates a postal address for deliverability BEFORE the full KYC submit, so it can be corrected before any documents are uploaded. The full submit (POST /v1/phone-numbers/kyc) re-validates the address, so this call is purely a fast feedback path and skipping it is safe. Only the postal address is sent (no documents, no gov-ID fields). A region (administrative_area) is required by the validator; when it is omitted the pre-check is skipped and { ok: true, skipped: true } is returned (the final submit still validates).
1790 1791 1792 1793 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1790 def validate_phone_number_kyc_address(validate_phone_number_kyc_address_request, opts = {}) data, _status_code, _headers = validate_phone_number_kyc_address_with_http_info(validate_phone_number_kyc_address_request, opts) data end |
#validate_phone_number_kyc_address_with_http_info(validate_phone_number_kyc_address_request, opts = {}) ⇒ Array<(ValidatePhoneNumberKycAddress200Response, Integer, Hash)>
Pre-validate KYC address Optional early check for the address step of a Tier 4 (end-user identity) registration: validates a postal address for deliverability BEFORE the full KYC submit, so it can be corrected before any documents are uploaded. The full submit (POST /v1/phone-numbers/kyc) re-validates the address, so this call is purely a fast feedback path and skipping it is safe. Only the postal address is sent (no documents, no gov-ID fields). A region (`administrative_area`) is required by the validator; when it is omitted the pre-check is skipped and `{ ok: true, skipped: true }` is returned (the final submit still validates).
1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1800 def validate_phone_number_kyc_address_with_http_info(validate_phone_number_kyc_address_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.validate_phone_number_kyc_address ...' end # verify the required parameter 'validate_phone_number_kyc_address_request' is set if @api_client.config.client_side_validation && validate_phone_number_kyc_address_request.nil? fail ArgumentError, "Missing the required parameter 'validate_phone_number_kyc_address_request' when calling PhoneNumbersApi.validate_phone_number_kyc_address" end # resource path local_var_path = '/v1/phone-numbers/kyc/validate-address' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_phone_number_kyc_address_request) # return_type return_type = opts[:debug_return_type] || 'ValidatePhoneNumberKycAddress200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.validate_phone_number_kyc_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#validate_phone_number_kyc_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#view_phone_number_kyc_document(document_id, opts = {}) ⇒ File
View a KYC document on file
Stream a document backing a reusable verification (the documentId values from GET /v1/phone-numbers/kyc reusable.options[].details[]), so the account holder can see what's on file before reusing it. Returned inline as application/pdf (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise 404.
1858 1859 1860 1861 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1858 def view_phone_number_kyc_document(document_id, opts = {}) data, _status_code, _headers = view_phone_number_kyc_document_with_http_info(document_id, opts) data end |
#view_phone_number_kyc_document_with_http_info(document_id, opts = {}) ⇒ Array<(File, Integer, Hash)>
View a KYC document on file Stream a document backing a reusable verification (the `documentId` values from GET /v1/phone-numbers/kyc `reusable.options.details`), so the account holder can see what's on file before reusing it. Returned inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise `404`.
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/zernio-sdk/api/phone_numbers_api.rb', line 1868 def view_phone_number_kyc_document_with_http_info(document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.view_phone_number_kyc_document ...' end # verify the required parameter 'document_id' is set if @api_client.config.client_side_validation && document_id.nil? fail ArgumentError, "Missing the required parameter 'document_id' when calling PhoneNumbersApi.view_phone_number_kyc_document" end # resource path local_var_path = '/v1/phone-numbers/kyc/document/{documentId}'.sub('{' + 'documentId' + '}', CGI.escape(document_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PhoneNumbersApi.view_phone_number_kyc_document", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneNumbersApi#view_phone_number_kyc_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |