late-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.
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 +134 -19
  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.534.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.534'
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
@@ -9176,9 +9176,7 @@ paths:
9176
9176
  content:
9177
9177
  application/json:
9178
9178
  schema:
9179
- type: object
9180
- properties:
9181
- error: { type: string }
9179
+ $ref: '#/components/schemas/ErrorResponse'
9182
9180
  examples:
9183
9181
  invalidMetric:
9184
9182
  value:
@@ -28201,10 +28199,18 @@ paths:
28201
28199
 
28202
28200
  Run the portability check (POST /v1/phone-numbers/port-in/check) and
28203
28201
  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).
28202
+ first — uploaded documents must be attached to an order within 30
28203
+ minutes or the carrier deletes them, so upload right before this call.
28204
+ The carrier may split the numbers into several orders (by country,
28205
+ number type, losing carrier); `orders` carries per-order results, and a
28206
+ partial failure still returns 201 with the failed orders' `error` set
28207
+ (they stay as cancellable drafts).
28208
+
28209
+ Non-US/CA numbers additionally need the country-specific values from
28210
+ GET /v1/phone-numbers/port-in/requirements, passed via `requirements`,
28211
+ and must be submitted one country per request. When required
28212
+ information is still missing after submission, the order is kept as a
28213
+ resumable draft whose `error` / `declineReason` names the gaps.
28208
28214
  security:
28209
28215
  - bearerAuth: []
28210
28216
  requestBody:
@@ -28228,24 +28234,42 @@ paths:
28228
28234
  losing carrier matches every field against its records and rejects the
28229
28235
  whole port on a mismatch — enter values exactly as they appear on the
28230
28236
  carrier bill.
28231
- required: [entityName, authPersonName, accountNumber, streetAddress, locality, administrativeArea, postalCode, countryCode]
28237
+ required: [entityName, authPersonName, accountNumber, streetAddress, locality, postalCode, countryCode]
28232
28238
  properties:
28233
28239
  entityName: { type: string, description: "Account holder / business name, as on the carrier account." }
28234
28240
  authPersonName: { type: string, description: "Full name (first + last) of the person authorizing the port — must match the LOA signature." }
28235
28241
  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
28242
  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." }
28243
+ 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." }
28244
+ taxIdentifier: { type: string, maxLength: 50, description: "Company tax id on the carrier account (EU ports, e.g. Spanish CIF)." }
28245
+ businessIdentifier: { type: string, maxLength: 50, description: "Business registration id on the carrier account (EU ports)." }
28238
28246
  streetAddress: { type: string }
28239
28247
  extendedAddress: { type: string }
28240
28248
  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] }
28249
+ administrativeArea: { type: string, description: "Region. Required for US/CA as the 2-letter state/province code (full names are accepted and normalized); optional elsewhere." }
28250
+ postalCode: { type: string, description: "Postal code. Validated as a US ZIP / Canadian postal code for US/CA; free-form elsewhere." }
28251
+ 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
28252
  loaDocumentId: { type: string, description: Document id from POST /v1/phone-numbers/port-in/documents (kind=loa). }
28245
28253
  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." }
28254
+ 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
28255
  customerReference: { type: string, maxLength: 100 }
28248
28256
  portType: { type: string, enum: [full, partial], default: full, description: "Whether the losing account ports all its numbers (full) or keeps some (partial)." }
28257
+ requirements:
28258
+ type: array
28259
+ maxItems: 30
28260
+ description: >-
28261
+ Country-specific requirement values for international ports
28262
+ (from GET /v1/phone-numbers/port-in/requirements). Not
28263
+ needed for US/CA. The LOA and invoice requirements are
28264
+ satisfied automatically by loaDocumentId/invoiceDocumentId,
28265
+ and address-type requirements by the endUser service
28266
+ address.
28267
+ items:
28268
+ type: object
28269
+ required: [requirementTypeId, fieldValue]
28270
+ properties:
28271
+ requirementTypeId: { type: string, description: "The requirement's id, from the requirements endpoint." }
28272
+ 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
28273
  responses:
28250
28274
  '201':
28251
28275
  description: Port submitted. Top-level fields mirror the first successfully submitted order; per-order truth (including failures) is in `orders`.
@@ -28268,9 +28292,10 @@ paths:
28268
28292
  status: { type: string }
28269
28293
  phoneNumbers: { type: array, items: { type: string } }
28270
28294
  error: { type: string, description: Present when this split order failed to submit (it stays as a cancellable draft). }
28295
+ '400': { $ref: '#/components/responses/BadRequest' }
28271
28296
  '401': { $ref: '#/components/responses/Unauthorized' }
28272
28297
  '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" }
28298
+ '422': { description: "A number is not portable (reason included), numbers span multiple non-US/CA countries, or every split order failed to submit" }
28274
28299
  get:
28275
28300
  operationId: listPhoneNumberPortIns
28276
28301
  tags: [Phone Numbers]
@@ -28348,7 +28373,9 @@ paths:
28348
28373
  phoneNumber: { type: string }
28349
28374
  portable: { type: boolean }
28350
28375
  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." }
28376
+ lineType: { type: [string, "null"], description: "Line type when known (mobile, landline, voip…). A US/CA mobile number requires the transfer PIN at submit." }
28377
+ countryCode: { type: [string, "null"], description: "ISO country of the number — pass it to GET /v1/phone-numbers/port-in/requirements for international numbers." }
28378
+ phoneNumberType: { type: [string, "null"], description: "Carrier number-type classification (local, mobile, national, toll_free…) — the numberType for the requirements endpoint." }
28352
28379
  notPortableReason: { type: [string, "null"], description: Carrier reason when not portable; null when portable. }
