Class: Levelup::Requests::AuthenticateMerchant
- Inherits:
-
Base
- Object
- Templates::DataParcel
- Base
- Levelup::Requests::AuthenticateMerchant
- Defined in:
- lib/levelup/requests/authenticate_merchant.rb
Overview
Represents a request to generate a merchant access token.
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Your merchant’s API key (accepts app API key as well).
-
#password ⇒ Object
Your merchant account’s password.
-
#username ⇒ Object
The username used to log into your merchant account.
Instance Method Summary collapse
Methods inherited from Base
#headers, instance_variables_excluded_from_hash, #send_to_api
Methods inherited from Templates::DataParcel
excluded?, #initialize, instance_variables_excluded_from_hash
Constructor Details
This class inherits a constructor from Levelup::Templates::DataParcel
Instance Attribute Details
#api_key ⇒ Object
Your merchant’s API key (accepts app API key as well)
6 7 8 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 6 def api_key @api_key end |
#password ⇒ Object
Your merchant account’s password
10 11 12 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 10 def password @password end |
#username ⇒ Object
The username used to log into your merchant account
8 9 10 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 8 def username @username end |
Instance Method Details
#auth_type ⇒ Object
12 13 14 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 12 def auth_type :none end |
#body ⇒ Object
16 17 18 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 16 def body { access_token: to_hash } end |
#response_from_hash(hash) ⇒ Object
20 21 22 |
# File 'lib/levelup/requests/authenticate_merchant.rb', line 20 def response_from_hash(hash) Responses::Success.new(hash['access_token']) end |