From 3629e46760e5996a403288d16f38a642c0214404 Mon Sep 17 00:00:00 2001 From: maksim demin Date: Mon, 8 Oct 2012 20:08:22 -0700 Subject: [PATCH] payment method can be nill for subscribe preview --- lib/zuora/objects/subscribe_request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zuora/objects/subscribe_request.rb b/lib/zuora/objects/subscribe_request.rb index d50353b..83f374f 100644 --- a/lib/zuora/objects/subscribe_request.rb +++ b/lib/zuora/objects/subscribe_request.rb @@ -54,7 +54,7 @@ def create s.__send__(zns, :PaymentMethod) do |pm| generate_payment_method(pm) - end + end unless payment_method.nil? s.__send__(zns, :BillToContact) do |btc| generate_bill_to_contact(btc) @@ -71,7 +71,7 @@ def create s.__send__(zns, :SubscribeOptions) do |so| generate_subscribe_options(so) end unless subscribe_options.blank? - + s.__send__(zns, :SubscriptionData) do |sd| sd.__send__(zns, :Subscription) do |sub| generate_subscription(sub)