recurly 4.75.0 → 4.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/ci.yml +1 -1
  4. data/.github/workflows/docs.yml +2 -2
  5. data/CHANGELOG.md +23 -0
  6. data/GETTING_STARTED.md +1 -1
  7. data/lib/recurly/client/operations.rb +14 -1
  8. data/lib/recurly/requests/address.rb +1 -1
  9. data/lib/recurly/requests/coupon_create.rb +3 -3
  10. data/lib/recurly/requests/custom_field.rb +8 -0
  11. data/lib/recurly/requests/invoice_address.rb +1 -1
  12. data/lib/recurly/requests/recovery_account_create.rb +34 -0
  13. data/lib/recurly/requests/recovery_address.rb +38 -0
  14. data/lib/recurly/requests/recovery_billing_info_create.rb +54 -0
  15. data/lib/recurly/requests/recovery_invoice_create.rb +34 -0
  16. data/lib/recurly/requests/recovery_line_item_create.rb +38 -0
  17. data/lib/recurly/requests/recovery_transaction_create.rb +22 -0
  18. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  19. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  20. data/lib/recurly/resources/address.rb +1 -1
  21. data/lib/recurly/resources/address_with_name.rb +1 -1
  22. data/lib/recurly/resources/coupon.rb +2 -2
  23. data/lib/recurly/resources/coupon_discount_trial.rb +1 -1
  24. data/lib/recurly/resources/coupon_redemption.rb +4 -0
  25. data/lib/recurly/resources/coupon_redemption_mini.rb +5 -1
  26. data/lib/recurly/resources/coupon_redemption_remaining_duration.rb +18 -0
  27. data/lib/recurly/resources/custom_field.rb +8 -0
  28. data/lib/recurly/resources/invoice.rb +8 -0
  29. data/lib/recurly/resources/invoice_address.rb +1 -1
  30. data/lib/recurly/resources/line_item.rb +5 -1
  31. data/lib/recurly/resources/line_item_discount.rb +34 -0
  32. data/lib/recurly/resources/shipping_address.rb +1 -1
  33. data/lib/recurly/version.rb +1 -1
  34. data/openapi/api.yaml +439 -26
  35. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 620411c58288a2895fc1edffdf688f3f0b6ecfd4aabc648c867b45f76d9cb7ba
4
- data.tar.gz: a68e9d658aeda3673feaea79a5d3dfdd03b0c38092bb4d424fd1bab1b8a571a8
3
+ metadata.gz: 39f517bfc1451d42ff2d1b8b7bcf5b2f0c6deff2ddeaf36a28e60b433b7bf166
4
+ data.tar.gz: 9fc9d18297e06fba3d530cd421e684ed601695beeb1bfb3865f9e9daf5b2f9ae
5
5
  SHA512:
6
- metadata.gz: 6d21ea0b716136ad05ecd1400f5744a5de7dc866b64fca446b3b3725973a5e8dadfe0d0a2f801e0f7928486823351ea6222cf4356c693c778ec38a3df4fa5f7d
7
- data.tar.gz: ef3216cb66e8af64e95d37bd6611cb27a6f45173308fb8e9fe1796947ff465180e32b805bc86ee212e9cb5432b9b070bd48157d1623fd95170e7a67d305a1305
6
+ metadata.gz: 193603f1ee150a01897ea7d40956874e4e0a208e6e6363a1cd5a89fdedb67e0f2f54a441dbdaaefe4b8444888cfaf50c1e7fa22be2c01a02931aade952d402c0
7
+ data.tar.gz: ac3eb127e95472768420ba6bf751ab8bdc37b770be64475e7f476f5ac725ca72a57d6cb46973286e1f6e0f76cea95533254248d10d937d0bfcb5603f77087f7f
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.75.0
2
+ current_version = 4.77.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
@@ -11,7 +11,7 @@ jobs:
11
11
  matrix:
12
12
  ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
13
13
  steps:
14
- - uses: actions/checkout@v3
14
+ - uses: actions/checkout@v6.0.3
15
15
  - name: Setup ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
