Skip to content

Commit

Permalink
fix: Make main structs Debug and Clone
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsvante committed Nov 3, 2021
1 parent 0941a78 commit 7fa92f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/metadata_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::requester::Requester;
use crate::response::Response;
use http::Method;

#[derive(Debug, Clone)]
pub struct MetadataApi {
requester: Requester,
}
Expand Down
6 changes: 3 additions & 3 deletions src/requester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use crate::params::Params;
use crate::response::Response;
use crate::Error;
use http::Method;
use log::{debug, info};
use log::debug;

#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct Requester {
config: Config,
base_url: String,
Expand Down Expand Up @@ -76,7 +76,7 @@ impl Requester {
}

let resp = if let Some(payload) = payload {
info!("Payload: {}", payload);
debug!("Payload: {}", payload);
req.send_string(payload)
} else {
req.send_string("")
Expand Down
1 change: 1 addition & 0 deletions src/rest_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use super::suiteql::SuiteQl;

static DEFAULT_BASE_URL: &str = "https://{}.suitetalk.api.netsuite.com/services/rest";

#[derive(Debug, Clone)]
pub struct RestApi {
requester: Requester,
pub suiteql: SuiteQl,
Expand Down
1 change: 1 addition & 0 deletions src/suiteql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::requester::Requester;
use crate::response::Response;
use http::Method;

#[derive(Debug, Clone)]
pub struct SuiteQl {
requester: Requester,
limit: usize,
Expand Down

0 comments on commit 7fa92f4

Please sign in to comment.