项目作者: bundleofbytes

项目描述 :
Rust implementation of Stripe API
高级语言: Rust
项目地址: git://github.com/bundleofbytes/libstripe.git
创建时间: 2019-04-17T19:18:07Z
项目社区:https://github.com/bundleofbytes/libstripe

开源协议:Other

下载


libstripe

Status

Build Status

Stripe library for rust.

Note: Everything is subject to change but everything should be stable to use.

Example

  1. use libstripe::Client;
  2. use libstripe::resources::core::customer::{Customer, CustomerParam};
  3. fn main() {
  4. let client = Client::new("sk_test_..............");
  5. let mut param = CustomerParam::default();
  6. param.email = Some("example@example.com");
  7. param.description = Some("Example account");
  8. let customer = match Customer::create(&client, param) {
  9. Ok(cust) => cust,
  10. Err(e) => panic!("{}", e)
  11. };
  12. println!("{:?}", customer);
  13. }