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