Table of Contents
Bolt Cover (https://www.boltcover.com/) helps UK retailers offer insurance at the point of sale.
This is an example of how to retrieve an insurance premium that will be offered to your customers for a specific product category and item price.
Note the examples use furniture categories however we do cover other categories, contact us for more information.
Bolt Warranty Limited Is Registered In England And Wales Under Company Number 14654818. Bolt Warranty Limited Is An Appointed Representative Of Innovative Risk Labs Ltd, Which Is Authorised And Regulated By The Financial Conduct Authority. Firm Reference Number 998330.
You will need a test API key to make this script work, head over to https://app.boltcover.com/request-test-api and request one.
You will need to have Ruby installed along with various gems. The script has been tested against Ruby 3.2.3 only.
-
Create a YAML file called get_boltcover_insurance_price.yml and insert the two attributes BOLT_BASE_URL and BOLT_API_KEY. If you are new to YAML see lines 20 onwards in the code file. The base url will be https://api.boltcover.com/test if you are just getting started.
-
Adjust the variables category and product_price to your needs, here are some categories you might use (note you can only use one at a time):
"Baby & Toddler Furniture", "Beds & Accessories", "Benches", "Cabinets & Storage", "Chairs", "Entertainment Centers & TV Stands", "Furniture Sets", "Futon Frames", "Futon Pads", "Futons", "Office Furniture", "Ottomans", "Sofa Accessories", "Sofas", "Table Accessories", "Tables"
-
Run ruby get_boltcover_insurance_price.rb at your command prompt.
-
You should now get a price, if you have any issues submit an issue or email us at developers@boltcover.com
Any contributions you make are greatly appreciated by the team at Bolt Cover.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.