Struct culqi::Token [] [src]

pub struct Token {}

Methods

impl Token
[src]

Examples

let client = culqi::Client::new("{KEY}");
let new_token = culqi::Token::new("4111111111111111","123",9,2020,"test@test.com", None);
let create_token = culqi::Token::create(&client, &new_token);
let get_token = culqi::Token::retrieve(&client, "{ID}");

Here you are the list of filters you can use for get Tokens

use std::collections::HashMap;
let mut token_filter: HashMap<String, String>;
token_filter = HashMap::new();
token_filter.insert("card_brand".to_string(), "VISA".to_string());
token_filter.insert("card_type".to_string(), "DEBITO".to_string());
token_filter.insert("device_type".to_string(), "DESKTOP".to_string());
token_filter.insert("bin".to_string(), "411111".to_string());
token_filter.insert("country_code".to_string(), "PE".to_string());

It must uses Unix Timestamp

token_filter.insert("creation_date".to_string(), "1484006400".to_string());
token_filter.insert("creation_date_from".to_string(), "1479600000".to_string());
token_filter.insert("creation_date_to".to_string(), "1484006400".to_string());
let all_tokens = culqi::Token::all(&client, Some(token_filter), None, None, None);

Trait Implementations

impl Debug for Token
[src]

Formats the value using the given formatter.