Class: Worldline::Connect::SDK::ApiResource
- Inherits:
-
Object
- Object
- Worldline::Connect::SDK::ApiResource
- Defined in:
- lib/worldline/connect/sdk/api_resource.rb
Overview
Base class of all Worldline Global Collect platform API resources. Provides shared functionality to facilitate communication with the Worldline Global Collect platform.
Direct Known Subclasses
Client, V1::Merchant::Captures::CapturesClient, V1::Merchant::Disputes::DisputesClient, V1::Merchant::Files::FilesClient, V1::Merchant::Hostedcheckouts::HostedcheckoutsClient, V1::Merchant::Hostedmandatemanagements::HostedmandatemanagementsClient, V1::Merchant::Installments::InstallmentsClient, V1::Merchant::Mandates::MandatesClient, V1::Merchant::MerchantClient, V1::Merchant::Payments::PaymentsClient, V1::Merchant::Payouts::PayoutsClient, V1::Merchant::Productgroups::ProductgroupsClient, V1::Merchant::Products::ProductsClient, V1::Merchant::Refunds::RefundsClient, V1::Merchant::Riskassessments::RiskassessmentsClient, V1::Merchant::Services::ServicesClient, V1::Merchant::Sessions::SessionsClient, V1::Merchant::Tokens::TokensClient, V1::V1Client
Instance Attribute Summary collapse
-
#client_meta_info ⇒ String
readonly
JSON string containing client info specific to the current client.
-
#communicator ⇒ Worldline::Connect::SDK::Communicator
readonly
Communicator instance that provides communication with the Worldline Global Collect platform.
Instance Method Summary collapse
-
#initialize(parent: nil, communicator: nil, path_context: nil, client_meta_info: nil) ⇒ ApiResource
constructor
Creates a new ApiResource.
Constructor Details
#initialize(parent: nil, communicator: nil, path_context: nil, client_meta_info: nil) ⇒ ApiResource
Creates a new ApiResource.
20 21 22 23 24 25 26 |
# File 'lib/worldline/connect/sdk/api_resource.rb', line 20 def initialize(parent: nil, communicator: nil, path_context: nil, client_meta_info: nil) raise ArgumentError.new('parent and/or communicator is required') if parent.nil? and communicator.nil? @parent = parent @communicator = communicator.nil? ? parent.communicator : communicator @path_context = path_context @client_meta_info = || parent.nil? ? : parent. end |
Instance Attribute Details
#client_meta_info ⇒ String (readonly)
JSON string containing client info specific to the current client.
11 12 13 |
# File 'lib/worldline/connect/sdk/api_resource.rb', line 11 def @client_meta_info end |
#communicator ⇒ Worldline::Connect::SDK::Communicator (readonly)
Communicator instance that provides communication with the Worldline Global Collect platform.
11 12 13 |
# File 'lib/worldline/connect/sdk/api_resource.rb', line 11 def communicator @communicator end |