Class: SixSaferpay::SixSecureData::Update
- Inherits:
-
Object
- Object
- SixSaferpay::SixSecureData::Update
- Defined in:
- lib/six_saferpay/api/six_secure_card_data/requests/update.rb
Instance Attribute Summary collapse
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#update_alias ⇒ Object
Returns the value of attribute update_alias.
-
#update_payment_means ⇒ Object
Returns the value of attribute update_payment_means.
Instance Method Summary collapse
-
#initialize(request_header: nil, update_alias: nil, update_payment_means: nil) ⇒ Update
constructor
A new instance of Update.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, update_alias: nil, update_payment_means: nil) ⇒ Update
Returns a new instance of Update.
10 11 12 13 14 15 16 17 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 10 def initialize(request_header: nil, update_alias: nil, update_payment_means: nil ) @request_header = request_header || SixSaferpay::RequestHeader.new() @update_alias = SixSaferpay::UpdateAlias.new(**update_alias.to_h) if update_alias @update_payment_means = SixSaferpay::UpdatePaymentMeans.new(**update_payment_means.to_h) if update_payment_means end |
Instance Attribute Details
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 5 def request_header @request_header end |
#update_alias ⇒ Object
Returns the value of attribute update_alias.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 5 def update_alias @update_alias end |
#update_payment_means ⇒ Object
Returns the value of attribute update_payment_means.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 5 def update_payment_means @update_payment_means end |
Instance Method Details
#response_class ⇒ Object
36 37 38 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 36 def response_class SixSaferpay::SixSecureData::UpdateResponse end |
#to_hash ⇒ Object Also known as: to_h
19 20 21 22 23 24 25 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 19 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(update_alias: @update_alias.to_h) if @update_alias hash.merge!(update_payment_means: @update_payment_means.to_h) if @update_payment_means hash end |
#to_json ⇒ Object
28 29 30 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 28 def to_json to_hash.to_json end |
#url ⇒ Object
32 33 34 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/update.rb', line 32 def url '/Payment/v1/Alias/Update' end |