Class: GoCardlessPro::Resources::OutboundPaymentImport
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::OutboundPaymentImport
- Defined in:
- lib/gocardless_pro/resources/outbound_payment_import.rb
Overview
Outbound Payment Imports allow you to create multiple payments via a single API call.
The Workflow:
- Create the outbound payment import.
- Retrieve an authorisation link from the response.
- Redirect the user to the link to authorise the import.
- Once the user authorises the import, the individual outbound payments are automatically submitted.
Import entries are not processed as actual payments until they are reviewed and authorised in GoCardless Dashboard. Upon approval, a unique outbound payment is generated for every entry in the import.
Outbound Payment Imports are capped at 1000 entries. If you expect to exceed this limit, please create multiple smaller imports.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#amount_sum ⇒ Object
readonly
Returns the value of attribute amount_sum.
-
#authorisation_url ⇒ Object
readonly
Returns the value of attribute authorisation_url.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#entry_counts ⇒ Object
readonly
Returns the value of attribute entry_counts.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ OutboundPaymentImport
constructor
Initialize a outbound_payment_import resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the outbound_payment_import resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ OutboundPaymentImport
Initialize a outbound_payment_import resource instance
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 42 def initialize(object, response = nil) @object = object @amount_sum = object['amount_sum'] @authorisation_url = object['authorisation_url'] @created_at = object['created_at'] @currency = object['currency'] @entry_counts = object['entry_counts'] @id = object['id'] @links = object['links'] @status = object['status'] @response = response end |
Instance Attribute Details
#amount_sum ⇒ Object (readonly)
Returns the value of attribute amount_sum.
32 33 34 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 32 def amount_sum @amount_sum end |
#authorisation_url ⇒ Object (readonly)
Returns the value of attribute authorisation_url.
33 34 35 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 33 def @authorisation_url end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
34 35 36 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.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_import.rb', line 35 def currency @currency end |
#entry_counts ⇒ Object (readonly)
Returns the value of attribute entry_counts.
36 37 38 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 36 def entry_counts @entry_counts end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
37 38 39 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 37 def id @id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
38 39 40 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 38 def status @status end |
Instance Method Details
#api_response ⇒ Object
56 57 58 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 56 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
61 62 63 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 61 def links @outbound_payment_import_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the outbound_payment_import resource as a hash of all its readable attributes
66 67 68 |
# File 'lib/gocardless_pro/resources/outbound_payment_import.rb', line 66 def to_h @object end |