Class: PaypalAPI::APICollection
- Inherits:
-
Object
- Object
- PaypalAPI::APICollection
- Defined in:
- lib/paypal-api/api_collection.rb
Overview
Base class for all PayPal API collections classes
Direct Known Subclasses
Authentication, AuthorizedPayments, CapturedPayments, CatalogProducts, Disputes, InvoiceTemplates, Invoices, Orders, OrdersV1, PartnerReferrals, PaymentExperienceWebProfiles, PaymentTokens, PayoutItems, Payouts, ReferencedPayoutItems, ReferencedPayouts, Refunds, SetupTokens, ShipmentTracking, SubscriptionPlans, Subscriptions, TransactionSearch, UserInfo, Users, WebhookEvents, WebhookLookups, Webhooks
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Current client.
Class Method Summary collapse
-
.client ⇒ Object
Global client.
-
.encode(id) ⇒ String
Encodes URI component.
Instance Method Summary collapse
-
#encode(id) ⇒ String
Encodes URI component.
-
#initialize(client) ⇒ Collection
constructor
Initializes API collection.
Constructor Details
#initialize(client) ⇒ Collection
Initializes API collection
19 20 21 |
# File 'lib/paypal-api/api_collection.rb', line 19 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns current client.
11 12 13 |
# File 'lib/paypal-api/api_collection.rb', line 11 def client @client end |
Class Method Details
.client ⇒ Object
Returns global client.
24 25 26 |
# File 'lib/paypal-api/api_collection.rb', line 24 def self.client PaypalAPI.client end |
.encode(id) ⇒ String
Encodes URI component
40 41 42 |
# File 'lib/paypal-api/api_collection.rb', line 40 def self.encode(id) URI.encode_uri_component(id) end |
Instance Method Details
#encode(id) ⇒ String
Encodes URI component
31 32 33 |
# File 'lib/paypal-api/api_collection.rb', line 31 def encode(id) self.class.encode(id) end |