Struct culqi::Customer [] [src]

pub struct Customer {}

Methods

impl Customer
[src]

Examples

let client = culqi::Client::new("{KEY}");
let new_customer = culqi::Customer::new("Will","Muro","wmuro@me.com","Av. Lima 123","LIMA","PE","999999999",None);
let create_customer = culqi::Customer::create(&client, &new_customer);
let get_customer = culqi::Customer::retrieve(&client, "{ID}");
let delete_customer = culqi::Customer::delete(&client, "{ID}");

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

use std::collections::HashMap;
let mut customer_filter: HashMap<String, String>;
customer_filter = HashMap::new();
customer_filter.insert("first_name".to_string(), "Will".to_string());
customer_filter.insert("last_name".to_string(), "Muro".to_string());
customer_filter.insert("email".to_string(), "will@me.com".to_string());
customer_filter.insert("address".to_string(), "Av. Lima 123".to_string());
customer_filter.insert("address_city".to_string(), "LIMA".to_string());
customer_filter.insert("phone_number".to_string(), "99999999".to_string());
customer_filter.insert("country_code".to_string(), "PE".to_string());
let all_customers = culqi::Customer::all(&client, Some(customer_filter), None, None, None);

Trait Implementations

impl Debug for Customer
[src]

Formats the value using the given formatter.