Class: SixSaferpay::SixSecurePayGateOffer::CreateOfferResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(offer_id:, payment_link:) ⇒ CreateOfferResponse

Returns a new instance of CreateOfferResponse.



9
10
11
12
13
14
# File 'lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb', line 9

def initialize(offer_id:,
               payment_link: )

  @offer_id = offer_id if offer_id
  @payment_link = payment_link if payment_link
end

Instance Attribute Details

#offer_idObject

Returns the value of attribute offer_id.



5
6
7
# File 'lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb', line 5

def offer_id
  @offer_id
end

Returns the value of attribute payment_link.



5
6
7
# File 'lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb', line 5

def payment_link
  @payment_link
end

Instance Method Details

#to_hashObject Also known as: to_h



16
17
18
19
20
21
# File 'lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb', line 16

def to_hash
  hash = Hash.new
  hash.merge!(offer_id: @offer_id) if @offer_id
  hash.merge!(payment_link: @payment_link) if @payment_link
  hash
end