Module: PaypalAPI

Defined in:
lib/paypal-api.rb,
lib/paypal-api/error.rb,
lib/paypal-api/client.rb,
lib/paypal-api/config.rb,
lib/paypal-api/request.rb,
lib/paypal-api/version.rb,
lib/paypal-api/response.rb,
lib/paypal-api/environment.rb,
lib/paypal-api/access_token.rb,
lib/paypal-api/api_collection.rb,
lib/paypal-api/request_executor.rb,
lib/paypal-api/webhook_verifier.rb,
lib/paypal-api/client/api_methods.rb,
lib/paypal-api/client/http_methods.rb,
lib/paypal-api/api_collections/users.rb,
lib/paypal-api/network_error_builder.rb,
lib/paypal-api/api_collections/orders.rb,
lib/paypal-api/api_collections/payouts.rb,
lib/paypal-api/api_collections/refunds.rb,
lib/paypal-api/api_collections/disputes.rb,
lib/paypal-api/api_collections/invoices.rb,
lib/paypal-api/api_collections/webhooks.rb,
lib/paypal-api/api_collections/orders_v1.rb,
lib/paypal-api/api_collections/user_info.rb,
lib/paypal-api/client/environment_methods.rb,
lib/paypal-api/client/access_token_methods.rb,
lib/paypal-api/api_collections/payout_items.rb,
lib/paypal-api/api_collections/setup_tokens.rb,
lib/paypal-api/failed_request_error_builder.rb,
lib/paypal-api/webhook_verifier/certs_cache.rb,
lib/paypal-api/api_collections/subscriptions.rb,
lib/paypal-api/api_collections/authentication.rb,
lib/paypal-api/api_collections/payment_tokens.rb,
lib/paypal-api/api_collections/webhook_events.rb,
lib/paypal-api/api_collections/webhook_lookups.rb,
lib/paypal-api/api_collections/catalog_products.rb,
lib/paypal-api/api_collections/captured_payments.rb,
lib/paypal-api/api_collections/invoice_templates.rb,
lib/paypal-api/api_collections/partner_referrals.rb,
lib/paypal-api/api_collections/shipment_tracking.rb,
lib/paypal-api/api_collections/referenced_payouts.rb,
lib/paypal-api/api_collections/subscription_plans.rb,
lib/paypal-api/api_collections/transaction_search.rb,
lib/paypal-api/api_collections/authorized_payments.rb,
lib/paypal-api/api_collections/referenced_payout_items.rb,
lib/paypal-api/api_collections/payment_experience_web_profiles.rb

Overview

PaypalAPI is a main gem module.

Defined Under Namespace

Modules: Errors Classes: APICollection, AccessToken, Authentication, AuthorizedPayments, CapturedPayments, CatalogProducts, Client, Config, Disputes, Environment, Error, FailedRequestErrorBuilder, InvoiceTemplates, Invoices, NetworkErrorBuilder, Orders, OrdersV1, PartnerReferrals, PaymentExperienceWebProfiles, PaymentTokens, PayoutItems, Payouts, ReferencedPayoutItems, ReferencedPayouts, Refunds, Request, RequestExecutor, Response, SetupTokens, ShipmentTracking, SubscriptionPlans, Subscriptions, TransactionSearch, UserInfo, Users, WebhookEvents, WebhookLookups, WebhookVerifier, Webhooks

Constant Summary collapse

VERSION =

PaypalAPI gem version

Returns:

  • (String)

    SemVer gem version

File.read(File.join(File.dirname(__FILE__), "../../VERSION")).strip
SANDBOX_API_URL =

Sandbox API PayPal URL

"https://api-m.sandbox.paypal.com"
LIVE_API_URL =

Live API PayPal URL

"https://api-m.paypal.com"
SANDBOX_WEB_URL =

Sandbox PayPal Web URL

"https://sandbox.paypal.com"
LIVE_WEB_URL =

Live PayPal Web URL

"https://paypal.com"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientClient

Globally set Client object

Examples:

PaypalAPI.client

Returns:



247
248
249
250
251
# File 'lib/paypal-api.rb', line 247

def client
  raise "#{name}.client must be set" unless @client

  @client
end

Class Method Details

.api_urlString

Base API URL

Returns:

  • (String)

    Base API URL



35
36
37
# File 'lib/paypal-api.rb', line 35

def api_url
  client.api_url
end

