class GoCardlessPro::Resources::BillingRequest

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.

Attributes

actions[R]
created_at[R]
id[R]
mandate_request[R]
metadata[R]
payment_request[R]
resources[R]
status[R]

Public Class Methods

new(object, response = nil) click to toggle source

Initialize a billing_request resource instance @param object [Hash] an object returned from the API

# File lib/gocardless_pro/resources/billing_request.rb, line 36
def initialize(object, response = nil)
  @object = object

  @actions = object['actions']
  @created_at = object['created_at']
  @id = object['id']
  @links = object['links']
  @mandate_request = object['mandate_request']
  @metadata = object['metadata']
  @payment_request = object['payment_request']
  @resources = object['resources']
  @status = object['status']
  @response = response
end

Public Instance Methods

api_response() click to toggle source
# File lib/gocardless_pro/resources/billing_request.rb, line 51
def api_response
  ApiResponse.new(@response)
end
to_h() click to toggle source

Provides the billing_request resource as a hash of all its readable attributes

# File lib/gocardless_pro/resources/billing_request.rb, line 61
def to_h
  @object
end