Class: PayPal::AdaptivePayments::Preapproval

Inherits:
Base
  • Object
show all
Defined in:
lib/paypal/adaptive_payments/preapproval.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#request_envelope

Instance Method Summary collapse

Methods inherited from Base

#request

Methods included from Common::Base

#after_initialize, #build_datetime, #build_value, #camelize, #hash_keys, #initialize, #request, #to_hash, #to_json, #underscore

Instance Attribute Details

#cancel_urlObject

Returns the value of attribute cancel_url.



6
7
8
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 6

def cancel_url
  @cancel_url
end

#client_detailsObject

Returns the value of attribute client_details.



5
6
7
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 5

def client_details
  @client_details
end

#currency_codeObject

Returns the value of attribute currency_code.



7
8
9
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 7

def currency_code
  @currency_code
end

#date_of_monthObject

Returns the value of attribute date_of_month.



8
9
10
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 8

def date_of_month
  @date_of_month
end

#day_of_weekObject

Returns the value of attribute day_of_week.



9
10
11
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 9

def day_of_week
  @day_of_week
end

#display_max_total_amountObject

Returns the value of attribute display_max_total_amount.



22
23
24
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 22

def display_max_total_amount
  @display_max_total_amount
end

#ending_dateObject

Returns the value of attribute ending_date.



10
11
12
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 10

def ending_date
  @ending_date
end

#fees_payerObject

Returns the value of attribute fees_payer.



23
24
25
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 23

def fees_payer
  @fees_payer
end

#ipn_notification_urlObject

Returns the value of attribute ipn_notification_url.



18
19
20
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 18

def ipn_notification_url
  @ipn_notification_url
end

#max_amount_per_paymentObject

Returns the value of attribute max_amount_per_payment.



11
12
13
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 11

def max_amount_per_payment
  @max_amount_per_payment
end

#max_number_of_paymentsObject

Returns the value of attribute max_number_of_payments.



12
13
14
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 12

def max_number_of_payments
  @max_number_of_payments
end

#max_number_of_payments_per_periodObject

Returns the value of attribute max_number_of_payments_per_period.



13
14
15
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 13

def max_number_of_payments_per_period
  @max_number_of_payments_per_period
end

#max_total_amount_of_all_paymentsObject

Returns the value of attribute max_total_amount_of_all_payments.



14
15
16
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 14

def max_total_amount_of_all_payments
  @max_total_amount_of_all_payments
end

#memoObject

Returns the value of attribute memo.



17
18
19
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 17

def memo
  @memo
end

#payment_periodObject

Returns the value of attribute payment_period.



15
16
17
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 15

def payment_period
  @payment_period
end

#pin_typeObject

Returns the value of attribute pin_type.



21
22
23
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 21

def pin_type
  @pin_type
end

#preapproval_keyObject

Returns the value of attribute preapproval_key.



4
5
6
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 4

def preapproval_key
  @preapproval_key
end

#require_instant_funding_sourceObject

Returns the value of attribute require_instant_funding_source.



24
25
26
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 24

def require_instant_funding_source
  @require_instant_funding_source
end

#return_urlObject

Returns the value of attribute return_url.



16
17
18
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 16

def return_url
  @return_url
end

#sender_emailObject

Returns the value of attribute sender_email.



19
20
21
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 19

def sender_email
  @sender_email
end

#starting_dateObject

Returns the value of attribute starting_date.



20
21
22
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 20

def starting_date
  @starting_date
end

Instance Method Details

#cancelObject



48
49
50
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 48

def cancel
  Response.process(:cancel_preapproval, request.run(:cancel_preapproval, self.to_hash(:preapproval_key)))
end

#createObject



38
39
40
41
42
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 38

def create
  response = Response.process(:preapproval, request.run(:preapproval, self.to_hash))
  self.preapproval_key = response.preapproval_key
  response
end

#detailsObject



44
45
46
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 44

def details
  Response.process(:preapproval_details, request.run(:preapproval_details, self.to_hash(:preapproval_key)))
end

#set_client_details(value) ⇒ Object



26
27
28
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 26

def set_client_details(value)
  self.client_details = build_value(ClientDetails, value)
end

#set_ending_date(value) ⇒ Object



30
31
32
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 30

def set_ending_date(value)
  self.ending_date = build_datetime(value)
end

#set_starting_date(value) ⇒ Object



34
35
36
# File 'lib/paypal/adaptive_payments/preapproval.rb', line 34

def set_starting_date(value)
  self.starting_date = build_datetime(value)
end