Class: Espago::ApiConnection::GetCharges
- Inherits:
-
Object
- Object
- Espago::ApiConnection::GetCharges
- Defined in:
- lib/espago/api_connection/get_charges.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ GetCharges
constructor
A new instance of GetCharges.
- #request(params = {}) ⇒ Object
Constructor Details
#initialize(connection) ⇒ GetCharges
Returns a new instance of GetCharges.
4 5 6 |
# File 'lib/espago/api_connection/get_charges.rb', line 4 def initialize(connection) @connection = connection end |
Instance Method Details
#request(params = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/espago/api_connection/get_charges.rb', line 8 def request(params = {}) if params[:charge_id] @connection.get "charges/#{params[:charge_id]}" else @connection.get "charges", params end end |