Class: GoCardlessPro::Resources::OutboundPayment
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::OutboundPayment
- Defined in:
- lib/gocardless_pro/resources/outbound_payment.rb
Overview
Outbound Payments represent payments sent from [creditors](#core-endpoints-creditors).
GoCardless will notify you via a [webhook](#appendix-webhooks) when the status of the outbound payment [changes](#event-actions-outbound-payment).
<p class=“restricted-notice”><strong>Restricted</strong>: Outbound Payments are currently in Early Access and available only to a limited list of organisations. If you are interested in using this feature, please stay tuned for our public launch announcement. We are actively testing and refining our API to ensure it meets your needs and provides the best experience.</p>
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#execution_date ⇒ Object
readonly
Returns the value of attribute execution_date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_withdrawal ⇒ Object
readonly
Returns the value of attribute is_withdrawal.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#verifications ⇒ Object
readonly
Returns the value of attribute verifications.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ OutboundPayment
constructor
Initialize a outbound_payment resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the outbound_payment resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ OutboundPayment
Initialize a outbound_payment resource instance
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 31 def initialize(object, response = nil) @object = object @amount = object['amount'] @created_at = object['created_at'] @currency = object['currency'] @description = object['description'] @execution_date = object['execution_date'] @id = object['id'] @is_withdrawal = object['is_withdrawal'] @links = object['links'] @metadata = object['metadata'] @reference = object['reference'] @scheme = object['scheme'] @status = object['status'] @verifications = object['verifications'] @response = response end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def description @description end |
#execution_date ⇒ Object (readonly)
Returns the value of attribute execution_date.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def execution_date @execution_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def id @id end |
#is_withdrawal ⇒ Object (readonly)
Returns the value of attribute is_withdrawal.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def is_withdrawal @is_withdrawal end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def @metadata end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def reference @reference end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def scheme @scheme end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def status @status end |
#verifications ⇒ Object (readonly)
Returns the value of attribute verifications.
26 27 28 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 26 def verifications @verifications end |
Instance Method Details
#api_response ⇒ Object
50 51 52 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 50 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
55 56 57 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 55 def links @outbound_payment_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the outbound_payment resource as a hash of all its readable attributes
60 61 62 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 60 def to_h @object end |