def generate(amount)
      builder = XML.new("<coupon/>")
      builder.add_element 'number_of_unique_codes', amount

      resp = follow_link(:generate,
        :body => builder.to_s
      )

      Pager.new(Recurly::Coupon, uri: resp['location'], parent: self, etag: resp['ETag'])
    end
def generate(amount)
      builder = XML.new("<coupon/>")
      builder.add_element 'number_of_unique_codes', amount

      resp = follow_link(:generate,
        :body => builder.to_s
      )

      Pager.new(Recurly::Coupon, uri: resp['location'], parent: self, etag: resp['ETag'])
    end
Generate unique coupon codes on the server. This is based on the unique_template_code.

 @param amount [Integer]
 @return [Pager<Coupon>] A pager that yields the coupon-code type Coupons
 @example
   unique_codes = coupon.generate(10)
   unique_codes.each do |c|
     puts c.coupon_code
   end