Class: OnlinePayments::SDK::Merchant::Services::ServicesClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- OnlinePayments::SDK::Merchant::Services::ServicesClient
- Defined in:
- lib/onlinepayments/sdk/merchant/services/services_client.rb
Overview
Services client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
#client_meta_info, #communicator
Instance Method Summary collapse
-
#get_iin_details(body, context = nil) ⇒ OnlinePayments::SDK::Domain::GetIINDetailsResponse
Resource /v2/{merchantId}/services/getIINdetails.
-
#get_privacy_policy(query, context = nil) ⇒ OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse
Resource /v2/{merchantId}/services/privacypolicy.
-
#initialize(parent, path_context = nil) ⇒ ServicesClient
constructor
A new instance of ServicesClient.
-
#surcharge_calculation(body, context = nil) ⇒ OnlinePayments::SDK::Domain::CalculateSurchargeResponse
Resource /v2/{merchantId}/services/surchargecalculation.
-
#test_connection(context = nil) ⇒ OnlinePayments::SDK::Domain::TestConnection
Resource /v2/{merchantId}/services/testconnection.
Constructor Details
#initialize(parent, path_context = nil) ⇒ ServicesClient
Returns a new instance of ServicesClient.
24 25 26 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 24 def initialize(parent, path_context = nil) super(parent, path_context) end |
Instance Method Details
#get_iin_details(body, context = nil) ⇒ OnlinePayments::SDK::Domain::GetIINDetailsResponse
Resource /v2/{merchantId}/services/getIINdetails
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 125 def get_iin_details(body, context = nil) uri = instantiate_uri('/v2/{merchantId}/services/getIINdetails') @communicator.post( uri, client_headers, nil, body, OnlinePayments::SDK::Domain::GetIINDetailsResponse, context ) rescue ResponseException => e error_type = OnlinePayments::SDK::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |
#get_privacy_policy(query, context = nil) ⇒ OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse
Resource /v2/{merchantId}/services/privacypolicy
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 70 def get_privacy_policy(query, context = nil) uri = instantiate_uri('/v2/{merchantId}/services/privacypolicy') @communicator.get( uri, client_headers, query, OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse, context ) rescue ResponseException => e error_type = OnlinePayments::SDK::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |
#surcharge_calculation(body, context = nil) ⇒ OnlinePayments::SDK::Domain::CalculateSurchargeResponse
Resource /v2/{merchantId}/services/surchargecalculation
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 41 def surcharge_calculation(body, context = nil) uri = instantiate_uri('/v2/{merchantId}/services/surchargecalculation') @communicator.post( uri, client_headers, nil, body, OnlinePayments::SDK::Domain::CalculateSurchargeResponse, context ) rescue ResponseException => e error_type = OnlinePayments::SDK::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |
#test_connection(context = nil) ⇒ OnlinePayments::SDK::Domain::TestConnection
Resource /v2/{merchantId}/services/testconnection
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 97 def test_connection(context = nil) uri = instantiate_uri('/v2/{merchantId}/services/testconnection') @communicator.get( uri, client_headers, nil, OnlinePayments::SDK::Domain::TestConnection, context ) rescue ResponseException => e error_type = OnlinePayments::SDK::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |