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
21 22 23 24 25 26 27 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 21 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.
17 18 19 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 17 def expires_at @expires_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
17 18 19 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 17 def url @url end |
Instance Method Details
#api_response ⇒ Object
29 30 31 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 29 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the mandate_pdf resource as a hash of all its readable attributes
34 35 36 |
# File 'lib/gocardless_pro/resources/mandate_pdf.rb', line 34 def to_h @object end |