Class: PaystackSdk::Resources::Banks
- Defined in:
- lib/paystack_sdk/resources/banks.rb
Constant Summary
Constants included from Utils::ConnectionUtils
Utils::ConnectionUtils::BASE_URL
Instance Method Summary collapse
-
#list(query = {}) ⇒ Object
List banks.
Methods inherited from Base
Methods included from Utils::ConnectionUtils
#create_connection, #initialize_connection
Methods included from Validations
#validate_allowed_values!, #validate_currency!, #validate_date_format!, #validate_email!, #validate_fields!, #validate_hash!, #validate_positive_integer!, #validate_presence!, #validate_reference_format!, #validate_required_params!
Constructor Details
This class inherits a constructor from PaystackSdk::Resources::Base
Instance Method Details
#list(query = {}) ⇒ Object
List banks
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/paystack_sdk/resources/banks.rb', line 8 def list(query = {}) if query.key?(:currency) validate_allowed_values!( value: query[:currency], name: "currency", allowed_values: %w[NGN GHS ZAR KES USD] ) end handle_response(@connection.get("/bank", query)) end |