Skip to content

Commit

Permalink
Merge pull request #209 from recurly/v3-v2021-02-25-7978657532
Browse files Browse the repository at this point in the history
Add invoice state param for v2021-02-25
  • Loading branch information
tilley-kyle authored Feb 20, 2024
2 parents 6cec9ff + b98c2b1 commit dfe8ed9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
28 changes: 28 additions & 0 deletions client_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,9 @@ type ListAccountInvoicesParams struct {
// returned at once you can sort the records yourself.
Ids []string

// State - Invoice state.
State *string

// Limit - Limit number of records 1-200.
Limit *int

Expand Down Expand Up @@ -1707,6 +1710,10 @@ func (list *ListAccountInvoicesParams) URLParams() []KeyValue {
options = append(options, KeyValue{Key: "ids", Value: strings.Join(list.Ids, ",")})
}

if list.State != nil {
options = append(options, KeyValue{Key: "state", Value: *list.State})
}

if list.Limit != nil {
options = append(options, KeyValue{Key: "limit", Value: strconv.Itoa(*list.Limit)})
}
Expand Down Expand Up @@ -4013,6 +4020,9 @@ type ListInvoicesParams struct {
// returned at once you can sort the records yourself.
Ids []string

// State - Invoice state.
State *string

// Limit - Limit number of records 1-200.
Limit *int

Expand Down Expand Up @@ -4047,6 +4057,10 @@ func (list *ListInvoicesParams) URLParams() []KeyValue {
options = append(options, KeyValue{Key: "ids", Value: strings.Join(list.Ids, ",")})
}

if list.State != nil {
options = append(options, KeyValue{Key: "state", Value: *list.State})
}

if list.Limit != nil {
options = append(options, KeyValue{Key: "limit", Value: strconv.Itoa(*list.Limit)})
}
Expand Down Expand Up @@ -5982,6 +5996,9 @@ type ListSubscriptionInvoicesParams struct {
// returned at once you can sort the records yourself.
Ids []string

// State - Invoice state.
State *string

// Limit - Limit number of records 1-200.
Limit *int

Expand Down Expand Up @@ -6016,6 +6033,10 @@ func (list *ListSubscriptionInvoicesParams) URLParams() []KeyValue {
options = append(options, KeyValue{Key: "ids", Value: strings.Join(list.Ids, ",")})
}

if list.State != nil {
options = append(options, KeyValue{Key: "state", Value: *list.State})
}

if list.Limit != nil {
options = append(options, KeyValue{Key: "limit", Value: strconv.Itoa(*list.Limit)})
}
Expand Down Expand Up @@ -7332,6 +7353,9 @@ type ListBusinessEntityInvoicesParams struct {
// returned at once you can sort the records yourself.
Ids []string

// State - Invoice state.
State *string

// Limit - Limit number of records 1-200.
Limit *int

Expand Down Expand Up @@ -7366,6 +7390,10 @@ func (list *ListBusinessEntityInvoicesParams) URLParams() []KeyValue {
options = append(options, KeyValue{Key: "ids", Value: strings.Join(list.Ids, ",")})
}

if list.State != nil {
options = append(options, KeyValue{Key: "state", Value: *list.State})
}

if list.Limit != nil {
options = append(options, KeyValue{Key: "limit", Value: strconv.Itoa(*list.Limit)})
}
Expand Down
23 changes: 19 additions & 4 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3521,6 +3521,7 @@ paths:
parameters:
- "$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 @@ -8110,6 +8111,7 @@ paths:
to learn how to use pagination in the API and Client Libraries.
parameters:
- "$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 @@ -13909,6 +13911,7 @@ paths:
parameters:
- "$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 @@ -16282,6 +16285,7 @@ paths:
parameters:
- "$ref": "#/components/parameters/business_entity_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 @@ -16455,6 +16459,12 @@ components:
required: true
schema:
type: string
invoice_state:
name: state
in: query
description: Invoice state.
schema:
"$ref": "#/components/schemas/InvoiceStateQueryParamEnum"
measured_unit_id:
name: measured_unit_id
in: path
Expand Down Expand Up @@ -21069,7 +21079,6 @@ components:
title: Ending quantity
minimum: 1
maximum: 999999999
default:
description: Ending quantity for the tier. This represents a unit amount
for unit-priced add ons. Must be left empty if it is the final tier.
usage_percentage:
Expand Down Expand Up @@ -21106,7 +21115,6 @@ components:
title: Ending amount
minimum: 0.01
maximum: 9999999999999.99
default:
description: Ending amount for the tier. Allows up to 2 decimal places.
Must be left empty if it is the final tier.
usage_percentage:
Expand Down Expand Up @@ -22070,7 +22078,6 @@ components:
title: Ending quantity
minimum: 1
maximum: 999999999
default:
description: Ending quantity for the tier. This represents a unit amount
for unit-priced add ons. Must be left empty if it is the final tier.
unit_amount:
Expand Down Expand Up @@ -22103,7 +22110,6 @@ components:
title: Ending amount
minimum: 1
maximum: 9999999999999.99
default:
description: Ending amount for the tier. Allows up to 2 decimal places.
Must be left empty if it is the final tier.
usage_percentage:
Expand Down Expand Up @@ -25193,6 +25199,7 @@ components:
- write_off
InvoiceStateEnum:
type: string
default: all
enum:
- open
- pending
Expand All @@ -25202,6 +25209,14 @@ components:
- closed
- failed
- voided
InvoiceStateQueryParamEnum:
type: string
default: all
enum:
- pending
- past_due
- paid
- failed
CollectionMethodEnum:
type: string
enum:
Expand Down

0 comments on commit dfe8ed9

Please sign in to comment.