Module: Pluggy
- Extended by:
- Forwardable
- Defined in:
- lib/pluggy.rb,
lib/pluggy/util.rb,
lib/pluggy/lists.rb,
lib/pluggy/client.rb,
lib/pluggy/errors.rb,
lib/pluggy/api_key.rb,
lib/pluggy/version.rb,
lib/pluggy/api_resource.rb,
lib/pluggy/api_requestor.rb,
lib/pluggy/configuration.rb,
lib/pluggy/pluggy_object.rb,
lib/pluggy/resources/bill.rb,
lib/pluggy/resources/item.rb,
lib/pluggy/resources/loan.rb,
lib/pluggy/resources/misc.rb,
lib/pluggy/lists/base_list.rb,
lib/pluggy/credential_store.rb,
lib/pluggy/lists/array_list.rb,
lib/pluggy/lists/cursor_list.rb,
lib/pluggy/lists/offset_list.rb,
lib/pluggy/resources/account.rb,
lib/pluggy/connection_manager.rb,
lib/pluggy/resources/merchant.rb,
lib/pluggy/resources/connector.rb,
lib/pluggy/resources/transaction.rb,
lib/pluggy/services/base_service.rb,
lib/pluggy/services/other_services.rb,
lib/pluggy/services/transaction_service.rb
Overview
Unofficial Ruby client for the Pluggy open-finance API.
client = Pluggy::Client.new(client_id: "...", client_secret: "...")
client.accounts.list(item_id: item_id).each { |a| puts a.name }
Configuration is per-client. The module-level accessors below set defaults that new clients inherit; they are not a way to make calls without a client.
Defined Under Namespace
Modules: Lists, Resources, Services, Util Classes: APIError, APIRequestor, APIResource, ApiKey, AuthenticationError, BadGatewayError, Client, Configuration, ConfigurationError, ConflictError, ConnectionError, ConnectionManager, CredentialStore, Error, InvalidRequestError, NotFoundError, PermissionError, PluggyObject, RateLimitError, TimeoutError
Constant Summary collapse
- ERROR_CLASSES =
{ 400 => InvalidRequestError, 401 => AuthenticationError, 403 => PermissionError, 404 => NotFoundError, 409 => ConflictError, 429 => RateLimitError, 500 => APIError, 502 => BadGatewayError }.freeze
- VERSION =
File.read(File.join(__dir__, "..", "..", "VERSION")).strip
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
- .configure {|config| ... } ⇒ Object
-
.error_class_for(status) ⇒ Object
By the time this is consulted the requestor has already resolved the expired-apiKey case, so a surviving 403 really is a permission problem.
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
42 43 44 |
# File 'lib/pluggy.rb', line 42 def config @config end |
Class Method Details
.configure {|config| ... } ⇒ Object
48 49 50 51 |
# File 'lib/pluggy.rb', line 48 def configure yield config config end |
.error_class_for(status) ⇒ Object
By the time this is consulted the requestor has already resolved the expired-apiKey case, so a surviving 403 really is a permission problem.
120 121 122 123 124 |
# File 'lib/pluggy/errors.rb', line 120 def self.error_class_for(status) ERROR_CLASSES.fetch(status) do status >= 500 ? APIError : Error end end |