Skip to content

feat: update immutable zkEVM API package #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions src/Packages/ZkEvmApi/Documentation~/PassportProfileApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All URIs are relative to *https://api.sandbox.immutable.com*
|--------|--------------|-------------|
| [**GetUserInfo**](PassportProfileApi.md#getuserinfo) | **GET** /passport-profile/v1/user/info | Get all info for a Passport user |
| [**LinkWalletV2**](PassportProfileApi.md#linkwalletv2) | **POST** /passport-profile/v2/linked-wallets | Link wallet v2 |
| [**SendPhoneOtp**](PassportProfileApi.md#sendphoneotp) | **POST** /passport-profile/v1/phone-otp | Send phone OTP code for user supplied phone number |
| [**VerifyPhoneOtp**](PassportProfileApi.md#verifyphoneotp) | **POST** /passport-profile/v1/phone-otp/verify | Verify phone OTP code against user phone number |

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

[[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)

<a id="sendphoneotp"></a>
# **SendPhoneOtp**
> PhoneNumberOTPResponse SendPhoneOtp (PhoneNumberOTPRequest? phoneNumberOTPRequest = null)

Send phone OTP code for user supplied phone number

Send phone OTP code for user supplied phone number

### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Immutable.Api.ZkEvm.Api;
using Immutable.Api.ZkEvm.Client;
using Immutable.Api.ZkEvm.Model;

namespace Example
{
public class SendPhoneOtpExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.sandbox.immutable.com";
// Configure Bearer token for authorization: BearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";

var apiInstance = new PassportProfileApi(config);
var phoneNumberOTPRequest = new PhoneNumberOTPRequest?(); // PhoneNumberOTPRequest? | (optional)

try
{
// Send phone OTP code for user supplied phone number
PhoneNumberOTPResponse result = apiInstance.SendPhoneOtp(phoneNumberOTPRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PassportProfileApi.SendPhoneOtp: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

#### Using the SendPhoneOtpWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.

```csharp
try
{
// Send phone OTP code for user supplied phone number
ApiResponse<PhoneNumberOTPResponse> response = apiInstance.SendPhoneOtpWithHttpInfo(phoneNumberOTPRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PassportProfileApi.SendPhoneOtpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```

### Parameters

| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **phoneNumberOTPRequest** | [**PhoneNumberOTPRequest?**](PhoneNumberOTPRequest?.md) | | [optional] |

### Return type

[**PhoneNumberOTPResponse**](PhoneNumberOTPResponse.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
| **400** | BadRequestError | - |
| **401** | UnauthorizedError | - |
| **403** | ForbiddenError | - |
| **500** | InternalServerError | - |

[[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)

<a id="verifyphoneotp"></a>
# **VerifyPhoneOtp**
> void VerifyPhoneOtp (PhoneNumberOTPVerificationRequest? phoneNumberOTPVerificationRequest = null)

Verify phone OTP code against user phone number

Verify phone OTP code for user supplied phone number

### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Immutable.Api.ZkEvm.Api;
using Immutable.Api.ZkEvm.Client;
using Immutable.Api.ZkEvm.Model;

namespace Example
{
public class VerifyPhoneOtpExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.sandbox.immutable.com";
// Configure Bearer token for authorization: BearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";

var apiInstance = new PassportProfileApi(config);
var phoneNumberOTPVerificationRequest = new PhoneNumberOTPVerificationRequest?(); // PhoneNumberOTPVerificationRequest? | (optional)

try
{
// Verify phone OTP code against user phone number
apiInstance.VerifyPhoneOtp(phoneNumberOTPVerificationRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PassportProfileApi.VerifyPhoneOtp: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

#### Using the VerifyPhoneOtpWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.

```csharp
try
{
// Verify phone OTP code against user phone number
apiInstance.VerifyPhoneOtpWithHttpInfo(phoneNumberOTPVerificationRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PassportProfileApi.VerifyPhoneOtpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```

### Parameters

| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **phoneNumberOTPVerificationRequest** | [**PhoneNumberOTPVerificationRequest?**](PhoneNumberOTPVerificationRequest?.md) | | [optional] |

### Return type

void (empty response body)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
| **400** | BadRequestError | - |
| **401** | UnauthorizedError | - |
| **403** | ForbiddenError | - |
| **500** | InternalServerError | - |

[[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)

11 changes: 11 additions & 0 deletions src/Packages/ZkEvmApi/Documentation~/PhoneNumberOTPRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPRequest
Phone number OTP request

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PhoneNumber** | **string** | Phone number |

[[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 changes: 11 additions & 0 deletions src/Packages/ZkEvmApi/Documentation~/PhoneNumberOTPResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPResponse
Phone number OTP request

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PhoneNumber** | **string** | Phone number |

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Immutable.Api.ZkEvm.Model.PhoneNumberOTPVerificationRequest
Phone number OTP verification request

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PhoneNumber** | **string** | Phone number |
**Code** | **string** | Phone number verification OTP |

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

Loading