Class: Mollie::Payment::Capture

Inherits:
Base
  • Object
show all
Defined in:
lib/mollie/payment/capture.rb

Direct Known Subclasses

Settlement::Capture

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

all, #assign_attributes, cancel, create, #delete, delete, get, id_param, #initialize, parent_id, request, resource_name, update, #update

Constructor Details

This class inherits a constructor from Mollie::Base

Instance Attribute Details

Returns the value of attribute _links.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def _links
  @_links
end

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def amount
  @amount
end

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def id
  @id
end

#modeObject

Returns the value of attribute mode.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def mode
  @mode
end

#payment_idObject

Returns the value of attribute payment_id.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def payment_id
  @payment_id
end

#settlement_amountObject

Returns the value of attribute settlement_amount.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def settlement_amount
  @settlement_amount
end

#settlement_idObject

Returns the value of attribute settlement_id.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def settlement_id
  @settlement_id
end

#shipment_idObject

Returns the value of attribute shipment_id.



4
5
6
# File 'lib/mollie/payment/capture.rb', line 4

def shipment_id
  @shipment_id
end

Instance Method Details

#payment(options = {}) ⇒ Object



28
29
30
# File 'lib/mollie/payment/capture.rb', line 28

def payment(options = {})
  Payment.get(payment_id, options)
end

#settlement(options = {}) ⇒ Object



38
39
40
41
# File 'lib/mollie/payment/capture.rb', line 38

def settlement(options = {})
  return if settlement_id.nil?
  Settlement.get(settlement_id, options)
end

#shipment(options = {}) ⇒ Object



32
33
34
35
36
# File 'lib/mollie/payment/capture.rb', line 32

def shipment(options = {})
  resource_url = Util.extract_url(links, 'shipment')
  response = Client.instance.perform_http_call('GET', resource_url, nil, {}, options)
  Order::Shipment.new(response)
end