Class: SixSaferpay::SixPaymentPage::InitializeResponse
- Inherits:
-
Object
- Object
- SixSaferpay::SixPaymentPage::InitializeResponse
- Defined in:
- lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb
Instance Attribute Summary collapse
-
#expiration ⇒ Object
Returns the value of attribute expiration.
-
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
-
#response_header ⇒ Object
Returns the value of attribute response_header.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(response_header:, token:, expiration:, redirect_url:) ⇒ InitializeResponse
constructor
A new instance of InitializeResponse.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(response_header:, token:, expiration:, redirect_url:) ⇒ InitializeResponse
Returns a new instance of InitializeResponse.
11 12 13 14 15 16 17 18 19 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 11 def initialize(response_header:, token:, expiration:, redirect_url: ) @response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header @token = token @expiration = expiration @redirect_url = redirect_url end |
Instance Attribute Details
#expiration ⇒ Object
Returns the value of attribute expiration.
5 6 7 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 5 def expiration @expiration end |
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
5 6 7 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 5 def redirect_url @redirect_url end |
#response_header ⇒ Object
Returns the value of attribute response_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 5 def response_header @response_header end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 5 def token @token end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
21 22 23 24 25 26 27 28 |
# File 'lib/six_saferpay/api/six_payment_page/responses/initialize_response.rb', line 21 def to_hash hash = Hash.new hash.merge!(response_header: @response_header.to_h) if @response_header hash.merge!(token: @token) if @token hash.merge!(expiration: @expiration) if @expiration hash.merge!(redirect_url: @redirect_url) if @redirect_url hash end |