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.
-
#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.
22 23 24 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 22 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
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 94 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
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 39 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 |
#test_connection(context = nil) ⇒ OnlinePayments::SDK::Domain::TestConnection
Resource /v2/{merchantId}/services/testconnection
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/onlinepayments/sdk/merchant/services/services_client.rb', line 66 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 |