recurly 4.28.0 → 4.30.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16800abba256fceed49ee4141796878faa9b1d10c97752fd18e05ae6f7be3761
4
- data.tar.gz: 8fcb048d891ab4ae3c6a401cdaf343d1889bd53337b976ca0d86616d53ae8706
3
+ metadata.gz: 390709441aca5c09d9488d70631d5ff3a14d9df4e6d56d8604f615f421331e85
4
+ data.tar.gz: c9a9c5d0b0c8b697f0a2261c431f7018e87eed5246c06ade654f7987a8bfde81
5
5
  SHA512:
6
- metadata.gz: c108d83003c365f301e93d255078a067ff6ecf440ba1efc3d5e0de61d40be977b5de1f1668d4661c927aeb8d8650d4d49765f6be2c9206d4545fc0315a29becf
7
- data.tar.gz: d1fc3157a45ac11d9e790d2510e7de1496a5549f1dd827b973ea69a056329b8a3b01b725c7b956a3ecbba896c03415316f29b94710408676a404e9ded6e5641a
6
+ metadata.gz: e9d31be321f4acaf50a1fcabddd241b37228a11685e547ebbd9549474a2488ccb6e83e552e78cfad1b2fd9a543c697b0bd9d73507f7ec536a65ed2022ab1c758
7
+ data.tar.gz: e767216dc486c50859f051d5788fd1b28a86950d1f178bad2ee4c9baf18ff4d20d7cf58be6bd25f2f7433257997c352c09587951109d0de4a615203d4f27638a
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.28.0
2
+ current_version = 4.30.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.30.0](https://github.com/recurly/recurly-client-ruby/tree/4.30.0) (2023-02-22)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.29.0...4.30.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 [#829](https://github.com/recurly/recurly-client-ruby/pull/829) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [4.29.0](https://github.com/recurly/recurly-client-ruby/tree/4.29.0) (2023-02-07)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.28.0...4.29.0)
17
+
18
+
19
+ **Merged Pull Requests**
20
+
21
+ - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#827](https://github.com/recurly/recurly-client-ruby/pull/827) ([recurly-integrations](https://github.com/recurly-integrations))
22
+
23
+
24
+
3
25
  ## [4.28.0](https://github.com/recurly/recurly-client-ruby/tree/4.28.0) (2023-01-19)
4
26
 
5
27
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.27.0...4.28.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.28'
8
+ gem 'recurly', '~> 4.30'
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.
@@ -4215,5 +4215,75 @@ module Recurly
4215
4215
  path = interpolate_path("/accounts/{account_id}/external_subscriptions", account_id: account_id)
4216
4216
  pager(path, **options)
4217
4217
  end
4218
+
4219
+ # List gift cards
4220
+ #
4221
+ # {https://developers.recurly.com/api/v2021-02-25#operation/list_gift_cards list_gift_cards api documentation}
4222
+ #
4223
+ # @param params [Hash] Optional query string parameters:
4224
+ #
4225
+ # @return [Pager<Resources::GiftCard>] List of all created gift cards on your site.
4226
+ #
4227
+ def list_gift_cards(**options)
4228
+ path = "/gift_cards"
4229
+ pager(path, **options)
4230
+ end
4231
+
4232
+ # Create gift card
4233
+ #
4234
+ # {https://developers.recurly.com/api/v2021-02-25#operation/create_gift_card create_gift_card api documentation}
4235
+ #
4236
+ # @param body [Requests::GiftCardCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::GiftCardCreate}
4237
+ # @param params [Hash] Optional query string parameters:
4238
+ #
4239
+ # @return [Resources::GiftCard] Returns the gift card
4240
+ #
4241
+ def create_gift_card(body:, **options)
4242
+ path = "/gift_cards"
4243
+ post(path, body, Requests::GiftCardCreate, **options)
4244
+ end
4245
+
4246
+ # Fetch a gift card
4247
+ #
4248
+ # {https://developers.recurly.com/api/v2021-02-25#operation/get_gift_card get_gift_card api documentation}
4249
+ #
4250
+ # @param gift_card_id [String] Gift Card ID, e.g. +e28zov4fw0v2+.
4251
+ # @param params [Hash] Optional query string parameters:
4252
+ #
4253
+ # @return [Resources::GiftCard] Gift card details
4254
+ #
4255
+ def get_gift_card(gift_card_id:, **options)
4256
+ path = interpolate_path("/gift_cards/{gift_card_id}", gift_card_id: gift_card_id)
4257
+ get(path, **options)
4258
+ end
4259
+
4260
+ # Preview gift card
4261
+ #
4262
+ # {https://developers.recurly.com/api/v2021-02-25#operation/preview_gift_card preview_gift_card api documentation}
4263
+ #
4264
+ # @param body [Requests::GiftCardCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::GiftCardCreate}
4265
+ # @param params [Hash] Optional query string parameters:
4266
+ #
4267
+ # @return [Resources::GiftCard] Returns the gift card
4268
+ #
4269
+ def preview_gift_card(body:, **options)
4270
+ path = "/gift_cards/preview"
4271
+ post(path, body, Requests::GiftCardCreate, **options)
4272
+ end
4273
+
4274
+ # Redeem gift card
4275
+ #
4276
+ # {https://developers.recurly.com/api/v2021-02-25#operation/redeem_gift_card redeem_gift_card api documentation}
4277
+ #
4278
+ # @param redemption_code [String] Gift Card redemption code, e.g., +N1A2T8IRXSCMO40V+.
4279
+ # @param body [Requests::GiftCardRedeem] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::GiftCardRedeem}
4280
+ # @param params [Hash] Optional query string parameters:
4281
+ #
4282
+ # @return [Resources::GiftCard] Redeems and returns the gift card
4283
+ #
4284
+ def redeem_gift_card(redemption_code:, body:, **options)
4285
+ path = interpolate_path("/gift_cards/{redemption_code}/redeem", redemption_code: redemption_code)
4286
+ post(path, body, Requests::GiftCardRedeem, **options)
4287
+ end
4218
4288
  end
4219
4289
  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 Requests
7
+ class AccountReference < Request
8
+
9
+ # @!attribute code
10
+ # @return [String]
11
+ define_attribute :code, String
12
+
13
+ # @!attribute id
14
+ # @return [String]
15
+ define_attribute :id, String
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,30 @@
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 GiftCardCreate < Request
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute delivery
14
+ # @return [GiftCardDeliveryCreate] The delivery details for the gift card.
15
+ define_attribute :delivery, :GiftCardDeliveryCreate
16
+
17
+ # @!attribute gifter_account
18
+ # @return [AccountPurchase] Block of account details for the gifter. This references an existing account_code.
19
+ define_attribute :gifter_account, :AccountPurchase
20
+
21
+ # @!attribute product_code
22
+ # @return [String] The product code or SKU of the gift card product.
23
+ define_attribute :product_code, String
24
+
25
+ # @!attribute unit_amount
26
+ # @return [Float] The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
27
+ define_attribute :unit_amount, Float
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,42 @@
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 GiftCardDeliveryCreate < Request
8
+
9
+ # @!attribute deliver_at
10
+ # @return [DateTime] When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
11
+ define_attribute :deliver_at, DateTime
12
+
13
+ # @!attribute email_address
14
+ # @return [String] The email address of the recipient. Required if `method` is `email`.
15
+ define_attribute :email_address, String
16
+
17
+ # @!attribute first_name
18
+ # @return [String] The first name of the recipient.
19
+ define_attribute :first_name, String
20
+
21
+ # @!attribute gifter_name
22
+ # @return [String] The name of the gifter for the purpose of a message displayed to the recipient.
23
+ define_attribute :gifter_name, String
24
+
25
+ # @!attribute last_name
26
+ # @return [String] The last name of the recipient.
27
+ define_attribute :last_name, String
28
+
29
+ # @!attribute method
30
+ # @return [String] Whether the delivery method is email or postal service.
31
+ define_attribute :method, String
32
+
33
+ # @!attribute personal_message
34
+ # @return [String] The personal message from the gifter to the recipient.
35
+ define_attribute :personal_message, String
36
+
37
+ # @!attribute recipient_address
38
+ # @return [Address] Address information for the recipient. Required if `method` is `post`.
39
+ define_attribute :recipient_address, :Address
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,14 @@
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 GiftCardRedeem < Request
8
+
9
+ # @!attribute recipient_account
10
+ # @return [AccountReference] The account for the recipient of the gift card.
11
+ define_attribute :recipient_account, :AccountReference
12
+ end
13
+ end
14
+ end
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [String] This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
47
47
  define_attribute :customer_notes, String
48
48
 
49
+ # @!attribute gift_card_redemption_code
50
+ # @return [String] A gift card redemption code to be redeemed on the purchase invoice.
51
+ define_attribute :gift_card_redemption_code, String
52
+
49
53
  # @!attribute net_terms
50
54
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
51
55
  define_attribute :net_terms, Integer
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :updated_at, DateTime
44
44
 
45
45
  # @!attribute user_access
46
- # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
46
+ # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. - `set_only` - Users with the Customers role will be able to set this field's data via the admin console.
47
47
  define_attribute :user_access, String
48
48
  end
49
49
  end
@@ -30,14 +30,14 @@ module Recurly
30
30
  # @return [DateTime] When the external subscription expires in the external platform.
31
31
  define_attribute :expires_at, DateTime
32
32
 
33
+ # @!attribute external_id
34
+ # @return [String] The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store.
35
+ define_attribute :external_id, String
36
+
33
37
  # @!attribute external_product_reference
34
38
  # @return [ExternalProductReferenceMini] External Product Reference details
35
39
  define_attribute :external_product_reference, :ExternalProductReferenceMini
36
40
 
37
- # @!attribute external_resource
38
- # @return [ExternalResourceMini] External Resource mini details
39
- define_attribute :external_resource, :ExternalResourceMini
40
-
41
41
  # @!attribute id
42
42
  # @return [String] System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`.
43
43
  define_attribute :id, String
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [Integer] An indication of the quantity of a subscribed item's quantity.
55
55
  define_attribute :quantity, Integer
56
56
 
57
+ # @!attribute state
58
+ # @return [String] External subscriptions can be active, canceled, expired, or future.
59
+ define_attribute :state, String
60
+
57
61
  # @!attribute updated_at
58
62
  # @return [DateTime] When the external subscription was updated in Recurly.
59
63
  define_attribute :updated_at, DateTime
@@ -0,0 +1,78 @@
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 GiftCard < Resource
8
+
9
+ # @!attribute balance
10
+ # @return [Float] The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers.
11
+ define_attribute :balance, Float
12
+
13
+ # @!attribute canceled_at
14
+ # @return [DateTime] When the gift card was canceled.
15
+ define_attribute :canceled_at, DateTime
16
+
17
+ # @!attribute created_at
18
+ # @return [DateTime] Created at
19
+ define_attribute :created_at, DateTime
20
+
21
+ # @!attribute currency
22
+ # @return [String] 3-letter ISO 4217 currency code.
23
+ define_attribute :currency, String
24
+
25
+ # @!attribute delivered_at
26
+ # @return [DateTime] When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled.
27
+ define_attribute :delivered_at, DateTime
28
+
29
+ # @!attribute delivery
30
+ # @return [GiftCardDelivery] The delivery details for the gift card.
31
+ define_attribute :delivery, :GiftCardDelivery
32
+
33
+ # @!attribute gifter_account_id
34
+ # @return [String] The ID of the account that purchased the gift card.
35
+ define_attribute :gifter_account_id, String
36
+
37
+ # @!attribute id
38
+ # @return [String] Gift card ID
39
+ define_attribute :id, String
40
+
41
+ # @!attribute object
42
+ # @return [String] Object type
43
+ define_attribute :object, String
44
+
45
+ # @!attribute product_code
46
+ # @return [String] The product code or SKU of the gift card product.
47
+ define_attribute :product_code, String
48
+
49
+ # @!attribute purchase_invoice_id
50
+ # @return [String] The ID of the invoice for the gift card purchase made by the gifter.
51
+ define_attribute :purchase_invoice_id, String
52
+
53
+ # @!attribute recipient_account_id
54
+ # @return [String] The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed.
55
+ define_attribute :recipient_account_id, String
56
+
57
+ # @!attribute redeemed_at
58
+ # @return [DateTime] When the gift card was redeemed by the recipient.
59
+ define_attribute :redeemed_at, DateTime
60
+
61
+ # @!attribute redemption_code
62
+ # @return [String] The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account.
63
+ define_attribute :redemption_code, String
64
+
65
+ # @!attribute redemption_invoice_id
66
+ # @return [String] The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed.
67
+ define_attribute :redemption_invoice_id, String
68
+
69
+ # @!attribute unit_amount
70
+ # @return [Float] The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
71
+ define_attribute :unit_amount, Float
72
+
73
+ # @!attribute updated_at
74
+ # @return [DateTime] Last updated at
75
+ define_attribute :updated_at, DateTime
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,42 @@
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 GiftCardDelivery < Resource
8
+
9
+ # @!attribute deliver_at
10
+ # @return [DateTime] When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
11
+ define_attribute :deliver_at, DateTime
12
+
13
+ # @!attribute email_address
14
+ # @return [String] The email address of the recipient.
15
+ define_attribute :email_address, String
16
+
17
+ # @!attribute first_name
18
+ # @return [String] The first name of the recipient.
19
+ define_attribute :first_name, String
20
+
21
+ # @!attribute gifter_name
22
+ # @return [String] The name of the gifter for the purpose of a message displayed to the recipient.
23
+ define_attribute :gifter_name, String
24
+
25
+ # @!attribute last_name
26
+ # @return [String] The last name of the recipient.
27
+ define_attribute :last_name, String
28
+
29
+ # @!attribute method
30
+ # @return [String] Whether the delivery method is email or postal service.
31
+ define_attribute :method, String
32
+
33
+ # @!attribute personal_message
34
+ # @return [String] The personal message from the gifter to the recipient.
35
+ define_attribute :personal_message, String
36
+
37
+ # @!attribute recipient_address
38
+ # @return [Address] Address information for the recipient.
39
+ define_attribute :recipient_address, :Address
40
+ end
41
+ end
42
+ end
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [String] Collection method
47
47
  define_attribute :collection_method, String
48
48
 
49
+ # @!attribute converted_at
50
+ # @return [DateTime] When the subscription was converted from a gift card.
51
+ define_attribute :converted_at, DateTime
52
+
49
53
  # @!attribute coupon_redemptions
50
54
  # @return [Array[CouponRedemptionMini]] Returns subscription level coupon redemptions that are tied to this subscription.
51
55
  define_attribute :coupon_redemptions, Array, { :item_type => :CouponRedemptionMini }
@@ -150,6 +154,10 @@ module Recurly
150
154
  # @return [SubscriptionShipping] Subscription shipping details
151
155
  define_attribute :shipping, :SubscriptionShipping
152
156
 
157
+ # @!attribute started_with_gift
158
+ # @return [Boolean] Whether the subscription was started with a gift certificate.
159
+ define_attribute :started_with_gift, :Boolean
160
+
153
161
  # @!attribute state
154
162
  # @return [String] State
155
163
  define_attribute :state, String
@@ -14,6 +14,10 @@ module Recurly
14
14
  # @return [String] Code
15
15
  define_attribute :code, String
16
16
 
17
+ # @!attribute decline_code
18
+ # @return [String] Decline code
19
+ define_attribute :decline_code, String
20
+
17
21
  # @!attribute merchant_advice
18
22
  # @return [String] Merchant message
19
23
  define_attribute :merchant_advice, String
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.28.0"
2
+ VERSION = "4.30.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -201,6 +201,7 @@ x-tagGroups:
201
201
  - automated_exports
202
202
  - external_subscriptions
203
203
  - external_products
204
+ - gift_cards
204
205
  - name: Products and Promotions
205
206
  tags:
206
207
  - item
@@ -227,8 +228,8 @@ tags:
227
228
  x-displayName: Site
228
229
  - name: custom_field_definition
229
230
  x-displayName: Custom Field Definition
230
- description: Describes the fields that can use used as custom fields on accounts
231
- or subscriptions.
231
+ description: Describes the fields that can be used as custom fields on accounts,
232
+ items, line-items (one time charges), plans, or subscriptions.
232
233
  - name: item
233
234
  x-displayName: Item
234
235
  description: |-
@@ -350,6 +351,10 @@ tags:
350
351
  description: A product from an external resource that is not managed by the Recurly
351
352
  platform and instead is managed by third-party platforms like Apple App Store
352
353
  and Google Play Store.
354
+ - name: gift_cards
355
+ x-displayName: Gift Cards
356
+ description: Add gift card purchases to your checkout and allow gift card recipients
357
+ to redeem the gift card for credit towards any of your products.
353
358
  paths:
354
359
  "/sites":
355
360
  get:
@@ -15402,6 +15407,175 @@ paths:
15402
15407
  schema:
15403
15408
  "$ref": "#/components/schemas/Error"
15404
15409
  x-code-samples: []
15410
+ "/gift_cards":
15411
+ get:
15412
+ tags:
15413
+ - gift_cards
15414
+ operationId: list_gift_cards
15415
+ summary: List gift cards
15416
+ responses:
15417
+ '200':
15418
+ description: List of all created gift cards on your site.
15419
+ content:
15420
+ application/json:
15421
+ schema:
15422
+ "$ref": "#/components/schemas/GiftCardList"
15423
+ '404':
15424
+ description: Incorrect site.
15425
+ content:
15426
+ application/json:
15427
+ schema:
15428
+ "$ref": "#/components/schemas/Error"
15429
+ default:
15430
+ description: Unexpected error.
15431
+ content:
15432
+ application/json:
15433
+ schema:
15434
+ "$ref": "#/components/schemas/Error"
15435
+ x-code-samples: []
15436
+ post:
15437
+ tags:
15438
+ - gift_cards
15439
+ operationId: create_gift_card
15440
+ summary: Create gift card
15441
+ requestBody:
15442
+ content:
15443
+ application/json:
15444
+ schema:
15445
+ "$ref": "#/components/schemas/GiftCardCreate"
15446
+ required: true
15447
+ responses:
15448
+ '201':
15449
+ description: Returns the gift card
15450
+ content:
15451
+ application/json:
15452
+ schema:
15453
+ "$ref": "#/components/schemas/GiftCard"
15454
+ '400':
15455
+ description: Bad request; perhaps missing or invalid parameters.
15456
+ content:
15457
+ application/json:
15458
+ schema:
15459
+ "$ref": "#/components/schemas/Error"
15460
+ '422':
15461
+ description: Gift card cannot be completed for the specified reason.
15462
+ content:
15463
+ application/json:
15464
+ schema:
15465
+ "$ref": "#/components/schemas/Error"
15466
+ default:
15467
+ description: Unexpected error.
15468
+ content:
15469
+ application/json:
15470
+ schema:
15471
+ "$ref": "#/components/schemas/Error"
15472
+ x-code-samples: []
15473
+ "/gift_cards/{gift_card_id}":
15474
+ parameters:
15475
+ - "$ref": "#/components/parameters/gift_card_id"
15476
+ get:
15477
+ tags:
15478
+ - gift_cards
15479
+ operationId: get_gift_card
15480
+ summary: Fetch a gift card
15481
+ responses:
15482
+ '200':
15483
+ description: Gift card details
15484
+ content:
15485
+ application/json:
15486
+ schema:
15487
+ "$ref": "#/components/schemas/GiftCard"
15488
+ '404':
15489
+ description: Incorrect site or gift card ID.
15490
+ content:
15491
+ application/json:
15492
+ schema:
15493
+ "$ref": "#/components/schemas/Error"
15494
+ default:
15495
+ description: Unexpected error.
15496
+ content:
15497
+ application/json:
15498
+ schema:
15499
+ "$ref": "#/components/schemas/Error"
15500
+ x-code-samples: []
15501
+ "/gift_cards/preview":
15502
+ post:
15503
+ tags:
15504
+ - gift_cards
15505
+ operationId: preview_gift_card
15506
+ summary: Preview gift card
15507
+ requestBody:
15508
+ content:
15509
+ application/json:
15510
+ schema:
15511
+ "$ref": "#/components/schemas/GiftCardCreate"
15512
+ required: true
15513
+ responses:
15514
+ '201':
15515
+ description: Returns the gift card
15516
+ content:
15517
+ application/json:
15518
+ schema:
15519
+ "$ref": "#/components/schemas/GiftCard"
15520
+ '400':
15521
+ description: Bad request; perhaps missing or invalid parameters.
15522
+ content:
15523
+ application/json:
15524
+ schema:
15525
+ "$ref": "#/components/schemas/Error"
15526
+ '422':
15527
+ description: Gift card cannot be completed for the specified reason.
15528
+ content:
15529
+ application/json:
15530
+ schema:
15531
+ "$ref": "#/components/schemas/Error"
15532
+ default:
15533
+ description: Unexpected error.
15534
+ content:
15535
+ application/json:
15536
+ schema:
15537
+ "$ref": "#/components/schemas/Error"
15538
+ x-code-samples: []
15539
+ "/gift_cards/{redemption_code}/redeem":
15540
+ parameters:
15541
+ - "$ref": "#/components/parameters/redemption_code"
15542
+ post:
15543
+ tags:
15544
+ - gift_cards
15545
+ operationId: redeem_gift_card
15546
+ summary: Redeem gift card
15547
+ requestBody:
15548
+ content:
15549
+ application/json:
15550
+ schema:
15551
+ "$ref": "#/components/schemas/GiftCardRedeem"
15552
+ required: true
15553
+ responses:
15554
+ '201':
15555
+ description: Redeems and returns the gift card
15556
+ content:
15557
+ application/json:
15558
+ schema:
15559
+ "$ref": "#/components/schemas/GiftCard"
15560
+ '400':
15561
+ description: Bad request; perhaps missing or invalid parameters.
15562
+ content:
15563
+ application/json:
15564
+ schema:
15565
+ "$ref": "#/components/schemas/Error"
15566
+ '422':
15567
+ description: Gift card cannot be redeemed for the specified reason.
15568
+ content:
15569
+ application/json:
15570
+ schema:
15571
+ "$ref": "#/components/schemas/Error"
15572
+ default:
15573
+ description: Unexpected error.
15574
+ content:
15575
+ application/json:
15576
+ schema:
15577
+ "$ref": "#/components/schemas/Error"
15578
+ x-code-samples: []
15405
15579
  servers:
15406
15580
  - url: https://v3.recurly.com
15407
15581
  - url: https://v3.eu.recurly.com
@@ -15576,6 +15750,20 @@ components:
15576
15750
  required: true
15577
15751
  schema:
15578
15752
  type: string
15753
+ gift_card_id:
15754
+ name: gift_card_id
15755
+ in: path
15756
+ description: Gift Card ID, e.g. `e28zov4fw0v2`.
15757
+ required: true
15758
+ schema:
15759
+ type: string
15760
+ redemption_code:
15761
+ name: redemption_code
15762
+ in: path
15763
+ description: Gift Card redemption code, e.g., `N1A2T8IRXSCMO40V`.
15764
+ required: true
15765
+ schema:
15766
+ type: string
15579
15767
  ids:
15580
15768
  name: ids
15581
15769
  in: query
@@ -16257,6 +16445,15 @@ components:
16257
16445
  required:
16258
16446
  - code
16259
16447
  - "$ref": "#/components/schemas/AccountUpdate"
16448
+ AccountReference:
16449
+ type: object
16450
+ properties:
16451
+ id:
16452
+ type: string
16453
+ maxLength: 13
16454
+ code:
16455
+ type: string
16456
+ maxLength: 50
16260
16457
  AccountUpdate:
16261
16458
  type: object
16262
16459
  properties:
@@ -18014,6 +18211,7 @@ components:
18014
18211
  - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but
18015
18212
  editing will only be available via the API.
18016
18213
  - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
18214
+ - `set_only` - Users with the Customers role will be able to set this field's data via the admin console.
18017
18215
  "$ref": "#/components/schemas/UserAccessEnum"
18018
18216
  display_name:
18019
18217
  type: string
@@ -20721,6 +20919,16 @@ components:
20721
20919
  subscription.
20722
20920
  maxLength: 13
20723
20921
  readOnly: true
20922
+ started_with_gift:
20923
+ type: boolean
20924
+ default: false
20925
+ description: Whether the subscription was started with a gift certificate.
20926
+ title: Started with Gift
20927
+ converted_at:
20928
+ type: string
20929
+ format: date-time
20930
+ description: When the subscription was converted from a gift card.
20931
+ title: Converted at
20724
20932
  SubscriptionAddOn:
20725
20933
  type: object
20726
20934
  title: Subscription Add-on
@@ -21433,6 +21641,11 @@ components:
21433
21641
  created by this request. Supports 'moto' value, which is the acronym for
21434
21642
  mail order and telephone transactions.
21435
21643
  "$ref": "#/components/schemas/GatewayTransactionTypeEnum"
21644
+ gift_card_redemption_code:
21645
+ type: string
21646
+ title: Gift card Redemption Code
21647
+ description: A gift card redemption code to be redeemed on the purchase
21648
+ invoice.
21436
21649
  required:
21437
21650
  - plan_code
21438
21651
  - currency
@@ -22634,10 +22847,13 @@ components:
22634
22847
  title: Object type
22635
22848
  account:
22636
22849
  "$ref": "#/components/schemas/AccountMini"
22637
- external_resource:
22638
- "$ref": "#/components/schemas/ExternalResourceMini"
22639
22850
  external_product_reference:
22640
22851
  "$ref": "#/components/schemas/ExternalProductReferenceMini"
22852
+ external_id:
22853
+ type: string
22854
+ title: External Id
22855
+ description: The id of the subscription in the external systems., I.e. Apple
22856
+ App Store or Google Play Store.
22641
22857
  last_purchased:
22642
22858
  type: string
22643
22859
  format: date-time
@@ -22660,6 +22876,10 @@ components:
22660
22876
  description: An indication of the quantity of a subscribed item's quantity.
22661
22877
  default: 1
22662
22878
  minimum: 0
22879
+ state:
22880
+ type: string
22881
+ description: External subscriptions can be active, canceled, expired, or
22882
+ future.
22663
22883
  activated_at:
22664
22884
  type: string
22665
22885
  format: date-time
@@ -22698,25 +22918,6 @@ components:
22698
22918
  type: array
22699
22919
  items:
22700
22920
  "$ref": "#/components/schemas/ExternalSubscription"
22701
- ExternalResourceMini:
22702
- type: object
22703
- title: External Resource mini details
22704
- properties:
22705
- id:
22706
- type: string
22707
- title: External resource ID
22708
- description: System-generated unique identifier for an external resource
22709
- ID, e.g. `e28zov4fw0v2`.
22710
- object:
22711
- type: string
22712
- title: Object type
22713
- external_object_reference:
22714
- type: string
22715
- title: External Object Reference
22716
- description: Identifier or URL reference where the resource is canonically
22717
- available in the external platform.
22718
- maxLength: 255
22719
- readOnly: true
22720
22921
  CustomerPermission:
22721
22922
  type: object
22722
22923
  properties:
@@ -22850,6 +23051,262 @@ components:
22850
23051
  type: string
22851
23052
  description: Username of the associated payment method. Currently only associated
22852
23053
  with Venmo.
23054
+ GiftCardList:
23055
+ type: object
23056
+ properties:
23057
+ object:
23058
+ type: string
23059
+ title: Object type
23060
+ description: Will always be List.
23061
+ has_more:
23062
+ type: boolean
23063
+ description: Indicates there are more results on subsequent pages.
23064
+ next:
23065
+ type: string
23066
+ description: Path to subsequent page of results.
23067
+ data:
23068
+ type: array
23069
+ items:
23070
+ "$ref": "#/components/schemas/GiftCard"
23071
+ GiftCard:
23072
+ type: object
23073
+ description: Gift card details
23074
+ properties:
23075
+ id:
23076
+ title: Gift card ID
23077
+ type: string
23078
+ maxLength: 13
23079
+ readOnly: true
23080
+ object:
23081
+ title: Object type
23082
+ type: string
23083
+ readOnly: true
23084
+ gifter_account_id:
23085
+ title: Gifter account ID
23086
+ type: string
23087
+ maxLength: 13
23088
+ description: The ID of the account that purchased the gift card.
23089
+ recipient_account_id:
23090
+ title: Recipient account ID
23091
+ type: string
23092
+ maxLength: 13
23093
+ description: The ID of the account that redeemed the gift card redemption
23094
+ code. Does not have a value until gift card is redeemed.
23095
+ purchase_invoice_id:
23096
+ title: Purchase invoice ID
23097
+ type: string
23098
+ maxLength: 13
23099
+ description: The ID of the invoice for the gift card purchase made by the
23100
+ gifter.
23101
+ redemption_invoice_id:
23102
+ title: Redemption invoice ID
23103
+ type: string
23104
+ maxLength: 13
23105
+ description: The ID of the invoice for the gift card redemption made by
23106
+ the recipient. Does not have a value until gift card is redeemed.
23107
+ redemption_code:
23108
+ title: Redemption code
23109
+ type: string
23110
+ description: The unique redemption code for the gift card, generated by
23111
+ Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but
23112
+ accepted in any case at redemption. Used by the recipient account to create
23113
+ a credit in the amount of the `unit_amount` on their account.
23114
+ balance:
23115
+ title: Remaining balance
23116
+ type: number
23117
+ format: float
23118
+ description: The remaining credit on the recipient account associated with
23119
+ this gift card. Only has a value once the gift card has been redeemed.
23120
+ Can be used to create gift card balance displays for your customers.
23121
+ product_code:
23122
+ title: Product code
23123
+ type: string
23124
+ description: The product code or SKU of the gift card product.
23125
+ unit_amount:
23126
+ title: Purchase unit amount
23127
+ type: number
23128
+ format: float
23129
+ description: The amount of the gift card, which is the amount of the charge
23130
+ to the gifter account and the amount of credit that is applied to the
23131
+ recipient account upon successful redemption.
23132
+ currency:
23133
+ title: Currency
23134
+ type: string
23135
+ description: 3-letter ISO 4217 currency code.
23136
+ maxLength: 3
23137
+ delivery:
23138
+ title: Delivery details
23139
+ description: The delivery details for the gift card.
23140
+ readOnly: true
23141
+ "$ref": "#/components/schemas/GiftCardDelivery"
23142
+ created_at:
23143
+ type: string
23144
+ format: date-time
23145
+ title: Created at
23146
+ readOnly: true
23147
+ updated_at:
23148
+ type: string
23149
+ format: date-time
23150
+ title: Last updated at
23151
+ readOnly: true
23152
+ delivered_at:
23153
+ type: string
23154
+ format: date-time
23155
+ title: Delivered at
23156
+ readOnly: true
23157
+ description: When the gift card was sent to the recipient by Recurly via
23158
+ email, if method was email and the "Gift Card Delivery" email template
23159
+ was enabled. This will be empty for post delivery or email delivery where
23160
+ the email template was disabled.
23161
+ redeemed_at:
23162
+ type: string
23163
+ format: date-time
23164
+ title: Redeemed at
23165
+ readOnly: true
23166
+ description: When the gift card was redeemed by the recipient.
23167
+ canceled_at:
23168
+ type: string
23169
+ format: date-time
23170
+ title: Canceled at
23171
+ readOnly: true
23172
+ description: When the gift card was canceled.
23173
+ GiftCardCreate:
23174
+ type: object
23175
+ description: Gift card details
23176
+ properties:
23177
+ product_code:
23178
+ title: Product code
23179
+ type: string
23180
+ description: The product code or SKU of the gift card product.
23181
+ unit_amount:
23182
+ title: Purchase unit amount
23183
+ type: number
23184
+ format: float
23185
+ description: The amount of the gift card, which is the amount of the charge
23186
+ to the gifter account and the amount of credit that is applied to the
23187
+ recipient account upon successful redemption.
23188
+ currency:
23189
+ title: Currency
23190
+ type: string
23191
+ description: 3-letter ISO 4217 currency code.
23192
+ maxLength: 3
23193
+ delivery:
23194
+ title: Delivery details
23195
+ description: The delivery details for the gift card.
23196
+ readOnly: true
23197
+ "$ref": "#/components/schemas/GiftCardDeliveryCreate"
23198
+ gifter_account:
23199
+ title: Gifter account details
23200
+ description: Block of account details for the gifter. This references an
23201
+ existing account_code.
23202
+ readOnly: true
23203
+ "$ref": "#/components/schemas/AccountPurchase"
23204
+ required:
23205
+ - product_code
23206
+ - unit_amount
23207
+ - currency
23208
+ - delivery
23209
+ - gifter_account
23210
+ GiftCardDeliveryCreate:
23211
+ type: object
23212
+ description: Gift card delivery details
23213
+ properties:
23214
+ method:
23215
+ title: Delivery method
23216
+ description: Whether the delivery method is email or postal service.
23217
+ "$ref": "#/components/schemas/DeliveryMethodEnum"
23218
+ email_address:
23219
+ title: Recipient email address
23220
+ type: string
23221
+ description: The email address of the recipient. Required if `method` is
23222
+ `email`.
23223
+ deliver_at:
23224
+ type: string
23225
+ format: date-time
23226
+ title: Deliver at
23227
+ readOnly: true
23228
+ description: When the gift card should be delivered to the recipient. If
23229
+ null, the gift card will be delivered immediately. If a datetime is provided,
23230
+ the delivery will be in an hourly window, rounding down. For example,
23231
+ 6:23 pm will be in the 6:00 pm hourly batch.
23232
+ first_name:
23233
+ title: Recipient first name
23234
+ type: string
23235
+ description: The first name of the recipient.
23236
+ last_name:
23237
+ title: Recipient last name
23238
+ type: string
23239
+ description: The last name of the recipient.
23240
+ recipient_address:
23241
+ title: Recipient address
23242
+ description: Address information for the recipient. Required if `method`
23243
+ is `post`.
23244
+ "$ref": "#/components/schemas/Address"
23245
+ gifter_name:
23246
+ title: Gifter name
23247
+ type: string
23248
+ description: The name of the gifter for the purpose of a message displayed
23249
+ to the recipient.
23250
+ personal_message:
23251
+ title: Personal message
23252
+ type: string
23253
+ maxLength: 255
23254
+ description: The personal message from the gifter to the recipient.
23255
+ required:
23256
+ - method
23257
+ GiftCardDelivery:
23258
+ type: object
23259
+ description: Gift card delivery details
23260
+ properties:
23261
+ method:
23262
+ title: Delivery method
23263
+ description: Whether the delivery method is email or postal service.
23264
+ "$ref": "#/components/schemas/DeliveryMethodEnum"
23265
+ email_address:
23266
+ title: Recipient email address
23267
+ type: string
23268
+ description: The email address of the recipient.
23269
+ deliver_at:
23270
+ type: string
23271
+ format: date-time
23272
+ title: Deliver at
23273
+ readOnly: true
23274
+ description: When the gift card should be delivered to the recipient. If
23275
+ null, the gift card will be delivered immediately. If a datetime is provided,
23276
+ the delivery will be in an hourly window, rounding down. For example,
23277
+ 6:23 pm will be in the 6:00 pm hourly batch.
23278
+ first_name:
23279
+ title: Recipient first name
23280
+ type: string
23281
+ description: The first name of the recipient.
23282
+ last_name:
23283
+ title: Recipient last name
23284
+ type: string
23285
+ description: The last name of the recipient.
23286
+ recipient_address:
23287
+ title: Recipient address
23288
+ description: Address information for the recipient.
23289
+ "$ref": "#/components/schemas/Address"
23290
+ gifter_name:
23291
+ title: Gifter name
23292
+ type: string
23293
+ description: The name of the gifter for the purpose of a message displayed
23294
+ to the recipient.
23295
+ personal_message:
23296
+ title: Personal message
23297
+ type: string
23298
+ maxLength: 255
23299
+ description: The personal message from the gifter to the recipient.
23300
+ GiftCardRedeem:
23301
+ type: object
23302
+ description: The information necessary to redeem a gift card.
23303
+ properties:
23304
+ recipient_account:
23305
+ title: Recipient account
23306
+ description: The account for the recipient of the gift card.
23307
+ "$ref": "#/components/schemas/AccountReference"
23308
+ required:
23309
+ - recipient_account
22853
23310
  Error:
22854
23311
  type: object
22855
23312
  properties:
@@ -22891,6 +23348,9 @@ components:
22891
23348
  code:
22892
23349
  title: Code
22893
23350
  "$ref": "#/components/schemas/ErrorCodeEnum"
23351
+ decline_code:
23352
+ title: Decline code
23353
+ "$ref": "#/components/schemas/DeclineCodeEnum"
22894
23354
  message:
22895
23355
  type: string
22896
23356
  title: Customer message
@@ -23062,6 +23522,11 @@ components:
23062
23522
  enum:
23063
23523
  - parent
23064
23524
  - self
23525
+ DeliveryMethodEnum:
23526
+ type: string
23527
+ enum:
23528
+ - email
23529
+ - post
23065
23530
  GatewayTransactionTypeEnum:
23066
23531
  type: string
23067
23532
  enum:
@@ -23197,6 +23662,7 @@ components:
23197
23662
  - api_only
23198
23663
  - read_only
23199
23664
  - write
23665
+ - set_only
23200
23666
  PricingModelTypeEnum:
23201
23667
  type: string
23202
23668
  enum:
@@ -23699,6 +24165,38 @@ components:
23699
24165
  - unmapped_partner_error
23700
24166
  - vaultly_service_unavailable
23701
24167
  - zero_dollar_auth_not_supported
24168
+ DeclineCodeEnum:
24169
+ type: string
24170
+ enum:
24171
+ - account_closed
24172
+ - call_issuer
24173
+ - card_not_activated
24174
+ - card_not_supported
24175
+ - cardholder_requested_stop
24176
+ - do_not_honor
24177
+ - do_not_try_again
24178
+ - exceeds_daily_limit
24179
+ - generic_decline
24180
+ - expired_card
24181
+ - fraudulent
24182
+ - insufficient_funds
24183
+ - incorrect_address
24184
+ - incorrect_security_code
24185
+ - invalid_amount
24186
+ - invalid_number
24187
+ - invalid_transaction
24188
+ - issuer_unavailable
24189
+ - lifecycle_decline
24190
+ - lost_card
24191
+ - pickup_card
24192
+ - policy_decline
24193
+ - restricted_card
24194
+ - restricted_card_chargeback
24195
+ - security_decline
24196
+ - stolen_card
24197
+ - try_again
24198
+ - update_cardholder_data
24199
+ - requires_3d_secure
23702
24200
  ExportDates:
23703
24201
  type: object
23704
24202
  properties:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.28.0
4
+ version: 4.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-19 00:00:00.000000000 Z
11
+ date: 2023-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,6 +150,7 @@ files:
150
150
  - lib/recurly/requests/account_acquisition_update.rb
151
151
  - lib/recurly/requests/account_create.rb
152
152
  - lib/recurly/requests/account_purchase.rb
153
+ - lib/recurly/requests/account_reference.rb
153
154
  - lib/recurly/requests/account_update.rb
154
155
  - lib/recurly/requests/add_on_create.rb
155
156
  - lib/recurly/requests/add_on_pricing.rb
@@ -167,6 +168,9 @@ files:
167
168
  - lib/recurly/requests/dunning_campaigns_bulk_update.rb
168
169
  - lib/recurly/requests/external_refund.rb
169
170
  - lib/recurly/requests/external_transaction.rb
171
+ - lib/recurly/requests/gift_card_create.rb
172
+ - lib/recurly/requests/gift_card_delivery_create.rb
173
+ - lib/recurly/requests/gift_card_redeem.rb
170
174
  - lib/recurly/requests/invoice_address.rb
171
175
  - lib/recurly/requests/invoice_collect.rb
172
176
  - lib/recurly/requests/invoice_create.rb
@@ -254,9 +258,10 @@ files:
254
258
  - lib/recurly/resources/export_files.rb
255
259
  - lib/recurly/resources/external_product.rb
256
260
  - lib/recurly/resources/external_product_reference_mini.rb
257
- - lib/recurly/resources/external_resource_mini.rb
258
261
  - lib/recurly/resources/external_subscription.rb
259
262
  - lib/recurly/resources/fraud_info.rb
263
+ - lib/recurly/resources/gift_card.rb
264
+ - lib/recurly/resources/gift_card_delivery.rb
260
265
  - lib/recurly/resources/granted_by.rb
261
266
  - lib/recurly/resources/invoice.rb
262
267
  - lib/recurly/resources/invoice_address.rb
@@ -326,7 +331,7 @@ metadata:
326
331
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
327
332
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
328
333
  homepage_uri: https://github.com/recurly/recurly-client-ruby
329
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.28.0
334
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.30.0
330
335
  post_install_message:
331
336
  rdoc_options: []
332
337
  require_paths:
@@ -1,22 +0,0 @@
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 ExternalResourceMini < Resource
8
-
9
- # @!attribute external_object_reference
10
- # @return [String] Identifier or URL reference where the resource is canonically available in the external platform.
11
- define_attribute :external_object_reference, String
12
-
13
- # @!attribute id
14
- # @return [String] System-generated unique identifier for an external resource ID, e.g. `e28zov4fw0v2`.
15
- define_attribute :id, String
16
-
17
- # @!attribute object
18
- # @return [String] Object type
19
- define_attribute :object, String
20
- end
21
- end
22
- end