recurly 4.22.0 → 4.23.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: ea38d9a4d3bcfd53d04e38127bcd75a152f974643151122a25d9e67293ae719c
4
- data.tar.gz: 87f4f5d23c82902915df2665508e2ad93db45943413932e456fa983ef97d73c8
3
+ metadata.gz: f3425e11a326e6886fe09606f3cd02f155ded5fb774f639d20f47f2a4def65f3
4
+ data.tar.gz: 39d0917188e796d37e7179a86e78427dab022cf94ea3d6c13b734153d54f2b0c
5
5
  SHA512:
6
- metadata.gz: 916c2f6172f117706535aeed44ee39176afdaf05de6203f2088f0a29534d9fde5e4041c0aeee91411ee7ca6a5d9364b34a212bec24615c8cf8ba88148a225189
7
- data.tar.gz: 5fe36efd973e04af109491e5bf385ffe0fc1bd6022498bbe8149f0345e4bb56c321eda85209e9fa694af99ea7f93abe6f53958a4d26c5b46f5a5aa1f3807bc54
6
+ metadata.gz: c06705fdd51268f7f1a298dc6b92ab65c4a972106d32d2e7909ac6852d780ab0024170da9c0f028d43695fe17706371684f93366217bbf3577fd9e1200068854
7
+ data.tar.gz: 63565f407525519ff2594677070a394675c7500d03565d704c0bd07e4ef7afa94ffb2d9839efd07f527bc65fc9979090d4ab4cf1166d988d7879fcbb757576e9
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.22.0
2
+ current_version = 4.23.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.23.0](https://github.com/recurly/recurly-client-ruby/tree/4.23.0) (2022-10-27)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.22.0...4.23.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#804](https://github.com/recurly/recurly-client-ruby/pull/804) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
3
14
  ## [4.22.0](https://github.com/recurly/recurly-client-ruby/tree/4.22.0) (2022-10-21)
4
15
 
5
16
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.21.1...4.22.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.22'
8
+ gem 'recurly', '~> 4.23'
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.
@@ -4091,5 +4091,24 @@ module Recurly
4091
4091
  path = interpolate_path("/invoice_templates/{invoice_template_id}", invoice_template_id: invoice_template_id)
4092
4092
  get(path, **options)
4093
4093
  end
4094
+
4095
+ # Show all entitlements granted to an account
4096
+ #
4097
+ # {https://developers.recurly.com/api/v2021-02-25#operation/list_entitlements list_entitlements api documentation}
4098
+ #
4099
+ # @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
4100
+ # @param params [Hash] Optional query string parameters:
4101
+ # :state [String] Filter the entitlements based on the state of the applicable subscription.
4102
+ #
4103
+ # - When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
4104
+ # - When no state is provided, subscriptions with active or canceled states will be returned.
4105
+ #
4106
+ #
4107
+ # @return [Pager<Resources::Entitlements>] A list of the entitlements granted to an account.
4108
+ #
4109
+ def list_entitlements(account_id:, **options)
4110
+ path = interpolate_path("/accounts/{account_id}/entitlements", account_id: account_id)
4111
+ pager(path, **options)
4112
+ end
4094
4113
  end
4095
4114
  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 Resources
7
+ class CustomerPermission < Resource
8
+
9
+ # @!attribute code
10
+ # @return [String] Customer permission code.
11
+ define_attribute :code, String
12
+
13
+ # @!attribute description
14
+ # @return [String] Description of customer permission.
15
+ define_attribute :description, String
16
+
17
+ # @!attribute id
18
+ # @return [String] Customer permission ID.
19
+ define_attribute :id, String
20
+
21
+ # @!attribute name
22
+ # @return [String] Customer permission name.
23
+ define_attribute :name, String
24
+
25
+ # @!attribute object
26
+ # @return [String] It will always be "customer_permission".
27
+ define_attribute :object, String
28
+ end
29
+ end
30
+ 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 Resources
7
+ class Entitlement < Resource
8
+
9
+ # @!attribute created_at
10
+ # @return [DateTime] Time object was created.
11
+ define_attribute :created_at, DateTime
12
+
13
+ # @!attribute customer_permission
14
+ # @return [CustomerPermission]
15
+ define_attribute :customer_permission, :CustomerPermission
16
+
17
+ # @!attribute granted_by
18
+ # @return [Array[GrantedBy]] Subscription or item that granted the customer permission.
19
+ define_attribute :granted_by, Array, { :item_type => :GrantedBy }
20
+
21
+ # @!attribute object
22
+ # @return [String] Entitlement
23
+ define_attribute :object, String
24
+
25
+ # @!attribute updated_at
26
+ # @return [DateTime] Time the object was last updated
27
+ define_attribute :updated_at, DateTime
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,26 @@
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 Entitlements < Resource
8
+
9
+ # @!attribute data
10
+ # @return [Array[Entitlement]]
11
+ define_attribute :data, Array, { :item_type => :Entitlement }
12
+
13
+ # @!attribute has_more
14
+ # @return [Boolean] Indicates there are more results on subsequent pages.
15
+ define_attribute :has_more, :Boolean
16
+
17
+ # @!attribute next
18
+ # @return [String] Path to subsequent page of results.
19
+ define_attribute :next, String
20
+
21
+ # @!attribute object
22
+ # @return [String] Object Type
23
+ define_attribute :object, String
24
+ end
25
+ end
26
+ 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 GrantedBy < Resource
8
+
9
+ # @!attribute id
10
+ # @return [String] The ID of the subscription or external subscription that grants the permission to the account.
11
+ define_attribute :id, String
12
+
13
+ # @!attribute object
14
+ # @return [String] Object Type
15
+ define_attribute :object, String
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.22.0"
2
+ VERSION = "4.23.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -305,6 +305,8 @@ tags:
305
305
  description: A purchase is a checkout containing at least one or more subscriptions
306
306
  or one-time charges (line items) and supports both coupon and gift card redemptions.
307
307
  All items purchased will be on one invoice and paid for with one transaction.
308
+ The purchases endpoint can also be used to immediately create a credit invoice
309
+ on an account, when Credit Invoices is enabled on your site.
308
310
  - name: usage
309
311
  x-displayName: Usage
310
312
  description: Send Recurly your customer usage and we will automatically bill them
@@ -3773,6 +3775,8 @@ paths:
3773
3775
  - line_item
3774
3776
  operationId: create_line_item
3775
3777
  summary: Create a new line item for the account
3778
+ description: When using the Credit Invoices feature, utilize the purchases endpoint
3779
+ in order to immediately post credit to a credit invoice.
3776
3780
  parameters:
3777
3781
  - "$ref": "#/components/parameters/account_id"
3778
3782
  requestBody:
@@ -15065,6 +15069,35 @@ paths:
15065
15069
  schema:
15066
15070
  "$ref": "#/components/schemas/Error"
15067
15071
  x-code-samples: []
15072
+ "/accounts/{account_id}/entitlements":
15073
+ parameters:
15074
+ - "$ref": "#/components/parameters/account_id"
15075
+ - "$ref": "#/components/parameters/filter_limited_subscription_state"
15076
+ get:
15077
+ tags:
15078
+ - account
15079
+ operationId: list_entitlements
15080
+ summary: Show all entitlements granted to an account
15081
+ responses:
15082
+ '200':
15083
+ description: A list of the entitlements granted to an account.
15084
+ content:
15085
+ application/json:
15086
+ schema:
15087
+ "$ref": "#/components/schemas/Entitlements"
15088
+ '404':
15089
+ description: Incorrect site or account ID.
15090
+ content:
15091
+ application/json:
15092
+ schema:
15093
+ "$ref": "#/components/schemas/Error"
15094
+ default:
15095
+ description: Unexpected error.
15096
+ content:
15097
+ application/json:
15098
+ schema:
15099
+ "$ref": "#/components/schemas/Error"
15100
+ x-code-samples: []
15068
15101
  servers:
15069
15102
  - url: https://v3.recurly.com
15070
15103
  - url: https://v3.eu.recurly.com
@@ -15306,6 +15339,16 @@ components:
15306
15339
  - When `state=live`, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
15307
15340
  schema:
15308
15341
  "$ref": "#/components/schemas/FilterSubscriptionStateEnum"
15342
+ filter_limited_subscription_state:
15343
+ name: state
15344
+ in: query
15345
+ description: |
15346
+ Filter the entitlements based on the state of the applicable subscription.
15347
+
15348
+ - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned.
15349
+ - When no state is provided, subscriptions with active or canceled states will be returned.
15350
+ schema:
15351
+ "$ref": "#/components/schemas/FilterLimitedSubscriptionStateEnum"
15309
15352
  filter_begin_time:
15310
15353
  name: begin_time
15311
15354
  in: query
@@ -22093,6 +22136,75 @@ components:
22093
22136
  maxItems: 200
22094
22137
  items:
22095
22138
  "$ref": "#/components/schemas/Plan"
22139
+ Entitlements:
22140
+ type: object
22141
+ description: A list of privileges granted to a customer through the purchase
22142
+ of a plan or item.
22143
+ properties:
22144
+ object:
22145
+ type: string
22146
+ title: Object Type
22147
+ has_more:
22148
+ type: boolean
22149
+ description: Indicates there are more results on subsequent pages.
22150
+ next:
22151
+ type: string
22152
+ description: Path to subsequent page of results.
22153
+ data:
22154
+ type: array
22155
+ items:
22156
+ "$ref": "#/components/schemas/Entitlement"
22157
+ Entitlement:
22158
+ type: object
22159
+ properties:
22160
+ object:
22161
+ type: string
22162
+ description: Entitlement
22163
+ customer_permission:
22164
+ "$ref": "#/components/schemas/CustomerPermission"
22165
+ granted_by:
22166
+ type: array
22167
+ description: Subscription or item that granted the customer permission.
22168
+ items:
22169
+ "$ref": "#/components/schemas/GrantedBy"
22170
+ created_at:
22171
+ type: string
22172
+ format: date-time
22173
+ description: Time object was created.
22174
+ updated_at:
22175
+ type: string
22176
+ format: date-time
22177
+ description: Time the object was last updated
22178
+ CustomerPermission:
22179
+ type: object
22180
+ properties:
22181
+ id:
22182
+ type: string
22183
+ description: Customer permission ID.
22184
+ code:
22185
+ type: string
22186
+ description: Customer permission code.
22187
+ name:
22188
+ type: string
22189
+ description: Customer permission name.
22190
+ description:
22191
+ type: string
22192
+ description: Description of customer permission.
22193
+ object:
22194
+ type: string
22195
+ description: It will always be "customer_permission".
22196
+ GrantedBy:
22197
+ type: object
22198
+ description: The subscription or external subscription that grants customer
22199
+ permissions.
22200
+ properties:
22201
+ object:
22202
+ type: string
22203
+ title: Object Type
22204
+ id:
22205
+ type: string
22206
+ description: The ID of the subscription or external subscription that grants
22207
+ the permission to the account.
22096
22208
  InvoiceTemplateList:
22097
22209
  type: object
22098
22210
  properties:
@@ -22306,6 +22418,13 @@ components:
22306
22418
  - future
22307
22419
  - in_trial
22308
22420
  - live
22421
+ FilterLimitedSubscriptionStateEnum:
22422
+ type: string
22423
+ enum:
22424
+ - active
22425
+ - canceled
22426
+ - expired
22427
+ - future
22309
22428
  TrueEnum:
22310
22429
  type: string
22311
22430
  enum:
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.22.0
4
+ version: 4.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2022-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -239,16 +239,20 @@ files:
239
239
  - lib/recurly/resources/credit_payment.rb
240
240
  - lib/recurly/resources/custom_field.rb
241
241
  - lib/recurly/resources/custom_field_definition.rb
242
+ - lib/recurly/resources/customer_permission.rb
242
243
  - lib/recurly/resources/dunning_campaign.rb
243
244
  - lib/recurly/resources/dunning_campaigns_bulk_update_response.rb
244
245
  - lib/recurly/resources/dunning_cycle.rb
245
246
  - lib/recurly/resources/dunning_interval.rb
247
+ - lib/recurly/resources/entitlement.rb
248
+ - lib/recurly/resources/entitlements.rb
246
249
  - lib/recurly/resources/error.rb
247
250
  - lib/recurly/resources/error_may_have_transaction.rb
248
251
  - lib/recurly/resources/export_dates.rb
249
252
  - lib/recurly/resources/export_file.rb
250
253
  - lib/recurly/resources/export_files.rb
251
254
  - lib/recurly/resources/fraud_info.rb
255
+ - lib/recurly/resources/granted_by.rb
252
256
  - lib/recurly/resources/invoice.rb
253
257
  - lib/recurly/resources/invoice_address.rb
254
258
  - lib/recurly/resources/invoice_collection.rb
@@ -316,7 +320,7 @@ metadata:
316
320
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
317
321
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
318
322
  homepage_uri: https://github.com/recurly/recurly-client-ruby
319
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.22.0
323
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.23.0
320
324
  post_install_message:
321
325
  rdoc_options: []
322
326
  require_paths: