Sha256: 7ef09eb2d002da1a2742fb3d66c47bc2182f89177280804ac83dcf553ea4b391
Contents?: true
Size: 630 Bytes
Versions: 1
Compression:
Stored size: 630 Bytes
Contents
require 'unirest' require 'gopay/error' module GoPay class Payment def self.create(payment_data) target = { target: { type: "ACCOUNT", goid: GoPay.goid } } GoPay.request :post, "/api/payments/payment", body_parameters: payment_data.merge(target) end def self.retrieve(id) GoPay.request :get, "/api/payments/payment/#{id}" end def self.void_recurrence(id) GoPay.request :post, "/api/payments/payment/#{id}/void-recurrence" end def self.refund(id, amount) GoPay.request :post, "/api/payments/payment/#{id}/refund", body_parameters: { amount: amount } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gopay-ruby-0.1.1 | lib/gopay/payment.rb |