Class: GoCardlessPro::Resources::BillingRequestTemplate
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::BillingRequestTemplate
- Defined in:
- lib/gocardless_pro/resources/billing_request_template.rb
Overview
Billing Request Templates are reusable templates that result in numerous Billing Requests with similar attributes. They provide a no-code solution for generating various types of multi-user payment links.
Each template includes a reusable URL that can be embedded in a website or shared with customers via email. Every time the URL is opened, it generates a new Billing Request.
Billing Request Templates overcome the key limitation of the Billing Request: a Billing Request cannot be shared among multiple users because it is intended for single-use and is designed to cater to the unique needs of individual customers.
Instance Attribute Summary collapse
-
#authorisation_url ⇒ Object
readonly
Returns the value of attribute authorisation_url.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mandate_request_currency ⇒ Object
readonly
Returns the value of attribute mandate_request_currency.
-
#mandate_request_description ⇒ Object
readonly
Returns the value of attribute mandate_request_description.
-
#mandate_request_metadata ⇒ Object
readonly
Returns the value of attribute mandate_request_metadata.
-
#mandate_request_scheme ⇒ Object
readonly
Returns the value of attribute mandate_request_scheme.
-
#mandate_request_verify ⇒ Object
readonly
Returns the value of attribute mandate_request_verify.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#payment_request_amount ⇒ Object
readonly
Returns the value of attribute payment_request_amount.
-
#payment_request_currency ⇒ Object
readonly
Returns the value of attribute payment_request_currency.
-
#payment_request_description ⇒ Object
readonly
Returns the value of attribute payment_request_description.
-
#payment_request_metadata ⇒ Object
readonly
Returns the value of attribute payment_request_metadata.
-
#payment_request_scheme ⇒ Object
readonly
Returns the value of attribute payment_request_scheme.
-
#redirect_uri ⇒ Object
readonly
Returns the value of attribute redirect_uri.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ BillingRequestTemplate
constructor
Initialize a billing_request_template resource instance.
-
#to_h ⇒ Object
Provides the billing_request_template resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ BillingRequestTemplate
Initialize a billing_request_template resource instance
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 34 def initialize(object, response = nil) @object = object @authorisation_url = object['authorisation_url'] @created_at = object['created_at'] @id = object['id'] @mandate_request_currency = object['mandate_request_currency'] @mandate_request_description = object['mandate_request_description'] @mandate_request_metadata = object['mandate_request_metadata'] @mandate_request_scheme = object['mandate_request_scheme'] @mandate_request_verify = object['mandate_request_verify'] @metadata = object['metadata'] @name = object['name'] @payment_request_amount = object['payment_request_amount'] @payment_request_currency = object['payment_request_currency'] @payment_request_description = object['payment_request_description'] @payment_request_metadata = object['payment_request_metadata'] @payment_request_scheme = object['payment_request_scheme'] @redirect_uri = object['redirect_uri'] @updated_at = object['updated_at'] @response = response end |
Instance Attribute Details
#authorisation_url ⇒ Object (readonly)
Returns the value of attribute authorisation_url.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def @authorisation_url end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def id @id end |
#mandate_request_currency ⇒ Object (readonly)
Returns the value of attribute mandate_request_currency.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def mandate_request_currency @mandate_request_currency end |
#mandate_request_description ⇒ Object (readonly)
Returns the value of attribute mandate_request_description.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def mandate_request_description @mandate_request_description end |
#mandate_request_metadata ⇒ Object (readonly)
Returns the value of attribute mandate_request_metadata.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def @mandate_request_metadata end |
#mandate_request_scheme ⇒ Object (readonly)
Returns the value of attribute mandate_request_scheme.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def mandate_request_scheme @mandate_request_scheme end |
#mandate_request_verify ⇒ Object (readonly)
Returns the value of attribute mandate_request_verify.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def mandate_request_verify @mandate_request_verify end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def @metadata end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def name @name end |
#payment_request_amount ⇒ Object (readonly)
Returns the value of attribute payment_request_amount.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def payment_request_amount @payment_request_amount end |
#payment_request_currency ⇒ Object (readonly)
Returns the value of attribute payment_request_currency.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def payment_request_currency @payment_request_currency end |
#payment_request_description ⇒ Object (readonly)
Returns the value of attribute payment_request_description.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def payment_request_description @payment_request_description end |
#payment_request_metadata ⇒ Object (readonly)
Returns the value of attribute payment_request_metadata.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def @payment_request_metadata end |
#payment_request_scheme ⇒ Object (readonly)
Returns the value of attribute payment_request_scheme.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def payment_request_scheme @payment_request_scheme end |
#redirect_uri ⇒ Object (readonly)
Returns the value of attribute redirect_uri.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def redirect_uri @redirect_uri end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 29 def updated_at @updated_at end |
Instance Method Details
#api_response ⇒ Object
57 58 59 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 57 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the billing_request_template resource as a hash of all its readable attributes
62 63 64 |
# File 'lib/gocardless_pro/resources/billing_request_template.rb', line 62 def to_h @object end |