lib/recurly/requests/subscription_change_create.rb in recurly-3.0.0.beta.5 vs lib/recurly/requests/subscription_change_create.rb in recurly-3.0.0
- old
+ new
@@ -5,12 +5,12 @@
module Recurly
module Requests
class SubscriptionChangeCreate < Request
# @!attribute add_ons
- # @return [Array[SubscriptionAddOnCreate]] If you set this value you include all the add-ons and their quantities and amounts. The values you include will replace the previous values entirely.
- define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnCreate }
+ # @return [Array[SubscriptionAddOnUpdate]] If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on's ID: `{"id": "abc123"}`.
+ define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnUpdate }
# @!attribute collection_method
# @return [String] Collection method
define_attribute :collection_method, String
@@ -36,11 +36,15 @@
# @!attribute quantity
# @return [Integer] Optionally override the default quantity of 1.
define_attribute :quantity, Integer
+ # @!attribute shipping
+ # @return [SubscriptionChangeShippingCreate]
+ define_attribute :shipping, :SubscriptionChangeShippingCreate
+
# @!attribute timeframe
- # @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now or when the subscription renews. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to "renewal" so the change takes affect at the end of the current billing cycle.
+ # @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription renews. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to "renewal" so the change takes affect at the end of the current subscription term.
define_attribute :timeframe, String
# @!attribute unit_amount
# @return [Float] Optionally, sets custom pricing for the subscription, overriding the plan's default unit amount. The subscription's current currency will be used.
define_attribute :unit_amount, Float