Class: Io::Flow::V0::Clients::MerchantGiftCardBalances
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::MerchantGiftCardBalances
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ MerchantGiftCardBalances
constructor
A new instance of MerchantGiftCardBalances.
-
#post(merchant_gift_card_balance_form) ⇒ Object
Check the remaining balance on a gift card.
Constructor Details
#initialize(client) ⇒ MerchantGiftCardBalances
Returns a new instance of MerchantGiftCardBalances.
7527 7528 7529 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7527 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(merchant_gift_card_balance_form) ⇒ Object
Check the remaining balance on a gift card
7532 7533 7534 7535 7536 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7532 def post(merchant_gift_card_balance_form) (x = merchant_gift_card_balance_form; x.is_a?(::Io::Flow::V0::Models::MerchantGiftCardBalanceForm) ? x : ::Io::Flow::V0::Models::MerchantGiftCardBalanceForm.new(x)) r = @client.request("/balance").with_json(merchant_gift_card_balance_form.to_json).post ::Io::Flow::V0::Models::MerchantGiftCardBalance.new(r) end |