Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Latest Changes for v2021-02-25 (get_preview_renewal) #508

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12434,6 +12434,43 @@ paths:
schema:
"$ref": "#/components/schemas/Error"
x-code-samples: []
"/subscriptions/{subscription_id}/preview_renewal":
get:
tags:
- subscription
operationId: get_preview_renewal
summary: Fetch a preview of a subscription's renewal invoice(s)
description: The subscriptions's renewal invoice(s) will be returned if they
exist; if they don't (for example, if the subscription is not set to renew),
it will return an result with no invoices.
parameters:
- "$ref": "#/components/parameters/subscription_id"
responses:
'200':
description: A preview of the subscription's renewal invoice(s).
content:
application/json:
schema:
"$ref": "#/components/schemas/InvoiceCollection"
'400':
description: Invalid or unpermitted parameter.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
'404':
description: Incorrect site ID or subscription ID.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
default:
description: Unexpected error.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
x-code-samples: []
"/subscriptions/{subscription_id}/change":
get:
tags:
Expand Down Expand Up @@ -20075,7 +20112,8 @@ components:
remaining_pause_cycles:
type: integer
title: Remaining pause cycles
description: Number of billing cycles to pause the subscriptions.
description: Number of billing cycles to pause the subscriptions. A value
of 0 will cancel any pending pauses on the subscription.
required:
- remaining_pause_cycles
SubscriptionShipping:
Expand Down
26 changes: 26 additions & 0 deletions recurly/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,32 @@ def convert_trial(self, subscription_id, **options):
)
return self._make_request("PUT", path, None, **options)

def get_preview_renewal(self, subscription_id, **options):
"""Fetch a preview of a subscription's renewal invoice(s)

Parameters
----------

subscription_id : str
Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.

Keyword Arguments
-----------------

headers : dict
Extra HTTP headers to send with the request.

Returns
-------

InvoiceCollection
A preview of the subscription's renewal invoice(s).
"""
path = self._interpolate_path(
"/subscriptions/%s/preview_renewal", subscription_id
)
return self._make_request("GET", path, None, **options)

def get_subscription_change(self, subscription_id, **options):
"""Fetch a subscription's pending change

Expand Down