Class: Mollie::PaymentLink

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

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

This class inherits a constructor from Mollie::Base

Instance Attribute Details

Returns the value of attribute _links.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def _links
  @_links
end

#amountObject

Returns the value of attribute amount.



12
13
14
# File 'lib/mollie/payment_link.rb', line 12

def amount
  @amount
end

#archivedObject

Returns the value of attribute archived.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def archived
  @archived
end

#created_atObject

Returns the value of attribute created_at.



12
13
14
# File 'lib/mollie/payment_link.rb', line 12

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def description
  @description
end

#expires_atObject

Returns the value of attribute expires_at.



12
13
14
# File 'lib/mollie/payment_link.rb', line 12

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def id
  @id
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def mode
  @mode
end

Returns the value of attribute paid_at.



12
13
14
# File 'lib/mollie/payment_link.rb', line 12

def paid_at
  @paid_at
end

#profile_idObject

Returns the value of attribute profile_id.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def profile_id
  @profile_id
end

#redirect_urlObject

Returns the value of attribute redirect_url.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def redirect_url
  @redirect_url
end

#updated_atObject

Returns the value of attribute updated_at.



12
13
14
# File 'lib/mollie/payment_link.rb', line 12

def updated_at
  @updated_at
end

#webhook_urlObject

Returns the value of attribute webhook_url.



3
4
5
# File 'lib/mollie/payment_link.rb', line 3

def webhook_url
  @webhook_url
end

Class Method Details

.embedded_resource_name(_parent_id = nil) ⇒ Object



20
21
22
# File 'lib/mollie/payment_link.rb', line 20

def self.embedded_resource_name(_parent_id = nil)
  "payment_links"
end

.resource_name(_parent_id = nil) ⇒ Object



24
25
26
# File 'lib/mollie/payment_link.rb', line 24

def self.resource_name(_parent_id = nil)
  "payment-links"
end

Instance Method Details

#archived?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/mollie/payment_link.rb', line 32

def archived?
  archived
end


58
59
60
# File 'lib/mollie/payment_link.rb', line 58

def payment_link
  Util.extract_url(links, "payment_link")
end

#payments(options = {}) ⇒ Object



62
63
64
65
66
67
68
# File 'lib/mollie/payment_link.rb', line 62

def payments(options = {})
  resource_url = Util.extract_url(links, "self")
  payments_url = File.join(resource_url, "/payments")

  response = Mollie::Client.instance.perform_http_call("GET", payments_url, nil, {}, options)
  Mollie::List.new(response, Mollie::Payment)
end