pub struct Locations {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Locations
impl Locations
Sourcepub async fn get_page(
&self,
start: &str,
page_size: f64,
) -> Result<Response<Vec<Location>>, ClientError>
pub async fn get_page( &self, start: &str, page_size: f64, ) -> Result<Response<Vec<Location>>, ClientError>
List locations.
This function performs a GET to the /locations endpoint.
Retrieves all locations for your business.
Parameters:
authorization: &str– The OAuth2 token header.start: &str– The ID of the last entity of the previous page, used for pagination to get the next page.page_size: f64– The number of results to be returned in each page. The value must be between 2 and 10,000. If not specified, the default will be 1,000.
Sourcepub async fn get_all(&self) -> Result<Response<Vec<Location>>, ClientError>
pub async fn get_all(&self) -> Result<Response<Vec<Location>>, ClientError>
List locations.
This function performs a GET to the /locations endpoint.
As opposed to get, this function returns all the pages of the request at once.
Retrieves all locations for your business.
Sourcepub async fn post(
&self,
body: &PostLocationRequest,
) -> Result<Response<Location>, ClientError>
pub async fn post( &self, body: &PostLocationRequest, ) -> Result<Response<Location>, ClientError>
Create new location.
This function performs a POST to the /locations endpoint.
Creates a new location for the business.
Parameters:
authorization: &str– The OAuth2 token header.
Sourcepub async fn get(&self, id: &str) -> Result<Response<Location>, ClientError>
pub async fn get(&self, id: &str) -> Result<Response<Location>, ClientError>
GET a location.
This function performs a GET to the /locations/{id} endpoint.
Retrieve a specific location.
Parameters:
authorization: &str– The OAuth2 token header.
Sourcepub async fn patch(
&self,
id: &str,
body: &PostLocationRequest,
) -> Result<Response<Location>, ClientError>
pub async fn patch( &self, id: &str, body: &PostLocationRequest, ) -> Result<Response<Location>, ClientError>
Update location.
This function performs a PATCH to the /locations/{id} endpoint.
Modifies a specific location.
Auto Trait Implementations§
impl Freeze for Locations
impl !RefUnwindSafe for Locations
impl Send for Locations
impl Sync for Locations
impl Unpin for Locations
impl UnsafeUnpin for Locations
impl !UnwindSafe for Locations
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