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.



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

def email
  @email
end

#value_amountObject

Returns the value of attribute value_amount.



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

def value_amount
  @value_amount
end

Instance Method Details

#bodyObject



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

def body
  { merchant_funded_credit: to_hash }
end

#response_from_hash(hash) ⇒ Object



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

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