Class: AdaptivePay::PaymentRequest
- Inherits:
-
AbstractPaymentRequest
- Object
- Request
- AbstractPaymentRequest
- AdaptivePay::PaymentRequest
- Defined in:
- lib/adaptive_pay/payment_request.rb
Instance Attribute Summary collapse
-
#recipients ⇒ Object
readonly
Returns the value of attribute recipients.
Attributes inherited from AbstractPaymentRequest
Class Method Summary collapse
Instance Method Summary collapse
- #add_recipient(recipient_options) ⇒ Object
-
#initialize(&block) ⇒ PaymentRequest
constructor
A new instance of PaymentRequest.
Methods inherited from Request
attribute, attribute_names, #format_attribute, #perform, #read_attribute, #serialize, #write_attribute
Constructor Details
#initialize(&block) ⇒ PaymentRequest
Returns a new instance of PaymentRequest.
22 23 24 25 |
# File 'lib/adaptive_pay/payment_request.rb', line 22 def initialize(&block) @recipients = [] super end |
Instance Attribute Details
#recipients ⇒ Object (readonly)
Returns the value of attribute recipients.
12 13 14 |
# File 'lib/adaptive_pay/payment_request.rb', line 12 def recipients @recipients end |
Class Method Details
.endpoint ⇒ Object
8 9 10 |
# File 'lib/adaptive_pay/payment_request.rb', line 8 def self.endpoint "Pay" end |
.response_type ⇒ Object
4 5 6 |
# File 'lib/adaptive_pay/payment_request.rb', line 4 def self.response_type :payment end |
Instance Method Details
#add_recipient(recipient_options) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/adaptive_pay/payment_request.rb', line 27 def add_recipient() if .is_a?(AdaptivePay::Recipient) @recipients << else @recipients << AdaptivePay::Recipient.new() end end |