From 7901e3c12a7f5500e7cfe8cc13e697d83f7f3459 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Tue, 20 Feb 2024 20:35:14 +0000 Subject: [PATCH] Generated Latest Changes for v2019-10-10 --- address.go | 3 ++ address_create.go | 3 ++ billing_info_create.go | 3 ++ client_operations.go | 21 +++++++++ gateway_attributes.go | 2 +- gateway_attributes_create.go | 2 +- invoice_address.go | 3 ++ invoice_address_create.go | 3 ++ openapi/api.yaml | 60 +++++++++++++++++++++++--- shipping_address.go | 3 ++ shipping_address_create.go | 3 ++ shipping_address_update.go | 3 ++ subscription_ramp_interval_response.go | 7 +++ 13 files changed, 108 insertions(+), 8 deletions(-) diff --git a/address.go b/address.go index 6d92808..35eaf7b 100644 --- a/address.go +++ b/address.go @@ -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 diff --git a/address_create.go b/address_create.go index be148e7..3965575 100644 --- a/address_create.go +++ b/address_create.go @@ -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 { diff --git a/billing_info_create.go b/billing_info_create.go index 1ab5021..6f79717 100644 --- a/billing_info_create.go +++ b/billing_info_create.go @@ -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"` diff --git a/client_operations.go b/client_operations.go index 2025b63..7537d19 100644 --- a/client_operations.go +++ b/client_operations.go @@ -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 @@ -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)}) } @@ -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 @@ -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)}) } @@ -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 @@ -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)}) } diff --git a/gateway_attributes.go b/gateway_attributes.go index 8bd40af..18ab84f 100644 --- a/gateway_attributes.go +++ b/gateway_attributes.go @@ -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"` } diff --git a/gateway_attributes_create.go b/gateway_attributes_create.go index a716d17..0a91e0a 100644 --- a/gateway_attributes_create.go +++ b/gateway_attributes_create.go @@ -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"` } diff --git a/invoice_address.go b/invoice_address.go index 44a8466..5995707 100644 --- a/invoice_address.go +++ b/invoice_address.go @@ -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 diff --git a/invoice_address_create.go b/invoice_address_create.go index d79c951..656da82 100644 --- a/invoice_address_create.go +++ b/invoice_address_create.go @@ -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 { diff --git a/openapi/api.yaml b/openapi/api.yaml index f32d168..fc1aced 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -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 @@ -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" @@ -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" @@ -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" @@ -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 @@ -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 @@ -16652,9 +16672,10 @@ 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 @@ -16662,6 +16683,9 @@ components: 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 @@ -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 @@ -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 @@ -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: @@ -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. @@ -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 diff --git a/shipping_address.go b/shipping_address.go index 7436253..bdd69bc 100644 --- a/shipping_address.go +++ b/shipping_address.go @@ -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"` diff --git a/shipping_address_create.go b/shipping_address_create.go index f62049a..1de53b4 100644 --- a/shipping_address_create.go +++ b/shipping_address_create.go @@ -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 { diff --git a/shipping_address_update.go b/shipping_address_update.go index 4aac913..a8b5c08 100644 --- a/shipping_address_update.go +++ b/shipping_address_update.go @@ -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 { diff --git a/subscription_ramp_interval_response.go b/subscription_ramp_interval_response.go index ac8d247..9ac0df1 100644 --- a/subscription_ramp_interval_response.go +++ b/subscription_ramp_interval_response.go @@ -7,6 +7,7 @@ package recurly import ( "context" "net/http" + "time" ) type SubscriptionRampIntervalResponse struct { @@ -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"` }