Class: SixSaferpay::SixTransaction::Initialize
- Inherits:
-
Object
- Object
- SixSaferpay::SixTransaction::Initialize
- Defined in:
- lib/six_saferpay/api/six_transaction/requests/initialize.rb
Instance Attribute Summary collapse
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#card_form ⇒ Object
Returns the value of attribute card_form.
-
#config_set ⇒ Object
Returns the value of attribute config_set.
-
#order ⇒ Object
Returns the value of attribute order.
-
#payer ⇒ Object
Returns the value of attribute payer.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#payment_means ⇒ Object
Returns the value of attribute payment_means.
-
#payment_methods ⇒ Object
Returns the value of attribute payment_methods.
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#return_urls ⇒ Object
Returns the value of attribute return_urls.
-
#risk_factors ⇒ Object
Returns the value of attribute risk_factors.
-
#styling ⇒ Object
Returns the value of attribute styling.
-
#terminal_id ⇒ Object
Returns the value of attribute terminal_id.
-
#wallet ⇒ Object
Returns the value of attribute wallet.
Instance Method Summary collapse
-
#initialize(request_header: nil, config_set: nil, terminal_id: nil, payment:, payment_means: nil, authentication: nil, payer: nil, return_urls: nil, styling: nil, wallet: nil, payment_methods: nil, card_form: nil, order: nil, risk_factors: nil) ⇒ Initialize
constructor
A new instance of Initialize.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, config_set: nil, terminal_id: nil, payment:, payment_means: nil, authentication: nil, payer: nil, return_urls: nil, styling: nil, wallet: nil, payment_methods: nil, card_form: nil, order: nil, risk_factors: nil) ⇒ Initialize
Returns a new instance of Initialize.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 23 def initialize(request_header: nil, config_set: nil, terminal_id: nil, payment:, payment_means: nil, authentication: nil, payer: nil, return_urls: nil, styling: nil, wallet: nil, payment_methods: nil, card_form: nil, order: nil, risk_factors: nil ) @request_header = request_header || SixSaferpay::RequestHeader.new() @config_set = config_set @terminal_id = terminal_id || SixSaferpay.config.terminal_id @payment = SixSaferpay::Payment.new(**payment.to_h) if payment @payment_means = SixSaferpay::RequestPaymentMeans.new(**payment_means.to_h) if payment_means @authentication = SixSaferpay::Authentication.new(**authentication.to_h) if authentication @payer = SixSaferpay::Payer.new(**payer.to_h) if payer @return_urls = return_urls || SixSaferpay::ReturnUrls.new() @styling = SixSaferpay::Styling.new(**styling.to_h) if styling @wallet = SixSaferpay::Wallet.new(**wallet.to_h) if wallet @payment_methods = payment_methods @card_form = SixSaferpay::CardForm.new(**card_form.to_h) if card_form @order = SixSaferpay::Order.new(**order.to_h) if order @risk_factors = SixSaferpay::RiskFactors.new(**risk_factors.to_h) if risk_factors end |
Instance Attribute Details
#authentication ⇒ Object
Returns the value of attribute authentication.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def authentication @authentication end |
#card_form ⇒ Object
Returns the value of attribute card_form.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def card_form @card_form end |
#config_set ⇒ Object
Returns the value of attribute config_set.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def config_set @config_set end |
#order ⇒ Object
Returns the value of attribute order.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def order @order end |
#payer ⇒ Object
Returns the value of attribute payer.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def payer @payer end |
#payment ⇒ Object
Returns the value of attribute payment.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def payment @payment end |
#payment_means ⇒ Object
Returns the value of attribute payment_means.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.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_transaction/requests/initialize.rb', line 5 def payment_methods @payment_methods end |
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.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/initialize.rb', line 5 def return_urls @return_urls end |
#risk_factors ⇒ Object
Returns the value of attribute risk_factors.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def risk_factors @risk_factors end |
#styling ⇒ Object
Returns the value of attribute styling.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def styling @styling end |
#terminal_id ⇒ Object
Returns the value of attribute terminal_id.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def terminal_id @terminal_id end |
#wallet ⇒ Object
Returns the value of attribute wallet.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 5 def wallet @wallet end |
Instance Method Details
#response_class ⇒ Object
82 83 84 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 82 def response_class SixSaferpay::SixTransaction::InitializeResponse end |
#to_hash ⇒ Object Also known as: to_h
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 54 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(config_set: @config_set) if @config_set hash.merge!(terminal_id: @terminal_id) if @terminal_id hash.merge!(payment: @payment.to_h) if @payment hash.merge!(payment_means: @payment_means.to_h) if @payment_means hash.merge!(authentication: @authentication.to_h) if @authentication hash.merge!(payer: @payer.to_h) if @payer hash.merge!(return_urls: @return_urls.to_h ) if @return_urls hash.merge!(styling: @styling.to_h) if @styling hash.merge!(wallet: @wallet.to_h) if @wallet hash.merge!(payment_methods: @payment_methods) if @payment_methods hash.merge!(card_form: @card_form.to_h) if @card_form hash.merge!(order: @order.to_h) if @order hash.merge!(risk_factors: @risk_factors.to_h) if @risk_factors hash end |
#to_json ⇒ Object
74 75 76 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 74 def to_json to_hash.to_json end |
#url ⇒ Object
78 79 80 |
# File 'lib/six_saferpay/api/six_transaction/requests/initialize.rb', line 78 def url '/Payment/v1/Transaction/Initialize' end |