Module: Infusionsoft::Client::Order

Included in:
Infusionsoft::Client
Defined in:
lib/infusionsoft/client/order.rb

Overview

The Order service allows you to create a new Order.

Instance Method Summary collapse

Instance Method Details

#place_order(contact_id, card_id, plan_id, product_ids, subscription_ids, process_specials, promo_codes, lead_affiliate_id, sale_affiliate_id) ⇒ Hash

Creates a new order.

Parameters:

  • ID of the order’s Contact (0 is not a valid ID).

  • ID of the card to charge. To skip charging a card, set to “0”.

  • ID of the payment plan to use when creating the order. If not specified, the default plan is used.

  • A list of integers representing the products to add to the order. This cannot be emtpy if a subscription is not specified.

  • A list of integers representing the subscription(s) to add to the order. This cannot be empty if a product ID is not specified.

  • Whether or not the order should consider discounts that would normally be applied if this order was placed through the shopping cart.

  • Promo codes to add to the cart; only used if processing of specials is turned on.

  • ID of the lead affiliate (0 should be used if none).

  • ID of the sale affiliate (0 should be used if none).

Returns:

  • The result of order placement with IDs of the order and invoice that were created and the status of a credit card charge (if applicable). => [Boolean], ‘Message’ => [String], ‘RefNum’ => [String], ‘OrderId’ => [String], ‘InvoiceId’ => [String], ‘Code’ => [String]



34
35
36
# File 'lib/infusionsoft/client/order.rb', line 34

def place_order(contact_id, card_id, plan_id, product_ids, subscription_ids, process_specials, promo_codes, lead_affiliate_id, sale_affiliate_id)
  response = xmlrpc('OrderService.placeOrder', contact_id, card_id, plan_id, product_ids, subscription_ids, process_specials, promo_codes, lead_affiliate_id, sale_affiliate_id)
end