Skip to content
Merged
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
14 changes: 14 additions & 0 deletions lib/recurly/requests/credit_application_policy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically created by Recurly's OpenAPI generation process
# and thus any edits you make by hand will be lost. If you wish to make a
# change to this file, please create a Github issue explaining the changes you
# need and we will usher them to the appropriate places.
module Recurly
module Requests
class CreditApplicationPolicy < Request

# @!attribute mode
# @return [String] Determines which credit invoices are applied to invoices: - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
define_attribute :mode, String
end
end
end
4 changes: 4 additions & 0 deletions lib/recurly/requests/invoice_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class InvoiceCreate < Request
# @return [String] An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
define_attribute :collection_method, String

# @!attribute credit_application_policy
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy, :CreditApplicationPolicy

# @!attribute credit_customer_notes
# @return [String] This will default to the Customer Notes text specified on the Invoice Settings for credit invoices. Specify customer notes to add or override Customer Notes on credit invoices.
define_attribute :credit_customer_notes, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/purchase_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class PurchaseCreate < Request
# @return [Array[String]] A list of coupon_codes to be redeemed on the subscription or account during the purchase.
define_attribute :coupon_codes, Array, { :item_type => String }

# @!attribute credit_application_policy_override
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy_override, :CreditApplicationPolicy

# @!attribute credit_customer_notes
# @return [String] Notes to be put on the credit invoice resulting from credits in the purchase, if any.
define_attribute :credit_customer_notes, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/subscription_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class SubscriptionCreate < Request
# @return [Array[String]] A list of coupon_codes to be redeemed on the subscription or account during the purchase.
define_attribute :coupon_codes, Array, { :item_type => String }

# @!attribute credit_application_policy
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy, :CreditApplicationPolicy

# @!attribute credit_customer_notes
# @return [String] If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice.
define_attribute :credit_customer_notes, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/subscription_purchase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class SubscriptionPurchase < Request
# @return [Boolean] Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
define_attribute :bulk, :Boolean

# @!attribute credit_application_policy
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy, :CreditApplicationPolicy

# @!attribute custom_fields
# @return [Array[CustomField]] 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.
define_attribute :custom_fields, Array, { :item_type => :CustomField }
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/subscription_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class SubscriptionUpdate < Request
# @return [String] Change collection method
define_attribute :collection_method, String

# @!attribute credit_application_policy
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy, :CreditApplicationPolicy

# @!attribute custom_fields
# @return [Array[CustomField]] 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.
define_attribute :custom_fields, Array, { :item_type => :CustomField }
Expand Down
14 changes: 14 additions & 0 deletions lib/recurly/resources/credit_application_policy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically created by Recurly's OpenAPI generation process
# and thus any edits you make by hand will be lost. If you wish to make a
# change to this file, please create a Github issue explaining the changes you
# need and we will usher them to the appropriate places.
module Recurly
module Resources
class CreditApplicationPolicy < Resource

# @!attribute mode
# @return [String] Determines which credit invoices are applied to invoices: - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
define_attribute :mode, String
end
end
end
12 changes: 12 additions & 0 deletions lib/recurly/resources/reference_only_currency_conversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ class ReferenceOnlyCurrencyConversion < Resource
# @return [String] 3-letter ISO 4217 currency code.
define_attribute :currency, String

# @!attribute date
# @return [String] The date of the conversion rate.
define_attribute :date, String

# @!attribute rate
# @return [String] The conversion rate to the currency.
define_attribute :rate, String

# @!attribute source
# @return [String] The source of the conversion rate.
define_attribute :source, String

# @!attribute subtotal_in_cents
# @return [Float] The subtotal converted to the currency.
define_attribute :subtotal_in_cents, Float
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/resources/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class Subscription < Resource
# @return [DateTime] Created at
define_attribute :created_at, DateTime

# @!attribute credit_application_policy
# @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior.
define_attribute :credit_application_policy, :CreditApplicationPolicy

# @!attribute currency
# @return [String] 3-letter ISO 4217 currency code.
define_attribute :currency, String
Expand Down
47 changes: 47 additions & 0 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20911,6 +20911,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
po_number:
type: string
title: Purchase order number
Expand Down Expand Up @@ -22507,6 +22509,19 @@ components:
format: float
title: Tax In Cents
description: The tax converted to the currency.
rate:
type: string
title: Rate
description: The conversion rate to the currency.
source:
type: string
title: Source
description: The source of the conversion rate.
date:
type: string
title: Date
format: date
description: The date of the conversion rate.
ShippingAddressCreate:
type: object
properties:
Expand Down Expand Up @@ -23125,6 +23140,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -23976,6 +23993,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -24107,6 +24126,8 @@ components:
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
bulk:
type: boolean
description: Optional field to be used only when needing to bypass the 60
Expand Down Expand Up @@ -24195,6 +24216,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -25033,6 +25056,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy_override:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -27038,6 +27063,28 @@ components:
enum:
- automatic
- manual
CreditApplicationPolicy:
type: object
title: Credit Application Policy
description: |
Controls whether credit invoices are automatically applied to new invoices.
The `mode` field determines the application behavior.
properties:
mode:
"$ref": "#/components/schemas/CreditApplicationModeEnum"
required:
- mode
CreditApplicationModeEnum:
type: string
title: Credit Application Mode
description: |
Determines which credit invoices are applied to invoices:
- `all`: All available credit invoices are applied (default)
- `none`: No credit invoices are applied automatically
enum:
- all
- none
default: all
InvoiceRefundTypeEnum:
type: string
enum:
Expand Down
Loading