Class: Io::Flow::V0::Clients::MerchantGiftCardReversals
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::MerchantGiftCardReversals
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ MerchantGiftCardReversals
constructor
A new instance of MerchantGiftCardReversals.
-
#post(merchant_gift_card_reversal_form) ⇒ Object
Check the remaining balance on a gift card.
Constructor Details
#initialize(client) ⇒ MerchantGiftCardReversals
Returns a new instance of MerchantGiftCardReversals.
7557 7558 7559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7557 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(merchant_gift_card_reversal_form) ⇒ Object
Check the remaining balance on a gift card
7562 7563 7564 7565 7566 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7562 def post(merchant_gift_card_reversal_form) (x = merchant_gift_card_reversal_form; x.is_a?(::Io::Flow::V0::Models::MerchantGiftCardReversalForm) ? x : ::Io::Flow::V0::Models::MerchantGiftCardReversalForm.new(x)) r = @client.request("/reverse").with_json(merchant_gift_card_reversal_form.to_json).post ::Io::Flow::V0::Models::MerchantGiftCardBalance.new(r) end |