Project

zip_money

0.0
No commit activity in last 3 years
No release in over 3 years
ZipMoney Merchant API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 4.4, >= 4.4.6
~> 0.2, >= 0.2.11
~> 0.2, >= 0.2.16
~> 4.1, >= 4.1.2
>= 3.4.0, ~> 3.4
~> 3.0, >= 3.0.1
~> 1.24, >= 1.24.3

Runtime

>= 2.1.0
~> 1.0, >= 1.0.1
 Project Readme

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

Documentation for Authorization

Authorization

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