File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed
Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,35 @@ public function setModify(ModifySubscriptionPayload $payload)
123123 return $ request ;
124124 }
125125
126+ /**
127+ * @summary Modify an existing subscription with a new price which will be used for the
128+ * next renewal
129+ *
130+ * @param $priceFid
131+ *
132+ * @return FidRequest
133+ */
134+ public function setUpdateRenewalPrice ($ priceFid )
135+ {
136+ $ request = new FidRequest ();
137+ $ request ->setConnection ($ this ->_getConnection ());
138+ $ request ->setEndpoint ($ this );
139+
140+ $ detail = new ApiRequestDetail ();
141+ $ detail ->setRequireAuth (true );
142+ $ detail ->setUrl ($ this ->_buildUrl (
143+ str_replace (
144+ array_keys ($ this ->_replacements ),
145+ array_values ($ this ->_replacements ),
146+ 'customers/{customerFid}/subscriptions/{subscriptionFid}/updateRenewalPrice '
147+ )
148+ ));
149+ $ detail ->addPostField ('priceFid ' , $ priceFid );
150+ $ detail ->setMethod ('PUT ' );
151+ $ request ->setRequestDetail ($ detail );
152+ return $ request ;
153+ }
154+
126155 /**
127156 * @summary Apply an offer to a subscription
128157 *
Original file line number Diff line number Diff line change @@ -1462,6 +1462,33 @@ paths:
14621462 404 :
14631463 description : Subscription not found
14641464
1465+ " /customers/{customerFid}/subscriptions/{subscriptionFid}/updateRenewalPrice " :
1466+ put :
1467+ consumes :
1468+ - multipart/form-data
1469+ summary : Modify an existing subscription with a new price which will be used for the next renewal
1470+ tags :
1471+ - customers
1472+ security :
1473+ - OAuth :
1474+ - customer
1475+ parameters :
1476+ - $ref : ' #/parameters/customerFid'
1477+ - $ref : ' #/parameters/subscriptionFid'
1478+ - name : priceFid
1479+ in : formData
1480+ required : true
1481+ type : string
1482+ responses :
1483+ 200 :
1484+ description : Subscription price updated
1485+ schema :
1486+ $ref : ' #/definitions/Fid'
1487+ 400 :
1488+ description : Invalid payload data
1489+ 404 :
1490+ description : Subscription not found
1491+
14651492 " /customers/{customerFid}/subscriptions/{subscriptionFid}/applyOffer " :
14661493 put :
14671494 consumes :
@@ -1971,7 +1998,6 @@ parameters:
19711998 in : formData
19721999 description : IP Address of the visitor
19732000 type : string
1974-
19752001 visitorId :
19762002 name : visitorId
19772003 in : path
You can’t perform that action at this time.
0 commit comments