class Access::Api
Public Instance Methods
all_usage(options = {})
click to toggle source
# File lib/access/api.rb, line 355 def all_usage(options = {}) # Internal Admin only Call request.get("/all_usage", "report", options) do |response| ReportResponse.new(response) end end
autocomplete(options = {})
click to toggle source
# File lib/access/api.rb, line 89 def autocomplete(options = {}) request.get("/autocomplete", "offer", options) do |response| AutocompleteResponse.new(response) end end
create_oauth_application(options = {})
click to toggle source
# File lib/access/api.rb, line 299 def create_oauth_application(options = {}) # Internal Admin only Call request.create("/oauth_applications", 'token', options) do |response| OauthApplicationResponse.new(response) end # create("/oauth_applications", 'token', options) end
create_oauth_application_token(application_key, options = {})
click to toggle source
# File lib/access/api.rb, line 290 def create_oauth_application_token(application_key, options = {}) # Internal Admin only Call request.create("/oauth_applications/#{application_key}/access_tokens", 'token', options) do |response| # TokenResponse.new(response) # OauthApplicationResponse.new(response) end # create("/oauth_applications/#{application_key}/access_tokens", 'token', options) end
delete_oauth_application(application_key, options = {})
click to toggle source
# File lib/access/api.rb, line 315 def delete_oauth_application(application_key, options = {}) # Internal Admin only Call request.delete("/oauth_applications/#{application_key}", 'token', options) do |response| OauthApplication.new(response) end # delete("/oauth_applications/#{application_key}", 'token', options) end
favorites_create(resource_id, options = {})
click to toggle source
# File lib/access/api.rb, line 414 def favorites_create(resource_id, options = {}) request.post("/members/#{options.delete(:member_key)}/favorites/#{options.delete(:favorite_type)}/#{resource_id}", "mms", options) do |response| FavoriteResponse.new(response) end end
favorites_delete(resource_id, options = {})
click to toggle source
# File lib/access/api.rb, line 420 def favorites_delete(resource_id, options = {}) request.delete("/members/#{options.delete(:member_key)}/favorites/#{options.delete(:favorite_type)}/#{resource_id}", "mms", options) do |response| FavoriteResponse.new(response) end end
favorites_find(resource_id, options = {})
click to toggle source
# File lib/access/api.rb, line 408 def favorites_find(resource_id, options = {}) request.get("/members/#{options.delete(:member_key)}/favorites/#{options.delete(:favorite_type)}/#{resource_id}", "report", options) do |response| FavoriteResponse.new(response) end end
favorites_search(options = {})
click to toggle source
Favorites
# File lib/access/api.rb, line 402 def favorites_search(options = {}) request.get("/members/#{options.delete(:member_key)}/favorites/#{options.delete(:favorite_type)}", "report", options) do |response| FavoriteResponse.new(response) end end
find_campaign(campaign_key, options = {})
click to toggle source
# File lib/access/api.rb, line 130 def find_campaign(campaign_key, options = {}) request.get("/campaigns/#{campaign_key}", "campaign", options) do |response| CampaignResponse.new(response) end end
find_category(category_key, options = {})
click to toggle source
# File lib/access/api.rb, line 11 def find_category(category_key, options = {}) request.get("/categories/#{category_key}", "offer", options) do |response| CategoryResponse.new(response) end end
find_channel(channel_key, options = {})
click to toggle source
# File lib/access/api.rb, line 117 def find_channel(channel_key, options = {}) request.get("/channels/#{channel_key}", "campaign", options) do |response| ChannelResponse.new(response) end end
find_device(member_key, options = {})
click to toggle source
# File lib/access/api.rb, line 218 def find_device(member_key, options = {}) request.get("/members/#{member_key}/devices/#{options.delete(:udid)}", 'mms', options) do |response| DeviceResponse.new(response) end end
find_filter(application_key, options = {})
click to toggle source
# File lib/access/api.rb, line 254 def find_filter(application_key, options = {}) # Internal Admin only Call request.get("/filters/#{application_key}", "token", options) do |response| FilterResponse.new(response) end end
find_hotel(hotel_key, options = {})
click to toggle source
# File lib/access/api.rb, line 50 def find_hotel(hotel_key, options = {}) request.get("/hotels/#{hotel_key}", "hotel", options) do |response| HotelResponse.new(response) end end
find_location(location_key, options = {})
click to toggle source
# File lib/access/api.rb, line 63 def find_location(location_key, options = {}) request.get("/locations/#{location_key}", "offer", options) do |response| LocationResponse.new(response) end end
find_oauth_application(application_key, options = {})
click to toggle source
# File lib/access/api.rb, line 269 def find_oauth_application(application_key, options = {}) # Internal Admin only Call request.get("/oauth_applications/#{application_key}", 'token', options) do |response| OauthApplicationResponse.new(response) end end
find_oauth_application_token(application_key, token_key, options = {})
click to toggle source
# File lib/access/api.rb, line 283 def find_oauth_application_token(application_key, token_key, options = {}) # Internal Admin only Call request.get("/oauth_applications/#{application_key}/access_tokens/#{token_key}", 'token', options) do |response| TokenResponse.new(response) end end
find_offer(offer_key, options = {})
click to toggle source
# File lib/access/api.rb, line 24 def find_offer(offer_key, options = {}) request.get("/offers/#{offer_key}", "offer", options) do |response| OfferResponse.new(response) end end
find_offer_redemptions_by_member(member_key, usage_redeem_key, options = {})
click to toggle source
# File lib/access/api.rb, line 238 def find_offer_redemptions_by_member(member_key, usage_redeem_key, options = {}) request.get("/members/#{member_key}/offer_redemptions/#{usage_redeem_key}", "report", options) do |response| RedemptionResponse.new(response) end end
find_offer_uses_remaining(offer_key, options = {})
click to toggle source
# File lib/access/api.rb, line 30 def find_offer_uses_remaining(offer_key, options = {}) request.get("/offers/#{offer_key}/uses_remaining", "offer", options) do |response| OfferResponse.new(response) end end
find_program_provisioning_method(pcid)
click to toggle source
# File lib/access/api.rb, line 225 def find_program_provisioning_method(pcid) request.get("/programs/#{pcid}", "mms") do |response| ProgramResponse.new(response) end end
find_spot(spot_key, options = {})
click to toggle source
# File lib/access/api.rb, line 149 def find_spot(spot_key, options = {}) request.get("/spots/#{spot_key}", "campaign", options) do |response| SpotResponse.new(response) end end
find_store(store_key, options = {})
click to toggle source
# File lib/access/api.rb, line 76 def find_store(store_key, options = {}) request.get("/stores/#{store_key}", "offer", options) do |response| StoreResponse.new(response) end end
find_token(token, options = {})
click to toggle source
# File lib/access/api.rb, line 331 def find_token(token, options = {}) # Internal Admin only Call # new verify_other request.get("/tokens/#{token}", "token", options) do |response| TokenResponse.new(response) end end
geolocation_find(options = {})
click to toggle source
# File lib/access/api.rb, line 434 def geolocation_find(options = {}) request.get('/geolocation/find_location', 'offer', options) do |response| GeolocationResponse.new(response) end end
geolocation_search(options = {})
click to toggle source
# File lib/access/api.rb, line 428 def geolocation_search(options = {}) request.get('/geolocation', 'offer', options) do |response| GeolocationResponse.new(response) end end
get_shopping_cart_count(options= {})
click to toggle source
# File lib/access/api.rb, line 440 def get_shopping_cart_count(options= {}) request.get('/cart/count', 'shoppingcart', options) do |response| ShoppingCartResponse.new(response) end end
import_members(members, options = {})
click to toggle source
AMT
# File lib/access/api.rb, line 448 def import_members(members, options = {}) request.post('/imports', 'amt', options.merge({import: {members: members}})) do |response| AmtResponse.new(response) end end
list_imports(options = {})
click to toggle source
# File lib/access/api.rb, line 454 def list_imports(options = {}) request.get('/imports', 'amt', options) do |response| AmtResponse.new(response) end end
member_location_frequent(member, options = {})
click to toggle source
# File lib/access/api.rb, line 388 def member_location_frequent(member, options = {}) request.get("/members/#{member}/locations/frequent", "report", options) do |response| ReportResponse.new(response) end end
member_location_recent(member, options = {})
click to toggle source
# File lib/access/api.rb, line 394 def member_location_recent(member, options = {}) request.get("/members/#{member}/locations/recent", "report", options) do |response| ReportResponse.new(response) end end
member_query_frequent(member, options = {})
click to toggle source
# File lib/access/api.rb, line 376 def member_query_frequent(member, options = {}) request.get("/members/#{member}/queries/frequent", "report", options) do |response| ReportResponse.new(response) end end
member_query_recent(member, options = {})
click to toggle source
# File lib/access/api.rb, line 382 def member_query_recent(member, options = {}) request.get("/members/#{member}/queries/recent", "report", options) do |response| ReportResponse.new(response) end end
member_show(member_key, options = {})
click to toggle source
# File lib/access/api.rb, line 199 def member_show(member_key, options = {}) request.get("/members/#{member_key}", 'mms', options) do |response| MemberResponse.new(response) end end
member_update(member_key, options = {})
click to toggle source
# File lib/access/api.rb, line 205 def member_update(member_key, options = {}) request.put("/members/#{member_key}?program_id=#{options.delete(:program_id)}", 'mms', options) do |response| MemberResponse.new(response) end end
national_stores(options={})
click to toggle source
# File lib/access/api.rb, line 82 def national_stores(options={}) request.get("/stores/national", "offer", options) do |response| StoreResponse.new(response) end end
redeem_offer(offer_key, redeem_type = nil, options = {})
click to toggle source
# File lib/access/api.rb, line 96 def redeem_offer(offer_key, redeem_type = nil, options = {}) request.get("/redeem/#{offer_key}/#{redeem_type}", "redeem", options) do |response| RedeemResponse.new(response) end end
search_campaigns(options = {})
click to toggle source
# File lib/access/api.rb, line 124 def search_campaigns(options = {}) request.get("/campaigns", "campaign", options) do |response| CampaignResponse.new(response) end end
search_categories(options = {})
click to toggle source
Categories
# File lib/access/api.rb, line 5 def search_categories(options = {}) request.get("/categories", "offer", options) do |response| CategoryResponse.new(response) end end
search_channels(options = {})
click to toggle source
# File lib/access/api.rb, line 111 def search_channels(options = {}) request.get("/channels", "campaign", options) do |response| ChannelResponse.new(response) end end
search_city_savings(options = {})
click to toggle source
# File lib/access/api.rb, line 103 def search_city_savings(options = {}) # this is broken request.get("/citysavings", "allcitysavings", options) do |response| CitySavingsResponse.new(response) end end
search_devices(member_key, options = {})
click to toggle source
# File lib/access/api.rb, line 212 def search_devices(member_key, options = {}) request.get("/members/#{member_key}/devices", 'mms', options) do |response| DeviceResponse.new(response) end end
search_filters(options = {})
click to toggle source
Filters
# File lib/access/api.rb, line 247 def search_filters(options = {}) # Internal Admin only Call request.get("/filters", "token", options) do |response| FilterResponse.new(response) end end
search_hotels(options = {})
click to toggle source
Hotels
# File lib/access/api.rb, line 44 def search_hotels(options = {}) request.get("/hotels", "hotel", options) do |response| HotelResponse.new(response) end end
search_locations(options = {})
click to toggle source
Locations
# File lib/access/api.rb, line 57 def search_locations(options = {}) request.get("/locations", "offer", options) do |response| LocationResponse.new(response) end end
search_oauth_application_tokens(application_key, options = {})
click to toggle source
# File lib/access/api.rb, line 276 def search_oauth_application_tokens(application_key, options = {}) # Internal Admin only Call request.get("/oauth_applications/#{application_key}/access_tokens", 'token', options) do |response| TokenResponse.new(response) end end
search_oauth_applications(options = {})
click to toggle source
Oauth Applications
# File lib/access/api.rb, line 262 def search_oauth_applications(options = {}) # Internal Admin only Call request.get("/oauth_applications", 'token', options) do |response| OauthApplicationResponse.new(response) end end
search_offer_redemptions_by_member(member_key, options = {})
click to toggle source
Offer
Redemptions
# File lib/access/api.rb, line 232 def search_offer_redemptions_by_member(member_key, options = {}) request.get("/members/#{member_key}/offer_redemptions", "report", options) do |response| RedemptionResponse.new(response) end end
search_offers(options = {})
click to toggle source
Offers
# File lib/access/api.rb, line 18 def search_offers(options = {}) request.get("/offers", "offer", options) do |response| OfferResponse.new(response) end end
search_product_groups(options = {})
click to toggle source
Product
Groups
# File lib/access/api.rb, line 37 def search_product_groups(options = {}) request.get("/product_groups", "offer", options) do |response| ProductGroupResponse.new(response) end end
search_spots_by_campaign(campaign_key, options = {})
click to toggle source
# File lib/access/api.rb, line 143 def search_spots_by_campaign(campaign_key, options = {}) request.get("/spots/campaign/#{campaign_key}", "campaign", options) do |response| SpotResponse.new(response) end end
search_spots_by_channel(channel_key, options = {})
click to toggle source
# File lib/access/api.rb, line 137 def search_spots_by_channel(channel_key, options = {}) request.get("/spots/channel/#{channel_key}", "campaign", options) do |response| SpotResponse.new(response) end end
search_stores(options = {})
click to toggle source
Stores
# File lib/access/api.rb, line 70 def search_stores(options = {}) request.get("/stores", "offer", options) do |response| StoreResponse.new(response) end end
search_tokens(options = {})
click to toggle source
Access
Tokens
# File lib/access/api.rb, line 324 def search_tokens(options = {}) # Internal Admin only Call request.get("/tokens", 'token', options) do |response| TokenResponse.new(response) end end
show_import(import_key, options = {})
click to toggle source
# File lib/access/api.rb, line 460 def show_import(import_key, options = {}) request.get("/imports/#{import_key}", 'amt', options) do |response| AmtResponse.new(response) end end
update_oauth_application(application_key, batch= {})
click to toggle source
# File lib/access/api.rb, line 307 def update_oauth_application(application_key, batch= {}) # Internal Admin only Call request.put("/oauth_applications/#{application_key}", 'token', options) do |response| OauthApplicationResponse.new(response) end # put("/oauth_applications/#{application_key}", 'token', options) end
usage(options = {})
click to toggle source
# File lib/access/api.rb, line 362 def usage(options = {}) # Internal Admin only Call request.get("/usage", "report", options) do |response| ReportResponse.new(response) end end
usage_other(token, options = {})
click to toggle source
# File lib/access/api.rb, line 369 def usage_other(token, options = {}) # Internal Admin only Call request.get("/usage/#{token}", "report", options) do |response| ReportResponse.new(response) end end
user_authentication(options = {})
click to toggle source
# File lib/access/api.rb, line 168 def user_authentication(options = {}) request.post("/auth", "mms", options) do |response| UserResponse.new(response) end end
user_authentication_by_cvt(options = {})
click to toggle source
# File lib/access/api.rb, line 174 def user_authentication_by_cvt(options = {}) request.get("/auth", "mms", options) do |response| UserResponse.new(response) end end
user_authentication_by_member_key(options = {})
click to toggle source
# File lib/access/api.rb, line 180 def user_authentication_by_member_key(options = {}) request.get("/auth", "mms", options) do |response| UserResponse.new(response) end end
user_external_authentication(options = {})
click to toggle source
# File lib/access/api.rb, line 186 def user_external_authentication(options = {}) request.post("/external-auth", "mms", options) do |response| UserResponse.new(response) end end
user_external_authentication_by_token(options = {})
click to toggle source
# File lib/access/api.rb, line 192 def user_external_authentication_by_token(options = {}) request.get("/external-auth", "mms", options) do |response| UserResponse.new(response) end end
user_registration(options = {})
click to toggle source
# File lib/access/api.rb, line 156 def user_registration(options = {}) request.post("/register", "mms", options) do |response| UserResponse.new(response) end end
user_update(options = {})
click to toggle source
# File lib/access/api.rb, line 162 def user_update(options = {}) request.put("/users", "mms", options) do |response| UserResponse.new(response) end end
verify_filter(filter, options = {})
click to toggle source
# File lib/access/api.rb, line 347 def verify_filter(filter, options = {}) # Internal Admin only Call request.post_for_filter("/filter", 'token', filter, options) do |response| VerifyResponse.new(response) end end
verify_token(options = {})
click to toggle source
# File lib/access/api.rb, line 340 def verify_token(options = {}) # Internal Admin only Call request.get("/verify", 'token', options) do |response| VerifyResponse.new(response) end end
Private Instance Methods
request()
click to toggle source
# File lib/access/api.rb, line 468 def request Access::Request.new end