square-rust

Crates.iosquare-rust
lib.rssquare-rust
version0.1.2
sourcesrc
created_at2023-10-09 15:33:40.501961
updated_at2023-10-10 03:05:44.013374
descriptionA Rust client library for the Square API.
homepagehttps://github.com/explorrrr/square-rust
repositoryhttps://github.com/explorrrr/square-rust
max_upload_size
id998167
size116,483
yuuki takahashi (explorrrr)

documentation

https://docs.rs/square-rust

README

Usage

Installation

cargo add square-rust

How to use

Example:

use square_rust::api::models::request::create_customer::versions::v20230925::CreateCustomerRequestV20230925;
use square_rust::config::SquareApiConfig;
use square_rust::http::client::http_client::SquareHttpClient;

let idempotency_key = None;
let given_name = Some("given_name".to_string());
let family_name = Some("family_name".to_string());
let company_name = None;
let nickname = None;
let email_address = None;
let address = None;
let phone_number = None;
let reference_id = None;
let note = None;
let birthday = None;
let tax_ids = None;
let config = SquareApiConfig::builder().build();
let http_client = SquareHttpClient::try_new(&config.http_client_config).unwrap();
let client = CustomersApi::new(config, http_client);
let request = CreateCustomerRequestV20230925::new(
    idempotency_key,
    given_name,
    family_name,
    company_name,
    nickname,
    email_address,
    address,
    phone_number,
    reference_id,
    note,
    birthday,
    tax_ids,
);
let _ = client.create_customer(request).await.unwrap();

Planed features

  • Payments
    • Payments
    • Refunds
    • Disputes
    • Checkout
    • Apple pay
    • Cards
    • Payouts
  • Terminal
  • Orders
  • Subscriptions
  • Invoices
  • Catalog
  • Inventory
  • Customers
  • Loyalty
  • Gift Cards
  • Bookings
  • Business
  • Team
  • Financials
  • Online
  • Auth
  • Webhook Subscriptions
Commit count: 22

cargo fmt