Class: GovukPayApiClient::CreatePayment
- Inherits:
-
Object
- Object
- GovukPayApiClient::CreatePayment
- Includes:
- Api
- Defined in:
- lib/govuk_pay_api_client/create_payment.rb
Instance Attribute Summary collapse
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#return_url ⇒ Object
Returns the value of attribute return_url.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(fee, return_url) ⇒ CreatePayment
constructor
A new instance of CreatePayment.
Methods included from Api
#get, included, #post, #response_body
Constructor Details
#initialize(fee, return_url) ⇒ CreatePayment
Returns a new instance of CreatePayment.
6 7 8 9 10 11 |
# File 'lib/govuk_pay_api_client/create_payment.rb', line 6 def initialize(fee, return_url) raise RequiresFeeObject if fee.blank? raise RequiresReturnUrl if return_url.blank? @fee = fee @return_url = return_url end |
Instance Attribute Details
#fee ⇒ Object
Returns the value of attribute fee.
4 5 6 |
# File 'lib/govuk_pay_api_client/create_payment.rb', line 4 def fee @fee end |
#return_url ⇒ Object
Returns the value of attribute return_url.
4 5 6 |
# File 'lib/govuk_pay_api_client/create_payment.rb', line 4 def return_url @return_url end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'lib/govuk_pay_api_client/create_payment.rb', line 13 def call post parsed_response end |