Class: Pingpp::Refund

Inherits:
APIResource show all
Includes:
APIOperations::List, APIOperations::Update
Defined in:
lib/pingpp/refund.rb

Instance Attribute Summary

Attributes inherited from PingppObject

#api_key

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

included

Methods included from APIOperations::Update

included, #save, #serialize_metadata, #serialize_params

Methods inherited from APIResource

class_name, #refresh, url

Methods inherited from PingppObject

#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #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

.retrieve(id, api_key = nil) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/pingpp/refund.rb', line 10

def self.retrieve(id, api_key=nil)
  raise NotImplementedError.new("Refunds cannot be retrieved without a charge ID. Retrieve a refund using charge.refunds.retrieve('refund_id')")
end

Instance Method Details

#urlObject



6
7
8
# File 'lib/pingpp/refund.rb', line 6

def url
  "#{Charge.url}/#{CGI.escape(charge)}/refunds/#{CGI.escape(id)}"
end