Class: PayPal::AdaptivePayments::PaymentOptions

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

Direct Known Subclasses

Response::PayOptions

Instance Attribute Summary collapse

Attributes inherited from Base

#request_envelope

Class Method Summary collapse

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

#display_optionsObject

Returns the value of attribute display_options.



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

def display_options
  @display_options
end

#initiating_entityObject

Returns the value of attribute initiating_entity.



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

def initiating_entity
  @initiating_entity
end

#pay_keyObject

Returns the value of attribute pay_key.



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

def pay_key
  @pay_key
end

#receiver_optionsObject

Returns the value of attribute receiver_options.



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

def receiver_options
  @receiver_options
end

#sender_optionsObject

Returns the value of attribute sender_options.



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

def sender_options
  @sender_options
end

#shipping_address_idObject

Returns the value of attribute shipping_address_id.



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

def shipping_address_id
  @shipping_address_id
end

Class Method Details

.find(key) ⇒ Object



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

def self.find(key)
  self.new(:pay_key => key).get
end

Instance Method Details

#getObject



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

def get
  Response.process(:get_payment_options, request.run(:get_payment_options, self.to_hash))
end

#setObject



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

def set
  Response.process(:set_payment_options, request.run(:set_payment_options, self.to_hash))
end

#set_display_options(value) ⇒ Object



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

def set_display_options(value)
  self.display_options = build_value(DisplayOptions, value)
end

#set_initiating_entity(value) ⇒ Object



27
28
29
# File 'lib/paypal/adaptive_payments/payment_options.rb', line 27

def set_initiating_entity(value)
  self.initiating_entity = build_value(InitiatingEntity, value)
end

#set_receiver_options(value) ⇒ Object



35
36
37
# File 'lib/paypal/adaptive_payments/payment_options.rb', line 35

def set_receiver_options(value)
  self.receiver_options = build_value(ReceiverOptions, value)
end

#set_sender_options(value) ⇒ Object



31
32
33
# File 'lib/paypal/adaptive_payments/payment_options.rb', line 31

def set_sender_options(value)
  self.sender_options = build_value(SenderOptions, value)
end