Class: SixSaferpay::SixTransaction::QueryPaymentMeans
- Inherits:
-
Object
- Object
- SixSaferpay::SixTransaction::QueryPaymentMeans
- Defined in:
- lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb
Instance Attribute Summary collapse
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#return_urls ⇒ Object
Returns the value of attribute return_urls.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(request_header: nil, token:, return_urls: nil) ⇒ QueryPaymentMeans
constructor
A new instance of QueryPaymentMeans.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, token:, return_urls: nil) ⇒ QueryPaymentMeans
Returns a new instance of QueryPaymentMeans.
9 10 11 12 13 14 15 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 9 def initialize(request_header: nil, token: , return_urls: nil) @request_header = request_header || SixSaferpay::RequestHeader.new() @token = token @return_urls = SixSaferpay::ReturnUrls.new(**return_urls.to_h) if return_urls end |
Instance Attribute Details
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 5 def request_header @request_header end |
#return_urls ⇒ Object
Returns the value of attribute return_urls.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 5 def return_urls @return_urls end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 5 def token @token end |
Instance Method Details
#response_class ⇒ Object
34 35 36 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 34 def response_class SixSaferpay::SixTransaction::QueryPaymentMeansResponse end |
#to_hash ⇒ Object Also known as: to_h
17 18 19 20 21 22 23 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 17 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(token: @token) if @token hash.merge!(return_urls: @return_urls.to_h) if @return_urls hash end |
#to_json ⇒ Object
26 27 28 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 26 def to_json to_hash.to_json end |
#url ⇒ Object
30 31 32 |
# File 'lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb', line 30 def url '/Payment/v1/Transaction/QueryPaymentMeans' end |