From 3a516854d965ca4f752050fd39e37a3cc0493b49 Mon Sep 17 00:00:00 2001 From: Oghenemarho Orukele Date: Sat, 11 Nov 2023 21:11:27 +0100 Subject: [PATCH] ready for publish --- Cargo.toml | 2 +- README.md | 2 +- src/endpoints/terminal.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aa94614..2e97978 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "paystack-rs" -version = "0.2.1" +version = "0.2.2" description = "A unofficial client library for the Paystack API" authors = ["Oghenemarho Orukele "] edition = "2021" diff --git a/README.md b/README.md index f16f9a3..aeb8735 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The client currently covers the following section of the API, and the sections t - [x] Transaction - [x] Transaction Split -- [ ] Terminal +- [x] Terminal - [ ] Customers - [ ] Dedicated Virtual Account - [ ] Apple Pay diff --git a/src/endpoints/terminal.rs b/src/endpoints/terminal.rs index 2a2068e..31ecb3a 100644 --- a/src/endpoints/terminal.rs +++ b/src/endpoints/terminal.rs @@ -9,7 +9,6 @@ use crate::{ }; use reqwest::StatusCode; use serde::Serialize; -use std::fmt::format; /// A Struct to hold all the functions of the terminal API route #[derive(Debug, Clone)] @@ -187,7 +186,7 @@ impl<'a> TerminalEndpoints<'a> { match post_request(self.api_key, &url, decommission_body).await { Ok(response) => match response.status() { - StatusCode::Ok => match response.json::().await { + StatusCode::OK => match response.json::().await { Ok(content) => Ok(content), Err(err) => Err(Error::Terminal(err.to_string())), },