CreateUserApplicationRequest

Struct CreateUserApplicationRequest 

Source
pub struct CreateUserApplicationRequest {
Show 26 fields pub sumsub_share_token: Option<String>, pub persona_share_token: Option<String>, pub id: Option<Uuid>, pub first_name: Option<String>, pub last_name: Option<String>, pub birth_date: Option<String>, pub national_id: Option<String>, pub country_of_issue: Option<String>, pub email: Option<String>, pub phone_country_code: Option<String>, pub phone_number: Option<String>, pub address: Option<Address>, pub ip_address: String, pub occupation: String, pub annual_salary: String, pub account_purpose: String, pub expected_monthly_volume: String, pub is_terms_of_service_accepted: bool, pub wallet_address: Option<String>, pub solana_address: Option<String>, pub tron_address: Option<String>, pub stellar_address: Option<String>, pub chain_id: Option<String>, pub contract_address: Option<String>, pub source_key: Option<String>, pub has_existing_documents: Option<bool>,
}
Expand description

Request to create a user application

This request supports three verification methods (oneOf in OpenAPI spec):

  1. Using Sumsub Share Token: Provide only sumsub_share_token
  2. Using Persona Share Token: Provide only persona_share_token
  3. Using API: Provide full person data (all IssuingApplicationPerson fields)

Exactly one verification method must be provided. The API will validate this at runtime.

§Verification Methods

§Sumsub Share Token

use rain_sdk::models::applications::CreateUserApplicationRequest;

CreateUserApplicationRequest {
    sumsub_share_token: Some("your-sumsub-token".to_string()),
    persona_share_token: None,
    id: None,
    first_name: None,
    last_name: None,
    birth_date: None,
    national_id: None,
    country_of_issue: None,
    email: None,
    phone_country_code: None,
    phone_number: None,
    address: None,
    ip_address: "127.0.0.1".to_string(),
    occupation: "Engineer".to_string(),
    annual_salary: "100000".to_string(),
    account_purpose: "Business".to_string(),
    expected_monthly_volume: "5000".to_string(),
    is_terms_of_service_accepted: true,
    wallet_address: None,
    solana_address: None,
    tron_address: None,
    stellar_address: None,
    chain_id: None,
    contract_address: None,
    source_key: None,
    has_existing_documents: None,
};

§Persona Share Token

use rain_sdk::models::applications::CreateUserApplicationRequest;

CreateUserApplicationRequest {
    sumsub_share_token: None,
    persona_share_token: Some("your-persona-token".to_string()),
    id: None,
    first_name: None,
    last_name: None,
    birth_date: None,
    national_id: None,
    country_of_issue: None,
    email: None,
    phone_country_code: None,
    phone_number: None,
    address: None,
    ip_address: "127.0.0.1".to_string(),
    occupation: "Engineer".to_string(),
    annual_salary: "100000".to_string(),
    account_purpose: "Business".to_string(),
    expected_monthly_volume: "5000".to_string(),
    is_terms_of_service_accepted: true,
    wallet_address: None,
    solana_address: None,
    tron_address: None,
    stellar_address: None,
    chain_id: None,
    contract_address: None,
    source_key: None,
    has_existing_documents: None,
};

§Full API (IssuingApplicationPerson)

use rain_sdk::models::applications::CreateUserApplicationRequest;
use rain_sdk::models::common::Address;

CreateUserApplicationRequest {
    sumsub_share_token: None,
    persona_share_token: None,
    id: None,
    first_name: Some("John".to_string()),
    last_name: Some("Doe".to_string()),
    birth_date: Some("2000-01-01".to_string()),
    national_id: Some("123456789".to_string()),
    country_of_issue: Some("US".to_string()),
    email: Some("john@example.com".to_string()),
    phone_country_code: Some("1".to_string()),
    phone_number: Some("5555555555".to_string()),
    address: Some(Address {
        line1: "123 Main St".to_string(),
        line2: None,
        city: "New York".to_string(),
        region: "NY".to_string(),
        postal_code: "10001".to_string(),
        country_code: "US".to_string(),
        country: None,
    }),
    ip_address: "127.0.0.1".to_string(),
    occupation: "Engineer".to_string(),
    annual_salary: "100000".to_string(),
    account_purpose: "Business".to_string(),
    expected_monthly_volume: "5000".to_string(),
    is_terms_of_service_accepted: true,
    wallet_address: None,
    solana_address: None,
    tron_address: None,
    stellar_address: None,
    chain_id: None,
    contract_address: None,
    source_key: None,
    has_existing_documents: None,
};

Fields§

§sumsub_share_token: Option<String>§persona_share_token: Option<String>§id: Option<Uuid>

The initiated application’s Rain ID, if an application was previously initiated for this user

§first_name: Option<String>

The person’s first name (max 50 characters)

§last_name: Option<String>

The person’s last name (max 50 characters)

§birth_date: Option<String>

The person’s birth date (ISO date format: YYYY-MM-DD)

§national_id: Option<String>

The person’s national id, 9-digit SSN if country of issue is US

§country_of_issue: Option<String>

The person’s country of issue of their national id (2-letter country code)

§email: Option<String>

The person’s email address

§phone_country_code: Option<String>

The user’s phone country code (1-3 digits)

§phone_number: Option<String>

The user’s phone number (1-15 digits)

§address: Option<Address>

The person’s address

§ip_address: String

This user’s IP address

§occupation: String

The user’s occupation

§annual_salary: String

The user’s annual salary

§account_purpose: String

The purpose of the user’s account

§expected_monthly_volume: String

The amount of money the user expects to spend each month

§is_terms_of_service_accepted: bool

Whether the user has accepted the terms of service

§wallet_address: Option<String>

This user’s EVM address; either walletAddress or solanaAddress or tronAddress or stellarAddress is required if using a Rain-managed solution, but not required otherwise

§solana_address: Option<String>

This user’s Solana address; either walletAddress or solanaAddress or tronAddress or stellarAddress is required if using a Rain-managed solution, but not required otherwise

§tron_address: Option<String>

This user’s Tron address; either walletAddress or solanaAddress or tronAddress or stellarAddress is required if using a Rain-managed solution, but not required otherwise

§stellar_address: Option<String>

This user’s Stellar address; either walletAddress or solanaAddress or tronAddress or stellarAddress is required if using a Rain-managed solution, but not required otherwise

§chain_id: Option<String>

If using external collateral contracts, the chain id of the user’s external collateral contract; not required if using Rain’s collateral contracts

§contract_address: Option<String>

If using external collateral contracts, the address of the user’s external collateral contract; not required if using Rain’s collateral contracts

§source_key: Option<String>

Unique identifier for where this user is coming from

§has_existing_documents: Option<bool>

Whether or not to use existing documents for additional verification

Trait Implementations§

Source§

impl Clone for CreateUserApplicationRequest

Source§

fn clone(&self) -> CreateUserApplicationRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreateUserApplicationRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CreateUserApplicationRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CreateUserApplicationRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,