28353
28380
  '401': { $ref: '#/components/responses/Unauthorized' }
28354
28381
 
@@ -28358,9 +28385,13 @@ paths:
28358
28385
  tags: [Phone Numbers]
28359
28386
  summary: Upload a porting document
28360
28387
  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.
28388
+ Upload ONE porting document and get back its `documentId`. For the
28389
+ signed LOA / carrier invoice the id goes to `loaDocumentId` /
28390
+ `invoiceDocumentId`; for a country-specific document requirement
28391
+ (international ports) it becomes that requirement's `fieldValue`.
28392
+ Requirement documents are normalized to PDF automatically (regulators
28393
+ reject raw images). PDF, JPEG, or PNG, 10MB max. Uploads must be
28394
+ attached to an order within 30 minutes or the carrier deletes them.
28364
28395
  security:
28365
28396
  - bearerAuth: []
28366
28397
  requestBody:
@@ -28372,7 +28403,7 @@ paths:
28372
28403
  required: [file]
28373
28404
  properties:
28374
28405
  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. }
28406
+ kind: { type: string, description: "'loa', 'invoice', or any short slug for requirement documents. Informational; used for the stored filename." }
28376
28407
  responses:
28377
28408
  '200':
28378
28409
  description: Document uploaded.
@@ -28385,6 +28416,90 @@ paths:
28385
28416
  '400': { description: "Missing file, file too large, or unsupported type" }
28386
28417
  '401': { $ref: '#/components/responses/Unauthorized' }
28387
28418
 
28419
+ /v1/phone-numbers/port-in/requirements:
28420
+ get:
28421
+ operationId: getPhoneNumberPortInRequirements
28422
+ tags: [Phone Numbers]
28423
+ summary: Country porting requirements
28424
+ description: |
28425
+ The country-specific information a port-in needs BEYOND the LOA,
28426
+ invoice, and account/address details — e.g. an ID copy, proof of
28427
+ address, a tax id, or a porting code. Call it after the portability
28428
+ check (which returns each number's `countryCode` and
28429
+ `phoneNumberType`), render the fields, and pass the collected values as
28430
+ the create request's `requirements`. US/CA return an empty list.
28431
+ security:
28432
+ - bearerAuth: []
28433
+ parameters:
28434
+ - { 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)." }
28435
+ - { 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." }
28436
+ responses:
28437
+ '200':
28438
+ description: Requirement fields for the country/type combination.
28439
+ content:
28440
+ application/json:
28441
+ schema:
28442
+ type: object
28443
+ properties:
28444
+ country: { type: string }
28445
+ numberType: { type: string }
28446
+ 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." }
28447
+ fields:
28448
+ type: array
28449
+ items:
28450
+ type: object
28451
+ properties:
28452
+ requirementId: { type: string, description: "Pass back as requirements[].requirementTypeId." }
28453
+ label: { type: string }
28454
+ 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." }
28455
+ description: { type: string }
28456
+ example: { type: string }
28457
+ acceptableValues: { type: array, items: { type: string }, description: "When present, the value must be one of these." }
28458
+ '400': { $ref: '#/components/responses/BadRequest' }
28459
+ '401': { $ref: '#/components/responses/Unauthorized' }
28460
+ '422': { description: "Country not supported for port-in" }
28461
+
28462
+ /v1/phone-numbers/port-in/{id}/requirements:
28463
+ get:
28464
+ operationId: getPhoneNumberPortInOrderRequirements
28465
+ tags: [Phone Numbers]
28466
+ summary: A port-in order's pending requirements
28467
+ description: |
28468
+ The live requirements on an EXISTING porting order: which are filled,
28469
+ which are still pending, and which bounced on review
28470
+ (`requirement-info-exception`). Use it to fix and resubmit a rejected
28471
+ international port. Same field shape as the country-level requirements
28472
+ endpoint, plus per-requirement status.
28473
+ security:
28474
+ - bearerAuth: []
28475
+ parameters:
28476
+ - { name: id, in: path, required: true, schema: { type: string }, description: Porting order ID (from the port-in list). }
28477
+ responses:
28478
+ '200':
28479
+ description: The order's requirements with statuses.
28480
+ content:
28481
+ application/json:
28482
+ schema:
28483
+ type: object
28484
+ properties:
28485
+ country: { type: string }
28486
+ requirements:
28487
+ type: array
28488
+ items:
28489
+ type: object
28490
+ properties:
28491
+ requirementId: { type: string }
28492
+ label: { type: string }
28493
+ kind: { type: string, enum: [text, date, address, file, action] }
28494
+ description: { type: string }
28495
+ example: { type: string }
28496
+ acceptableValues: { type: array, items: { type: string } }
28497
+ status: { type: string, description: "requirement-info-pending | requirement-info-under-review | requirement-info-exception | approved" }
28498
+ filled: { type: boolean }
28499
+ '400': { $ref: '#/components/responses/BadRequest' }
28500
+ '401': { $ref: '#/components/responses/Unauthorized' }
28501
+ '404': { description: Porting order not found }
28502
+
28388
28503
  /v1/phone-numbers/port-in/{id}:
28389
28504
  delete:
28390
28505
  operationId: cancelPhoneNumberPortIn