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 (https://developer.gocardless.com/getting-started/billing-requests/overview/) for how-to's, explanations and tutorials.
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
27 28 29 30 31 32 33 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 27 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.
22 23 24 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 22 def @bank_authorisations end |
#billing_requests ⇒ Object (readonly)
Returns the value of attribute billing_requests.
23 24 25 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 23 def billing_requests @billing_requests end |
Instance Method Details
#api_response ⇒ Object
35 36 37 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 35 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
40 41 42 |
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 40 def to_h @object end |