class GoCardlessPro::Resources::InstalmentSchedule
Instalment schedules are objects which represent a collection of related payments, with the intention to collect the `total_amount` specified. The API supports both schedule-based creation (similar to subscriptions) as well as explicit selection of differing payment amounts and charge dates.
Unlike subscriptions, the payments are created immediately, so the instalment schedule cannot be modified once submitted and instead can only be cancelled (which will cancel any of the payments which have not yet been submitted).
Customers will receive a single notification about the complete schedule of collection.
Attributes
Public Class Methods
Initialize a instalment_schedule resource instance @param object [Hash] an object returned from the API
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 44 def initialize(object, response = nil) @object = object @created_at = object['created_at'] @currency = object['currency'] @id = object['id'] @links = object['links'] @metadata = object['metadata'] @name = object['name'] @payment_errors = object['payment_errors'] @status = object['status'] @total_amount = object['total_amount'] @response = response end
Public Instance Methods
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 59 def api_response ApiResponse.new(@response) end
Return the links that the resource has
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 64 def links @instalment_schedule_links ||= Links.new(@links) end
Provides the instalment_schedule resource as a hash of all its readable attributes
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 69 def to_h @object end