Class: GoCardlessPro::Resources::Mandate
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::Mandate
- Defined in:
- lib/gocardless_pro/resources/mandate.rb
Overview
Mandates represent the Direct Debit mandate with a [customer](#core-endpoints-customers).
GoCardless will notify you via a [webhook](#appendix-webhooks) whenever the status of a mandate changes.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#authorisation_source ⇒ Object
readonly
Returns the value of attribute authorisation_source.
-
#consent_parameters ⇒ Object
readonly
Returns the value of attribute consent_parameters.
-
#consent_type ⇒ Object
readonly
Returns the value of attribute consent_type.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#funds_settlement ⇒ Object
readonly
Returns the value of attribute funds_settlement.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#next_possible_charge_date ⇒ Object
readonly
Returns the value of attribute next_possible_charge_date.
-
#next_possible_standard_ach_charge_date ⇒ Object
readonly
Returns the value of attribute next_possible_standard_ach_charge_date.
-
#payments_require_approval ⇒ Object
readonly
Returns the value of attribute payments_require_approval.
-
#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.
-
#verified_at ⇒ Object
readonly
Returns the value of attribute verified_at.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ Mandate
constructor
Initialize a mandate resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the mandate resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ Mandate
Initialize a mandate resource instance
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 24 def initialize(object, response = nil) @object = object @authorisation_source = object['authorisation_source'] @consent_parameters = object['consent_parameters'] @consent_type = object['consent_type'] @created_at = object['created_at'] @funds_settlement = object['funds_settlement'] @id = object['id'] @links = object['links'] @metadata = object['metadata'] @next_possible_charge_date = object['next_possible_charge_date'] @next_possible_standard_ach_charge_date = object['next_possible_standard_ach_charge_date'] @payments_require_approval = object['payments_require_approval'] @reference = object['reference'] @scheme = object['scheme'] @status = object['status'] @verified_at = object['verified_at'] @response = response end |
Instance Attribute Details
#authorisation_source ⇒ Object (readonly)
Returns the value of attribute authorisation_source.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def @authorisation_source end |
#consent_parameters ⇒ Object (readonly)
Returns the value of attribute consent_parameters.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def @consent_parameters end |
#consent_type ⇒ Object (readonly)
Returns the value of attribute consent_type.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def @consent_type end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def created_at @created_at end |
#funds_settlement ⇒ Object (readonly)
Returns the value of attribute funds_settlement.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def funds_settlement @funds_settlement end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def @metadata end |
#next_possible_charge_date ⇒ Object (readonly)
Returns the value of attribute next_possible_charge_date.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def next_possible_charge_date @next_possible_charge_date end |
#next_possible_standard_ach_charge_date ⇒ Object (readonly)
Returns the value of attribute next_possible_standard_ach_charge_date.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def next_possible_standard_ach_charge_date @next_possible_standard_ach_charge_date end |
#payments_require_approval ⇒ Object (readonly)
Returns the value of attribute payments_require_approval.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def payments_require_approval @payments_require_approval end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def reference @reference end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def scheme @scheme end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def status @status end |
#verified_at ⇒ Object (readonly)
Returns the value of attribute verified_at.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 19 def verified_at @verified_at end |
Instance Method Details
#api_response ⇒ Object
45 46 47 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 45 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
50 51 52 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 50 def links @mandate_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the mandate resource as a hash of all its readable attributes
55 56 57 |
# File 'lib/gocardless_pro/resources/mandate.rb', line 55 def to_h @object end |