Sha256: ab79b387198058383e5108aef2dde8965b054f42d2ede29d5c841e87612614f4
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
module NubankSdk class Credit # # Returns the credit statement # # @param [NubankSdk::Client::HTTPS] connection # @param [NubankSdk::ApiRoutes] api_routes def initialize(connection:, api_routes:) @connection = connection @api_routes = api_routes end # # Returns the credit balances # # @return [Hash<Symbol, Float>] the credit balances def balances account_url = @api_routes.entrypoint(path: :ssl, entrypoint: :account) response = @connection.get(account_url) response_hash = Client.get_body(response) response_hash[:account][:balances] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nubank_sdk-0.6.0 | lib/nubank_sdk/credit.rb |