zernio-sdk 0.0.532 → 0.0.534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/docs/CheckPhoneNumberPortability200ResponseResultsInner.md +5 -1
- data/docs/CreatePhoneNumberPortInRequest.md +4 -2
- data/docs/CreatePhoneNumberPortInRequestEndUser.md +8 -4
- data/docs/CreatePhoneNumberPortInRequestRequirementsInner.md +20 -0
- data/docs/GetPhoneNumberPortInOrderRequirements200Response.md +20 -0
- data/docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md +32 -0
- data/docs/GetPhoneNumberPortInRequirements200Response.md +24 -0
- data/docs/GetPhoneNumberPortInRequirements200ResponseFieldsInner.md +28 -0
- data/docs/PhoneNumbersApi.md +149 -5
- data/lib/zernio-sdk/api/phone_numbers_api.rb +148 -10
- data/lib/zernio-sdk/models/check_phone_number_portability200_response_results_inner.rb +24 -2
- data/lib/zernio-sdk/models/create_phone_number_port_in_request.rb +36 -5
- data/lib/zernio-sdk/models/create_phone_number_port_in_request_end_user.rb +65 -23
- data/lib/zernio-sdk/models/create_phone_number_port_in_request_requirements_inner.rb +201 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response.rb +158 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner.rb +247 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response.rb +177 -0
- data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response_fields_inner.rb +231 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +5 -0
- data/openapi.yaml +134 -19
- data/spec/api/phone_numbers_api_spec.rb +28 -3
- data/spec/models/check_phone_number_portability200_response_results_inner_spec.rb +12 -0
- data/spec/models/create_phone_number_port_in_request_end_user_spec.rb +13 -1
- data/spec/models/create_phone_number_port_in_request_requirements_inner_spec.rb +42 -0
- data/spec/models/create_phone_number_port_in_request_spec.rb +6 -0
- data/spec/models/get_phone_number_port_in_order_requirements200_response_requirements_inner_spec.rb +82 -0
- data/spec/models/get_phone_number_port_in_order_requirements200_response_spec.rb +42 -0
- data/spec/models/get_phone_number_port_in_requirements200_response_fields_inner_spec.rb +70 -0
- data/spec/models/get_phone_number_port_in_requirements200_response_spec.rb +54 -0
- metadata +21 -1
|
@@ -290,7 +290,7 @@ module Zernio
|
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
# Port numbers in
|
|
293
|
-
# 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. 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).
|
|
293
|
+
# 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.
|
|
294
294
|
# @param create_phone_number_port_in_request [CreatePhoneNumberPortInRequest]
|
|
295
295
|
# @param [Hash] opts the optional parameters
|
|
296
296
|
# @return [CreatePhoneNumberPortIn201Response]
|
|
@@ -300,7 +300,7 @@ module Zernio
|
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
# Port numbers in
|
|
303
|
-
# 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. 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).
|
|
303
|
+
# 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.
|
|
304
304
|
# @param create_phone_number_port_in_request [CreatePhoneNumberPortInRequest]
|
|
305
305
|
# @param [Hash] opts the optional parameters
|
|
306
306
|
# @return [Array<(CreatePhoneNumberPortIn201Response, Integer, Hash)>] CreatePhoneNumberPortIn201Response data, response status code and response headers
|
|
@@ -491,6 +491,148 @@ module Zernio
|
|
|
491
491
|
return data, status_code, headers
|
|
492
492
|
end
|
|
493
493
|
|
|
494
|
+
# A port-in order's pending requirements
|
|
495
|
+
# 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.
|
|
496
|
+
# @param id [String] Porting order ID (from the port-in list).
|
|
497
|
+
# @param [Hash] opts the optional parameters
|
|
498
|
+
# @return [GetPhoneNumberPortInOrderRequirements200Response]
|
|
499
|
+
def get_phone_number_port_in_order_requirements(id, opts = {})
|
|
500
|
+
data, _status_code, _headers = get_phone_number_port_in_order_requirements_with_http_info(id, opts)
|
|
501
|
+
data
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# A port-in order's pending requirements
|
|
505
|
+
# 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.
|
|
506
|
+
# @param id [String] Porting order ID (from the port-in list).
|
|
507
|
+
# @param [Hash] opts the optional parameters
|
|
508
|
+
# @return [Array<(GetPhoneNumberPortInOrderRequirements200Response, Integer, Hash)>] GetPhoneNumberPortInOrderRequirements200Response data, response status code and response headers
|
|
509
|
+
def get_phone_number_port_in_order_requirements_with_http_info(id, opts = {})
|
|
510
|
+
if @api_client.config.debugging
|
|
511
|
+
@api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_port_in_order_requirements ...'
|
|
512
|
+
end
|
|
513
|
+
# verify the required parameter 'id' is set
|
|
514
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
515
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.get_phone_number_port_in_order_requirements"
|
|
516
|
+
end
|
|
517
|
+
# resource path
|
|
518
|
+
local_var_path = '/v1/phone-numbers/port-in/{id}/requirements'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
519
|
+
|
|
520
|
+
# query parameters
|
|
521
|
+
query_params = opts[:query_params] || {}
|
|
522
|
+
|
|
523
|
+
# header parameters
|
|
524
|
+
header_params = opts[:header_params] || {}
|
|
525
|
+
# HTTP header 'Accept' (if needed)
|
|
526
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
527
|
+
|
|
528
|
+
# form parameters
|
|
529
|
+
form_params = opts[:form_params] || {}
|
|
530
|
+
|
|
531
|
+
# http body (model)
|
|
532
|
+
post_body = opts[:debug_body]
|
|
533
|
+
|
|
534
|
+
# return_type
|
|
535
|
+
return_type = opts[:debug_return_type] || 'GetPhoneNumberPortInOrderRequirements200Response'
|
|
536
|
+
|
|
537
|
+
# auth_names
|
|
538
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
539
|
+
|
|
540
|
+
new_options = opts.merge(
|
|
541
|
+
:operation => :"PhoneNumbersApi.get_phone_number_port_in_order_requirements",
|
|
542
|
+
:header_params => header_params,
|
|
543
|
+
:query_params => query_params,
|
|
544
|
+
:form_params => form_params,
|
|
545
|
+
:body => post_body,
|
|
546
|
+
:auth_names => auth_names,
|
|
547
|
+
:return_type => return_type
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
551
|
+
if @api_client.config.debugging
|
|
552
|
+
@api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_port_in_order_requirements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
553
|
+
end
|
|
554
|
+
return data, status_code, headers
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Country porting requirements
|
|
558
|
+
# 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.
|
|
559
|
+
# @param country [String] ISO country of the numbers being ported (a supported port-in country).
|
|
560
|
+
# @param [Hash] opts the optional parameters
|
|
561
|
+
# @option opts [String] :number_type The portability check's phoneNumberType — requirements differ by type. (default to 'local')
|
|
562
|
+
# @return [GetPhoneNumberPortInRequirements200Response]
|
|
563
|
+
def get_phone_number_port_in_requirements(country, opts = {})
|
|
564
|
+
data, _status_code, _headers = get_phone_number_port_in_requirements_with_http_info(country, opts)
|
|
565
|
+
data
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Country porting requirements
|
|
569
|
+
# 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.
|
|
570
|
+
# @param country [String] ISO country of the numbers being ported (a supported port-in country).
|
|
571
|
+
# @param [Hash] opts the optional parameters
|
|
572
|
+
# @option opts [String] :number_type The portability check's phoneNumberType — requirements differ by type. (default to 'local')
|
|
573
|
+
# @return [Array<(GetPhoneNumberPortInRequirements200Response, Integer, Hash)>] GetPhoneNumberPortInRequirements200Response data, response status code and response headers
|
|
574
|
+
def get_phone_number_port_in_requirements_with_http_info(country, opts = {})
|
|
575
|
+
if @api_client.config.debugging
|
|
576
|
+
@api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_port_in_requirements ...'
|
|
577
|
+
end
|
|
578
|
+
# verify the required parameter 'country' is set
|
|
579
|
+
if @api_client.config.client_side_validation && country.nil?
|
|
580
|
+
fail ArgumentError, "Missing the required parameter 'country' when calling PhoneNumbersApi.get_phone_number_port_in_requirements"
|
|
581
|
+
end
|
|
582
|
+
if @api_client.config.client_side_validation && country.to_s.length > 2
|
|
583
|
+
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.'
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
if @api_client.config.client_side_validation && country.to_s.length < 2
|
|
587
|
+
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.'
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
allowable_values = ["local", "mobile", "national", "toll_free"]
|
|
591
|
+
if @api_client.config.client_side_validation && opts[:'number_type'] && !allowable_values.include?(opts[:'number_type'])
|
|
592
|
+
fail ArgumentError, "invalid value for \"number_type\", must be one of #{allowable_values}"
|
|
593
|
+
end
|
|
594
|
+
# resource path
|
|
595
|
+
local_var_path = '/v1/phone-numbers/port-in/requirements'
|
|
596
|
+
|
|
597
|
+
# query parameters
|
|
598
|
+
query_params = opts[:query_params] || {}
|
|
599
|
+
query_params[:'country'] = country
|
|
600
|
+
query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil?
|
|
601
|
+
|
|
602
|
+
# header parameters
|
|
603
|
+
header_params = opts[:header_params] || {}
|
|
604
|
+
# HTTP header 'Accept' (if needed)
|
|
605
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
606
|
+
|
|
607
|
+
# form parameters
|
|
608
|
+
form_params = opts[:form_params] || {}
|
|
609
|
+
|
|
610
|
+
# http body (model)
|
|
611
|
+
post_body = opts[:debug_body]
|
|
612
|
+
|
|
613
|
+
# return_type
|
|
614
|
+
return_type = opts[:debug_return_type] || 'GetPhoneNumberPortInRequirements200Response'
|
|
615
|
+
|
|
616
|
+
# auth_names
|
|
617
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
618
|
+
|
|
619
|
+
new_options = opts.merge(
|
|
620
|
+
:operation => :"PhoneNumbersApi.get_phone_number_port_in_requirements",
|
|
621
|
+
:header_params => header_params,
|
|
622
|
+
:query_params => query_params,
|
|
623
|
+
:form_params => form_params,
|
|
624
|
+
:body => post_body,
|
|
625
|
+
:auth_names => auth_names,
|
|
626
|
+
:return_type => return_type
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
630
|
+
if @api_client.config.debugging
|
|
631
|
+
@api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_port_in_requirements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
632
|
+
end
|
|
633
|
+
return data, status_code, headers
|
|
634
|
+
end
|
|
635
|
+
|
|
494
636
|
# Get declined requirements
|
|
495
637
|
# 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.
|
|
496
638
|
# @param id [String] Phone number record ID.
|
|
@@ -1234,10 +1376,10 @@ module Zernio
|
|
|
1234
1376
|
end
|
|
1235
1377
|
|
|
1236
1378
|
# Upload a porting document
|
|
1237
|
-
# Upload ONE porting document
|
|
1379
|
+
# 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.
|
|
1238
1380
|
# @param file [File] The document (PDF/JPEG/PNG, 10MB max).
|
|
1239
1381
|
# @param [Hash] opts the optional parameters
|
|
1240
|
-
# @option opts [String] :kind Informational; used for the stored filename.
|
|
1382
|
+
# @option opts [String] :kind 'loa', 'invoice', or any short slug for requirement documents. Informational; used for the stored filename.
|
|
1241
1383
|
# @return [UploadPhoneNumberPortInDocument200Response]
|
|
1242
1384
|
def upload_phone_number_port_in_document(file, opts = {})
|
|
1243
1385
|
data, _status_code, _headers = upload_phone_number_port_in_document_with_http_info(file, opts)
|
|
@@ -1245,10 +1387,10 @@ module Zernio
|
|
|
1245
1387
|
end
|
|
1246
1388
|
|
|
1247
1389
|
# Upload a porting document
|
|
1248
|
-
# Upload ONE porting document
|
|
1390
|
+
# 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.
|
|
1249
1391
|
# @param file [File] The document (PDF/JPEG/PNG, 10MB max).
|
|
1250
1392
|
# @param [Hash] opts the optional parameters
|
|
1251
|
-
# @option opts [String] :kind Informational; used for the stored filename.
|
|
1393
|
+
# @option opts [String] :kind 'loa', 'invoice', or any short slug for requirement documents. Informational; used for the stored filename.
|
|
1252
1394
|
# @return [Array<(UploadPhoneNumberPortInDocument200Response, Integer, Hash)>] UploadPhoneNumberPortInDocument200Response data, response status code and response headers
|
|
1253
1395
|
def upload_phone_number_port_in_document_with_http_info(file, opts = {})
|
|
1254
1396
|
if @api_client.config.debugging
|
|
@@ -1258,10 +1400,6 @@ module Zernio
|
|
|
1258
1400
|
if @api_client.config.client_side_validation && file.nil?
|
|
1259
1401
|
fail ArgumentError, "Missing the required parameter 'file' when calling PhoneNumbersApi.upload_phone_number_port_in_document"
|
|
1260
1402
|
end
|
|
1261
|
-
allowable_values = ["loa", "invoice"]
|
|
1262
|
-
if @api_client.config.client_side_validation && opts[:'kind'] && !allowable_values.include?(opts[:'kind'])
|
|
1263
|
-
fail ArgumentError, "invalid value for \"kind\", must be one of #{allowable_values}"
|
|
1264
|
-
end
|
|
1265
1403
|
# resource path
|
|
1266
1404
|
local_var_path = '/v1/phone-numbers/port-in/documents'
|
|
1267
1405
|
|
|
@@ -22,9 +22,15 @@ module Zernio
|
|
|
22
22
|
# Qualifies for the carrier's accelerated FastPort lane.
|
|
23
23
|
attr_accessor :fast_portable
|
|
24
24
|
|
|
25
|
-
# Line type when known (mobile, landline, voip…). A mobile number requires the transfer PIN at submit.
|
|
25
|
+
# Line type when known (mobile, landline, voip…). A US/CA mobile number requires the transfer PIN at submit.
|
|
26
26
|
attr_accessor :line_type
|
|
27
27
|
|
|
28
|
+
# ISO country of the number — pass it to GET /v1/phone-numbers/port-in/requirements for international numbers.
|
|
29
|
+
attr_accessor :country_code
|
|
30
|
+
|
|
31
|
+
# Carrier number-type classification (local, mobile, national, toll_free…) — the numberType for the requirements endpoint.
|
|
32
|
+
attr_accessor :phone_number_type
|
|
33
|
+
|
|
28
34
|
# Carrier reason when not portable; null when portable.
|
|
29
35
|
attr_accessor :not_portable_reason
|
|
30
36
|
|
|
@@ -35,6 +41,8 @@ module Zernio
|
|
|
35
41
|
:'portable' => :'portable',
|
|
36
42
|
:'fast_portable' => :'fastPortable',
|
|
37
43
|
:'line_type' => :'lineType',
|
|
44
|
+
:'country_code' => :'countryCode',
|
|
45
|
+
:'phone_number_type' => :'phoneNumberType',
|
|
38
46
|
:'not_portable_reason' => :'notPortableReason'
|
|
39
47
|
}
|
|
40
48
|
end
|
|
@@ -56,6 +64,8 @@ module Zernio
|
|
|
56
64
|
:'portable' => :'Boolean',
|
|
57
65
|
:'fast_portable' => :'Boolean',
|
|
58
66
|
:'line_type' => :'String',
|
|
67
|
+
:'country_code' => :'String',
|
|
68
|
+
:'phone_number_type' => :'String',
|
|
59
69
|
:'not_portable_reason' => :'String'
|
|
60
70
|
}
|
|
61
71
|
end
|
|
@@ -64,6 +74,8 @@ module Zernio
|
|
|
64
74
|
def self.openapi_nullable
|
|
65
75
|
Set.new([
|
|
66
76
|
:'line_type',
|
|
77
|
+
:'country_code',
|
|
78
|
+
:'phone_number_type',
|
|
67
79
|
:'not_portable_reason'
|
|
68
80
|
])
|
|
69
81
|
end
|
|
@@ -100,6 +112,14 @@ module Zernio
|
|
|
100
112
|
self.line_type = attributes[:'line_type']
|
|
101
113
|
end
|
|
102
114
|
|
|
115
|
+
if attributes.key?(:'country_code')
|
|
116
|
+
self.country_code = attributes[:'country_code']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'phone_number_type')
|
|
120
|
+
self.phone_number_type = attributes[:'phone_number_type']
|
|
121
|
+
end
|
|
122
|
+
|
|
103
123
|
if attributes.key?(:'not_portable_reason')
|
|
104
124
|
self.not_portable_reason = attributes[:'not_portable_reason']
|
|
105
125
|
end
|
|
@@ -129,6 +149,8 @@ module Zernio
|
|
|
129
149
|
portable == o.portable &&
|
|
130
150
|
fast_portable == o.fast_portable &&
|
|
131
151
|
line_type == o.line_type &&
|
|
152
|
+
country_code == o.country_code &&
|
|
153
|
+
phone_number_type == o.phone_number_type &&
|
|
132
154
|
not_portable_reason == o.not_portable_reason
|
|
133
155
|
end
|
|
134
156
|
|
|
@@ -141,7 +163,7 @@ module Zernio
|
|
|
141
163
|
# Calculates hash code according to all attributes.
|
|
142
164
|
# @return [Integer] Hash code
|
|
143
165
|
def hash
|
|
144
|
-
[phone_number, portable, fast_portable, line_type, not_portable_reason].hash
|
|
166
|
+
[phone_number, portable, fast_portable, line_type, country_code, phone_number_type, not_portable_reason].hash
|
|
145
167
|
end
|
|
146
168
|
|
|
147
169
|
# Builds the object from hash
|
|
@@ -26,7 +26,7 @@ module Zernio
|
|
|
26
26
|
# Document id from POST /v1/phone-numbers/port-in/documents (kind=invoice).
|
|
27
27
|
attr_accessor :invoice_document_id
|
|
28
28
|
|
|
29
|
-
# Requested port date; the carrier confirms the actual FOC later.
|
|
29
|
+
# Requested port date; the carrier confirms the actual FOC later. US/CA default is one week out (shifted off weekends); international orders are scheduled into the carrier's next allowed porting window at or after this date.
|
|
30
30
|
attr_accessor :foc_datetime_requested
|
|
31
31
|
|
|
32
32
|
attr_accessor :customer_reference
|
|
@@ -34,6 +34,9 @@ module Zernio
|
|
|
34
34
|
# Whether the losing account ports all its numbers (full) or keeps some (partial).
|
|
35
35
|
attr_accessor :port_type
|
|
36
36
|
|
|
37
|
+
# Country-specific requirement values for international ports (from GET /v1/phone-numbers/port-in/requirements). Not needed for US/CA. The LOA and invoice requirements are satisfied automatically by loaDocumentId/invoiceDocumentId, and address-type requirements by the endUser service address.
|
|
38
|
+
attr_accessor :requirements
|
|
39
|
+
|
|
37
40
|
class EnumAttributeValidator
|
|
38
41
|
attr_reader :datatype
|
|
39
42
|
attr_reader :allowable_values
|
|
@@ -65,7 +68,8 @@ module Zernio
|
|
|
65
68
|
:'invoice_document_id' => :'invoiceDocumentId',
|
|
66
69
|
:'foc_datetime_requested' => :'focDatetimeRequested',
|
|
67
70
|
:'customer_reference' => :'customerReference',
|
|
68
|
-
:'port_type' => :'portType'
|
|
71
|
+
:'port_type' => :'portType',
|
|
72
|
+
:'requirements' => :'requirements'
|
|
69
73
|
}
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -88,7 +92,8 @@ module Zernio
|
|
|
88
92
|
:'invoice_document_id' => :'String',
|
|
89
93
|
:'foc_datetime_requested' => :'Time',
|
|
90
94
|
:'customer_reference' => :'String',
|
|
91
|
-
:'port_type' => :'String'
|
|
95
|
+
:'port_type' => :'String',
|
|
96
|
+
:'requirements' => :'Array<CreatePhoneNumberPortInRequestRequirementsInner>'
|
|
92
97
|
}
|
|
93
98
|
end
|
|
94
99
|
|
|
@@ -153,6 +158,12 @@ module Zernio
|
|
|
153
158
|
else
|
|
154
159
|
self.port_type = 'full'
|
|
155
160
|
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'requirements')
|
|
163
|
+
if (value = attributes[:'requirements']).is_a?(Array)
|
|
164
|
+
self.requirements = value
|
|
165
|
+
end
|
|
166
|
+
end
|
|
156
167
|
end
|
|
157
168
|
|
|
158
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -188,6 +199,10 @@ module Zernio
|
|
|
188
199
|
invalid_properties.push('invalid value for "customer_reference", the character length must be smaller than or equal to 100.')
|
|
189
200
|
end
|
|
190
201
|
|
|
202
|
+
if !@requirements.nil? && @requirements.length > 30
|
|
203
|
+
invalid_properties.push('invalid value for "requirements", number of items must be less than or equal to 30.')
|
|
204
|
+
end
|
|
205
|
+
|
|
191
206
|
invalid_properties
|
|
192
207
|
end
|
|
193
208
|
|
|
@@ -204,6 +219,7 @@ module Zernio
|
|
|
204
219
|
return false if !@customer_reference.nil? && @customer_reference.to_s.length > 100
|
|
205
220
|
port_type_validator = EnumAttributeValidator.new('String', ["full", "partial"])
|
|
206
221
|
return false unless port_type_validator.valid?(@port_type)
|
|
222
|
+
return false if !@requirements.nil? && @requirements.length > 30
|
|
207
223
|
true
|
|
208
224
|
end
|
|
209
225
|
|
|
@@ -279,6 +295,20 @@ module Zernio
|
|
|
279
295
|
@port_type = port_type
|
|
280
296
|
end
|
|
281
297
|
|
|
298
|
+
# Custom attribute writer method with validation
|
|
299
|
+
# @param [Object] requirements Value to be assigned
|
|
300
|
+
def requirements=(requirements)
|
|
301
|
+
if requirements.nil?
|
|
302
|
+
fail ArgumentError, 'requirements cannot be nil'
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if requirements.length > 30
|
|
306
|
+
fail ArgumentError, 'invalid value for "requirements", number of items must be less than or equal to 30.'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
@requirements = requirements
|
|
310
|
+
end
|
|
311
|
+
|
|
282
312
|
# Checks equality by comparing each attribute.
|
|
283
313
|
# @param [Object] Object to be compared
|
|
284
314
|
def ==(o)
|
|
@@ -290,7 +320,8 @@ module Zernio
|
|
|
290
320
|
invoice_document_id == o.invoice_document_id &&
|
|
291
321
|
foc_datetime_requested == o.foc_datetime_requested &&
|
|
292
322
|
customer_reference == o.customer_reference &&
|
|
293
|
-
port_type == o.port_type
|
|
323
|
+
port_type == o.port_type &&
|
|
324
|
+
requirements == o.requirements
|
|
294
325
|
end
|
|
295
326
|
|
|
296
327
|
# @see the `==` method
|
|
@@ -302,7 +333,7 @@ module Zernio
|
|
|
302
333
|
# Calculates hash code according to all attributes.
|
|
303
334
|
# @return [Integer] Hash code
|
|
304
335
|
def hash
|
|
305
|
-
[phone_numbers, end_user, loa_document_id, invoice_document_id, foc_datetime_requested, customer_reference, port_type].hash
|
|
336
|
+
[phone_numbers, end_user, loa_document_id, invoice_document_id, foc_datetime_requested, customer_reference, port_type, requirements].hash
|
|
306
337
|
end
|
|
307
338
|
|
|
308
339
|
# Builds the object from hash
|
|
@@ -28,21 +28,28 @@ module Zernio
|
|
|
28
28
|
# Account number with the losing carrier — required (carriers reject ports without it; on prepaid mobile plans it is often the phone number itself).
|
|
29
29
|
attr_accessor :account_number
|
|
30
30
|
|
|
31
|
-
# Transfer PIN. Required for mobile numbers (wireless carriers reject PIN-less ports). Forwarded to the carrier, never stored.
|
|
31
|
+
# Transfer PIN. Required for US/CA mobile numbers (wireless carriers reject PIN-less ports). Forwarded to the carrier, never stored. International porting codes (e.g. the UK PAC) go through `requirements` instead.
|
|
32
32
|
attr_accessor :pin_passcode
|
|
33
33
|
|
|
34
|
+
# Company tax id on the carrier account (EU ports, e.g. Spanish CIF).
|
|
35
|
+
attr_accessor :tax_identifier
|
|
36
|
+
|
|
37
|
+
# Business registration id on the carrier account (EU ports).
|
|
38
|
+
attr_accessor :business_identifier
|
|
39
|
+
|
|
34
40
|
attr_accessor :street_address
|
|
35
41
|
|
|
36
42
|
attr_accessor :extended_address
|
|
37
43
|
|
|
38
44
|
attr_accessor :locality
|
|
39
45
|
|
|
40
|
-
# 2-letter
|
|
46
|
+
# Region. Required for US/CA as the 2-letter state/province code (full names are accepted and normalized); optional elsewhere.
|
|
41
47
|
attr_accessor :administrative_area
|
|
42
48
|
|
|
43
|
-
# US ZIP
|
|
49
|
+
# Postal code. Validated as a US ZIP / Canadian postal code for US/CA; free-form elsewhere.
|
|
44
50
|
attr_accessor :postal_code
|
|
45
51
|
|
|
52
|
+
# Service-address country (a supported port-in country).
|
|
46
53
|
attr_accessor :country_code
|
|
47
54
|
|
|
48
55
|
class EnumAttributeValidator
|
|
@@ -75,6 +82,8 @@ module Zernio
|
|
|
75
82
|
:'billing_phone_number' => :'billingPhoneNumber',
|
|
76
83
|
:'account_number' => :'accountNumber',
|
|
77
84
|
:'pin_passcode' => :'pinPasscode',
|
|
85
|
+
:'tax_identifier' => :'taxIdentifier',
|
|
86
|
+
:'business_identifier' => :'businessIdentifier',
|
|
78
87
|
:'street_address' => :'streetAddress',
|
|
79
88
|
:'extended_address' => :'extendedAddress',
|
|
80
89
|
:'locality' => :'locality',
|
|
@@ -102,6 +111,8 @@ module Zernio
|
|
|
102
111
|
:'billing_phone_number' => :'String',
|
|
103
112
|
:'account_number' => :'String',
|
|
104
113
|
:'pin_passcode' => :'String',
|
|
114
|
+
:'tax_identifier' => :'String',
|
|
115
|
+
:'business_identifier' => :'String',
|
|
105
116
|
:'street_address' => :'String',
|
|
106
117
|
:'extended_address' => :'String',
|
|
107
118
|
:'locality' => :'String',
|
|
@@ -159,6 +170,14 @@ module Zernio
|
|
|
159
170
|
self.pin_passcode = attributes[:'pin_passcode']
|
|
160
171
|
end
|
|
161
172
|
|
|
173
|
+
if attributes.key?(:'tax_identifier')
|
|
174
|
+
self.tax_identifier = attributes[:'tax_identifier']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'business_identifier')
|
|
178
|
+
self.business_identifier = attributes[:'business_identifier']
|
|
179
|
+
end
|
|
180
|
+
|
|
162
181
|
if attributes.key?(:'street_address')
|
|
163
182
|
self.street_address = attributes[:'street_address']
|
|
164
183
|
else
|
|
@@ -177,8 +196,6 @@ module Zernio
|
|
|
177
196
|
|
|
178
197
|
if attributes.key?(:'administrative_area')
|
|
179
198
|
self.administrative_area = attributes[:'administrative_area']
|
|
180
|
-
else
|
|
181
|
-
self.administrative_area = nil
|
|
182
199
|
end
|
|
183
200
|
|
|
184
201
|
if attributes.key?(:'postal_code')
|
|
@@ -211,6 +228,14 @@ module Zernio
|
|
|
211
228
|
invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
|
|
212
229
|
end
|
|
213
230
|
|
|
231
|
+
if !@tax_identifier.nil? && @tax_identifier.to_s.length > 50
|
|
232
|
+
invalid_properties.push('invalid value for "tax_identifier", the character length must be smaller than or equal to 50.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if !@business_identifier.nil? && @business_identifier.to_s.length > 50
|
|
236
|
+
invalid_properties.push('invalid value for "business_identifier", the character length must be smaller than or equal to 50.')
|
|
237
|
+
end
|
|
238
|
+
|
|
214
239
|
if @street_address.nil?
|
|
215
240
|
invalid_properties.push('invalid value for "street_address", street_address cannot be nil.')
|
|
216
241
|
end
|
|
@@ -219,10 +244,6 @@ module Zernio
|
|
|
219
244
|
invalid_properties.push('invalid value for "locality", locality cannot be nil.')
|
|
220
245
|
end
|
|
221
246
|
|
|
222
|
-
if @administrative_area.nil?
|
|
223
|
-
invalid_properties.push('invalid value for "administrative_area", administrative_area cannot be nil.')
|
|
224
|
-
end
|
|
225
|
-
|
|
226
247
|
if @postal_code.nil?
|
|
227
248
|
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
|
228
249
|
end
|
|
@@ -249,12 +270,13 @@ module Zernio
|
|
|
249
270
|
return false if @entity_name.nil?
|
|
250
271
|
return false if @auth_person_name.nil?
|
|
251
272
|
return false if @account_number.nil?
|
|
273
|
+
return false if !@tax_identifier.nil? && @tax_identifier.to_s.length > 50
|
|
274
|
+
return false if !@business_identifier.nil? && @business_identifier.to_s.length > 50
|
|
252
275
|
return false if @street_address.nil?
|
|
253
276
|
return false if @locality.nil?
|
|
254
|
-
return false if @administrative_area.nil?
|
|
255
277
|
return false if @postal_code.nil?
|
|
256
278
|
return false if @country_code.nil?
|
|
257
|
-
country_code_validator = EnumAttributeValidator.new('String', ["US", "CA"])
|
|
279
|
+
country_code_validator = EnumAttributeValidator.new('String', ["US", "CA", "GB", "ES", "DE", "FR", "NL", "AU"])
|
|
258
280
|
return false unless country_code_validator.valid?(@country_code)
|
|
259
281
|
return false if @country_code.to_s.length > 2
|
|
260
282
|
return false if @country_code.to_s.length < 2
|
|
@@ -291,6 +313,34 @@ module Zernio
|
|
|
291
313
|
@account_number = account_number
|
|
292
314
|
end
|
|
293
315
|
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] tax_identifier Value to be assigned
|
|
318
|
+
def tax_identifier=(tax_identifier)
|
|
319
|
+
if tax_identifier.nil?
|
|
320
|
+
fail ArgumentError, 'tax_identifier cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if tax_identifier.to_s.length > 50
|
|
324
|
+
fail ArgumentError, 'invalid value for "tax_identifier", the character length must be smaller than or equal to 50.'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@tax_identifier = tax_identifier
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] business_identifier Value to be assigned
|
|
332
|
+
def business_identifier=(business_identifier)
|
|
333
|
+
if business_identifier.nil?
|
|
334
|
+
fail ArgumentError, 'business_identifier cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if business_identifier.to_s.length > 50
|
|
338
|
+
fail ArgumentError, 'invalid value for "business_identifier", the character length must be smaller than or equal to 50.'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@business_identifier = business_identifier
|
|
342
|
+
end
|
|
343
|
+
|
|
294
344
|
# Custom attribute writer method with validation
|
|
295
345
|
# @param [Object] street_address Value to be assigned
|
|
296
346
|
def street_address=(street_address)
|
|
@@ -311,16 +361,6 @@ module Zernio
|
|
|
311
361
|
@locality = locality
|
|
312
362
|
end
|
|
313
363
|
|
|
314
|
-
# Custom attribute writer method with validation
|
|
315
|
-
# @param [Object] administrative_area Value to be assigned
|
|
316
|
-
def administrative_area=(administrative_area)
|
|
317
|
-
if administrative_area.nil?
|
|
318
|
-
fail ArgumentError, 'administrative_area cannot be nil'
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
@administrative_area = administrative_area
|
|
322
|
-
end
|
|
323
|
-
|
|
324
364
|
# Custom attribute writer method with validation
|
|
325
365
|
# @param [Object] postal_code Value to be assigned
|
|
326
366
|
def postal_code=(postal_code)
|
|
@@ -334,7 +374,7 @@ module Zernio
|
|
|
334
374
|
# Custom attribute writer method checking allowed values (enum).
|
|
335
375
|
# @param [Object] country_code Object to be assigned
|
|
336
376
|
def country_code=(country_code)
|
|
337
|
-
validator = EnumAttributeValidator.new('String', ["US", "CA"])
|
|
377
|
+
validator = EnumAttributeValidator.new('String', ["US", "CA", "GB", "ES", "DE", "FR", "NL", "AU"])
|
|
338
378
|
unless validator.valid?(country_code)
|
|
339
379
|
fail ArgumentError, "invalid value for \"country_code\", must be one of #{validator.allowable_values}."
|
|
340
380
|
end
|
|
@@ -351,6 +391,8 @@ module Zernio
|
|
|
351
391
|
billing_phone_number == o.billing_phone_number &&
|
|
352
392
|
account_number == o.account_number &&
|
|
353
393
|
pin_passcode == o.pin_passcode &&
|
|
394
|
+
tax_identifier == o.tax_identifier &&
|
|
395
|
+
business_identifier == o.business_identifier &&
|
|
354
396
|
street_address == o.street_address &&
|
|
355
397
|
extended_address == o.extended_address &&
|
|
356
398
|
locality == o.locality &&
|
|
@@ -368,7 +410,7 @@ module Zernio
|
|
|
368
410
|
# Calculates hash code according to all attributes.
|
|
369
411
|
# @return [Integer] Hash code
|
|
370
412
|
def hash
|
|
371
|
-
[entity_name, auth_person_name, billing_phone_number, account_number, pin_passcode, street_address, extended_address, locality, administrative_area, postal_code, country_code].hash
|
|
413
|
+
[entity_name, auth_person_name, billing_phone_number, account_number, pin_passcode, tax_identifier, business_identifier, street_address, extended_address, locality, administrative_area, postal_code, country_code].hash
|
|
372
414
|
end
|
|
373
415
|
|
|
374
416
|
# Builds the object from hash
|