Class: Pingpp::Recharge
- Inherits:
-
AppBasedResource
- Object
- PingppObject
- APIResource
- AppBasedResource
- Pingpp::Recharge
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/pingpp/recharge.rb
Class Method Summary collapse
- .list_refunds(id, params = {}, opts = {}) ⇒ Object
- .refund(id, params, opts = {}) ⇒ Object
- .retrieve_refund(id, refund_id, opts = {}) ⇒ Object
Instance Method Summary collapse
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods inherited from AppBasedResource
Methods inherited from APIResource
class_name, object_name, #refresh, resource_url, #resource_url, retrieve, uri_object_name
Methods included from APIOperations::Request
Methods inherited from PingppObject
#==, #[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #serialize_params, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Pingpp::PingppObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Pingpp::PingppObject
Class Method Details
.list_refunds(id, params = {}, opts = {}) ⇒ Object
21 22 23 24 |
# File 'lib/pingpp/recharge.rb', line 21 def self.list_refunds(id, params={}, opts={}) response, opts = request(:get, refund_url(id), params, opts) Util.convert_to_pingpp_object(response, opts) end |
.refund(id, params, opts = {}) ⇒ Object
11 12 13 14 |
# File 'lib/pingpp/recharge.rb', line 11 def self.refund(id, params, opts={}) response, opts = request(:post, refund_url(id), params, opts) Util.convert_to_pingpp_object(response, opts) end |
.retrieve_refund(id, refund_id, opts = {}) ⇒ Object
16 17 18 19 |
# File 'lib/pingpp/recharge.rb', line 16 def self.retrieve_refund(id, refund_id, opts={}) response, opts = request(:get, "#{refund_url(id)}/#{refund_id}", {}, opts) Util.convert_to_pingpp_object(response, opts) end |
Instance Method Details
#refund(params, opts = {}) ⇒ Object
6 7 8 9 |
# File 'lib/pingpp/recharge.rb', line 6 def refund(params, opts={}) response, opts = request(:post, refund_url, params, opts) initialize_from(response, opts) end |