helloextend_api_client
HelloextendApiClient - the Ruby gem for the Extend API Reference
Introduction
Welcome to the Extend API Documentation! Our goal is to make your integration as clear and easy as possible, so if you have feedback or suggestions for our API or reference docs, please let us know.
If you are implementing the API for the first time, please use the latest \"2019-08-01\" API version. If you have already implemented the API and haven't specified a version, you are on the \"Default\" API version.
#### You can get up and running with Extend with just 5 simple steps:
Create an account with Extend, and get an access token from your Extend merchant portal
Sync your store's products to Extend
Get the relevant Extend warranty SKUs and add them to your store
Add the JS SDK snippets to your store's website, which will enable warranty offers to be displayed in your store
Record warranty purchases with Extend so we can create a new contract and deliver it to the customer, or record warranty returns / refunds so we can cancel the contract and account for the refunded amount
Pro Tip! Keep your store's products up to date
To make sure you are selling warranty plans on all eligible products (and not selling them on ineligible ones), it is best to keep your store's products in sync with Extend. If you update your products infrequently, it might be easiest to manually upload or edit products in your merchant portal. If you do update frequently, though, consider integrating with our Products API resource.
Need help? Contact us! We love to help!
This SDK is automatically generated by the OpenAPI Generator project:
- API version: Default
- Package version: 1.0.3
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build helloextend_api_client.gemspec
Then either install the gem locally:
gem install ./helloextend_api_client-1.0.3.gem
(for development, run gem install --dev ./helloextend_api_client-1.0.3.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'helloextend_api_client', '~> 1.0.3'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'helloextend_api_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'helloextend_api_client'
# Setup authorization
HelloextendApiClient.configure do |config|
# Configure API key authorization: ExtendAccessToken
config.api_key['X-Extend-Access-Token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-Extend-Access-Token'] = 'Bearer'
end
api_instance = HelloextendApiClient::ContractsApi.new
store_id = 'c57ed096-24ef-49a4-a20a-d1b8bf770980' # String | Unique identifier for a Store on Extend
contract_id = 'cc957cb3-3d5d-430b-90a2-9ec96ee4c3cf' # String | Unique identifier for an Extend warranty Contract
begin
#Get invoice information for a contract
result = api_instance.contract_invoice(store_id, contract_id)
p result
rescue HelloextendApiClient::ApiError => e
puts "Exception when calling ContractsApi->contract_invoice: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api-demo.helloextend.com
Class | Method | HTTP request | Description |
---|---|---|---|
HelloextendApiClient::ContractsApi | contract_invoice | GET /stores/storeId/contracts/contractId/invoice | Get invoice information for a contract |
HelloextendApiClient::ContractsApi | create_contracts | POST /stores/storeId/contracts | Create a warranty contract |
HelloextendApiClient::ContractsApi | refund_contract | POST /stores/storeId/contracts/contractId/refund | Cancel a warranty contract and request a refund |
HelloextendApiClient::OffersApi | get_offer | GET /offers?storeId=storeId&productId=productId | Get Offer information |
HelloextendApiClient::PlansApi | offers_liststore_idstore_id_get | GET /offers/list?storeId=storeId | A list of warranty plans available to the store |
HelloextendApiClient::ProductsApi | stores_store_id_products_post | POST /stores/storeId/products | Create a product |
HelloextendApiClient::ProductsApi | stores_store_id_products_product_id_delete | DELETE /stores/storeId/products/productId | Delete a product |
HelloextendApiClient::ProductsApi | stores_store_id_products_product_id_get | GET /stores/storeId/products/productId | Get a product |
HelloextendApiClient::ProductsApi | stores_store_id_products_product_id_put | PUT /stores/storeId/products/productId | Update a product |
Documentation for Models
- HelloextendApiClient::Address
- HelloextendApiClient::Amount
- HelloextendApiClient::Contract
- HelloextendApiClient::ContractPlan
- HelloextendApiClient::ContractProduct
- HelloextendApiClient::Customer
- HelloextendApiClient::Error
- HelloextendApiClient::Invoice
- HelloextendApiClient::InvoiceDetails
- HelloextendApiClient::InvoiceDiscount
- HelloextendApiClient::InvoiceItems
- HelloextendApiClient::InvoiceMetadata
- HelloextendApiClient::InvoiceMetadataProduct
- HelloextendApiClient::InvoicePayee
- HelloextendApiClient::InvoicePayer
- HelloextendApiClient::Offer
- HelloextendApiClient::OfferPlan
- HelloextendApiClient::OfferPlanContract
- HelloextendApiClient::Plan
- HelloextendApiClient::PlanDetails
- HelloextendApiClient::PlanPrices
- HelloextendApiClient::PlansList
- HelloextendApiClient::Product
- HelloextendApiClient::ProductIdentifiers
- HelloextendApiClient::ProductMfrWarranty
Documentation for Authorization
ExtendAccessToken
- Type: API key
- API key parameter name: X-Extend-Access-Token
- Location: HTTP header