Method: ProcessOut::Subscription#fetch_customer
- Defined in:
- lib/processout/subscription.rb
#fetch_customer(options = {}) ⇒ Object
Get the customer owning the subscription. Params:
options-
Hashof options
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/processout/subscription.rb', line 620 def fetch_customer( = {}) self.prefill() request = Request.new(@client) path = "/subscriptions/" + CGI.escape(@id) + "/customers" data = { } response = Response.new(request.get(path, data, )) return_values = Array.new body = response.body body = body["customer"] customer = Customer.new(@client) return_values.push(customer.fill_with_data(body)) return_values[0] end |