use crate::rest::client::ServerResponse;
use crate::rest::enums::category::Category;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GetDeliveryPriceParams {
pub category: Category, pub symbol: String, }
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeliveryPrice {
pub symbol: String,
#[serde(rename = "deliveryPrice")]
pub delivery_price: String,
#[serde(rename = "deliveryTime")]
pub delivery_time: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeliveryPriceResult {
pub category: String,
#[serde(rename = "nextPageCursor")]
pub next_page_cursor: String,
pub list: Vec<DeliveryPrice>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeliveryPriceResponse(ServerResponse<DeliveryPriceResult>);
impl DeliveryPriceResponse {
pub fn into_inner(self) -> DeliveryPriceResult {
self.0.result
}
pub fn into_response(self) -> ServerResponse<DeliveryPriceResult> {
self.0
}
}