Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sezzle_client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sezzle_client

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

sezzle_client

SezzleClient - the Ruby gem for the Sezzle API

The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build sezzle_client.gemspec

Then either install the gem locally:

gem install ./sezzle_client-1.0.0.gem

(for development, run gem install --dev ./sezzle_client-1.0.0.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 'sezzle_client', '~> 1.0.0'

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 'sezzle_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 'sezzle_client'

api_instance = SezzleClient::BearerAuthenticationApi.new
body = SezzleClient::Body.new # Body | Authentication request


begin
  #Get bearer authentication token
  result = api_instance.post_v1_authentication(body)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling BearerAuthenticationApi->post_v1_authentication: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::CustomerApi.new
customer_uuid = 'customer_uuid_example' # String | Customer UUID


begin
  #Delete customer
  api_instance.delete_v2_token(customer_uuid)
rescue SezzleClient::ApiError => e
  puts "Exception when calling CustomerApi->delete_v2_token: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::CustomerApi.new
customer_uuid = 'customer_uuid_example' # String | Customer UUID


begin
  #Get customer
  result = api_instance.get_v2_customer(customer_uuid)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling CustomerApi->get_v2_customer: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::CustomerApi.new

begin
  #Get list of customers
  result = api_instance.get_v2_customer_list
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling CustomerApi->get_v2_customer_list: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::CustomerApi.new
customer_uuid = 'customer_uuid_example' # String | Customer UUID
opts = {
  body: SezzleClient::Body2.new, # Body2 | Order request
  sezzle_request_id: 'sezzle_request_id_example' # String | Unique client-generated ID to enforce idempotency
}

begin
  #Create order by customer
  result = api_instance.post_v2_customer_order(customer_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling CustomerApi->post_v2_customer_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::CustomerApi.new
customer_uuid = 'customer_uuid_example' # String | Customer UUID
opts = {
  body: SezzleClient::Price.new # Price | Preapproval request
}

begin
  #Preapprove amount by customer
  result = api_instance.preapprove_v2_token(customer_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling CustomerApi->preapprove_v2_token: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID


begin
  #Get order details
  result = api_instance.get_v2_order(order_uuid)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->get_v2_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
body = SezzleClient::Body1.new # Body1 | Session request
order_uuid = 'order_uuid_example' # String | Order UUID


begin
  #Update order
  api_instance.patch_v2_checkout(body, order_uuid)
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->patch_v2_checkout: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID
opts = {
  body: SezzleClient::Body3.new # Body3 | Capture request
}

begin
  #Capture amount by order
  result = api_instance.post_v2_capture_by_order(order_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->post_v2_capture_by_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID
opts = {
  body: SezzleClient::Price.new # Price | Reauthorize request
}

begin
  #Reauthorize amount by order
  result = api_instance.post_v2_reauthorize_by_order(order_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->post_v2_reauthorize_by_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID
opts = {
  body: SezzleClient::Price.new # Price | Refund request
}

begin
  #Refund amount by order
  result = api_instance.post_v2_refund_by_order(order_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->post_v2_refund_by_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID
opts = {
  body: SezzleClient::Price.new # Price | Release request
}

begin
  #Release amount by order
  result = api_instance.post_v2_release_by_order(order_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->post_v2_release_by_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::OrderApi.new
order_uuid = 'order_uuid_example' # String | Order UUID
opts = {
  body: SezzleClient::Body4.new # Body4 | Upcharge request
}

begin
  #Upcharge amount by order
  result = api_instance.post_v2_upcharge_by_order(order_uuid, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling OrderApi->post_v2_upcharge_by_order: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::ReportsApi.new
start_date = 'start_date_example' # String | Start Date
opts = {
  end_date: 'end_date_example', # String | End Date
  offset: 'offset_example', # String | Pagination Offset (Limit 20)
  currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
}

begin
  #Interest Account Activity
  result = api_instance.get_interest_account_activity(start_date, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling ReportsApi->get_interest_account_activity: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::ReportsApi.new
opts = {
  currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
}

begin
  #Interest Account Balance
  result = api_instance.get_interest_account_balance(opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling ReportsApi->get_interest_account_balance: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::ReportsApi.new
payout_uuid = 'payout_uuid_example' # String | Payout UUID


begin
  #Settlement Details
  result = api_instance.get_settlement_details(payout_uuid)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling ReportsApi->get_settlement_details: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::ReportsApi.new
start_date = 'start_date_example' # String | Start Date
opts = {
  end_date: 'end_date_example', # String | End Date
  offset: 'offset_example', # String | Pagination Offset (Limit 20)
  currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
}

begin
  #Settlement Summaries
  result = api_instance.get_settlement_summaries(start_date, opts)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling ReportsApi->get_settlement_summaries: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::SessionApi.new
session_uuid = 'session_uuid_example' # String | Session UUID


begin
  #Get session status
  result = api_instance.get_v2_session(session_uuid)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling SessionApi->get_v2_session: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::SessionApi.new
body = SezzleClient::Session.new # Session | Session request


begin
  #Create a new session
  result = api_instance.post_v2_session(body)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling SessionApi->post_v2_session: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::TokenApi.new
token = 'token_example' # String | Customer initiated token, e.g. generated in mobile app


begin
  #Get customer token
  api_instance.get_v2_customer_token(token)
rescue SezzleClient::ApiError => e
  puts "Exception when calling TokenApi->get_v2_customer_token: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::TokenApi.new
token = 'token_example' # String | Merchant initiated token


begin
  #Get session token
  result = api_instance.get_v2_session_token(token)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling TokenApi->get_v2_session_token: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::WebhooksApi.new
webhooks_uuid = 'webhooks_uuid_example' # String | Webhooks UUID


begin
  #Delete webhooks
  api_instance.delete_v2_webhooks(webhooks_uuid)
rescue SezzleClient::ApiError => e
  puts "Exception when calling WebhooksApi->delete_v2_webhooks: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::WebhooksApi.new

begin
  #List webhooks
  result = api_instance.get_v2_webhooks
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling WebhooksApi->get_v2_webhooks: #{e}"
end
# Setup authorization
SezzleClient.configure do |config|
  # Configure API key authorization: Bearer
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = SezzleClient::WebhooksApi.new
body = SezzleClient::Webhook.new # Webhook | Webhooks request


begin
  #Create webhooks
  result = api_instance.post_v2_webhooks(body)
  p result
rescue SezzleClient::ApiError => e
  puts "Exception when calling WebhooksApi->post_v2_webhooks: #{e}"
end

Documentation for API Endpoints

All URIs are relative to //sandbox.gateway.sezzle.com/v2/

ClassMethodHTTP requestDescription
SezzleClient::BearerAuthenticationApipost_v1_authenticationPOST /authenticationGet bearer authentication token
SezzleClient::CustomerApidelete_v2_tokenDELETE /customer/{customer_uuid}Delete customer
SezzleClient::CustomerApiget_v2_customerGET /customer/{customer_uuid}Get customer
SezzleClient::CustomerApiget_v2_customer_listGET /customerGet list of customers
SezzleClient::CustomerApipost_v2_customer_orderPOST /customer/{customer_uuid}/orderCreate order by customer
SezzleClient::CustomerApipreapprove_v2_tokenPOST /customer/{customer_uuid}/preapprovePreapprove amount by customer
SezzleClient::OrderApiget_v2_orderGET /order/{order_uuid}Get order details
SezzleClient::OrderApipatch_v2_checkoutPATCH /order/{order_uuid}Update order
SezzleClient::OrderApipost_v2_capture_by_orderPOST /order/{order_uuid}/captureCapture amount by order
SezzleClient::OrderApipost_v2_reauthorize_by_orderPOST /order/{order_uuid}/reauthorizeReauthorize amount by order
SezzleClient::OrderApipost_v2_refund_by_orderPOST /order/{order_uuid}/refundRefund amount by order
SezzleClient::OrderApipost_v2_release_by_orderPOST /order/{order_uuid}/releaseRelease amount by order
SezzleClient::OrderApipost_v2_upcharge_by_orderPOST /order/{order_uuid}/upchargeUpcharge amount by order
SezzleClient::ReportsApiget_interest_account_activityGET /interest/activityInterest Account Activity
SezzleClient::ReportsApiget_interest_account_balanceGET /interest/balanceInterest Account Balance
SezzleClient::ReportsApiget_settlement_detailsGET /settlements/details/{payout_uuid}Settlement Details
SezzleClient::ReportsApiget_settlement_summariesGET /settlements/summariesSettlement Summaries
SezzleClient::SessionApiget_v2_sessionGET /session/{session_uuid}Get session status
SezzleClient::SessionApipost_v2_sessionPOST /sessionCreate a new session
SezzleClient::TokenApiget_v2_customer_tokenGET /token/{token}/customerGet customer token
SezzleClient::TokenApiget_v2_session_tokenGET /token/{token}/sessionGet session token
SezzleClient::WebhooksApidelete_v2_webhooksDELETE /webhooks/{webhooks_uuid}Delete webhooks
SezzleClient::WebhooksApiget_v2_webhooksGET /webhooksList webhooks
SezzleClient::WebhooksApipost_v2_webhooksPOST /webhooksCreate webhooks

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

FAQs

Package last updated on 19 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc