Class: GoCardlessPro::Resources::BillingRequestWithAction

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ BillingRequestWithAction

Initialize a billing_request_with_action resource instance

Parameters:

  • object (Hash)

    an object returned from the API



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_authorisationsObject (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
  @bank_authorisations
end

#billing_requestsObject (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_responseObject



37
38
39
# File 'lib/gocardless_pro/resources/billing_request_with_action.rb', line 37

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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