Skip to main content

OrganizationModule

Struct OrganizationModule 

Source
pub struct OrganizationModule { /* private fields */ }

Implementations§

Source§

impl OrganizationModule

Source

pub fn new(client: Arc<TapsilatClient>) -> Self

Source

pub fn get_settings(&self) -> Result<Value>

Retrieves organization settings

Source

pub fn settings(&self) -> Result<OrganizationSettings>

Retrieves organization settings as OrganizationSettings

Source

pub fn get_callback(&self) -> Result<Value>

Retrieves organization callback (webhook) settings

Source

pub fn update_callback(&self, request: CallbackURLDTO) -> Result<Value>

Updates organization callback (webhook) settings

Source

pub fn create_business( &self, request: OrgCreateBusinessRequest, ) -> Result<Value>

Creates a new business entity

Source

pub fn get_currencies(&self) -> Result<Value>

Retrieves the organization’s currencies; the response is {currencies: [...]}

Source

pub fn currencies(&self) -> Result<OrganizationCurrenciesResponse>

Retrieves the organization’s currencies as OrganizationCurrenciesResponse

Source

pub fn list_currency_presets( &self, ) -> Result<OrganizationCurrencyPresetsResponse>

Lists the currencies the organization can add.

Source

pub fn create_currency( &self, currency_code: &str, ) -> Result<CreateOrganizationCurrencyResponse>

Adds a currency to the organization by its code, such as “EUR”.

Source

pub fn get_limit_user(&self, user_id: &str) -> Result<Value>

👎Deprecated:

the API has no organization user limit route; this request always fails

Retrieves limit information for a specific user

Source

pub fn set_limit_user(&self, request: SetLimitUserRequest) -> Result<Value>

👎Deprecated:

the API has no organization user limit route; this request always fails

Sets limit for a specific user

Source

pub fn get_limits(&self) -> Result<Value>

👎Deprecated:

use get_limits_by_id; the limits route needs an organization ID

Retrieves organization overall limits

Source

pub fn get_limits_by_id(&self, organization_id: &str) -> Result<Value>

Retrieves the limits of the given organization

Source

pub fn list_vpos(&self, currency_id: &str) -> Result<Value>

Lists virtual POS terminals

Source

pub fn get_meta(&self, name: &str) -> Result<Value>

Retrieves an organization meta value by name

Source

pub fn get_scopes(&self) -> Result<Value>

Retrieves supported scopes

Source

pub fn get_suborganizations(&self, page: u32, per_page: u32) -> Result<Value>

Retrieves list of sub-organizations; the response is {rows, total, page, per_page, total_pages}

Source

pub fn list_suborganizations( &self, page: u32, per_page: u32, ) -> Result<SuborganizationListResponse>

Lists sub-organizations.

Source

pub fn get_suborganization_detail( &self, id: &str, ) -> Result<SuborganizationDetail>

Retrieves a sub-organization; the server answers 404 when it does not exist.

Source

pub fn get_suborganization_submerchant( &self, suborganization_id: &str, ) -> Result<SuborganizationSubmerchantMapping>

Returns the submerchant mapped to a sub-organization.

Source

pub fn create_user(&self, request: OrgCreateUserReq) -> Result<Value>

Creates a new user

Source

pub fn create_user_token( &self, request: OrgUserTokenCreateRequest, ) -> Result<OrgUserTokenCreateResponse>

Creates an access token for an organization user; expire is given in minutes.

Source

pub fn verify_user(&self, user_id: &str) -> Result<Value>

Verifies an organization user

Source

pub fn verify_user_mobile(&self, user_id: &str) -> Result<Value>

Verifies an organization user via mobile

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.