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.



141
142
143
# File 'lib/mangopay/pay_in.rb', line 141

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_data_collection(params, idempotency_key = nil) ⇒ Object



145
146
147
# File 'lib/mangopay/pay_in.rb', line 145

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

.create_v2(params, idempotency_key = nil) ⇒ Object



133
134
135
# File 'lib/mangopay/pay_in.rb', line 133

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

.get_data_collection(data_collection_id, idempotency_key = nil) ⇒ Object



149
150
151
# File 'lib/mangopay/pay_in.rb', line 149

def self.get_data_collection(data_collection_id, idempotency_key = nil)
  MangoPay.request(:get, "#{MangoPay.api_path}/payins/payment-methods/paypal/data-collection/#{data_collection_id}")
end

.urlObject



129
130
131
# File 'lib/mangopay/pay_in.rb', line 129

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