Class: MasspayRubySdk::CatalogService
- Inherits:
-
Object
- Object
- MasspayRubySdk::CatalogService
- Defined in:
- lib/masspay_ruby_sdk/api/catalog_service.rb
Instance Method Summary collapse
-
#get_cheapest_country_services(country_code, query_params = {}) ⇒ Object
Gets a list of Companies and their cheapest service offerings for the given country code.
-
#get_country_list ⇒ Object
Gets a list of countries where services offered.
-
#get_country_services(country_code, query_params = {}) ⇒ Object
Gets a list of Companies and their service offerings for the given country code.
-
#get_destination_token(destination_token, query_params = {}) ⇒ Object
Returns provided service GET /payout/service/destination_token.
-
#get_destination_token_alternatives(destination_token) ⇒ Object
Returns list of alternative service to a provided service GET /payout/service/destination_token/alternatives.
-
#get_user_agreement(query_params = {}) ⇒ Object
Get user agreement GET /payout/user-agreements.
-
#get_user_agreements_names ⇒ Object
Get available user agreements OPTIONS /payout/user-agreements.
-
#initialize(client) ⇒ CatalogService
constructor
A new instance of CatalogService.
Constructor Details
#initialize(client) ⇒ CatalogService
Returns a new instance of CatalogService.
15 16 17 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 15 def initialize(client) @client = client ||= Client.new end |
Instance Method Details
#get_cheapest_country_services(country_code, query_params = {}) ⇒ Object
Gets a list of Companies and their cheapest service offerings for the given country code. GET /payout/country/country_code/cheapest
37 38 39 40 41 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 37 def get_cheapest_country_services country_code, query_params={} @client.get("payout/country/#{country_code}/cheapest") do |req| req.params = query_params end end |
#get_country_list ⇒ Object
Gets a list of countries where services offered. GET /payout/country/list
21 22 23 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 21 def get_country_list @client.get("payout/country/list") end |
#get_country_services(country_code, query_params = {}) ⇒ Object
Gets a list of Companies and their service offerings for the given country code. GET /payout/country/country_code
28 29 30 31 32 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 28 def get_country_services country_code, query_params={} @client.get("payout/country/#{country_code}") do |req| req.params = query_params end end |
#get_destination_token(destination_token, query_params = {}) ⇒ Object
Returns provided service GET /payout/service/destination_token
52 53 54 55 56 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 52 def get_destination_token destination_token, query_params={} @client.get("payout/service/#{destination_token}") do |req| req.params = query_params end end |
#get_destination_token_alternatives(destination_token) ⇒ Object
Returns list of alternative service to a provided service GET /payout/service/destination_token/alternatives
45 46 47 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 45 def get_destination_token_alternatives destination_token @client.get("payout/service/#{destination_token}/alternatives") end |
#get_user_agreement(query_params = {}) ⇒ Object
Get user agreement GET /payout/user-agreements
61 62 63 64 65 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 61 def get_user_agreement query_params={} @client.get("payout/user-agreements") do |req| req.params = query_params end end |
#get_user_agreements_names ⇒ Object
Get available user agreements OPTIONS /payout/user-agreements
69 70 71 |
# File 'lib/masspay_ruby_sdk/api/catalog_service.rb', line 69 def get_user_agreements_names @client.("payout/user-agreements") end |