Update reqwest stub
Update the reqwest implementation to match the Client trait by removing
add/update methods and add the new `post_batches` method.
//! A Reqwest-based implementation of Client
+use crate::batches::store::BatchList;
use crate::error::InternalError;
use super::Client;
@@ -36,9 +37,7 @@ impl ReqwestClient {
}
impl Client for ReqwestClient {
- /// Adds the given `PurchaseOrder`.
- #[cfg(feature = "purchase-order")]
- fn add_purchase_order(&self, _purchase_order: &PurchaseOrder) -> Result<(), InternalError> {
+ fn post_batches(&self, _batches: BatchList) -> Result<(), InternalError> {
unimplemented!()
}
@@ -48,16 +47,6 @@ impl Client for ReqwestClient {
unimplemented!()
}
- /// Adds the given `PurchaseOrderVersion`.
- #[cfg(feature = "purchase-order")]
- fn add_purchase_order_version(
- &self,
- _id: String,
- _purchase_order_version: &PurchaseOrderVersion,
- ) -> Result<(), InternalError> {
- unimplemented!()
- }
-
/// Retrieves the purchase order version with the given `version_id` of the purchase order
/// with the given `id`
#[cfg(feature = "purchase-order")]
@@ -69,17 +58,6 @@ impl Client for ReqwestClient {
unimplemented!()
}
- /// Adds the given `PurchaseOrderRevision`.
- #[cfg(feature = "purchase-order")]
- fn add_purchase_order_revision(
- &self,
- _id: String,
- _version_id: String,
- _purchase_order_revision: &PurchaseOrderRevision,
- ) -> Result<(), InternalError> {
- unimplemented!()
- }
-
/// Retrieves the purchase order revision with the given `revision_id` of the purchase
/// order version with the given `version_id` of the purchase order with the given `id`
#[cfg(feature = "purchase-order")]
@@ -121,20 +99,4 @@ impl Client for ReqwestClient {
) -> Result<Vec<PurchaseOrderRevision>, InternalError> {
unimplemented!()
}
-
- /// Updates the purchase order with the same id as the given `purchase_order`.
- #[cfg(feature = "purchase-order")]
- fn update_purchase_order(&self, _purchase_order: &PurchaseOrder) -> Result<(), InternalError> {
- unimplemented!()
- }
-
- /// Updates the purchase order version with the same version_id as the given `purchase_order_version`.
- #[cfg(feature = "purchase-order")]
- fn update_purchase_order_version(
- &self,
- _id: String,
- _purchase_order_version: &PurchaseOrderVersion,
- ) -> Result<(), InternalError> {
- unimplemented!()
- }
}
