class GoCardless::Resources::Mandate

# GoCardless will notify you via a [webhook](developer.gocardless.com/pro/#webhooks) whenever the status of a mandate changes. Represents an instance of a mandate resource returned from the API

Attributes

created_at[R]
id[R]
metadata[R]
next_possible_charge_date[R]
reference[R]
scheme[R]
status[R]

Public Class Methods

new(object) click to toggle source

initialize a resource instance @param object [Hash] an object returned from the API

# File lib/gocardless-pro/resources/mandate.rb, line 38
def initialize(object)
  @object = object

  @created_at = object['created_at']
  @id = object['id']
  @links = object['links']
  @metadata = object['metadata']
  @next_possible_charge_date = object['next_possible_charge_date']
  @reference = object['reference']
  @scheme = object['scheme']
  @status = object['status']
end

Public Instance Methods

to_h() click to toggle source

Provides the resource as a hash of all it’s readable attributes

# File lib/gocardless-pro/resources/mandate.rb, line 65
def to_h
  @object
end