Class: SixSaferpay::CaptureReference

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/capture_reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capture_id: nil, transaction_id: nil, order_id: nil, order_part_id: nil) ⇒ CaptureReference

Returns a new instance of CaptureReference.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/six_saferpay/models/capture_reference.rb', line 10

def initialize(capture_id: nil,
               transaction_id: nil,
               order_id: nil,
               order_part_id: nil
              )
  @capture_id = capture_id
  @transaction_id = transaction_id
  @order_id = order_id
  @order_part_id = order_part_id

end

Instance Attribute Details

#capture_idObject

Returns the value of attribute capture_id.



4
5
6
# File 'lib/six_saferpay/models/capture_reference.rb', line 4

def capture_id
  @capture_id
end

#order_idObject

Returns the value of attribute order_id.



4
5
6
# File 'lib/six_saferpay/models/capture_reference.rb', line 4

def order_id
  @order_id
end

#order_part_idObject

Returns the value of attribute order_part_id.



4
5
6
# File 'lib/six_saferpay/models/capture_reference.rb', line 4

def order_part_id
  @order_part_id
end

#transaction_idObject

Returns the value of attribute transaction_id.



4
5
6
# File 'lib/six_saferpay/models/capture_reference.rb', line 4

def transaction_id
  @transaction_id
end

Instance Method Details

#to_hashObject Also known as: to_h



22
23
24
25
26
27
28
29
# File 'lib/six_saferpay/models/capture_reference.rb', line 22

def to_hash
  hash = Hash.new
  hash.merge!(capture_id: @capture_id) if @capture_id
  hash.merge!(transaction_id: @transaction_id) if @transaction_id
  hash.merge!(order_id: @order_id) if @order_id
  hash.merge!(order_part_id: @order_part_id) if @order_part_id
  hash
end