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 #210

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
3 changes: 3 additions & 0 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ type Address struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode string `json:"geo_code,omitempty"`
}

// GetResponse returns the ResponseMetadata that generated this resource
Expand Down
3 changes: 3 additions & 0 deletions address_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type AddressCreate struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country *string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode *string `json:"geo_code,omitempty"`
}

func (attr *AddressCreate) toParams() *Params {
Expand Down
3 changes: 3 additions & 0 deletions billing_info_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type BillingInfoCreate struct {
// PayPal billing agreement ID
PaypalBillingAgreementId *string `json:"paypal_billing_agreement_id,omitempty"`

// Roku's CIB if billing through Roku
RokuBillingAgreementId *string `json:"roku_billing_agreement_id,omitempty"`

// Fraud Session ID
FraudSessionId *string `json:"fraud_session_id,omitempty"`

Expand Down
21 changes: 21 additions & 0 deletions client_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,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 @@ -1509,6 +1512,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 @@ -3475,6 +3482,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 @@ -3518,6 +3528,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 @@ -5606,6 +5620,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 @@ -5649,6 +5666,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
2 changes: 1 addition & 1 deletion gateway_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type GatewayAttributes struct {
recurlyResponse *ResponseMetadata

// 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.
AccountReference string `json:"account_reference,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion gateway_attributes_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ()
type GatewayAttributesCreate struct {
Params `json:"-"`

// 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.
// 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.
AccountReference *string `json:"account_reference,omitempty"`
}

Expand Down
3 changes: 3 additions & 0 deletions invoice_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ type InvoiceAddress struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode string `json:"geo_code,omitempty"`
}

// GetResponse returns the ResponseMetadata that generated this resource
Expand Down
3 changes: 3 additions & 0 deletions invoice_address_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ type InvoiceAddressCreate struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country *string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode *string `json:"geo_code,omitempty"`
}

func (attr *InvoiceAddressCreate) toParams() *Params {
Expand Down
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
3 changes: 3 additions & 0 deletions shipping_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ type ShippingAddress struct {
// Country, 2-letter ISO 3166-1 alpha-2 code.
Country string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode string `json:"geo_code,omitempty"`

// Created at
CreatedAt time.Time `json:"created_at,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions shipping_address_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ type ShippingAddressCreate struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country *string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode *string `json:"geo_code,omitempty"`
}

func (attr *ShippingAddressCreate) toParams() *Params {
Expand Down
3 changes: 3 additions & 0 deletions shipping_address_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ type ShippingAddressUpdate struct {

// Country, 2-letter ISO 3166-1 alpha-2 code.
Country *string `json:"country,omitempty"`

// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
GeoCode *string `json:"geo_code,omitempty"`
}

func (attr *ShippingAddressUpdate) toParams() *Params {
Expand Down
7 changes: 7 additions & 0 deletions subscription_ramp_interval_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package recurly
import (
"context"
"net/http"
"time"
)

type SubscriptionRampIntervalResponse struct {
Expand All @@ -18,6 +19,12 @@ type SubscriptionRampIntervalResponse struct {
// Represents how many billing cycles are left in a ramp interval.
RemainingBillingCycles int `json:"remaining_billing_cycles,omitempty"`

// Date the ramp interval starts
StartingOn time.Time `json:"starting_on,omitempty"`

// Date the ramp interval ends
EndingOn time.Time `json:"ending_on,omitempty"`

// Represents the price for the ramp interval.
UnitAmount int `json:"unit_amount,omitempty"`
}
Expand Down
Loading