Skip to content

A Rust-based client for using the payment module APIs from Block, Inc., Squareup Pte. Ltd.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

explorrrr/square-rust

Repository files navigation

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

About

A Rust-based client for using the payment module APIs from Block, Inc., Squareup Pte. Ltd.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published