Class: Payfast::PaymentBuilder
- Inherits:
-
Object
- Object
- Payfast::PaymentBuilder
- Defined in:
- lib/payfast/payment_builder.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(params) ⇒ PaymentBuilder
constructor
A new instance of PaymentBuilder.
Constructor Details
#initialize(params) ⇒ PaymentBuilder
Returns a new instance of PaymentBuilder.
9 10 11 |
# File 'lib/payfast/payment_builder.rb', line 9 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/payfast/payment_builder.rb', line 3 def params @params end |
Class Method Details
.build(params) ⇒ Object
5 6 7 |
# File 'lib/payfast/payment_builder.rb', line 5 def self.build(params) new(params).build end |
Instance Method Details
#build ⇒ Object
13 14 15 |
# File 'lib/payfast/payment_builder.rb', line 13 def build merchant_details.merge(customer_details, transaction_details, payment_methods).compact end |