late-sdk 0.0.532 → 0.0.533

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/docs/CheckPhoneNumberPortability200ResponseResultsInner.md +5 -1
  4. data/docs/CreatePhoneNumberPortInRequest.md +4 -2
  5. data/docs/CreatePhoneNumberPortInRequestEndUser.md +8 -4
  6. data/docs/CreatePhoneNumberPortInRequestRequirementsInner.md +20 -0
  7. data/docs/GetPhoneNumberPortInOrderRequirements200Response.md +20 -0
  8. data/docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md +32 -0
  9. data/docs/GetPhoneNumberPortInRequirements200Response.md +24 -0
  10. data/docs/GetPhoneNumberPortInRequirements200ResponseFieldsInner.md +28 -0
  11. data/docs/PhoneNumbersApi.md +149 -5
  12. data/lib/zernio-sdk/api/phone_numbers_api.rb +148 -10
  13. data/lib/zernio-sdk/models/check_phone_number_portability200_response_results_inner.rb +24 -2
  14. data/lib/zernio-sdk/models/create_phone_number_port_in_request.rb +36 -5
  15. data/lib/zernio-sdk/models/create_phone_number_port_in_request_end_user.rb +65 -23
  16. data/lib/zernio-sdk/models/create_phone_number_port_in_request_requirements_inner.rb +201 -0
  17. data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response.rb +158 -0
  18. data/lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner.rb +247 -0
  19. data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response.rb +177 -0
  20. data/lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response_fields_inner.rb +231 -0
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +5 -0
  23. data/openapi.yaml +133 -16
  24. data/spec/api/phone_numbers_api_spec.rb +28 -3
  25. data/spec/models/check_phone_number_portability200_response_results_inner_spec.rb +12 -0
  26. data/spec/models/create_phone_number_port_in_request_end_user_spec.rb +13 -1
  27. data/spec/models/create_phone_number_port_in_request_requirements_inner_spec.rb +42 -0
  28. data/spec/models/create_phone_number_port_in_request_spec.rb +6 -0
  29. data/spec/models/get_phone_number_port_in_order_requirements200_response_requirements_inner_spec.rb +82 -0
  30. data/spec/models/get_phone_number_port_in_order_requirements200_response_spec.rb +42 -0
  31. data/spec/models/get_phone_number_port_in_requirements200_response_fields_inner_spec.rb +70 -0
  32. data/spec/models/get_phone_number_port_in_requirements200_response_spec.rb +54 -0
  33. data/zernio-sdk-0.0.533.gem +0 -0
  34. metadata +22 -2
  35. data/zernio-sdk-0.0.532.gem +0 -0
