zernio-sdk 0.0.554 → 0.0.556

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.
data/openapi.yaml CHANGED
@@ -28469,7 +28469,7 @@ paths:
28469
28469
  localTo: { type: [string, "null"], description: ISO country the value must be local to }
28470
28470
  reusable:
28471
28471
  type: [object, "null"]
28472
- description: Present when this account already has an approved verification for the country that can be reused (skip the form). `fromPhoneNumber`/`details` mirror the newest option; `options` lists ALL approved verifications (agencies hold one per end client) pass the chosen option's `fromPhoneNumber` as `reuseFrom` on POST.
28472
+ description: 'Present when this account already has a reusable verification for the country (skip the form). `fromPhoneNumber`/`details` mirror the first option; `options` lists ALL reusable verifications (agencies hold one per end client), approved-first. Pass the chosen option''s `id` as `reuseOptionId` on POST. Each option''s `instant` says whether it activates in minutes (group-approved) or still queues for carrier review (1-3 days).'
28473
28473
  properties:
28474
28474
  available: { type: boolean }
28475
28475
  fromPhoneNumber: { type: string }
@@ -28487,7 +28487,9 @@ paths:
28487
28487
  items:
28488
28488
  type: object
28489
28489
  properties:
28490
- fromPhoneNumber: { type: string }
28490
+ id: { type: string, description: 'Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications).' }
28491
+ fromPhoneNumber: { type: string, description: Display only — the number this verification was submitted for. Not a selection key. }
28492
+ instant: { type: boolean, description: 'true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days).' }
28491
28493
  details:
28492
28494
  type: array
28493
28495
  items:
@@ -28495,6 +28497,7 @@ paths:
28495
28497
  properties:
28496
28498
  label: { type: string }
28497
28499
  value: { type: string }
28500
+ documentId: { type: string, description: 'Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).' }
28498
28501
  '400': { description: Country not available }
28499
28502
  '401': { $ref: '#/components/responses/Unauthorized' }
28500
28503
  post:
@@ -28534,7 +28537,8 @@ paths:
28534
28537
  submissionId: { type: string, description: Idempotency token for this submission attempt. A retry/double-submit with the same token returns the same number; omit and each call creates a new number. }
28535
28538
  quantity: { type: integer, minimum: 1, maximum: 5, default: 1, description: 'Provision several same-country numbers from one submission (1-5). The single verification covers all of them; each number is billed only when it activates. Numbers that fail to order are skipped (best-effort).' }
28536
28539
  reuse: { type: boolean, description: Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). }
28537
- reuseFrom: { type: string, description: 'Which approved verification to reuse when several exist: the phone number it was originally approved for (GET reusable.options[].fromPhoneNumber). Omitted = newest. No match = 409.' }
28540
+ reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
28541
+ reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
28538
28542
  endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
28539
28543
  endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
28540
28544
  values:
@@ -28599,6 +28603,34 @@ paths:
28599
28603
  '409': { description: reuse requested but no prior approved verification exists for this country }
28600
28604
  '401': { $ref: '#/components/responses/Unauthorized' }
28601
28605
 
28606
+ /v1/phone-numbers/kyc/document/{documentId}:
28607
+ get:
28608
+ operationId: viewPhoneNumberKycDocument
28609
+ tags: [Phone Numbers]
28610
+ summary: View a KYC document on file
28611
+ description: |
28612
+ Stream a document backing a reusable verification (the `documentId`
28613
+ values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so
28614
+ the account holder can see what's on file before reusing it. Returned
28615
+ inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped:
28616
+ a document is viewable only when its id is referenced by one of the
28617
+ caller's own numbers — otherwise `404`.
28618
+ parameters:
28619
+ - name: documentId
28620
+ in: path
28621
+ required: true
28622
+ schema: { type: string }
28623
+ description: The Telnyx document id (from `reusable.options[].details[].documentId`).
28624
+ responses:
28625
+ '200':
28626
+ description: The document, streamed inline.
28627
+ content:
28628
+ application/pdf:
28629
+ schema: { type: string, format: binary }
28630
+ '400': { $ref: '#/components/responses/BadRequest' }
28631
+ '401': { $ref: '#/components/responses/Unauthorized' }
28632
+ '404': { description: No such document for this account. }
28633
+
28602
28634
  /v1/phone-numbers/kyc/upload-document:
28603
28635
  post:
28604
28636
  operationId: uploadPhoneNumberKycDocument
@@ -29274,7 +29306,7 @@ paths:
29274
29306
  audience: { type: [string, "null"], enum: [business, individual, null], description: 'When set, the requirement applies ONLY to this end-user type — provide it for that type and OMIT it for the other (e.g. Brazil: "Cartão CNPJ" is business-only, "CPF" and "ID/Passport Copy" are personal-only). Submitting both sets makes the regulator ask whether the number is for personal or business use and stalls the review. Pass `entityType` on POST so the server drops the inapplicable set.' }
29275
29307
  reusable:
29276
29308
  type: [object, "null"]
29277
- description: Present when this account already has an approved verification for the country that can be reused (skip the form). `fromPhoneNumber`/`details` mirror the newest option; `options` lists ALL approved verifications (agencies hold one per end client) pass the chosen option's `fromPhoneNumber` as `reuseFrom` on POST.
29309
+ description: 'Present when this account already has a reusable verification for the country (skip the form). `fromPhoneNumber`/`details` mirror the first option; `options` lists ALL reusable verifications (agencies hold one per end client), approved-first. Pass the chosen option''s `id` as `reuseOptionId` on POST. Each option''s `instant` says whether it activates in minutes (group-approved) or still queues for carrier review (1-3 days).'
29278
29310
  properties:
29279
29311
  available: { type: boolean }
29280
29312
  fromPhoneNumber: { type: string }
@@ -29292,7 +29324,9 @@ paths:
29292
29324
  items:
29293
29325
  type: object
29294
29326
  properties:
29295
- fromPhoneNumber: { type: string }
29327
+ id: { type: string, description: 'Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications).' }
29328
+ fromPhoneNumber: { type: string, description: Display only — the number this verification was submitted for. Not a selection key. }
29329
+ instant: { type: boolean, description: 'true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days).' }
29296
29330
  details:
29297
29331
  type: array
29298
29332
  items:
@@ -29300,6 +29334,7 @@ paths:
29300
29334
  properties:
29301
29335
  label: { type: string }
29302
29336
  value: { type: string }
29337
+ documentId: { type: string, description: 'Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).' }
29303
29338
  '400': { description: Country not available }
29304
29339
  '401': { $ref: '#/components/responses/Unauthorized' }
29305
29340
  post:
@@ -29343,7 +29378,8 @@ paths:
29343
29378
  submissionId: { type: string, description: Idempotency token for this submission attempt. A retry/double-submit with the same token returns the same number; omit and each call creates a new number. }
29344
29379
  quantity: { type: integer, minimum: 1, maximum: 5, default: 1, description: 'Provision several same-country numbers from one submission (1-5). The single verification covers all of them; each number is billed only when it activates. Numbers that fail to order are skipped (best-effort).' }
29345
29380
  reuse: { type: boolean, description: Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). }
29346
- reuseFrom: { type: string, description: 'Which approved verification to reuse when several exist: the phone number it was originally approved for (GET reusable.options[].fromPhoneNumber). Omitted = newest. No match = 409.' }
29381
+ reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
29382
+ reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
29347
29383
  endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
29348
29384
  endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
29349
29385
  values:
@@ -307,4 +307,16 @@ describe 'PhoneNumbersApi' do
307
307
  end
308
308
  end
309
309
 
310
+ # unit tests for view_phone_number_kyc_document
311
+ # View a KYC document on file
312
+ # Stream a document backing a reusable verification (the `documentId` values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so the account holder can see what's on file before reusing it. Returned inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise `404`.
313
+ # @param document_id The Telnyx document id (from `reusable.options[].details[].documentId`).
314
+ # @param [Hash] opts the optional parameters
315
+ # @return [File]
316
+ describe 'view_phone_number_kyc_document test' do
317
+ it 'should work' do
318
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
319
+ end
320
+ end
321
+
310
322
  end
@@ -0,0 +1,48 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner do
21
+ #let(:instance) { Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.new }
22
+
23
+ describe 'test an instance of GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner' do
24
+ it 'should create an instance of GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "label"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "value"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "document_id"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -27,12 +27,24 @@ describe Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInner do
27
27
  end
28
28
  end
29
29
 
30
+ describe 'test attribute "id"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
30
36
  describe 'test attribute "from_phone_number"' do
31
37
  it 'should work' do
32
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
39
  end
34
40
  end
35
41
 
42
+ describe 'test attribute "instant"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
36
48
  describe 'test attribute "details"' do
37
49
  it 'should work' do
38
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -57,6 +57,12 @@ describe Zernio::SubmitPhoneNumberKycRequest do
57
57
  end
58
58
  end
59
59
 
60
+ describe 'test attribute "reuse_option_id"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
60
66
  describe 'test attribute "reuse_from"' do
61
67
  it 'should work' do
62
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -57,6 +57,12 @@ describe Zernio::SubmitWhatsAppNumberKycRequest do
57
57
  end
58
58
  end
59
59
 
60
+ describe 'test attribute "reuse_option_id"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
60
66
  describe 'test attribute "reuse_from"' do
61
67
  it 'should work' do
62
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/