Class: MerchantZip::Charge
- Inherits:
-
ApiResource
- Object
- ApiResource
- MerchantZip::Charge
- Extended by:
- Operations::Get
- Defined in:
- lib/merchant-zip/charge.rb
Class Method Summary collapse
Methods included from Operations::Get
Methods inherited from ApiResource
Methods included from Operations::Request
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/merchant-zip/charge.rb', line 9 def self.create(params = {}, opts = {}) payload = { authority: { type: "checkout_id", value: params[:checkout_id], }, reference: params[:reference], amount: params[:amount], currency: params[:currency].to_s.upcase, capture: true, } request(:post, resource_url, payload, opts) end |
.resource_url ⇒ Object
5 6 7 |
# File 'lib/merchant-zip/charge.rb', line 5 def self.resource_url "/#{CGI.escape(class_name.tableize)}" end |