Class: GoCardlessPro::Resources::BillingRequest
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::BillingRequest
- Defined in:
- lib/gocardless_pro/resources/billing_request.rb
Overview
Billing Requests help create resources that require input or action from a customer. An example of required input might be additional customer billing details, while an action would be asking a customer to authorise a payment using their mobile banking app.
See [Billing Requests: Overview](developer.gocardless.com/getting-started/billing-requests/overview/) for how-to’s, explanations and tutorials. <p class=“notice”><strong>Important</strong>: All properties associated with ‘subscription_request` and `instalment_schedule_request` are only supported for ACH and PAD schemes.</p>
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#fallback_enabled ⇒ Object
readonly
Returns the value of attribute fallback_enabled.
-
#fallback_occurred ⇒ Object
readonly
Returns the value of attribute fallback_occurred.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#instalment_schedule_request ⇒ Object
readonly
Returns the value of attribute instalment_schedule_request.
-
#mandate_request ⇒ Object
readonly
Returns the value of attribute mandate_request.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#payment_request ⇒ Object
readonly
Returns the value of attribute payment_request.
-
#purpose_code ⇒ Object
readonly
Returns the value of attribute purpose_code.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#subscription_request ⇒ Object
readonly
Returns the value of attribute subscription_request.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ BillingRequest
constructor
Initialize a billing_request resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the billing_request resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ BillingRequest
Initialize a billing_request resource instance
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 30 def initialize(object, response = nil) @object = object @actions = object['actions'] @created_at = object['created_at'] @fallback_enabled = object['fallback_enabled'] @fallback_occurred = object['fallback_occurred'] @id = object['id'] @instalment_schedule_request = object['instalment_schedule_request'] @links = object['links'] @mandate_request = object['mandate_request'] @metadata = object['metadata'] @payment_request = object['payment_request'] @purpose_code = object['purpose_code'] @resources = object['resources'] @status = object['status'] @subscription_request = object['subscription_request'] @response = response end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def actions @actions end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def created_at @created_at end |
#fallback_enabled ⇒ Object (readonly)
Returns the value of attribute fallback_enabled.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def fallback_enabled @fallback_enabled end |
#fallback_occurred ⇒ Object (readonly)
Returns the value of attribute fallback_occurred.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def fallback_occurred @fallback_occurred end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def id @id end |
#instalment_schedule_request ⇒ Object (readonly)
Returns the value of attribute instalment_schedule_request.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def instalment_schedule_request @instalment_schedule_request end |
#mandate_request ⇒ Object (readonly)
Returns the value of attribute mandate_request.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def mandate_request @mandate_request end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def @metadata end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def payment_request @payment_request end |
#purpose_code ⇒ Object (readonly)
Returns the value of attribute purpose_code.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def purpose_code @purpose_code end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def resources @resources end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def status @status end |
#subscription_request ⇒ Object (readonly)
Returns the value of attribute subscription_request.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 25 def subscription_request @subscription_request end |
Instance Method Details
#api_response ⇒ Object
50 51 52 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 50 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
55 56 57 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 55 def links @billing_request_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the billing_request resource as a hash of all its readable attributes
60 61 62 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 60 def to_h @object end |