Class: Hyperwallet::Payment

Inherits:
HyperwalletObject show all
Defined in:
lib/hyperwallet/payment.rb

Class Method Summary collapse

Methods inherited from HyperwalletObject

attributes, construct_from, convert_to_hyperwallet_object, #initialize, #method_missing, relations

Constructor Details

This class inherits a constructor from Hyperwallet::HyperwalletObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Hyperwallet::HyperwalletObject

Class Method Details

.allObject



4
5
6
7
# File 'lib/hyperwallet/payment.rb', line 4

def self.all
  res = Hyperwallet.request(:get, '/payments')
  convert_to_hyperwallet_object(res, Payment)
end

.create(params = {}) ⇒ Object



14
15
16
17
# File 'lib/hyperwallet/payment.rb', line 14

def self.create(params={})
  res = Hyperwallet.request(:post, '/payments', params)
  convert_to_hyperwallet_object(res, Payment)
end

.find(key) ⇒ Object



9
10
11
12
# File 'lib/hyperwallet/payment.rb', line 9

def self.find(key)
  res = Hyperwallet.request(:get, "/payments/#{key}")
  convert_to_hyperwallet_object(res, Payment)
end