Class: Levelup::Requests::GiveMerchantCredit

Inherits:
Base show all
Includes:
Templates::MerchantAuthenticated
Defined in:
lib/levelup/requests/give_merchant_credit.rb

Overview

Represents a request to grant merchant-funded credit to a user. Merchant access token must have the give_merchant_funded_credit permission.

Constant Summary

Constants inherited from Base

Base::ALLOWED_REQUEST_METHODS

Instance Attribute Summary collapse

Attributes included from Templates::MerchantAuthenticated

#merchant_access_token

Instance Method Summary collapse

Methods included from Templates::MerchantAuthenticated

#auth_type

Methods inherited from Base

#auth_type, #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

#emailObject

Returns the value of attribute email.



7
8
9
# File 'lib/levelup/requests/give_merchant_credit.rb', line 7

def email
  @email
end

#value_amountObject

Returns the value of attribute value_amount.



7
8
9
# File 'lib/levelup/requests/give_merchant_credit.rb', line 7

def value_amount
  @value_amount
end

Instance Method Details

#bodyObject



9
10
11
# File 'lib/levelup/requests/give_merchant_credit.rb', line 9

def body
  { merchant_funded_credit: to_hash }
end

#response_from_hash(hash) ⇒ Object



13
14
15
# File 'lib/levelup/requests/give_merchant_credit.rb', line 13

def response_from_hash(hash)
  Responses::Success.new
end