Class: AcceptOn::Client
- Inherits:
-
Object
- Object
- AcceptOn::Client
- Includes:
- API::Promotion, API::Querying, API::Refunding, API::Tokenization
- Defined in:
- lib/accepton/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#environment ⇒ Object
Returns the value of attribute environment.
- #user_agent ⇒ String
Instance Method Summary collapse
- #api_key? ⇒ Boolean
-
#initialize(options = {}) {|_self| ... } ⇒ AcceptOn::Client
constructor
Initializes a new Client object.
Methods included from API::Tokenization
Methods included from API::Refunding
Methods included from API::Querying
#charge, #charges, #promo_code, #promo_codes, #token
Methods included from API::Promotion
#create_promo_code, #delete_promo_code, #update_promo_code
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ AcceptOn::Client
Initializes a new Client object
20 21 22 23 24 25 26 |
# File 'lib/accepton/client.rb', line 20 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) end set_defaults yield(self) if block_given? end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
13 14 15 |
# File 'lib/accepton/client.rb', line 13 def api_key @api_key end |
#environment ⇒ Object
Returns the value of attribute environment.
13 14 15 |
# File 'lib/accepton/client.rb', line 13 def environment @environment end |
Instance Method Details
#api_key? ⇒ Boolean
29 30 31 |
# File 'lib/accepton/client.rb', line 29 def api_key? !!api_key end |