Class: SixSaferpay::SixSecureData::Insert
- Inherits:
-
Object
- Object
- SixSaferpay::SixSecureData::Insert
- Defined in:
- lib/six_saferpay/api/six_secure_card_data/requests/insert.rb
Instance Attribute Summary collapse
-
#card_form ⇒ Object
Returns the value of attribute card_form.
-
#check ⇒ Object
Returns the value of attribute check.
-
#language_code ⇒ Object
Returns the value of attribute language_code.
-
#payment_means ⇒ Object
Returns the value of attribute payment_means.
-
#payment_methods ⇒ Object
Returns the value of attribute payment_methods.
-
#register_alias ⇒ Object
Returns the value of attribute register_alias.
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#return_urls ⇒ Object
Returns the value of attribute return_urls.
-
#styling ⇒ Object
Returns the value of attribute styling.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(request_header: nil, register_alias:, type:, return_urls:, styling: nil, language_code: nil, check: nil, payment_methods: nil, card_form: nil, payment_means: nil) ⇒ Insert
constructor
A new instance of Insert.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, register_alias:, type:, return_urls:, styling: nil, language_code: nil, check: nil, payment_methods: nil, card_form: nil, payment_means: nil) ⇒ Insert
Returns a new instance of Insert.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 17 def initialize(request_header: nil, register_alias:, type:, return_urls:, styling: nil, language_code: nil, check: nil, payment_methods: nil, card_form: nil, payment_means: nil ) @request_header = request_header || SixSaferpay::RequestHeader.new() @register_alias = SixSaferpay::RegisterAlias.new(**register_alias.to_h) if register_alias @type = type @return_urls = SixSaferpay::ReturnUrls.new(**return_urls.to_h) if return_urls @styling = SixSaferpay::Styling.new(**styling.to_h) if styling @language_code = language_code @check = SixSaferpay::Check.new(**check.to_h) if check @payment_methods = payment_methods @card_form = SixSaferpay::CardForm.new(**card_form.to_h) if card_form @payment_means = SixSaferpay::RequestPaymentMeans.new(**payment_means.to_h) if payment_means end |
Instance Attribute Details
#card_form ⇒ Object
Returns the value of attribute card_form.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def card_form @card_form end |
#check ⇒ Object
Returns the value of attribute check.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def check @check end |
#language_code ⇒ Object
Returns the value of attribute language_code.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def language_code @language_code 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.rb', line 5 def payment_means @payment_means end |
#payment_methods ⇒ Object
Returns the value of attribute payment_methods.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def payment_methods @payment_methods 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.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.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_secure_card_data/requests/insert.rb', line 5 def return_urls @return_urls end |
#styling ⇒ Object
Returns the value of attribute styling.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def styling @styling end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 5 def type @type end |
Instance Method Details
#response_class ⇒ Object
64 65 66 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 64 def response_class SixSaferpay::SixSecureData::InsertResponse end |
#to_hash ⇒ Object Also known as: to_h
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 40 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!(type: @type) if @type hash.merge!(return_urls: @return_urls.to_h) if @return_urls hash.merge!(styling: @styling.to_h) if @styling hash.merge!(language_code: @language_code) if @language_code hash.merge!(check: @check.to_h) if @check hash.merge!(payment_methods: @payment_methods) if @payment_methods hash.merge!(card_form: @card_form.to_h) if @card_form hash.merge!(payment_means: @payment_means.to_h) if @payment_means hash end |
#to_json ⇒ Object
56 57 58 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 56 def to_json to_hash.to_json end |
#url ⇒ Object
60 61 62 |
# File 'lib/six_saferpay/api/six_secure_card_data/requests/insert.rb', line 60 def url '/Payment/v1/Alias/Insert' end |