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

.client ⇒ Client

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_url ⇒ String

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

.authentication ⇒ Authentication

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.authorized_payments ⇒ AuthorizedPayments

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.captured_payments ⇒ CapturedPayments

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.catalog_products ⇒ CatalogProducts

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
  user_info
  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

.disputes ⇒ Disputes

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
  user_info
  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_templates ⇒ InvoiceTemplates

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.invoices ⇒ Invoices

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
  user_info
  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

.orders ⇒ Orders

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.orders_v1 ⇒ OrdersV1

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.partner_referrals ⇒ PartnerReferrals

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
  user_info
  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_profiles ⇒ PaymentExperienceWebProfile

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.payout_items ⇒ PayoutItems

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.payouts ⇒ Payouts

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
  user_info
  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_items ⇒ ReferencedPayoutItems

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.referenced_payouts ⇒ ReferencedPayouts

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.refunds ⇒ Refunds

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
  user_info
  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_tracking ⇒ ShipmentTracking

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.subscription_plans ⇒ SubscriptionPlans

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.subscriptions ⇒ Subscriptions

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.transaction_search ⇒ TransactionSearch

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.user_info ⇒ UserInfo

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.users ⇒ Users

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
  user_info
  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_url ⇒ String

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_events ⇒ WebhookEvents

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.webhook_lookups ⇒ WebhookLookups

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end

.webhooks ⇒ Webhooks

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
  user_info
  users
  webhooks
  webhook_events
  webhook_lookups
].each do |method_name|
  define_method(method_name) do
    client.public_send(method_name)
  end
end