module Promisepay::Configurable
Configuration options for {Client}, defaulting to values in {Default}.
Attributes
@!attribute api_domain
@return [String] Promisepay API domain name. default: api.promisepay.com
@!attribute environment
@see http://docs.promisepay.com/v2.2/docs/environments @return [String] Promisepay environment. default: test
@!attribute token
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay token for Basic Authentication.
@!attribute username
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay username for Basic Authentication.
@!attribute errors_format
@return [String] {'processed', 'raw'} format to be used for exception messages.
@!attribute api_domain
@return [String] Promisepay API domain name. default: api.promisepay.com
@!attribute environment
@see http://docs.promisepay.com/v2.2/docs/environments @return [String] Promisepay environment. default: test
@!attribute token
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay token for Basic Authentication.
@!attribute username
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay username for Basic Authentication.
@!attribute errors_format
@return [String] {'processed', 'raw'} format to be used for exception messages.
@!attribute api_domain
@return [String] Promisepay API domain name. default: api.promisepay.com
@!attribute environment
@see http://docs.promisepay.com/v2.2/docs/environments @return [String] Promisepay environment. default: test
@!attribute token
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay token for Basic Authentication.
@!attribute username
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay username for Basic Authentication.
@!attribute errors_format
@return [String] {'processed', 'raw'} format to be used for exception messages.
@!attribute api_domain
@return [String] Promisepay API domain name. default: api.promisepay.com
@!attribute environment
@see http://docs.promisepay.com/v2.2/docs/environments @return [String] Promisepay environment. default: test
@!attribute token
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay token for Basic Authentication.
@!attribute username
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay username for Basic Authentication.
@!attribute errors_format
@return [String] {'processed', 'raw'} format to be used for exception messages.
@!attribute api_domain
@return [String] Promisepay API domain name. default: api.promisepay.com
@!attribute environment
@see http://docs.promisepay.com/v2.2/docs/environments @return [String] Promisepay environment. default: test
@!attribute token
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay token for Basic Authentication.
@!attribute username
@see http://docs.promisepay.com/v2.2/docs/overview-2 @return [String] Promisepay username for Basic Authentication.
@!attribute errors_format
@return [String] {'processed', 'raw'} format to be used for exception messages.
Public Class Methods
List of configurable keys for {Promisepay::Client}.
@return [Array] of option keys
# File lib/promisepay/configurable.rb, line 24 def keys @keys ||= [ :environment, :api_domain, :token, :username, :errors_format ] end
Public Instance Methods
API endpoint to be used by {Promisepay::Client}. Built from {#environment} and {#api_domain}
@return [String]
# File lib/promisepay/configurable.rb, line 48 def api_endpoint "https://#{@environment}.#{@api_domain}/" end
Reset configuration options to default values.
# File lib/promisepay/configurable.rb, line 36 def reset! Promisepay::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", Promisepay::Default.options[key]) end self end