Creating a customer with Ruby – Square Corner Blog – Medium

Adding customers to your Square account is a snap with a simple ruby script.

No Customers Yet ☹️

Customer management via API can be incredibly useful when syncing with other systems, automating marketing tasks, and more. If your Customer Directory looks empty and you want to add to it, take a look at the following ruby script:

This script is fairly simple because Square’s Ruby SDK does most of the heavy lifting through authentication and parsing the data returned from the API. You can even run it easily from the command line with ruby CreateCustomer.rb. With a few modifications to the script you could loop through customer creation to import your customers from a different database or even a backup file that you have created in the past.

That’s it! If you have any questions or comments, feel free to reach out to us at @SquareDev on twitter or look at the official documentation.

First customer ready to go!🥇

Source link