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
(https://developer.gocardless.com/getting-started/billing-requests/overview/)
for how-to's, explanations and tutorials. Important: All properties
associated with subscription_request and instalment_schedule_request
are only supported for ACH and PAD schemes.
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_context_code ⇒ Object
readonly
Returns the value of attribute payment_context_code.
-
#payment_purpose_code ⇒ Object
readonly
Returns the value of attribute payment_purpose_code.
-
#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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 42 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_context_code = object['payment_context_code'] @payment_purpose_code = object['payment_purpose_code'] @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.
24 25 26 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 24 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.
26 27 28 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 26 def fallback_enabled @fallback_enabled end |
#fallback_occurred ⇒ Object (readonly)
Returns the value of attribute fallback_occurred.
27 28 29 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 27 def fallback_occurred @fallback_occurred end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
28 29 30 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 28 def id @id end |
#instalment_schedule_request ⇒ Object (readonly)
Returns the value of attribute instalment_schedule_request.
29 30 31 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 29 def instalment_schedule_request @instalment_schedule_request end |
#mandate_request ⇒ Object (readonly)
Returns the value of attribute mandate_request.
30 31 32 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 30 def mandate_request @mandate_request end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
31 32 33 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 31 def @metadata end |
#payment_context_code ⇒ Object (readonly)
Returns the value of attribute payment_context_code.
32 33 34 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 32 def payment_context_code @payment_context_code end |
#payment_purpose_code ⇒ Object (readonly)
Returns the value of attribute payment_purpose_code.
33 34 35 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 33 def payment_purpose_code @payment_purpose_code end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
34 35 36 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 34 def payment_request @payment_request end |
#purpose_code ⇒ Object (readonly)
Returns the value of attribute purpose_code.
35 36 37 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 35 def purpose_code @purpose_code end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
36 37 38 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 36 def resources @resources end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
37 38 39 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 37 def status @status end |
#subscription_request ⇒ Object (readonly)
Returns the value of attribute subscription_request.
38 39 40 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 38 def subscription_request @subscription_request end |
Instance Method Details
#api_response ⇒ Object
64 65 66 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 64 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
69 70 71 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 69 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
74 75 76 |
# File 'lib/gocardless_pro/resources/billing_request.rb', line 74 def to_h @object end |