Class: OnlinePayments::SDK::ApiResource
- Inherits:
-
Object
- Object
- OnlinePayments::SDK::ApiResource
- Defined in:
- lib/onlinepayments/sdk/api_resource.rb
Overview
Base class of all Online Payments platform API resources. Provides shared functionality to facilitate communication with the Online Payments platform.
Direct Known Subclasses
Client, Merchant::HostedCheckout::HostedCheckoutClient, Merchant::HostedTokenization::HostedTokenizationClient, Merchant::Mandates::MandatesClient, Merchant::MerchantClient, Merchant::PaymentLinks::PaymentLinksClient, Merchant::Payments::PaymentsClient, Merchant::Payouts::PayoutsClient, Merchant::ProductGroups::ProductGroupsClient, Merchant::Products::ProductsClient, Merchant::Services::ServicesClient, Merchant::Sessions::SessionsClient, Merchant::Tokens::TokensClient
Instance Attribute Summary collapse
-
#client_meta_info ⇒ String
readonly
JSON string containing client info specific to the current client.
-
#communicator ⇒ OnlinePayments::SDK::Communicator
readonly
Communicator instance that provides communication with the Online Payments platform.
Instance Method Summary collapse
-
#initialize(arg, path_context = nil, client_meta_info = false) ⇒ ApiResource
constructor
Creates a new ApiResource.
Constructor Details
#initialize(arg, path_context = nil, client_meta_info = false) ⇒ ApiResource
Creates a new ApiResource.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/onlinepayments/sdk/api_resource.rb', line 23 def initialize(arg, path_context = nil, = false) if == false raise ArgumentError, 'parent is required' unless arg @parent = arg @communicator = arg.communicator @client_meta_info = arg. else raise ArgumentError, 'communicator is required' unless arg @parent = nil @communicator = arg @client_meta_info = end @path_context = path_context end |
Instance Attribute Details
#client_meta_info ⇒ String (readonly)
JSON string containing client info specific to the current client.
10 11 12 |
# File 'lib/onlinepayments/sdk/api_resource.rb', line 10 def @client_meta_info end |
#communicator ⇒ OnlinePayments::SDK::Communicator (readonly)
Communicator instance that provides communication with the Online Payments platform.
10 11 12 |
# File 'lib/onlinepayments/sdk/api_resource.rb', line 10 def communicator @communicator end |