Class: PaystackSdk::Resources::Base
- Inherits:
-
Object
- Object
- PaystackSdk::Resources::Base
- Includes:
- Utils::ConnectionUtils, Validations
- Defined in:
- lib/paystack_sdk/resources/base.rb
Overview
The Base class serves as a parent class for all resource classes in the SDK.
It provides shared functionality, such as handling API responses.
Direct Known Subclasses
Banks, Charges, Customers, Transactions, TransferRecipients, Transfers, Verification
Constant Summary
Constants included from Utils::ConnectionUtils
Utils::ConnectionUtils::BASE_URL
Instance Method Summary collapse
-
#initialize(connection = nil, secret_key: nil) ⇒ Base
constructor
Initializes a new
Baseinstance.
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
#initialize(connection = nil, secret_key: nil) ⇒ Base
Initializes a new Base instance.
32 33 34 |
# File 'lib/paystack_sdk/resources/base.rb', line 32 def initialize(connection = nil, secret_key: nil) @connection = initialize_connection(connection, secret_key: secret_key) end |