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_dcc_rate_inquiry(body, context = nil) ⇒ OnlinePayments::SDK::Domain::CurrencyConversionResponse
Resource /v2/{merchantId}/services/dccrate.
-
#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.
26 27 28 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 26 def initialize(parent, path_context = nil) super(parent, path_context) end |
Instance Method Details
#get_dcc_rate_inquiry(body, context = nil) ⇒ OnlinePayments::SDK::Domain::CurrencyConversionResponse
Resource /v2/{merchantId}/services/dccrate
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 72 def get_dcc_rate_inquiry(body, context = nil) uri = instantiate_uri('/v2/{merchantId}/services/dccrate') @communicator.post( uri, client_headers, nil, body, OnlinePayments::SDK::Domain::CurrencyConversionResponse, 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_iin_details(body, context = nil) ⇒ OnlinePayments::SDK::Domain::GetIINDetailsResponse
Resource /v2/{merchantId}/services/getIINdetails
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 156 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
101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 101 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
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 43 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
128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 128 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 |