Class: MangoPay::PayIn::PayPal::Web

Inherits:
Resource
  • Object
show all
Includes:
HTTPCalls::Create
Defined in:
lib/mangopay/pay_in.rb

Overview

See docs.mangopay.com/api-references/payins/paypal-payin/ # DEPRECATED: ‘create’ function is now deprecated. Please use the ‘create_v2’ function - MangoPay::PayIn::PayPal::Web.create_new(params)

Class Method Summary collapse

Methods included from HTTPCalls::Create

included

Methods inherited from Resource

class_name

Class Method Details

.add_paypal_tracking_information(pay_in_id, params, idempotency_key = nil) ⇒ Object

Add tracking information to a PayPal PayIn (add the tracking number and carrier for LineItems shipments.) Caution – Tracking information cannot be edited You can’t modify the TrackingNumber, Carrier, or NotifyBuyer once added. You can only send a unique tracking number once.



127
128
129
# File 'lib/mangopay/pay_in.rb', line 127

def self.add_paypal_tracking_information(pay_in_id, params, idempotency_key = nil)
  MangoPay.request(:put, "#{MangoPay.api_path}/payins/#{pay_in_id}/trackings", params, {}, idempotency_key)
end

.create_v2(params, idempotency_key = nil) ⇒ Object



119
120
121
# File 'lib/mangopay/pay_in.rb', line 119

def self.create_v2(params, idempotency_key = nil)
  MangoPay.request(:post, "#{MangoPay.api_path}/payins/payment-methods/paypal", params, {}, idempotency_key)
end

.urlObject



115
116
117
# File 'lib/mangopay/pay_in.rb', line 115

def self.url(*)
  "#{MangoPay.api_path}/payins/paypal/#{CGI.escape(class_name.downcase)}"
end