@@ -8,7 +8,7 @@ jobs:
8
8
  name: Publish
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v2
11
+ - uses: actions/checkout@v6.0.3
12
12
 
13
13
  - uses: ruby/setup-ruby@v1
14
14
  with:
@@ -19,7 +19,7 @@ jobs:
19
19
 
20
20
  - name: Deploy
21
21
  if: success()
22
- uses: crazy-max/ghaction-github-pages@v1
22
+ uses: crazy-max/ghaction-github-pages@v5.0.0
23
23
  with:
24
24
  target_branch: gh-pages
25
25
  build_dir: ./doc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.77.0](https://github.com/recurly/recurly-client-ruby/tree/4.77.0) (2026-06-10)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.76.0...4.77.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 [#958](https://github.com/recurly/recurly-client-ruby/pull/958) ([recurly-integrations](https://github.com/recurly-integrations))
11
+ - ci: Remediate Node.js 20 deprecation in GitHub Actions workflows [#957](https://github.com/recurly/recurly-client-ruby/pull/957) ([jparrabedoya](https://github.com/jparrabedoya))
12
+
13
+
14
+
15
+ ## [4.76.0](https://github.com/recurly/recurly-client-ruby/tree/4.76.0) (2026-05-20)
16
+
17
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.75.0...4.76.0)
18
+
19
+
20
+ **Merged Pull Requests**
21
+
22
+ - Generated Latest Changes for v2021-02-25 [#956](https://github.com/recurly/recurly-client-ruby/pull/956) ([recurly-integrations](https://github.com/recurly-integrations))
23
+
24
+
25
+
3
26
  ## [4.75.0](https://github.com/recurly/recurly-client-ruby/tree/4.75.0) (2026-04-15)
4
27
 
5
28
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.74.0...4.75.0)
data/GETTING_STARTED.md CHANGED
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
5
5
  In your Gemfile, add `recurly` as a dependency.
6
6
 
7
7
  ```ruby
8
- gem 'recurly', '~> 4.75'
8
+ gem 'recurly', '~> 4.77'
9
9
  ```
10
10
 
11
11
  > *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
@@ -2734,7 +2734,6 @@ module Recurly
2734
2734
  #
2735
2735
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+. For number with prefix or country code, use +number-+ and +prefix+, e.g. +number-TEST-FR1001+
2736
2736
  # @param params [Hash] Optional query string parameters:
2737
- # :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
2738
2737
  #
2739
2738
  # @return [Resources::Invoice] The updated invoice.
2740
2739
  # @example
@@ -3038,6 +3037,20 @@ module Recurly
3038
3037
  post(path, body, Requests::InvoiceRefund, **options)
3039
3038
  end
3040
3039
 
3040
+ # Create an invoice for revenue recovery
3041
+ #
3042
+ # {https://developers.recurly.com/api/v2021-02-25#operation/create_invoice_retry create_invoice_retry api documentation}
3043
+ #
3044
+ # @param body [Requests::RecoveryInvoiceCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::RecoveryInvoiceCreate}
3045
+ # @param params [Hash] Optional query string parameters:
3046
+ #
3047
+ # @return [Resources::InvoiceCollection] Returns the new invoices.
3048
+ #
3049
+ def create_invoice_retry(body:, **options)
3050
+ path = "/invoices/recovery"
3051
+ post(path, body, Requests::RecoveryInvoiceCreate, **options)
3052
+ end
3053
+
3041
3054
  # List a site's line items
3042
3055
  #
3043
3056
  # {https://developers.recurly.com/api/v2021-02-25#operation/list_line_items list_line_items api documentation}
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute geo_code
18
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
18
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
19
19
  define_attribute :geo_code, String
20
20
 
21
21
  # @!attribute phone
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :free_trial_amount, Integer
48
48
 
49
49
  # @!attribute free_trial_unit
50
- # @return [String] Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
50
+ # @return [String] Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. Use `billing_period` to grant a free trial for a number of billing cycles.
51
51
  define_attribute :free_trial_unit, String
52
52
 
53
53
  # @!attribute hosted_description
@@ -87,11 +87,11 @@ module Recurly
87
87
  define_attribute :redemption_resource, String
88
88
 
89
89
  # @!attribute temporal_amount
90
- # @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
90
+ # @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. When `temporal_unit` is "billing_period", this is the number of complete billing cycles.
91
91
  define_attribute :temporal_amount, Integer
92
92
 
93
93
  # @!attribute temporal_unit
94
- # @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
94
+ # @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`. Not compatible with `discount_type=free_trial`; use `free_trial_unit=billing_period` and `free_trial_amount` instead.
95
95
  define_attribute :temporal_unit, String
96
96
 
97
97
  # @!attribute unique_code_template
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Fields must be created in the UI before values can be assigned to them.
11
11
  define_attribute :name, String
12
12
 
13
+ # @!attribute source_record_id
14
+ # @return [String] The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.
15
+ define_attribute :source_record_id, String
16
+
17
+ # @!attribute source_record_type
18
+ # @return [String] The type of record this custom field was automatically copied from. Only present when the field was copied from another record.
19
+ define_attribute :source_record_type, String
20
+
13
21
  # @!attribute value
14
22
  # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
15
23
  define_attribute :value, String
@@ -23,7 +23,7 @@ module Recurly
23
23
  define_attribute :first_name, String
24
24
 
25
25
  # @!attribute geo_code
26
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
26
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
27
27
  define_attribute :geo_code, String
28
28
 
29
29
  # @!attribute last_name
@@ -0,0 +1,34 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryAccountCreate < Request
8
+
9
+ # @!attribute address
10
+ # @return [RecoveryAddress]
11
+ define_attribute :address, :RecoveryAddress
12
+
13
+ # @!attribute billing_infos
14
+ # @return [Array[RecoveryBillingInfoCreate]] If the premium Wallet feature is enabled, more than one payment method can be associated with an account, and one can be designated as a primary and one as a backup. Without the Wallet feature, only one payment method will be accepted.
15
+ define_attribute :billing_infos, Array, { :item_type => :RecoveryBillingInfoCreate }
16
+
17
+ # @!attribute code
18
+ # @return [String] The unique identifier of the account. This cannot be changed once the account is created.
19
+ define_attribute :code, String
20
+
21
+ # @!attribute custom_fields
22
+ # @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.
23
+ define_attribute :custom_fields, Array, { :item_type => :CustomField }
24
+
25
+ # @!attribute dunning_campaign_id
26
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
27
+ define_attribute :dunning_campaign_id, String
28
+
29
+ # @!attribute email
30
+ # @return [String] The email address used for communicating with this customer.
31
+ define_attribute :email, String
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,38 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryAddress < Request
8
+
9
+ # @!attribute city
10
+ # @return [String] City
11
+ define_attribute :city, String
12
+
13
+ # @!attribute country
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
+ define_attribute :country, String
16
+
17
+ # @!attribute phone
18
+ # @return [String] Phone number
19
+ define_attribute :phone, String
20
+
21
+ # @!attribute postal_code
22
+ # @return [String] Zip or postal code.
23
+ define_attribute :postal_code, String
24
+
25
+ # @!attribute region
26
+ # @return [String] State or province.
27
+ define_attribute :region, String
28
+
29
+ # @!attribute street1
30
+ # @return [String] Street 1
31
+ define_attribute :street1, String
32
+
33
+ # @!attribute street2
34
+ # @return [String] Street 2
35
+ define_attribute :street2, String
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,54 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryBillingInfoCreate < Request
8
+
9
+ # @!attribute address
10
+ # @return [RecoveryAddress]
11
+ define_attribute :address, :RecoveryAddress
12
+
13
+ # @!attribute backup_payment_method
14
+ # @return [Boolean] The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.
15
+ define_attribute :backup_payment_method, :Boolean
16
+
17
+ # @!attribute company
18
+ # @return [String] Company name
19
+ define_attribute :company, String
20
+
21
+ # @!attribute first_name
22
+ # @return [String] First name
23
+ define_attribute :first_name, String
24
+
25
+ # @!attribute gateway_code
26
+ # @return [String] An identifier for a specific payment gateway.
27
+ define_attribute :gateway_code, String
28
+
29
+ # @!attribute ip_address
30
+ # @return [String] *STRONGLY RECOMMENDED* Customer's IP address when updating their billing information.
31
+ define_attribute :ip_address, String
32
+
33
+ # @!attribute last_name
34
+ # @return [String] Last name
35
+ define_attribute :last_name, String
36
+
37
+ # @!attribute network_transaction_id
38
+ # @return [String] Network transaction ID from the previous customer-in-session subscription signup or billing info storage. - 10-15 alphanumeric characters for Mastercard - 14-15 alphanumeric for Visa - 15 digits for all other brands - 16 alphanumeric characters for Cartes Bancaires, which are processed as Visa or Mastercard
39
+ define_attribute :network_transaction_id, String
40
+
41
+ # @!attribute payment_gateway_references
42
+ # @return [Array[PaymentGatewayReferences]] Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
43
+ define_attribute :payment_gateway_references, Array, { :item_type => :PaymentGatewayReferences }
44
+
45
+ # @!attribute primary_payment_method
46
+ # @return [Boolean] The `primary_payment_method` field is used to designate the primary billing info on the account. An account can have a maximum of 1 primary. If a user sets a different payment method as a primary, then the existing primary will no longer be marked as such.
47
+ define_attribute :primary_payment_method, :Boolean
48
+
49
+ # @!attribute transactions
50
+ # @return [Array[RecoveryTransactionCreate]] Transactions from previous collection attempts for this payment method.
51
+ define_attribute :transactions, Array, { :item_type => :RecoveryTransactionCreate }
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,34 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryInvoiceCreate < Request
8
+
9
+ # @!attribute account
10
+ # @return [RecoveryAccountCreate]
11
+ define_attribute :account, :RecoveryAccountCreate
12
+
13
+ # @!attribute currency
14
+ # @return [String] 3-letter ISO 4217 currency code.
15
+ define_attribute :currency, String
16
+
17
+ # @!attribute due_at
18
+ # @return [DateTime] Date invoice was originally due. Must be in the past.
19
+ define_attribute :due_at, DateTime
20
+
21
+ # @!attribute external_recovery_eligible
22
+ # @return [Boolean] Must be set to `true` to acknowledge that the invoice is eligible for external recovery. Requests with `false`, omitted, or non-boolean values will be rejected.
23
+ define_attribute :external_recovery_eligible, :Boolean
24
+
25
+ # @!attribute line_items
26
+ # @return [Array[RecoveryLineItemCreate]] Line items to include on the invoice. Currency is specified at the root level and must not be included in individual line items.
27
+ define_attribute :line_items, Array, { :item_type => :RecoveryLineItemCreate }
28
+
29
+ # @!attribute po_number
30
+ # @return [String] This identifies the PO number associated with the subscription.
31
+ define_attribute :po_number, String
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,38 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryLineItemCreate < Request
8
+
9
+ # @!attribute custom_fields
10
+ # @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.
11
+ define_attribute :custom_fields, Array, { :item_type => :CustomField }
12
+
13
+ # @!attribute description
14
+ # @return [String] Description that appears on the invoice.
15
+ define_attribute :description, String
16
+
17
+ # @!attribute harmonized_system_code
18
+ # @return [String] The Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.
19
+ define_attribute :harmonized_system_code, String
20
+
21
+ # @!attribute product_code
22
+ # @return [String] Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases.
23
+ define_attribute :product_code, String
24
+
25
+ # @!attribute quantity
26
+ # @return [Integer] This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
27
+ define_attribute :quantity, Integer
28
+
29
+ # @!attribute tax
30
+ # @return [Float] The tax amount for the line item.
31
+ define_attribute :tax, Float
32
+
33
+ # @!attribute unit_amount
34
+ # @return [Float] A positive or negative amount will result in a positive `unit_amount`.
35
+ define_attribute :unit_amount, Float
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,22 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class RecoveryTransactionCreate < Request
8
+
9
+ # @!attribute attempted_collection_date
10
+ # @return [DateTime] The date the original payment collection was attempted.
11
+ define_attribute :attempted_collection_date, DateTime
12
+
13
+ # @!attribute gateway_error_code
14
+ # @return [String] The error code returned by the payment gateway for the original payment collection attempt.
15
+ define_attribute :gateway_error_code, String
16
+
17
+ # @!attribute merchant_advice_code
18
+ # @return [String] The advice code returned by the payment gateway for the original payment collection attempt. This field is only applicable for certain gateways.
19
+ define_attribute :merchant_advice_code, String
20
+ end
21
+ end
22
+ end
@@ -27,7 +27,7 @@ module Recurly
27
27
  define_attribute :first_name, String
28
28
 
29
29
  # @!attribute geo_code
30
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
30
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
31
31
  define_attribute :geo_code, String
32
32
 
33
33
  # @!attribute last_name
@@ -27,7 +27,7 @@ module Recurly
27
27
  define_attribute :first_name, String
28
28
 
29
29
  # @!attribute geo_code
30
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
30
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
31
31
  define_attribute :geo_code, String
32
32
 
33
33
  # @!attribute id
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute geo_code
18
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
18
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
19
19
  define_attribute :geo_code, String
20
20
 
21
21
  # @!attribute phone
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :first_name, String
20
20
 
21
21
  # @!attribute geo_code
22
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
22
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
23
23
  define_attribute :geo_code, String
24
24
 
25
25
  # @!attribute last_name
@@ -99,11 +99,11 @@ module Recurly
99
99
  define_attribute :state, String
100
100
 
101
101
  # @!attribute temporal_amount
102
- # @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
102
+ # @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. When `temporal_unit` is "billing_period", this is the number of complete billing cycles.
103
103
  define_attribute :temporal_amount, Integer
104
104
 
105
105
  # @!attribute temporal_unit
106
- # @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
106
+ # @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`.
107
107
  define_attribute :temporal_unit, String
108
108
 
109
109
  # @!attribute unique_code_template
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :length, Integer
12
12
 
13
13
  # @!attribute unit
14
- # @return [String] Temporal unit of the free trial
14
+ # @return [String] Temporal unit of the free trial. When `billing_period`, `length` represents the number of billing cycles.
15
15
  define_attribute :unit, String
16
16
  end
17
17
  end
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [String] Will always be `coupon`.
35
35
  define_attribute :object, String
36
36
 
37
+ # @!attribute remaining_duration
38
+ # @return [CouponRedemptionRemainingDuration]
39
+ define_attribute :remaining_duration, :CouponRedemptionRemainingDuration
40
+
37
41
  # @!attribute removed_at
38
42
  # @return [DateTime] The date and time the redemption was removed from the account (un-redeemed).
39
43
  define_attribute :removed_at, DateTime
@@ -26,8 +26,12 @@ module Recurly
26
26
  # @return [String] Will always be `coupon`.
27
27
  define_attribute :object, String
28
28
 
29
+ # @!attribute remaining_duration
30
+ # @return [CouponRedemptionRemainingDuration]
31
+ define_attribute :remaining_duration, :CouponRedemptionRemainingDuration
32
+
29
33
  # @!attribute state
30
- # @return [String] Invoice state
34
+ # @return [String] Coupon Redemption state
31
35
  define_attribute :state, String
32
36
  end
33
37
  end
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class CouponRedemptionRemainingDuration < Resource
8
+
9
+ # @!attribute expires_at
10
+ # @return [DateTime] Present when `type` is `temporal`. The datetime after which this redemption will no longer apply.
11
+ define_attribute :expires_at, DateTime
12
+
13
+ # @!attribute type
14
+ # @return [String] The coupon's duration type. `temporal` includes an `expires_at` timestamp. `forever` and `single_use` have no additional fields.
15
+ define_attribute :type, String
16
+ end
17
+ end
18
+ end
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Fields must be created in the UI before values can be assigned to them.
11
11
  define_attribute :name, String
12
12
 
13
+ # @!attribute source_record_id
14
+ # @return [String] The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.
15
+ define_attribute :source_record_id, String
16
+
17
+ # @!attribute source_record_type
18
+ # @return [String] The type of record this custom field was automatically copied from. Only present when the field was copied from another record.
19
+ define_attribute :source_record_type, String
20
+
13
21
  # @!attribute value
14
22
  # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
15
23
  define_attribute :value, String
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @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.
35
35
  define_attribute :collection_method, String
36
36
 
37
+ # @!attribute coupon_redemptions
38
+ # @return [Array[CouponRedemptionMini]] The coupon redemptions applied to this invoice.
39
+ define_attribute :coupon_redemptions, Array, { :item_type => :CouponRedemptionMini }
40
+
37
41
  # @!attribute created_at
38
42
  # @return [DateTime] Created at
39
43
  define_attribute :created_at, DateTime
@@ -46,6 +50,10 @@ module Recurly
46
50
  # @return [String] 3-letter ISO 4217 currency code.
47
51
  define_attribute :currency, String
48
52
 
53
+ # @!attribute custom_fields
54
+ # @return [Array[CustomField]] A list of custom fields that were on the account at the time of invoice creation and were marked to be displayed on invoices. Read-only; cannot be set directly on the invoice.
55
+ define_attribute :custom_fields, Array, { :item_type => :CustomField }
56
+
49
57
  # @!attribute customer_notes
50
58
  # @return [String] This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.
51
59
  define_attribute :customer_notes, String
@@ -23,7 +23,7 @@ module Recurly
23
23
  define_attribute :first_name, String
24
24
 
25
25
  # @!attribute geo_code
26
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
26
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
27
27
  define_attribute :geo_code, String
28
28
 
29
29
  # @!attribute last_name
@@ -67,9 +67,13 @@ module Recurly
67
67
  define_attribute :destination_tax_address_source, String
68
68
 
69
69
  # @!attribute discount
70
- # @return [Float] The discount applied to the line item.
70
+ # @return [Float] The sum of all discounts applied to the line item.
71
71
  define_attribute :discount, Float
72
72
 
73
+ # @!attribute discounts
74
+ # @return [Array[LineItemDiscount]] The breakdown of discounts applied to the line item by coupon redemption.
75
+ define_attribute :discounts, Array, { :item_type => :LineItemDiscount }
76
+
73
77
  # @!attribute end_date
74
78
  # @return [DateTime] If this date is provided, it indicates the end of a time range.
75
79
  define_attribute :end_date, DateTime
@@ -0,0 +1,34 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class LineItemDiscount < Resource
8
+
9
+ # @!attribute coupon_id
10
+ # @return [String] The ID of the coupon that generated this discount.
11
+ define_attribute :coupon_id, String
12
+
13
+ # @!attribute coupon_redemption_id
14
+ # @return [String] The ID of the coupon redemption that generated this discount.
15
+ define_attribute :coupon_redemption_id, String
16
+
17
+ # @!attribute currency
18
+ # @return [String] 3-letter ISO 4217 currency code.
19
+ define_attribute :currency, String
20
+
21
+ # @!attribute discount_amount
22
+ # @return [Float] The amount discounted on this line item by this coupon redemption.
23
+ define_attribute :discount_amount, Float
24
+
25
+ # @!attribute object
26
+ # @return [String] Will always be `line_item_discount`.
27
+ define_attribute :object, String
28
+
29
+ # @!attribute order_applied
30
+ # @return [Integer] The order in which this discount was applied when multiple coupons were redeemed.
31
+ define_attribute :order_applied, Integer
32
+ end
33
+ end
34
+ end
@@ -35,7 +35,7 @@ module Recurly
35
35
  define_attribute :first_name, String
36
36
 
37
37
  # @!attribute geo_code
38
- # @return [String] Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
38
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
39
39
  define_attribute :geo_code, String
40
40
 
41
41
  # @!attribute id
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.75.0"
2
+ VERSION = "4.77.0"
3
3
  end