Module: ViglinkApi::Deal
- Included in:
- Client
- Defined in:
- lib/viglink_api/deal.rb
Instance Method Summary collapse
-
#find_deal_types(options = {}) ⇒ Hashie::Mash
Retrieve the list of Deal Types.
-
#find_deals(options = {}) ⇒ Hashie::Mash
Retrieve the list of Deals.
Instance Method Details
#find_deal_types(options = {}) ⇒ Hashie::Mash
Retrieve the list of Deal Types
the complete response
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/viglink_api/deal.rb', line 32 def find_deal_types( = {}) full_response = .delete(:full) if [:full] [:key] = @api_key deal_types_response = get('/vigcatalog/deal_types.xml', ) if full_response.to_s.to_bool or @api_full_response deal_types_response.response if deal_types_response.response else deal_types_response.response.results.deal_types if deal_types_response.response.results end end |
#find_deals(options = {}) ⇒ Hashie::Mash
Retrieve the list of Deals
the complete response
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/viglink_api/deal.rb', line 13 def find_deals(={}) full_response = .delete(:full) if [:full] [:key] = @api_key deals_response = get('/vigcatalog/deals.xml', ) if full_response.to_s.to_bool or @api_full_response deals_response.response if deals_response.response else deals_response.response.results.deals if deals_response.response.results end end |