class Stripetease::API::Customers

Overview

This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.

Defined in:

stripetease/api/customers.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(session : Session) #

[View source]

Instance Method Detail

def create(account_balance : Int32 | Nil = nil, coupon : String | Nil = nil, default_source : String | Nil = nil, description : String | Nil = nil, email : String | Nil = nil, invoice_prefix : String | Nil = nil, metadata : Hash | Nil = nil, shipping : Hash | Nil = nil, source : String | Nil = nil, tax_info : Hash | Nil = nil) #

[View source]
def delete(id : String) #

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.


[View source]
def get(id : String) #

Retrieves a Customer object.


[View source]
def list(email : String | Nil = nil, created : Hash | Nil = nil, ending_before : String | Nil = nil, limit : Int32 | Nil = nil, starting_after : String | Nil = nil) #

Returns a list of customers.


[View source]
def search(query : String, limit : Int32 | Nil = nil, page : Int32 | Nil = nil) #

[View source]
def update(id : String, customer : String | Nil = nil, account_balance : Int32 | Nil = nil, coupon : String | Nil = nil, default_source : String | Nil = nil, description : String | Nil = nil, email : String | Nil = nil, invoice_prefix : String | Nil = nil, metadata : Hash | Nil = nil, shipping : Hash | Nil = nil, source : String | Nil = nil, tax_info : Hash | Nil = nil) #

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.


[View source]