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

Add invoice state param for v2019-10-10 #678

Closed
Closed
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
60 changes: 54 additions & 6 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ paths:
Alabama St.\"),\n\t\t\tCity: recurly.String(\"San Francisco\"),\n\t\t\tPostalCode:
recurly.String(\"94110\"),\n\t\t\tCountry: recurly.String(\"US\"),\n\t\t\tRegion:
\ recurly.String(\"CA\"),\n\t\t},\n\t\tNumber: recurly.String(\"4111111111111111\"),\n\t\tMonth:
\ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"22\"),\n\t\tCvv:
\ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"30\"),\n\t\tCvv:
\ recurly.String(\"123\"),\n\t},\n}\n\naccount, err := client.CreateAccount(accountReq)\nif
e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation
{\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
Expand Down Expand Up @@ -3195,6 +3195,7 @@ paths:
- "$ref": "#/components/parameters/site_id"
- "$ref": "#/components/parameters/account_id"
- "$ref": "#/components/parameters/ids"
- "$ref": "#/components/parameters/invoice_state"
- "$ref": "#/components/parameters/limit"
- "$ref": "#/components/parameters/order"
- "$ref": "#/components/parameters/sort_dates"
Expand Down Expand Up @@ -7394,6 +7395,7 @@ paths:
parameters:
- "$ref": "#/components/parameters/site_id"
- "$ref": "#/components/parameters/ids"
- "$ref": "#/components/parameters/invoice_state"
- "$ref": "#/components/parameters/limit"
- "$ref": "#/components/parameters/order"
- "$ref": "#/components/parameters/sort_dates"
Expand Down Expand Up @@ -13059,6 +13061,7 @@ paths:
- "$ref": "#/components/parameters/site_id"
- "$ref": "#/components/parameters/subscription_id"
- "$ref": "#/components/parameters/ids"
- "$ref": "#/components/parameters/invoice_state"
- "$ref": "#/components/parameters/limit"
- "$ref": "#/components/parameters/order"
- "$ref": "#/components/parameters/sort_dates"
Expand Down Expand Up @@ -14724,6 +14727,18 @@ components:
required: true
schema:
type: string
invoice_state:
name: state
in: query
description: Invoice state.
schema:
type: string
default: all
enum:
- pending
- past_due
- paid
- failed
measured_unit_id:
name: measured_unit_id
in: path
Expand Down Expand Up @@ -15932,6 +15947,11 @@ components:
type: string
title: Country
description: Country, 2-letter ISO 3166-1 alpha-2 code.
geo_code:
type: string
maxLength: 20
description: Code that represents a geographic entity (location or object).
Only returned for Sling Vertex Integration
AddOnMini:
type: object
title: Add-on mini details
Expand Down Expand Up @@ -16652,16 +16672,20 @@ components:
properties:
account_reference:
type: string
description: Used by Adyen gateways. The Shopper Reference value used
when the external token was created. Must be used in conjunction with
gateway_token and gateway_code.
description: Used by Adyen and Braintree gateways. For Adyen The Shopper
Reference value used when the external token was created. Must be
used in conjunction with gateway_token and gateway_code. For Braintree
the PayPal PayerID is populated in the response.
maxLength: 264
amazon_billing_agreement_id:
type: string
title: Amazon billing agreement ID
paypal_billing_agreement_id:
type: string
title: PayPal billing agreement ID
roku_billing_agreement_id:
type: string
title: Roku's CIB if billing through Roku
fraud_session_id:
type: string
title: Fraud Session ID
Expand Down Expand Up @@ -19734,6 +19758,11 @@ components:
type: string
maxLength: 50
description: Country, 2-letter ISO 3166-1 alpha-2 code.
geo_code:
type: string
maxLength: 20
description: Code that represents a geographic entity (location or object).
Only returned for Sling Vertex Integration
created_at:
type: string
title: Created at
Expand Down Expand Up @@ -19789,6 +19818,11 @@ components:
type: string
maxLength: 50
description: Country, 2-letter ISO 3166-1 alpha-2 code.
geo_code:
type: string
maxLength: 20
description: Code that represents a geographic entity (location or object).
Only returned for Sling Vertex Integration
required:
- first_name
- last_name
Expand Down Expand Up @@ -20039,6 +20073,11 @@ components:
type: string
maxLength: 50
description: Country, 2-letter ISO 3166-1 alpha-2 code.
geo_code:
type: string
maxLength: 20
description: Code that represents a geographic entity (location or object).
Only returned for Sling Vertex Integration
Site:
type: object
properties:
Expand Down Expand Up @@ -21334,6 +21373,14 @@ components:
remaining_billing_cycles:
type: integer
description: Represents how many billing cycles are left in a ramp interval.
starting_on:
type: string
format: date-time
title: Date the ramp interval starts
ending_on:
type: string
format: date-time
title: Date the ramp interval ends
unit_amount:
type: integer
description: Represents the price for the ramp interval.
Expand Down Expand Up @@ -22275,8 +22322,9 @@ components:
properties:
account_reference:
type: string
description: Used by Adyen gateways. The Shopper Reference value used
when the external token was created.
description: Used by Adyen and Braintree gateways. For Adyen the Shopper
Reference value used when the external token was created. For Braintree
the PayPal PayerID is populated in the response.
maxLength: 264
billing_agreement_id:
type: string
Expand Down
6 changes: 6 additions & 0 deletions recurly/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ def list_account_invoices(self, account_id, **options):
results correspond to your request.
* Records are returned in an arbitrary order. Since results are all
returned at once you can sort the records yourself.
state : str
Invoice state.
limit : int
Limit number of records 1-200.
order : str
Expand Down Expand Up @@ -1970,6 +1972,8 @@ def list_invoices(self, **options):
results correspond to your request.
* Records are returned in an arbitrary order. Since results are all
returned at once you can sort the records yourself.
state : str
Invoice state.
limit : int
Limit number of records 1-200.
order : str
Expand Down Expand Up @@ -3370,6 +3374,8 @@ def list_subscription_invoices(self, subscription_id, **options):
results correspond to your request.
* Records are returned in an arbitrary order. Since results are all
returned at once you can sort the records yourself.
state : str
Invoice state.
limit : int
Limit number of records 1-200.
order : str
Expand Down
17 changes: 16 additions & 1 deletion recurly/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class Address(Resource):
Country, 2-letter ISO 3166-1 alpha-2 code.
first_name : str
First name
geo_code : str
Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
last_name : str
Last name
phone : str
Expand All @@ -75,6 +77,7 @@ class Address(Resource):
"city": str,
"country": str,
"first_name": str,
"geo_code": str,
"last_name": str,
"phone": str,
"postal_code": str,
Expand Down Expand Up @@ -238,6 +241,8 @@ class ShippingAddress(Resource):
Created at
email : str
first_name : str
geo_code : str
Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
id : str
Shipping Address ID
last_name : str
Expand All @@ -264,6 +269,7 @@ class ShippingAddress(Resource):
"created_at": datetime,
"email": str,
"first_name": str,
"geo_code": str,
"id": str,
"last_name": str,
"nickname": str,
Expand Down Expand Up @@ -389,7 +395,7 @@ class GatewayAttributes(Resource):
Attributes
----------
account_reference : str
Used by Adyen gateways. The Shopper Reference value used when the external token was created.
Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response.
"""

schema = {
Expand Down Expand Up @@ -1238,6 +1244,8 @@ class InvoiceAddress(Resource):
Country, 2-letter ISO 3166-1 alpha-2 code.
first_name : str
First name
geo_code : str
Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
last_name : str
Last name
name_on_account : str
Expand All @@ -1259,6 +1267,7 @@ class InvoiceAddress(Resource):
"company": str,
"country": str,
"first_name": str,
"geo_code": str,
"last_name": str,
"name_on_account": str,
"phone": str,
Expand Down Expand Up @@ -2031,17 +2040,23 @@ class SubscriptionRampIntervalResponse(Resource):
"""
Attributes
----------
ending_on : datetime
Date the ramp interval ends
remaining_billing_cycles : int
Represents how many billing cycles are left in a ramp interval.
starting_billing_cycle : int
Represents the billing cycle where a ramp interval starts.
starting_on : datetime
Date the ramp interval starts
unit_amount : int
Represents the price for the ramp interval.
"""

schema = {
"ending_on": datetime,
"remaining_billing_cycles": int,
"starting_billing_cycle": int,
"starting_on": datetime,
"unit_amount": int,
}

Expand Down
Loading