pub struct Users<'a> { /* private fields */ }Expand description
Accessor for namecheap.users.* commands, returned by
Client::users.
Implementations§
Source§impl<'a> Users<'a>
impl<'a> Users<'a>
Sourcepub async fn get_balances(&self) -> Result<Balances>
pub async fn get_balances(&self) -> Result<Balances>
Sourcepub async fn get_pricing(
&self,
request: &PricingRequest,
) -> Result<PricingResult>
pub async fn get_pricing( &self, request: &PricingRequest, ) -> Result<PricingResult>
Looks up product pricing (namecheap.users.getPricing).
This is a free, read-only call. For domain prices, build the request with
PricingRequest::domains and narrow it by action and TLD. The response
is nested (product type, then category, then product, then per-duration
prices); use PricingResult::prices to flatten it to the price entries.
Note this returns standard TLD pricing. Per-name premium prices come
from domains().check() instead.
§Example
use namecheap_client::PricingRequest;
let result = client
.users()
.get_pricing(&PricingRequest::domains().action("REGISTER").tld("com"))
.await?;
for price in result.prices() {
println!("{} {}: {} {}", price.duration, price.duration_type, price.price, price.currency);
}§Errors
Returns an Error on transport failure, an API error
response, or a decode failure.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Users<'a>
impl<'a> !UnwindSafe for Users<'a>
impl<'a> Freeze for Users<'a>
impl<'a> Send for Users<'a>
impl<'a> Sync for Users<'a>
impl<'a> Unpin for Users<'a>
impl<'a> UnsafeUnpin for Users<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more