Class: Adyen::GrantOffersApi
- Defined in:
- lib/adyen/services/balancePlatform/grant_offers_api.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Service
Instance Method Summary collapse
- #get_all_available_grant_offers(headers: {}, queryParams: {}) ⇒ Object
- #get_grant_offer(grantOfferId, headers: {}) ⇒ Object
-
#initialize(client, version = DEFAULT_VERSION) ⇒ GrantOffersApi
constructor
A new instance of GrantOffersApi.
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ GrantOffersApi
Returns a new instance of GrantOffersApi.
8 9 10 11 12 |
# File 'lib/adyen/services/balancePlatform/grant_offers_api.rb', line 8 def initialize(client, version = DEFAULT_VERSION) @service = "BalancePlatform" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/balancePlatform/grant_offers_api.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/balancePlatform/grant_offers_api.rb', line 6 def version @version end |
Instance Method Details
#get_all_available_grant_offers(headers: {}, queryParams: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/balancePlatform/grant_offers_api.rb', line 14 def get_all_available_grant_offers(headers: {} , queryParams: {}) """ Get all available grant offers """ endpoint = "/grantOffers".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_grant_offer(grantOfferId, headers: {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/adyen/services/balancePlatform/grant_offers_api.rb', line 26 def get_grant_offer(grantOfferId, headers: {} ) """ Get a grant offer """ endpoint = "/grantOffers/{grantOfferId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [grantOfferId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |