lib/figo.rb in figo-1.2.4 vs lib/figo.rb in figo-1.2.5
- old
+ new
@@ -28,11 +28,11 @@
# Ruby bindings for the figo Connect API: http://developer.figo.me
module Figo
$api_endpoint = "api.figo.me"
- $valid_fingerprints = ["3A:62:54:4D:86:B4:34:38:EA:34:64:4E:95:10:A9:FF:37:27:69:C0",
+ $valid_fingerprints = ["38:AE:4A:32:6F:16:EA:15:81:33:8B:B0:D8:E4:A6:35:E7:27:F1:07",
"CF:C1:BC:7F:6A:16:09:2B:10:83:8A:B0:22:4F:3A:65:D2:70:D7:3E"]
# Base class for all errors transported via the figo Connect API.
class Error < RuntimeError
# Initialize error object.
@@ -200,14 +200,14 @@
#
# @param name [String] First and last name
# @param email [String] Email address; It must obey the figo username & password policy
# @param password [String] New figo Account password; It must obey the figo username & password policy
# @param language [String] Two-letter code of preferred language
- # @param send_newsletter [Boolean] This flag indicates whether the user has agreed to be contacted by email
+ # @param send_newsletter [Boolean] This flag indicates whether the user has agreed to be contacted by email -- Not accepted by backend at the moment
# @return [Hash] object with the key `recovery_password` as documented in the figo Connect API specification
- def create_user(name, email, password, language='de', send_newsletter=True)
- data = { 'name' => name, 'email' => email, 'password' => password, 'language' => language, 'send_newsletter' => send_newsletter, 'affiliate_client_id' => @client_id}
+ def create_user(name, email, password, language='de', send_newsletter=true)
+ data = { 'name' => name, 'email' => email, 'password' => password, 'language' => language, 'affiliate_client_id' => @client_id} #'send_newsletter' => send_newsletter,
return query_api("/auth/user", data)
end
end
# Represents a user-bound connection to the figo Connect API and allows access to the user's data.
@@ -349,10 +349,19 @@
# Remove stored PIN from bank
#
# @param bank [Bank, String] the bank whose stored PIN should be removed or its ID
# @return [nil]
def remove_bank_pin(bank)
- query_app bank.is_a?(String) ? "/rest/banks/#{bank}/submit": "/rest/banks/#{bank.bank_id}/submit", nil, "POST"
+ query_api bank.is_a?(String) ? "/rest/banks/#{bank}/submit": "/rest/banks/#{bank.bank_id}/submit", nil, "POST"
+ end
+
+ # Get bank information from standard bank code
+ #
+ # @param country_code [String]
+ # @param bank_code [String] bank sort code (Bankleitzahl)
+ # @return [Hash] JSON response
+ def find_bank(bank_code, country_code)
+ query_api "/rest/catalog/banks/#{country_code}/#{bank_code}"
end
# Retrieve list of transactions (on all or a specific account)
#
# @param account_id [String] ID of the account for which to list the transactions