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
Source
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 35 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
Initialize a instalment_schedule resource instance @param object [Hash] an object returned from the API
Public Instance Methods
Source
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 50 def api_response ApiResponse.new(@response) end
Source
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 55 def links @instalment_schedule_links ||= Links.new(@links) end
Return the links that the resource has
Source
# File lib/gocardless_pro/resources/instalment_schedule.rb, line 60 def to_h @object end
Provides the instalment_schedule resource as a hash of all its readable attributes