Class: SixSaferpay::SixSecureData::InsertDirect
- Inherits:
-
Object
- Object
- SixSaferpay::SixSecureData::InsertDirect
- Defined in:
- lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb
Instance Attribute Summary collapse
-
#check ⇒ Object
Returns the value of attribute check.
-
#payment_means ⇒ Object
Returns the value of attribute payment_means.
-
#register_alias ⇒ Object
Returns the value of attribute register_alias.
-
#request_header ⇒ Object
Returns the value of attribute request_header.
Instance Method Summary collapse
-
#initialize(request_header: nil, register_alias:, payment_means:, check: nil) ⇒ InsertDirect
constructor
A new instance of InsertDirect.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, register_alias:, payment_means:, check: nil) ⇒ InsertDirect
Returns a new instance of InsertDirect.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 11 def initialize(request_header: nil, register_alias:, payment_means:, check: nil ) @request_header = request_header || SixSaferpay::RequestHeader.new() @register_alias = SixSaferpay::RegisterAlias.new(**register_alias.to_h) if register_alias @payment_means = SixSaferpay::RequestPaymentMeans.new(**payment_means.to_h) if payment_means @check = SixSaferpay::Check.new(**check.to_h) if check end |
Instance Attribute Details
#check ⇒ Object
Returns the value of attribute check.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 5 def check @check end |
#payment_means ⇒ Object
Returns the value of attribute payment_means.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 5 def payment_means @payment_means end |
#register_alias ⇒ Object
Returns the value of attribute register_alias.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 5 def register_alias @register_alias end |
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 5 def request_header @request_header end |
Instance Method Details
#response_class ⇒ Object
40 41 42 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 40 def response_class SixSaferpay::SixSecureData::InsertDirectResponse end |
#to_hash ⇒ Object Also known as: to_h
22 23 24 25 26 27 28 29 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 22 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(register_alias: @register_alias.to_h) if @register_alias hash.merge!(payment_means: @payment_means.to_h) if @payment_means hash.merge!(check: @check.to_h) if @check hash end |
#to_json ⇒ Object
32 33 34 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 32 def to_json to_hash.to_json end |
#url ⇒ Object
36 37 38 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb', line 36 def url '/Payment/v1/Alias/InsertDirect' end |