Class: PayPal::SDK::Merchant::API

Inherits:
Core::API::Merchant
  • Object
show all
Includes:
Services, Urls
Defined in:
lib/paypal-sdk/merchant/api.rb

Constant Summary collapse

MERCHANT_HTTP_HEADER =
{ "X-PAYPAL-REQUEST-SOURCE" => "merchant-ruby-sdk-#{VERSION}" }

Constants included from Urls

Urls::REDIRECT_ENDPOINTS

Instance Method Summary collapse

Methods included from Urls

#express_checkout_url, #redirect_url

Methods included from Services

#AddressVerify, #BillOutstandingAmount, #BillUser, #BuildAddressVerify, #BuildBillAgreementUpdate, #BuildBillOutstandingAmount, #BuildBillUser, #BuildCancelRecoup, #BuildCompleteRecoup, #BuildCreateBillingAgreement, #BuildCreateMobilePayment, #BuildCreateRecurringPaymentsProfile, #BuildDoAuthorization, #BuildDoCancel, #BuildDoCapture, #BuildDoDirectPayment, #BuildDoExpressCheckoutPayment, #BuildDoMobileCheckoutPayment, #BuildDoNonReferencedCredit, #BuildDoReauthorization, #BuildDoReferenceTransaction, #BuildDoUATPAuthorization, #BuildDoUATPExpressCheckoutPayment, #BuildDoVoid, #BuildEnterBoarding, #BuildExecuteCheckoutOperations, #BuildExternalRememberMeOptOut, #BuildGetAccessPermissionDetails, #BuildGetAuthDetails, #BuildGetBalance, #BuildGetBillingAgreementCustomerDetails, #BuildGetBoardingDetails, #BuildGetExpressCheckoutDetails, #BuildGetIncentiveEvaluation, #BuildGetMobileStatus, #BuildGetPalDetails, #BuildGetRecurringPaymentsProfileDetails, #BuildGetTransactionDetails, #BuildInitiateRecoup, #BuildManagePendingTransactionStatus, #BuildManageRecurringPaymentsProfileStatus, #BuildMassPay, #BuildRefundTransaction, #BuildReverseTransaction, #BuildSetAccessPermissions, #BuildSetAuthFlowParam, #BuildSetCustomerBillingAgreement, #BuildSetExpressCheckout, #BuildSetMobileCheckout, #BuildTransactionSearch, #BuildUpdateAccessPermissions, #BuildUpdateAuthorization, #BuildUpdateRecurringPaymentsProfile, #CancelRecoup, #CompleteRecoup, #CreateBillingAgreement, #CreateMobilePayment, #CreateRecurringPaymentsProfile, #DoAuthorization, #DoCancel, #DoCapture, #DoDirectPayment, #DoExpressCheckoutPayment, #DoMobileCheckoutPayment, #DoNonReferencedCredit, #DoReauthorization, #DoReferenceTransaction, #DoUATPAuthorization, #DoUATPExpressCheckoutPayment, #DoVoid, #EnterBoarding, #ExecuteCheckoutOperations, #ExternalRememberMeOptOut, #GetAccessPermissionDetails, #GetAuthDetails, #GetBalance, #GetBillingAgreementCustomerDetails, #GetBoardingDetails, #GetExpressCheckoutDetails, #GetIncentiveEvaluation, #GetMobileStatus, #GetPalDetails, #GetRecurringPaymentsProfileDetails, #GetTransactionDetails, #InitiateRecoup, #ManagePendingTransactionStatus, #ManageRecurringPaymentsProfileStatus, #MassPay, #RefundTransaction, #ReverseTransaction, #SetAccessPermissions, #SetAuthFlowParam, #SetCustomerBillingAgreement, #SetExpressCheckout, #SetMobileCheckout, #TransactionSearch, #UpdateAccessPermissions, #UpdateAuthorization, #UpdateRecurringPaymentsProfile

Constructor Details

#initialize(environment = nil, options = {}) ⇒ API

Returns a new instance of API.



10
11
12
# File 'lib/paypal-sdk/merchant/api.rb', line 10

def initialize(environment = nil, options = {})
  super("", environment, options)
end

Instance Method Details

#BillAgreementUpdate(options = {}, http_header = {}) ⇒ Object Also known as: bill_agreement_update

Service Call: BillAgreementUpdate

Parameters:

  • BillAgreementUpdateReq

Returns:

  • BAUpdateResponseType



27
28
29
30
31
32
33
34
35
36
# File 'lib/paypal-sdk/merchant/api.rb', line 27

def BillAgreementUpdate(options = {} , http_header = {})
  request_object = BuildBillAgreementUpdate(options)
  request_hash = request_object.to_hash
  response_hash = request(nil, {
    "ns:BillAgreementUpdateReq" => {
      "ns:BAUpdateRequest" => request_hash
    }
  }, http_header)
  BAUpdateResponseType.new(response_hash)
end

#default_http_headerObject



15
16
17
# File 'lib/paypal-sdk/merchant/api.rb', line 15

def default_http_header
  super.merge(MERCHANT_HTTP_HEADER)
end

#ipn_valid?(raw_post_data) ⇒ Boolean

Validate IPN message

Returns:

  • (Boolean)


20
21
22
# File 'lib/paypal-sdk/merchant/api.rb', line 20

def ipn_valid?(raw_post_data)
  Core::API::IPN.valid?(raw_post_data, config)
end