Class: Adyen::PaymentMethodsMerchantLevelApi
- Defined in:
- lib/adyen/services/management/payment_methods_merchant_level_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
- #add_apple_pay_domain(request, merchantId, paymentMethodId, headers: {}) ⇒ Object
- #get_all_payment_methods(merchantId, headers: {}, queryParams: {}) ⇒ Object
- #get_apple_pay_domains(merchantId, paymentMethodId, headers: {}) ⇒ Object
- #get_payment_method_details(merchantId, paymentMethodId, headers: {}) ⇒ Object
-
#initialize(client, version = DEFAULT_VERSION) ⇒ PaymentMethodsMerchantLevelApi
constructor
A new instance of PaymentMethodsMerchantLevelApi.
- #request_payment_method(request, merchantId, headers: {}) ⇒ Object
- #update_payment_method(request, merchantId, paymentMethodId, headers: {}) ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ PaymentMethodsMerchantLevelApi
Returns a new instance of PaymentMethodsMerchantLevelApi.
8 9 10 11 12 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 8 def initialize(client, version = DEFAULT_VERSION) @service = "Management" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 6 def version @version end |
Instance Method Details
#add_apple_pay_domain(request, merchantId, paymentMethodId, headers: {}) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 74 def add_apple_pay_domain(request, merchantId, paymentMethodId, headers: {} ) """ Add an Apple Pay domain """ endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId,paymentMethodId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#get_all_payment_methods(merchantId, headers: {}, queryParams: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 14 def get_all_payment_methods(merchantId, headers: {} , queryParams: {}) """ Get all payment methods """ endpoint = "/merchants/{merchantId}/paymentMethodSettings".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_apple_pay_domains(merchantId, paymentMethodId, headers: {}) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 38 def get_apple_pay_domains(merchantId, paymentMethodId, headers: {} ) """ Get Apple Pay domains """ endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId,paymentMethodId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_payment_method_details(merchantId, paymentMethodId, headers: {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 26 def get_payment_method_details(merchantId, paymentMethodId, headers: {} ) """ Get payment method details """ endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId,paymentMethodId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#request_payment_method(request, merchantId, headers: {}) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 62 def request_payment_method(request, merchantId, headers: {} ) """ Request a payment method """ endpoint = "/merchants/{merchantId}/paymentMethodSettings".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#update_payment_method(request, merchantId, paymentMethodId, headers: {}) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/adyen/services/management/payment_methods_merchant_level_api.rb', line 50 def update_payment_method(request, merchantId, paymentMethodId, headers: {} ) """ Update a payment method """ endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [merchantId,paymentMethodId] action = { method: "patch", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |