Skip to content

Commit 584f31e

Browse files
authored
Merge pull request #434 from immutable/feat/update-zkevm-api-2025-03-09-10-04-07
feat: update immutable zkEVM API package
2 parents bbbbe5b + 88e152c commit 584f31e

12 files changed

+1032
-0
lines changed

src/Packages/ZkEvmApi/Documentation~/PassportProfileApi.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All URIs are relative to *https://api.sandbox.immutable.com*
66
|--------|--------------|-------------|
77
| [**GetUserInfo**](PassportProfileApi.md#getuserinfo) | **GET** /passport-profile/v1/user/info | Get all info for a Passport user |
88
| [**LinkWalletV2**](PassportProfileApi.md#linkwalletv2) | **POST** /passport-profile/v2/linked-wallets | Link wallet v2 |
9+
| [**SendPhoneOtp**](PassportProfileApi.md#sendphoneotp) | **POST** /passport-profile/v1/phone-otp | Send phone OTP code for user supplied phone number |
10+
| [**VerifyPhoneOtp**](PassportProfileApi.md#verifyphoneotp) | **POST** /passport-profile/v1/phone-otp/verify | Verify phone OTP code against user phone number |
911

1012
<a id="getuserinfo"></a>
1113
# **GetUserInfo**
@@ -197,3 +199,195 @@ catch (ApiException e)
197199

198200
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
199201

202+
<a id="sendphoneotp"></a>
203+
# **SendPhoneOtp**
204+
> PhoneNumberOTPResponse SendPhoneOtp (PhoneNumberOTPRequest? phoneNumberOTPRequest = null)
205+
206+
Send phone OTP code for user supplied phone number
207+
208+
Send phone OTP code for user supplied phone number
209+
210+
### Example
211+
```csharp
212+
using System.Collections.Generic;
213+
using System.Diagnostics;
214+
using Immutable.Api.ZkEvm.Api;
215+
using Immutable.Api.ZkEvm.Client;
216+
using Immutable.Api.ZkEvm.Model;
217+
218+
namespace Example
219+
{
220+
public class SendPhoneOtpExample
221+
{
222+
public static void Main()
223+
{
224+
Configuration config = new Configuration();
225+
config.BasePath = "https://api.sandbox.immutable.com";
226+
// Configure Bearer token for authorization: BearerAuth
227+
config.AccessToken = "YOUR_BEARER_TOKEN";
228+
229+
var apiInstance = new PassportProfileApi(config);
230+
var phoneNumberOTPRequest = new PhoneNumberOTPRequest?(); // PhoneNumberOTPRequest? | (optional)
231+
232+
try
233+
{
234+
// Send phone OTP code for user supplied phone number
235+
PhoneNumberOTPResponse result = apiInstance.SendPhoneOtp(phoneNumberOTPRequest);
236+
Debug.WriteLine(result);
237+
}
238+
catch (ApiException e)
239+
{
240+
Debug.Print("Exception when calling PassportProfileApi.SendPhoneOtp: " + e.Message);
241+
Debug.Print("Status Code: " + e.ErrorCode);
242+
Debug.Print(e.StackTrace);
243+
}
244+
}
245+
}
246+
}
247+
```
248+
249+
#### Using the SendPhoneOtpWithHttpInfo variant
250+
This returns an ApiResponse object which contains the response data, status code and headers.
251+
252+
```csharp
253+
try
254+
{
255+
// Send phone OTP code for user supplied phone number
256+
ApiResponse<PhoneNumberOTPResponse> response = apiInstance.SendPhoneOtpWithHttpInfo(phoneNumberOTPRequest);
257+
Debug.Write("Status Code: " + response.StatusCode);
258+
Debug.Write("Response Headers: " + response.Headers);
259+
Debug.Write("Response Body: " + response.Data);
260+
}
261+
catch (ApiException e)
262+
{
263+
Debug.Print("Exception when calling PassportProfileApi.SendPhoneOtpWithHttpInfo: " + e.Message);
264+
Debug.Print("Status Code: " + e.ErrorCode);
265+
Debug.Print(e.StackTrace);
266+
}
267+
```
268+
269+
### Parameters
270+
271+
| Name | Type | Description | Notes |
272+
|------|------|-------------|-------|
273+
| **phoneNumberOTPRequest** | [**PhoneNumberOTPRequest?**](PhoneNumberOTPRequest?.md) | | [optional] |
274+
275+
### Return type
276+
277+
[**PhoneNumberOTPResponse**](PhoneNumberOTPResponse.md)
278+
279+
### Authorization
280+
281+
[BearerAuth](../README.md#BearerAuth)
282+
283+
### HTTP request headers
284+
285+
- **Content-Type**: application/json
286+
- **Accept**: application/json
287+
288+
289+
### HTTP response details
290+
| Status code | Description | Response headers |
291+
|-------------|-------------|------------------|
292+
| **200** | OK | - |
293+
| **400** | BadRequestError | - |
294+
| **401** | UnauthorizedError | - |
295+
| **403** | ForbiddenError | - |
296+
| **500** | InternalServerError | - |
297+
298+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
299+
300+
<a id="verifyphoneotp"></a>
301+
# **VerifyPhoneOtp**
302+
> void VerifyPhoneOtp (PhoneNumberOTPVerificationRequest? phoneNumberOTPVerificationRequest = null)
303+
304+
Verify phone OTP code against user phone number
305+
306+
Verify phone OTP code for user supplied phone number
307+
308+
### Example
309+
```csharp
310+
using System.Collections.Generic;
311+
using System.Diagnostics;
312+
using Immutable.Api.ZkEvm.Api;
313+
using Immutable.Api.ZkEvm.Client;
314+
using Immutable.Api.ZkEvm.Model;
315+
316+
namespace Example
317+
{
318+
public class VerifyPhoneOtpExample
319+
{
320+
public static void Main()
321+
{
322+
Configuration config = new Configuration();
323+
config.BasePath = "https://api.sandbox.immutable.com";
324+
// Configure Bearer token for authorization: BearerAuth
325+
config.AccessToken = "YOUR_BEARER_TOKEN";
326+
327+
var apiInstance = new PassportProfileApi(config);
328+
var phoneNumberOTPVerificationRequest = new PhoneNumberOTPVerificationRequest?(); // PhoneNumberOTPVerificationRequest? | (optional)
329+
330+
try
331+
{
332+
// Verify phone OTP code against user phone number
333+
apiInstance.VerifyPhoneOtp(phoneNumberOTPVerificationRequest);
334+
}
335+
catch (ApiException e)
336+
{
337+
Debug.Print("Exception when calling PassportProfileApi.VerifyPhoneOtp: " + e.Message);
338+
Debug.Print("Status Code: " + e.ErrorCode);
339+
Debug.Print(e.StackTrace);
340+
}
341+
}
342+
}
343+
}
344+
```
345+
346+
#### Using the VerifyPhoneOtpWithHttpInfo variant
347+
This returns an ApiResponse object which contains the response data, status code and headers.
348+
349+
```csharp
350+
try
351+
{
352+
// Verify phone OTP code against user phone number
353+
apiInstance.VerifyPhoneOtpWithHttpInfo(phoneNumberOTPVerificationRequest);
354+
}
355+
catch (ApiException e)
356+
{
357+
Debug.Print("Exception when calling PassportProfileApi.VerifyPhoneOtpWithHttpInfo: " + e.Message);
358+
Debug.Print("Status Code: " + e.ErrorCode);
359+
Debug.Print(e.StackTrace);
360+
}
361+
```
362+
363+
### Parameters
364+
365+
| Name | Type | Description | Notes |
366+
|------|------|-------------|-------|
367+
| **phoneNumberOTPVerificationRequest** | [**PhoneNumberOTPVerificationRequest?**](PhoneNumberOTPVerificationRequest?.md) | | [optional] |
368+
369+
### Return type
370+
371+
void (empty response body)
372+
373+
### Authorization
374+
375+
[BearerAuth](../README.md#BearerAuth)
376+
377+
### HTTP request headers
378+
379+
- **Content-Type**: application/json
380+
- **Accept**: application/json
381+
382+
383+
### HTTP response details
384+
| Status code | Description | Response headers |
385+
|-------------|-------------|------------------|
386+
| **200** | OK | - |
387+
| **400** | BadRequestError | - |
388+
| **401** | UnauthorizedError | - |
389+
| **403** | ForbiddenError | - |
390+
| **500** | InternalServerError | - |
391+
392+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
393+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPRequest
2+
Phone number OTP request
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**PhoneNumber** | **string** | Phone number |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPResponse
2+
Phone number OTP request
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**PhoneNumber** | **string** | Phone number |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPVerificationRequest
2+
Phone number OTP verification request
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**PhoneNumber** | **string** | Phone number |
9+
**Code** | **string** | Phone number verification OTP |
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+

0 commit comments

Comments
 (0)