Class: GifterHub::GiftCard

Inherits:
ApiResource show all
Extended by:
Operations::Create
Defined in:
lib/gifter_hub/gift_card.rb

Instance Attribute Summary

Attributes inherited from ApiResource

#attributes, #id, #opts

Instance Method Summary collapse

Methods included from Operations::Create

create

Methods inherited from ApiResource

class_name, get, #initialize, #inspect, #refresh, resource_url, #resource_url

Methods included from Operations::Get

included

Constructor Details

This class inherits a constructor from GifterHub::ApiResource

Instance Method Details

#redeem(params) ⇒ Object



5
6
7
8
# File 'lib/gifter_hub/gift_card.rb', line 5

def redeem(params)
  response = request(:post, resource_url + '/redeem', params)
  initialize_from(response)
end

#topup(params) ⇒ Object



10
11
12
13
# File 'lib/gifter_hub/gift_card.rb', line 10

def topup(params)
  response = request(:post, resource_url + '/topup', params)
  initialize_from(response)
end