class Gyft::Client::Reseller
Public Class Methods
new(client)
click to toggle source
# File lib/gyft/client/reseller.rb, line 3 def initialize client @client = client end
Public Instance Methods
account()
click to toggle source
# File lib/gyft/client/reseller.rb, line 44 def account account = @client.get('/reseller/account') account[:client] = @client Gyft::Account.new(account) end
categories()
click to toggle source
# File lib/gyft/client/reseller.rb, line 14 def categories @client.get('/reseller/categories')['details'].map do |category| category[:client] = @client Gyft::Category.new(category) end end
merchants()
click to toggle source
# File lib/gyft/client/reseller.rb, line 21 def merchants @client.get('/reseller/merchants')['details'].map do |merchant| merchant[:client] = @client merchant = Gyft::Merchant.new(merchant) if merchant.shop_cards merchant.shop_cards = merchant.shop_cards.map do |card| card[:client] = @client Gyft::Card.new(card) end end if merchant.categories merchant.categories = merchant.categories.map do |category| category[:client] = @client Gyft::Category.new(category) end end merchant end end
shop_cards()
click to toggle source
# File lib/gyft/client/reseller.rb, line 7 def shop_cards @client.get('/reseller/shop_cards').map do |card| card[:client] = @client Gyft::Card.new(card) end end
transaction()
click to toggle source
# File lib/gyft/client/reseller.rb, line 54 def transaction Gyft::Client::Transactions.new(@client) end
transactions()
click to toggle source
# File lib/gyft/client/reseller.rb, line 50 def transactions Gyft::Client::Transactions.new(@client) end