zip_money
ZipMoney - the Ruby gem for the Merchant API
ZipMoney Merchant API Initial build
This SDK is automatically generated by the Swagger Codegen project:
- API version: 2017-03-01
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build zip_money.gemspec
Then either install the gem locally:
gem install ./zip_money-1.0.0.gem
(for development, run gem install --dev ./zip_money-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 'zip_money', '~> 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 'zip_money', :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 'zip_money'
# Setup authorization
ZipMoney.configure do |config|
# Configure API key authorization: Authorization
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 = ZipMoney::ChargesApi.new
id = "id_example" # String | The id of the authorised charge
opts = {
idempotency_key: "idempotency_key_example" # String | The unique idempotency key.
}
begin
#Cancel a charge
result = api_instance.charges_cancel(id, opts)
p result
rescue ZipMoney::ApiError => e
puts "Exception when calling ChargesApi->charges_cancel: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.sandbox.zipmoney.com.au/merchant/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ZipMoney::ChargesApi | charges_cancel | POST /charges/{id}/cancel | Cancel a charge |
ZipMoney::ChargesApi | charges_capture | POST /charges/{id}/capture | Capture a charge |
ZipMoney::ChargesApi | charges_create | POST /charges | Create a charge |
ZipMoney::ChargesApi | charges_list | GET /charges | List charges |
ZipMoney::ChargesApi | charges_retrieve | GET /charges/{id} | Retrieve a charge |
ZipMoney::CheckoutsApi | checkouts_create | POST /checkouts | Create a checkout |
ZipMoney::CheckoutsApi | checkouts_get | GET /checkouts/{id} | Retrieve a checkout |
ZipMoney::CustomersApi | customers_get | GET /customers/{id} | Retrieve customer |
ZipMoney::CustomersApi | customers_list | GET /customers | List customers |
ZipMoney::RefundsApi | refunds_create | POST /refunds | Create a refund |
ZipMoney::RefundsApi | refunds_list | GET /refunds | List refunds |
ZipMoney::RefundsApi | refunds_retrieve | GET /refunds/{id} | Retrieve a refund |
ZipMoney::SettlementsApi | settlements_get | GET /settlements/{id} | Retrieve a settlement |
ZipMoney::SettlementsApi | settlements_list | GET /settlements | List settlements |
ZipMoney::TokensApi | tokens_create | POST /tokens | Create token |
Documentation for Models
- ZipMoney::Address
- ZipMoney::Authority
- ZipMoney::CaptureChargeRequest
- ZipMoney::Charge
- ZipMoney::ChargeCollection
- ZipMoney::ChargeOrder
- ZipMoney::Checkout
- ZipMoney::CheckoutConfiguration
- ZipMoney::CheckoutFeatures
- ZipMoney::CheckoutFeaturesTokenisation
- ZipMoney::CheckoutOrder
- ZipMoney::CreateChargeRequest
- ZipMoney::CreateCheckoutRequest
- ZipMoney::CreateCheckoutRequestFeatures
- ZipMoney::CreateCheckoutRequestFeaturesTokenisation
- ZipMoney::CreateRefundRequest
- ZipMoney::CreateTokenRequest
- ZipMoney::Customer
- ZipMoney::ErrorResponse
- ZipMoney::ErrorResponseError
- ZipMoney::ErrorResponseErrorDetails
- ZipMoney::InlineResponse200
- ZipMoney::Metadata
- ZipMoney::OrderItem
- ZipMoney::OrderShipping
- ZipMoney::OrderShippingTracking
- ZipMoney::Refund
- ZipMoney::Shopper
- ZipMoney::ShopperStatistics
- ZipMoney::Token
Documentation for Authorization
Authorization
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header