Class: GoCardlessPro::Resources::MandatePdf
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::MandatePdf
- Defined in:
- lib/gocardless_pro/resources/mandate_pdf.rb
Overview
Mandate PDFs allow you to easily display [scheme-rules compliant](#appendix-compliance-requirements) Direct Debit mandates to your customers.
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ MandatePdf
constructor
Initialize a mandate_pdf resource instance.
-
#to_h ⇒ Object
Provides the mandate_pdf resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ MandatePdf
Initialize a mandate_pdf resource instance
24 25 26 27 28 29 30 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 24 def initialize(object, response = nil) @object = object @expires_at = object['expires_at'] @url = object['url'] @response = response end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
19 20 21 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 19 def expires_at @expires_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 20 def url @url end |
Instance Method Details
#api_response ⇒ Object
32 33 34 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 32 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the mandate_pdf resource as a hash of all its readable attributes
37 38 39 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 37 def to_h @object end |