Class: GoCardlessPro::Resources::BillingRequestWithAction
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::BillingRequestWithAction
- Defined in:
- lib/gocardless_pro/resources/billing_request_with_action.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>
Instance Attribute Summary collapse
-
#bank_authorisations ⇒ Object
readonly
Returns the value of attribute bank_authorisations.
-
#billing_requests ⇒ Object
readonly
Returns the value of attribute billing_requests.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ BillingRequestWithAction
constructor
Initialize a billing_request_with_action resource instance.
-
#to_h ⇒ Object
Provides the billing_request_with_action resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ BillingRequestWithAction
Initialize a billing_request_with_action resource instance
29 30 31 32 33 34 35 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 29 def initialize(object, response = nil) @object = object @bank_authorisations = object['bank_authorisations'] @billing_requests = object['billing_requests'] @response = response end |
Instance Attribute Details
#bank_authorisations ⇒ Object (readonly)
Returns the value of attribute bank_authorisations.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 25 def @bank_authorisations end |
#billing_requests ⇒ Object (readonly)
Returns the value of attribute billing_requests.
25 26 27 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 25 def billing_requests @billing_requests end |
Instance Method Details
#api_response ⇒ Object
37 38 39 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 37 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the billing_request_with_action resource as a hash of all its readable attributes
42 43 44 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 42 def to_h @object end |