@@ -0,0 +1,177 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetPhoneNumberPortInRequirements200Response < ApiModelBase
18
+ attr_accessor :country
19
+
20
+ attr_accessor :number_type
21
+
22
+ # false when the combination includes a step that can't be completed through the API (e.g. an in-person identity verification) — porting it needs support.
23
+ attr_accessor :supported
24
+
25
+ attr_accessor :fields
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'country' => :'country',
31
+ :'number_type' => :'numberType',
32
+ :'supported' => :'supported',
33
+ :'fields' => :'fields'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'country' => :'String',
51
+ :'number_type' => :'String',
52
+ :'supported' => :'Boolean',
53
+ :'fields' => :'Array<GetPhoneNumberPortInRequirements200ResponseFieldsInner>'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetPhoneNumberPortInRequirements200Response` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetPhoneNumberPortInRequirements200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'country')
80
+ self.country = attributes[:'country']
81
+ end
82
+
83
+ if attributes.key?(:'number_type')
84
+ self.number_type = attributes[:'number_type']
85
+ end
86
+
87
+ if attributes.key?(:'supported')
88
+ self.supported = attributes[:'supported']
89
+ end
90
+
91
+ if attributes.key?(:'fields')
92
+ if (value = attributes[:'fields']).is_a?(Array)
93
+ self.fields = value
94
+ end
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ country == o.country &&
119
+ number_type == o.number_type &&
120
+ supported == o.supported &&
121
+ fields == o.fields
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [country, number_type, supported, fields].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
151
+ end
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
154
+ end
155
+ end
156
+ new(transformed_hash)
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ if value.nil?
166
+ is_nullable = self.class.openapi_nullable.include?(attr)
167
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
168
+ end
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ end
176
+
177
+ end
@@ -0,0 +1,231 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetPhoneNumberPortInRequirements200ResponseFieldsInner < ApiModelBase
18
+ # Pass back as requirements[].requirementTypeId.
19
+ attr_accessor :requirement_id
20
+
21
+ attr_accessor :label
22
+
23
+ # text/date take a string value; file takes a documentId from the documents endpoint; address is satisfied automatically from the end-user service address.
24
+ attr_accessor :kind
25
+
26
+ attr_accessor :description
27
+
28
+ attr_accessor :example
29
+
30
+ # When present, the value must be one of these.
31
+ attr_accessor :acceptable_values
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'requirement_id' => :'requirementId',
59
+ :'label' => :'label',
60
+ :'kind' => :'kind',
61
+ :'description' => :'description',
62
+ :'example' => :'example',
63
+ :'acceptable_values' => :'acceptableValues'
64
+ }
65
+ end
66
+
67
+ # Returns attribute mapping this model knows about
68
+ def self.acceptable_attribute_map
69
+ attribute_map
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ acceptable_attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'requirement_id' => :'String',
81
+ :'label' => :'String',
82
+ :'kind' => :'String',
83
+ :'description' => :'String',
84
+ :'example' => :'String',
85
+ :'acceptable_values' => :'Array<String>'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ ])
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetPhoneNumberPortInRequirements200ResponseFieldsInner` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ acceptable_attribute_map = self.class.acceptable_attribute_map
104
+ attributes = attributes.each_with_object({}) { |(k, v), h|
105
+ if (!acceptable_attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetPhoneNumberPortInRequirements200ResponseFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
107
+ end
108
+ h[k.to_sym] = v
109
+ }
110
+
111
+ if attributes.key?(:'requirement_id')
112
+ self.requirement_id = attributes[:'requirement_id']
113
+ end
114
+
115
+ if attributes.key?(:'label')
116
+ self.label = attributes[:'label']
117
+ end
118
+
119
+ if attributes.key?(:'kind')
120
+ self.kind = attributes[:'kind']
121
+ end
122
+
123
+ if attributes.key?(:'description')
124
+ self.description = attributes[:'description']
125
+ end
126
+
127
+ if attributes.key?(:'example')
128
+ self.example = attributes[:'example']
129
+ end
130
+
131
+ if attributes.key?(:'acceptable_values')
132
+ if (value = attributes[:'acceptable_values']).is_a?(Array)
133
+ self.acceptable_values = value
134
+ end
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
142
+ invalid_properties = Array.new
143
+ invalid_properties
144
+ end
145
+
146
+ # Check to see if the all the properties in the model are valid
147
+ # @return true if the model is valid
148
+ def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
150
+ kind_validator = EnumAttributeValidator.new('String', ["text", "date", "address", "file", "action"])
151
+ return false unless kind_validator.valid?(@kind)
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method checking allowed values (enum).
156
+ # @param [Object] kind Object to be assigned
157
+ def kind=(kind)
158
+ validator = EnumAttributeValidator.new('String', ["text", "date", "address", "file", "action"])
159
+ unless validator.valid?(kind)
160
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
161
+ end
162
+ @kind = kind
163
+ end
164
+
165
+ # Checks equality by comparing each attribute.
166
+ # @param [Object] Object to be compared
167
+ def ==(o)
168
+ return true if self.equal?(o)
169
+ self.class == o.class &&
170
+ requirement_id == o.requirement_id &&
171
+ label == o.label &&
172
+ kind == o.kind &&
173
+ description == o.description &&
174
+ example == o.example &&
175
+ acceptable_values == o.acceptable_values
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [requirement_id, label, kind, description, example, acceptable_values].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ return nil unless attributes.is_a?(Hash)
195
+ attributes = attributes.transform_keys(&:to_sym)
196
+ transformed_hash = {}
197
+ openapi_types.each_pair do |key, type|
198
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = nil
200
+ elsif type =~ /\AArray<(.*)>/i
201
+ # check to ensure the input is an array given that the attribute
202
+ # is documented as an array but the input is not
203
+ if attributes[attribute_map[key]].is_a?(Array)
204
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
205
+ end
206
+ elsif !attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
208
+ end
209
+ end
210
+ new(transformed_hash)
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.532'
14
+ VERSION = '0.0.533'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -216,6 +216,7 @@ require 'zernio-sdk/models/create_phone_number_port_in201_response'
216
216
  require 'zernio-sdk/models/create_phone_number_port_in201_response_orders_inner'
217
217
  require 'zernio-sdk/models/create_phone_number_port_in_request'
218
218
  require 'zernio-sdk/models/create_phone_number_port_in_request_end_user'
219
+ require 'zernio-sdk/models/create_phone_number_port_in_request_requirements_inner'
219
220
  require 'zernio-sdk/models/create_pinterest_board201_response'
220
221
  require 'zernio-sdk/models/create_pinterest_board201_response_board'
221
222
  require 'zernio-sdk/models/create_pinterest_board_request'
@@ -587,6 +588,10 @@ require 'zernio-sdk/models/get_phone_number_kyc_form200_response_fields_inner'
587
588
  require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable'
588
589
  require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_details_inner'
589
590
  require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner'
591
+ require 'zernio-sdk/models/get_phone_number_port_in_order_requirements200_response'
592
+ require 'zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner'
593
+ require 'zernio-sdk/models/get_phone_number_port_in_requirements200_response'
594
+ require 'zernio-sdk/models/get_phone_number_port_in_requirements200_response_fields_inner'
590
595
  require 'zernio-sdk/models/get_phone_number_remediation200_response'
591
596
  require 'zernio-sdk/models/get_pinterest_boards200_response'
592
597
  require 'zernio-sdk/models/get_pinterest_boards200_response_boards_inner'
data/openapi.yaml CHANGED
@@ -28201,10 +28201,18 @@ paths:
28201
28201
 
28202
28202
  Run the portability check (POST /v1/phone-numbers/port-in/check) and
28203
28203
  upload the two documents (POST /v1/phone-numbers/port-in/documents)
28204
- first. The carrier may split the numbers into several orders (by
28205
- country, number type, losing carrier); `orders` carries per-order
28206
- results, and a partial failure still returns 201 with the failed
28207
- orders' `error` set (they stay as cancellable drafts).
28204
+ first — uploaded documents must be attached to an order within 30
28205
+ minutes or the carrier deletes them, so upload right before this call.
28206
+ The carrier may split the numbers into several orders (by country,
28207
+ number type, losing carrier); `orders` carries per-order results, and a
28208
+ partial failure still returns 201 with the failed orders' `error` set
28209
+ (they stay as cancellable drafts).
28210
+
28211
+ Non-US/CA numbers additionally need the country-specific values from
28212
+ GET /v1/phone-numbers/port-in/requirements, passed via `requirements`,
28213
+ and must be submitted one country per request. When required
28214
+ information is still missing after submission, the order is kept as a
28215
+ resumable draft whose `error` / `declineReason` names the gaps.
28208
28216
  security:
28209
28217
  - bearerAuth: []
28210
28218
  requestBody:
@@ -28228,24 +28236,42 @@ paths:
28228
28236
  losing carrier matches every field against its records and rejects the
28229
28237
  whole port on a mismatch — enter values exactly as they appear on the
28230
28238
  carrier bill.
28231
- required: [entityName, authPersonName, accountNumber, streetAddress, locality, administrativeArea, postalCode, countryCode]
28239
+ required: [entityName, authPersonName, accountNumber, streetAddress, locality, postalCode, countryCode]
28232
28240
  properties:
28233
28241
  entityName: { type: string, description: "Account holder / business name, as on the carrier account." }
28234
28242
  authPersonName: { type: string, description: "Full name (first + last) of the person authorizing the port — must match the LOA signature." }
28235
28243
  billingPhoneNumber: { type: string, description: "Phone number on the losing carrier's bill. Defaults to the ported number itself on single-number orders. Validated as a real phone number when present." }
28236
28244
  accountNumber: { type: string, description: "Account number with the losing carrier — required (carriers reject ports without it; on prepaid mobile plans it is often the phone number itself)." }
28237
- pinPasscode: { type: string, description: "Transfer PIN. Required for mobile numbers (wireless carriers reject PIN-less ports). Forwarded to the carrier, never stored." }
28245
+ pinPasscode: { type: string, description: "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." }
28246
+ taxIdentifier: { type: string, maxLength: 50, description: "Company tax id on the carrier account (EU ports, e.g. Spanish CIF)." }
28247
+ businessIdentifier: { type: string, maxLength: 50, description: "Business registration id on the carrier account (EU ports)." }
28238
28248
  streetAddress: { type: string }
28239
28249
  extendedAddress: { type: string }
28240
28250
  locality: { type: string }
28241
- administrativeArea: { type: string, description: "2-letter US state / CA province code (full names are accepted and normalized)." }
28242
- postalCode: { type: string, description: "US ZIP (5 digits) or Canadian postal code, matching countryCode." }
28243
- countryCode: { type: string, minLength: 2, maxLength: 2, enum: [US, CA] }
28251
+ administrativeArea: { type: string, description: "Region. Required for US/CA as the 2-letter state/province code (full names are accepted and normalized); optional elsewhere." }
28252
+ postalCode: { type: string, description: "Postal code. Validated as a US ZIP / Canadian postal code for US/CA; free-form elsewhere." }
28253
+ countryCode: { type: string, minLength: 2, maxLength: 2, enum: [US, CA, GB, ES, DE, FR, NL, AU], description: "Service-address country (a supported port-in country)." }
28244
28254
  loaDocumentId: { type: string, description: Document id from POST /v1/phone-numbers/port-in/documents (kind=loa). }
28245
28255
  invoiceDocumentId: { type: string, description: Document id from POST /v1/phone-numbers/port-in/documents (kind=invoice). }
28246
- focDatetimeRequested: { type: string, format: date-time, description: "Requested port date; the carrier confirms the actual FOC later. Defaults to one week out (shifted off weekends) when omitted." }
28256
+ focDatetimeRequested: { type: string, format: date-time, description: "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." }
28247
28257
  customerReference: { type: string, maxLength: 100 }
28248
28258
  portType: { type: string, enum: [full, partial], default: full, description: "Whether the losing account ports all its numbers (full) or keeps some (partial)." }
28259
+ requirements:
28260
+ type: array
28261
+ maxItems: 30
28262
+ description: >-
28263
+ Country-specific requirement values for international ports
28264
+ (from GET /v1/phone-numbers/port-in/requirements). Not
28265
+ needed for US/CA. The LOA and invoice requirements are
28266
+ satisfied automatically by loaDocumentId/invoiceDocumentId,
28267
+ and address-type requirements by the endUser service
28268
+ address.
28269
+ items:
28270
+ type: object
28271
+ required: [requirementTypeId, fieldValue]
28272
+ properties:
28273
+ requirementTypeId: { type: string, description: "The requirement's id, from the requirements endpoint." }
28274
+ fieldValue: { type: string, maxLength: 1000, description: "Text value, ISO datetime, or a documentId from POST /v1/phone-numbers/port-in/documents, per the requirement's kind." }
28249
28275
  responses:
28250
28276
  '201':
28251
28277
  description: Port submitted. Top-level fields mirror the first successfully submitted order; per-order truth (including failures) is in `orders`.
@@ -28268,9 +28294,10 @@ paths:
28268
28294
  status: { type: string }
28269
28295
  phoneNumbers: { type: array, items: { type: string } }
28270
28296
  error: { type: string, description: Present when this split order failed to submit (it stays as a cancellable draft). }
28297
+ '400': { $ref: '#/components/responses/BadRequest' }
28271
28298
  '401': { $ref: '#/components/responses/Unauthorized' }
28272
28299
  '409': { description: "A number is already provisioned, or already in an in-flight port" }
28273
- '422': { description: "A number is not portable (reason included), or every split order failed to submit" }
28300
+ '422': { description: "A number is not portable (reason included), numbers span multiple non-US/CA countries, or every split order failed to submit" }
28274
28301
  get:
28275
28302
  operationId: listPhoneNumberPortIns
28276
28303
  tags: [Phone Numbers]
@@ -28348,7 +28375,9 @@ paths:
28348
28375
  phoneNumber: { type: string }
28349
28376
  portable: { type: boolean }
28350
28377
  fastPortable: { type: boolean, description: Qualifies for the carrier's accelerated FastPort lane. }
28351
- lineType: { type: [string, "null"], description: "Line type when known (mobile, landline, voip…). A mobile number requires the transfer PIN at submit." }
28378
+ lineType: { type: [string, "null"], description: "Line type when known (mobile, landline, voip…). A US/CA mobile number requires the transfer PIN at submit." }
28379
+ countryCode: { type: [string, "null"], description: "ISO country of the number — pass it to GET /v1/phone-numbers/port-in/requirements for international numbers." }
28380
+ phoneNumberType: { type: [string, "null"], description: "Carrier number-type classification (local, mobile, national, toll_free…) — the numberType for the requirements endpoint." }
28352
28381
  notPortableReason: { type: [string, "null"], description: Carrier reason when not portable; null when portable. }
28353
28382
  '401': { $ref: '#/components/responses/Unauthorized' }
28354
28383
 
@@ -28358,9 +28387,13 @@ paths:
28358
28387
  tags: [Phone Numbers]
28359
28388
  summary: Upload a porting document
28360
28389
  description: |
28361
- Upload ONE porting document (the signed LOA or a recent carrier invoice)
28362
- and get back its `documentId`, which the port-in create request takes as
28363
- `loaDocumentId` / `invoiceDocumentId`. PDF, JPEG, or PNG, 10MB max.
28390
+ Upload ONE porting document and get back its `documentId`. For the
28391
+ signed LOA / carrier invoice the id goes to `loaDocumentId` /
28392
+ `invoiceDocumentId`; for a country-specific document requirement
28393
+ (international ports) it becomes that requirement's `fieldValue`.
28394
+ Requirement documents are normalized to PDF automatically (regulators
28395
+ reject raw images). PDF, JPEG, or PNG, 10MB max. Uploads must be
28396
+ attached to an order within 30 minutes or the carrier deletes them.
28364
28397
  security:
28365
28398
  - bearerAuth: []
28366
28399
  requestBody:
@@ -28372,7 +28405,7 @@ paths:
28372
28405
  required: [file]
28373
28406
  properties:
28374
28407
  file: { type: string, format: binary, description: "The document (PDF/JPEG/PNG, 10MB max)." }
28375
- kind: { type: string, enum: [loa, invoice], description: Informational; used for the stored filename. }
28408
+ kind: { type: string, description: "'loa', 'invoice', or any short slug for requirement documents. Informational; used for the stored filename." }
28376
28409
  responses:
28377
28410
  '200':
28378
28411
  description: Document uploaded.
@@ -28385,6 +28418,90 @@ paths:
28385
28418
  '400': { description: "Missing file, file too large, or unsupported type" }
28386
28419
  '401': { $ref: '#/components/responses/Unauthorized' }
28387
28420
 
28421
+ /v1/phone-numbers/port-in/requirements:
28422
+ get:
28423
+ operationId: getPhoneNumberPortInRequirements
28424
+ tags: [Phone Numbers]
28425
+ summary: Country porting requirements
28426
+ description: |
28427
+ The country-specific information a port-in needs BEYOND the LOA,
28428
+ invoice, and account/address details — e.g. an ID copy, proof of
28429
+ address, a tax id, or a porting code. Call it after the portability
28430
+ check (which returns each number's `countryCode` and
28431
+ `phoneNumberType`), render the fields, and pass the collected values as
28432
+ the create request's `requirements`. US/CA return an empty list.
28433
+ security:
28434
+ - bearerAuth: []
28435
+ parameters:
28436
+ - { name: country, in: query, required: true, schema: { type: string, minLength: 2, maxLength: 2 }, description: "ISO country of the numbers being ported (a supported port-in country)." }
28437
+ - { name: numberType, in: query, required: false, schema: { type: string, enum: [local, mobile, national, toll_free], default: local }, description: "The portability check's phoneNumberType — requirements differ by type." }
28438
+ responses:
28439
+ '200':
28440
+ description: Requirement fields for the country/type combination.
28441
+ content:
28442
+ application/json:
28443
+ schema:
28444
+ type: object
28445
+ properties:
28446
+ country: { type: string }
28447
+ numberType: { type: string }
28448
+ supported: { type: boolean, description: "false when the combination includes a step that can't be completed through the API (e.g. an in-person identity verification) — porting it needs support." }
28449
+ fields:
28450
+ type: array
28451
+ items:
28452
+ type: object
28453
+ properties:
28454
+ requirementId: { type: string, description: "Pass back as requirements[].requirementTypeId." }
28455
+ label: { type: string }
28456
+ kind: { type: string, enum: [text, date, address, file, action], description: "text/date take a string value; file takes a documentId from the documents endpoint; address is satisfied automatically from the end-user service address." }
28457
+ description: { type: string }
28458
+ example: { type: string }
28459
+ acceptableValues: { type: array, items: { type: string }, description: "When present, the value must be one of these." }
28460
+ '400': { $ref: '#/components/responses/BadRequest' }
28461
+ '401': { $ref: '#/components/responses/Unauthorized' }
28462
+ '422': { description: "Country not supported for port-in" }
28463
+
28464
+ /v1/phone-numbers/port-in/{id}/requirements:
28465
+ get:
28466
+ operationId: getPhoneNumberPortInOrderRequirements
28467
+ tags: [Phone Numbers]
28468
+ summary: A port-in order's pending requirements
28469
+ description: |
28470
+ The live requirements on an EXISTING porting order: which are filled,
28471
+ which are still pending, and which bounced on review
28472
+ (`requirement-info-exception`). Use it to fix and resubmit a rejected
28473
+ international port. Same field shape as the country-level requirements
28474
+ endpoint, plus per-requirement status.
28475
+ security:
28476
+ - bearerAuth: []
28477
+ parameters:
28478
+ - { name: id, in: path, required: true, schema: { type: string }, description: Porting order ID (from the port-in list). }
28479
+ responses:
28480
+ '200':
28481
+ description: The order's requirements with statuses.
28482
+ content:
28483
+ application/json:
28484
+ schema:
28485
+ type: object
28486
+ properties:
28487
+ country: { type: string }
28488
+ requirements:
28489
+ type: array
28490
+ items:
28491
+ type: object
28492
+ properties:
28493
+ requirementId: { type: string }
28494
+ label: { type: string }
28495
+ kind: { type: string, enum: [text, date, address, file, action] }
28496
+ description: { type: string }
28497
+ example: { type: string }
28498
+ acceptableValues: { type: array, items: { type: string } }
28499
+ status: { type: string, description: "requirement-info-pending | requirement-info-under-review | requirement-info-exception | approved" }
28500
+ filled: { type: boolean }
28501
+ '400': { $ref: '#/components/responses/BadRequest' }
28502
+ '401': { $ref: '#/components/responses/Unauthorized' }
28503
+ '404': { description: Porting order not found }
28504
+
28388
28505
  /v1/phone-numbers/port-in/{id}:
28389
28506
  delete:
28390
28507
  operationId: cancelPhoneNumberPortIn