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 (https://developer.gocardless.com/api-reference/#core-endpoints-creditors).
GoCardless will notify you via a webhook (https://developer.gocardless.com/api-reference/#appendix-webhooks) when the status of the outbound payment changes (https://developer.gocardless.com/api-reference/#event-types-outbound-payment).
####Rate limiting
Two rate limits apply to the Outbound Payments APIs:
- All POST Outbound Payment endpoints (create, withdraw, approve, cancel and etc.) share a single rate-limit group of 300 requests per minute. As initiating a payment typically requires two API calls (one to create the payment and one to approve it), this allows you to add approximately 150 outbound payments per minute.
- All remaining Outbound Payment endpoints are limited to 500 requests per minute.
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
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 48 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.
33 34 35 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 33 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
34 35 36 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 34 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
35 36 37 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 35 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
36 37 38 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 36 def description @description end |
#execution_date ⇒ Object (readonly)
Returns the value of attribute execution_date.
37 38 39 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 37 def execution_date @execution_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
38 39 40 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 38 def id @id end |
#is_withdrawal ⇒ Object (readonly)
Returns the value of attribute is_withdrawal.
39 40 41 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 39 def is_withdrawal @is_withdrawal end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
40 41 42 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 40 def @metadata end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
41 42 43 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 41 def reference @reference end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
42 43 44 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 42 def scheme @scheme end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
43 44 45 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 43 def status @status end |
#verifications ⇒ Object (readonly)
Returns the value of attribute verifications.
44 45 46 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 44 def verifications @verifications end |
Instance Method Details
#api_response ⇒ Object
67 68 69 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 67 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
72 73 74 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 72 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
77 78 79 |
# File 'lib/gocardless_pro/resources/outbound_payment.rb', line 77 def to_h @object end |