Class: PayPal::ExpressCheckout::Payment

Inherits:
Base
  • Object
show all
Defined in:
lib/paypal/express_checkout/payment.rb

Constant Summary

Constants included from Fields

Fields::ASSOCIATIONS, Fields::ATTRIBUTES

Instance Method Summary collapse

Methods inherited from Base

#initialize, #request, #run

Methods included from Fields

#field_map, #group_collect, #group_fields, #has_fields?, #has_many?, included, #inverted_field_map

Constructor Details

This class inherits a constructor from PayPal::ExpressCheckout::Base

Instance Method Details

#detailsObject



70
71
72
73
# File 'lib/paypal/express_checkout/payment.rb', line 70

def details
  params = collect(:transaction_id)
  run(:transaction_details, params)
end

#referenceObject



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/paypal/express_checkout/payment.rb', line 56

def reference
  params = group_collect(
    :payment,
    :ship_to,
    :amount,
    :payment_items,
    :credit_card,
    :payer,
    :address
  )

  run(:reference, params)
end

#refundObject



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/paypal/express_checkout/payment.rb', line 43

def refund
  params = group_collect(
    :transaction_id,
    :amount,
    :refund,
    :msg_sub_id,
    :store_id,
    :terminal_id
  )

  run(:refund, params)
end

#searchObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/paypal/express_checkout/payment.rb', line 8

def search
  params = collect(
    :start_date,
    :end_date,
    :amount,
    :currency,
    :email,
    :receiver,
    :receipt_id,
    :account,
    :invoice_num,
    :transaction_id,
    :transaction_class,
    :auction_item_num,
    :status,
    :profile_id,
    :salutation,
    :first_name,
    :middle_name,
    :last_name,
    :suffix
  )

  run(:search, params)
end

#update_statusObject



34
35
36
37
38
39
40
41
# File 'lib/paypal/express_checkout/payment.rb', line 34

def update_status
  params = collect(
    :transaction_id,
    :action
  )

  run(:update_status, params)
end