Skip to content

Commit

Permalink
Generated Latest Changes for v2019-10-10
Browse files Browse the repository at this point in the history
  • Loading branch information
Recurly Integrations authored May 24, 2024
1 parent e6857a6 commit 7e46d3a
Show file tree
Hide file tree
Showing 18 changed files with 156 additions and 10 deletions.
3 changes: 3 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ type Account struct {

// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
CustomFields []CustomField `json:"custom_fields,omitempty"`

// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
EntityUseCode string `json:"entity_use_code,omitempty"`
}

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

// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
EntityUseCode *string `json:"entity_use_code,omitempty"`
}

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

// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
EntityUseCode *string `json:"entity_use_code,omitempty"`
}

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

// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
EntityUseCode *string `json:"entity_use_code,omitempty"`
}

func (attr *AccountUpdate) toParams() *Params {
Expand Down
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
6 changes: 6 additions & 0 deletions billing_info_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ type BillingInfoCreate struct {
// Additional attributes to send to the gateway.
GatewayAttributes *GatewayAttributesCreate `json:"gateway_attributes,omitempty"`

// Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
CardNetworkPreference *string `json:"card_network_preference,omitempty"`

// Amazon billing agreement ID
AmazonBillingAgreementId *string `json:"amazon_billing_agreement_id,omitempty"`

// 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
92 changes: 84 additions & 8 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 @@ -7888,8 +7890,6 @@ paths:
summary: Apply available credit to a pending or past due charge invoice
description: Apply credit payment to the outstanding balance on an existing
charge invoice from an account’s available balance from existing credit invoices.
Credit that was refunded from the invoice cannot be applied back to the invoice
as payment.
parameters:
- "$ref": "#/components/parameters/site_id"
- "$ref": "#/components/parameters/invoice_id"
Expand Down Expand Up @@ -13059,6 +13059,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 +14725,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 @@ -15662,6 +15675,11 @@ components:
"$ref": "#/components/schemas/BillingInfoCreate"
custom_fields:
"$ref": "#/components/schemas/CustomFields"
entity_use_code:
type: string
description: The Avalara AvaTax value that can be passed to identify the
customer type for tax purposes. The range of values can be A - R (more
info at Avalara). Value is case-sensitive.
AccountResponse:
type: object
properties:
Expand Down Expand Up @@ -15781,6 +15799,11 @@ components:
"$ref": "#/components/schemas/BillingInfo"
custom_fields:
"$ref": "#/components/schemas/CustomFields"
entity_use_code:
type: string
description: The Avalara AvaTax value that can be passed to identify the
customer type for tax purposes. The range of values can be A - R (more
info at Avalara). Value is case-sensitive.
AccountNote:
type: object
required:
Expand Down Expand Up @@ -15932,6 +15955,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 +16680,30 @@ 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
card_network_preference:
type: string
description: Represents the card network preference associated with the
billing info for dual badged cards. Must be a supported card network.
enum:
- Bancontact
- CartesBancaires
- Dankort
- MasterCard
- Visa
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 +19776,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 +19836,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 +20091,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 +21391,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,9 +22340,20 @@ 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
card_network_preference:
type: string
description: Represents the card network preference associated with the
billing info for dual badged cards. Must be a supported card network.
enum:
- Bancontact
- CartesBancaires
- Dankort
- MasterCard
- Visa
billing_agreement_id:
type: string
description: Billing Agreement identifier. Only present for Amazon or Paypal
Expand Down
3 changes: 3 additions & 0 deletions payment_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ type PaymentMethod struct {
// Gateway specific attributes associated with this PaymentMethod
GatewayAttributes GatewayAttributes `json:"gateway_attributes,omitempty"`

// Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
CardNetworkPreference string `json:"card_network_preference,omitempty"`

// Billing Agreement identifier. Only present for Amazon or Paypal payment methods.
BillingAgreementId string `json:"billing_agreement_id,omitempty"`

Expand Down
Loading

0 comments on commit 7e46d3a

Please sign in to comment.