.authenticationAuthentication

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.authorized_paymentsAuthorizedPayments

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.captured_paymentsCapturedPayments

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.catalog_productsCatalogProducts

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.delete(path, query: nil, body: nil, headers: nil) ⇒ Response

Executes DELETE http request

Examples:

PaypalAPI.each("/path1/path2", query: query, body: body, headers: headers)

Parameters:

  • path (String)

    Request path

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:



83
84
85
86
87
# File 'lib/paypal-api.rb', line 83

[:post, :get, :patch, :put, :delete].each do |method_name|
  define_method(method_name) do |path, query: nil, body: nil, headers: nil|
    client.public_send(method_name, path, query: query, body: body, headers: headers)
  end
end

.disputesDisputes

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.get(path, query: nil, body: nil, headers: nil) ⇒ Response

Executes GET http request

Examples:

PaypalAPI.("/path1/path2", query: query, body: body, headers: headers)

Parameters:

  • path (String)

    Request path

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:



# File 'lib/paypal-api.rb', line 58


.invoice_templatesInvoiceTemplates

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.invoicesInvoices

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.live?Boolean

Checks if PayPal LIVE environment enabled

Returns:

  • (Boolean)

    Checks if PayPal LIVE environment enabled



23
24
25
# File 'lib/paypal-api.rb', line 23

def live?
  client.live?
end

.ordersOrders

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.orders_v1OrdersV1

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.partner_referralsPartnerReferrals

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.patch(path, query: nil, body: nil, headers: nil) ⇒ Response

Executes PATCH http request

Examples:

PaypalAPI.("/path1/path2", query: query, body: body, headers: headers)

Parameters:

  • path (String)

    Request path

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:



# File 'lib/paypal-api.rb', line 58


.payment_experience_web_profilesPaymentExperienceWebProfile

APIs collection

Returns:

  • (PaymentExperienceWebProfile)


208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.payout_itemsPayoutItems

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.payoutsPayouts

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.post(path, query: nil, body: nil, headers: nil) ⇒ Response

Executes POST http request

Examples:

PaypalAPI.("/path1/path2", query: query, body: body, headers: headers)

Parameters:

  • path (String)

    Request path

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:



# File 'lib/paypal-api.rb', line 58


.put(path, query: nil, body: nil, headers: nil) ⇒ Response

Executes PUT http request

Examples:

PaypalAPI.("/path1/path2", query: query, body: body, headers: headers)

Parameters:

  • path (String)

    Request path

  • query (Hash, nil) (defaults to: nil)

    Request query parameters

  • body (Hash, nil) (defaults to: nil)

    Request body parameters

  • headers (Hash, nil) (defaults to: nil)

    Request headers

Returns:



# File 'lib/paypal-api.rb', line 58


.referenced_payout_itemsReferencedPayoutItems

APIs collection



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.referenced_payoutsReferencedPayouts

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.refundsRefunds

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.sandbox?Boolean

Checks if PayPal SANDBOX environment enabled

Returns:

  • (Boolean)

    Checks if PayPal SANDBOX environment enabled



29
30
31
# File 'lib/paypal-api.rb', line 29

def sandbox?
  client.sandbox?
end

.shipment_trackingShipmentTracking

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.subscription_plansSubscriptionPlans

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.subscriptionsSubscriptions

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.transaction_searchTransactionSearch

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.user_infoUserInfo

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.usersUsers

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.verify_webhook(webhook_id:, headers:, raw_body:) ⇒ Object

Verifies Webhook

It requires one-time request to download and cache certificate. If local verification returns false it tries to verify webhook online.



97
98
99
# File 'lib/paypal-api.rb', line 97

def verify_webhook(webhook_id:, headers:, raw_body:)
  client.verify_webhook(webhook_id: webhook_id, headers: headers, raw_body: raw_body)
end

.web_urlString

Base WEB URL

Returns:

  • (String)

    Base WEB URL



41
42
43
# File 'lib/paypal-api.rb', line 41

def web_url
  client.web_url
end

.webhook_eventsWebhookEvents

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.webhook_lookupsWebhookLookups

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.webhooksWebhooks

APIs collection

Returns:



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/paypal-api.rb', line 208

i[
  authentication
  authorized_payments
  captured_payments
  catalog_products
  disputes
  invoice_templates
  invoices
  orders
  orders_v1
  partner_referrals
  payment_experience_web_profiles
  payment_tokens
  payout_items
  payouts
  refunds
  referenced_payout_items
  referenced_payouts
  setup_tokens
  shipment_tracking
  subscriptions
  subscription_plans
  transaction_search
  
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end