recurly 4.48.1 → 4.50.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: 96e4b84ed92642304d316caef8e02440f25b3aa86b53f4aa409be552ba6ea528
4
- data.tar.gz: de9d27ad9767114b32a7aedd451b4f0ad3f84868e2ce9477001a3df08db5401f
3
+ metadata.gz: 9deb4deb5ca3391327d77c6a0e01784b582d552822ca1a049549b02ba457d0cc
4
+ data.tar.gz: 68d1bc0fe11b5dadde464dd7b450765751fe528d482394205afaeda885e2e63c
5
5
  SHA512:
6
- metadata.gz: 57aa7328b70c2e729f0d5b6ab3f0b0d31767b99209c61452240534a728dca5744361f8f955547a6c786fa82ee23aa6da664adf14b5a24468de76002972654f4e
7
- data.tar.gz: fc8b24b5cc0bcb0651d277f5c594866fd58bfcb6797c5ff09283338c3cc1fb8761871f3789e46b6108df7fa51b7a4fdb04f116605a597153f6463a9c4bc6c3e1
6
+ metadata.gz: 508098f34e9196704e4a6d511c4e6f7654008fb25b025984582dfc60f707a4dfb8cd8f4b1945d4522b932a6cd919c553443e42a67f3e484e2bfe590e7dff3734
7
+ data.tar.gz: b594596975bb8f5b5e1b5cce5f37ac7c60bc14ed5252379741d5c6bbbe59f0ef8c849a1dd80ae190d0aebf758148e4733f9d87b20e5ed0b4eab8af0d34fb8ee9
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.48.1
2
+ current_version = 4.50.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.50.0](https://github.com/recurly/recurly-client-ruby/tree/4.50.0) (2024-05-08)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.49.0...4.50.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 (Proration Settings) [#901](https://github.com/recurly/recurly-client-ruby/pull/901) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [4.49.0](https://github.com/recurly/recurly-client-ruby/tree/4.49.0) (2024-05-01)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.48.1...4.49.0)
17
+
18
+
19
+ **Merged Pull Requests**
20
+
21
+ - Generated Latest Changes for v2021-02-25 (Auth & Capture) [#900](https://github.com/recurly/recurly-client-ruby/pull/900) ([recurly-integrations](https://github.com/recurly-integrations))
22
+
23
+
24
+
3
25
  ## [4.48.1](https://github.com/recurly/recurly-client-ruby/tree/4.48.1) (2024-04-02)
4
26
 
5
27
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.48.0...4.48.1)
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.48'
8
+ gem 'recurly', '~> 4.50'
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.
@@ -4277,6 +4277,48 @@ module Recurly
4277
4277
  post(path, body, Requests::PurchaseCreate, **options)
4278
4278
  end
4279
4279
 
4280
+ # Authorize a purchase
4281
+ #
4282
+ # {https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase create_authorize_purchase api documentation}
4283
+ #
4284
+ # @param body [Requests::PurchaseCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PurchaseCreate}
4285
+ # @param params [Hash] Optional query string parameters:
4286
+ #
4287
+ # @return [Resources::InvoiceCollection] Returns the authorize invoice
4288
+ #
4289
+ def create_authorize_purchase(body:, **options)
4290
+ path = "/purchases/authorize"
4291
+ post(path, body, Requests::PurchaseCreate, **options)
4292
+ end
4293
+
4294
+ # Capture a purchase
4295
+ #
4296
+ # {https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase create_capture_purchase api documentation}
4297
+ #
4298
+ # @param transaction_id [String] Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
4299
+ # @param params [Hash] Optional query string parameters:
4300
+ #
4301
+ # @return [Resources::InvoiceCollection] Returns the captured invoice
4302
+ #
4303
+ def create_capture_purchase(transaction_id:, **options)
4304
+ path = interpolate_path("/purchases/{transaction_id}/capture", transaction_id: transaction_id)
4305
+ post(path, **options)
4306
+ end
4307
+
4308
+ # Cancel Purchase
4309
+ #
4310
+ # {https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase cancelPurchase api documentation}
4311
+ #
4312
+ # @param transaction_id [String] Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
4313
+ # @param params [Hash] Optional query string parameters:
4314
+ #
4315
+ # @return [Resources::InvoiceCollection] Returns the cancelled invoice
4316
+ #
4317
+ def cancelPurchase(transaction_id:, **options)
4318
+ path = interpolate_path("/purchases/{transaction_id}/cancel/", transaction_id: transaction_id)
4319
+ post(path, **options)
4320
+ end
4321
+
4280
4322
  # List the dates that have an available export to download.
4281
4323
  #
4282
4324
  # {https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates get_export_dates api documentation}
@@ -27,7 +27,7 @@ module Recurly
27
27
  define_attribute :net_terms, Integer
28
28
 
29
29
  # @!attribute net_terms_type
30
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
30
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
31
31
  define_attribute :net_terms_type, String
32
32
 
33
33
  # @!attribute po_number
@@ -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 ProrationSettings < Request
8
+
9
+ # @!attribute charge
10
+ # @return [String] Determines how the amount charged is determined for this change
11
+ define_attribute :charge, String
12
+
13
+ # @!attribute credit
14
+ # @return [String] Determines how the amount credited is determined for this change
15
+ define_attribute :credit, String
16
+ end
17
+ end
18
+ end
@@ -51,7 +51,7 @@ module Recurly
51
51
  define_attribute :net_terms, Integer
52
52
 
53
53
  # @!attribute net_terms_type
54
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
54
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
55
55
  define_attribute :net_terms_type, String
56
56
 
57
57
  # @!attribute po_number
@@ -31,7 +31,7 @@ module Recurly
31
31
  define_attribute :net_terms, Integer
32
32
 
33
33
  # @!attribute net_terms_type
34
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
34
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
35
35
  define_attribute :net_terms_type, String
36
36
 
37
37
  # @!attribute plan_code
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [String] For manual invoicing, this identifies the PO number associated with the subscription.
47
47
  define_attribute :po_number, String
48
48
 
49
+ # @!attribute proration_settings
50
+ # @return [ProrationSettings] Allows you to control how any resulting charges and credits will be calculated and prorated.
51
+ define_attribute :proration_settings, :ProrationSettings
52
+
49
53
  # @!attribute quantity
50
54
  # @return [Integer] Optionally override the default quantity of 1.
51
55
  define_attribute :quantity, Integer
@@ -59,7 +59,7 @@ module Recurly
59
59
  define_attribute :net_terms, Integer
60
60
 
61
61
  # @!attribute net_terms_type
62
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
62
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
63
63
  define_attribute :net_terms_type, String
64
64
 
65
65
  # @!attribute next_bill_date
@@ -35,7 +35,7 @@ module Recurly
35
35
  define_attribute :net_terms, Integer
36
36
 
37
37
  # @!attribute net_terms_type
38
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
38
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
39
39
  define_attribute :net_terms_type, String
40
40
 
41
41
  # @!attribute next_bill_date
@@ -87,7 +87,7 @@ module Recurly
87
87
  define_attribute :net_terms, Integer
88
88
 
89
89
  # @!attribute net_terms_type
90
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
90
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
91
91
  define_attribute :net_terms_type, String
92
92
 
93
93
  # @!attribute number
@@ -111,7 +111,7 @@ module Recurly
111
111
  define_attribute :net_terms, Integer
112
112
 
113
113
  # @!attribute net_terms_type
114
- # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled.
114
+ # @return [String] Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
115
115
  define_attribute :net_terms_type, String
116
116
 
117
117
  # @!attribute object
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.48.1"
2
+ VERSION = "4.50.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -15470,6 +15470,132 @@ paths:
15470
15470
  validation: %v\", e)\n\t\treturn nil, err\n\t}\n\n\tfmt.Printf(\"Unexpected
15471
15471
  Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Created ChargeInvoice
15472
15472
  with UUID: %s.\\n\", collection.ChargeInvoice.Uuid)\n"
15473
+ "/purchases/authorize":
15474
+ post:
15475
+ tags:
15476
+ - purchase
15477
+ operationId: create_authorize_purchase
15478
+ summary: Authorize a purchase
15479
+ description: |-
15480
+ A purchase is a hybrid checkout containing at least one or more subscriptions or one-time charges (adjustments) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. A purchase is only a request data type and is not persistent in Recurly and an invoice collection will be the returned type.
15481
+
15482
+ The authorize endpoint will create a pending purchase that can be activated at a later time once payment has been completed on an external source.
15483
+
15484
+ For additional information regarding shipping fees, please see https://docs.recurly.com/docs/shipping
15485
+ requestBody:
15486
+ content:
15487
+ application/json:
15488
+ schema:
15489
+ "$ref": "#/components/schemas/PurchaseCreate"
15490
+ required: true
15491
+ responses:
15492
+ '200':
15493
+ description: Returns the authorize invoice
15494
+ content:
15495
+ application/json:
15496
+ schema:
15497
+ "$ref": "#/components/schemas/InvoiceCollection"
15498
+ '400':
15499
+ description: Bad request; perhaps missing or invalid parameters.
15500
+ content:
15501
+ application/json:
15502
+ schema:
15503
+ "$ref": "#/components/schemas/Error"
15504
+ '422':
15505
+ description: authorize purchase cannot be completed for the specified reason.
15506
+ content:
15507
+ application/json:
15508
+ schema:
15509
+ "$ref": "#/components/schemas/Error"
15510
+ default:
15511
+ description: Unexpected error.
15512
+ content:
15513
+ application/json:
15514
+ schema:
15515
+ "$ref": "#/components/schemas/Error"
15516
+ x-code-samples: []
15517
+ "/purchases/{transaction_id}/capture":
15518
+ post:
15519
+ tags:
15520
+ - purchase
15521
+ parameters:
15522
+ - "$ref": "#/components/parameters/transaction_id"
15523
+ operationId: create_capture_purchase
15524
+ summary: Capture a purchase
15525
+ description: |-
15526
+ A purchase is a hybrid checkout containing at least one or more
15527
+ subscriptions or one-time charges (adjustments) and supports both coupon
15528
+ and gift card redemptions. All items purchased will be on one invoice
15529
+ and paid for with one transaction. A purchase is only a request data
15530
+ type and is not persistent in Recurly and an invoice collection will be
15531
+ the returned type.
15532
+
15533
+
15534
+ Capture an open Authorization request
15535
+ responses:
15536
+ '200':
15537
+ description: Returns the captured invoice
15538
+ content:
15539
+ application/json:
15540
+ schema:
15541
+ "$ref": "#/components/schemas/InvoiceCollection"
15542
+ '400':
15543
+ description: Bad request; perhaps missing or invalid parameters.
15544
+ content:
15545
+ application/json:
15546
+ schema:
15547
+ "$ref": "#/components/schemas/Error"
15548
+ '422':
15549
+ description: Capture purchase cannot be completed for the specified reason.
15550
+ content:
15551
+ application/json:
15552
+ schema:
15553
+ "$ref": "#/components/schemas/Error"
15554
+ default:
15555
+ description: Unexpected error.
15556
+ content:
15557
+ application/json:
15558
+ schema:
15559
+ "$ref": "#/components/schemas/Error"
15560
+ x-code-samples: []
15561
+ "/purchases/{transaction_id}/cancel/":
15562
+ parameters:
15563
+ - "$ref": "#/components/parameters/transaction_id"
15564
+ post:
15565
+ summary: Cancel Purchase
15566
+ description: |
15567
+ A purchase is a hybrid checkout containing at least one or more subscriptions or one-time charges (adjustments) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. A purchase is only a request data type and is not persistent in Recurly and an invoice collection will be the returned type.
15568
+
15569
+ Cancel an open Authorization request
15570
+ tags:
15571
+ - purchase
15572
+ operationId: cancelPurchase
15573
+ responses:
15574
+ '200':
15575
+ description: Returns the cancelled invoice
15576
+ content:
15577
+ application/json:
15578
+ schema:
15579
+ "$ref": "#/components/schemas/InvoiceCollection"
15580
+ '400':
15581
+ description: Bad request; perhaps missing or invalid parameters.
15582
+ content:
15583
+ application/json:
15584
+ schema:
15585
+ "$ref": "#/components/schemas/Error"
15586
+ '422':
15587
+ description: Cancel purchase cannot be completed for the specified reason.
15588
+ content:
15589
+ application/json:
15590
+ schema:
15591
+ "$ref": "#/components/schemas/Error"
15592
+ default:
15593
+ description: Unexpected error.
15594
+ content:
15595
+ application/json:
15596
+ schema:
15597
+ "$ref": "#/components/schemas/Error"
15598
+ x-code-samples: []
15473
15599
  "/export_dates":
15474
15600
  get:
15475
15601
  tags:
@@ -21127,6 +21253,34 @@ components:
21127
21253
  description: |
21128
21254
  The percentage taken of the monetary amount of usage tracked.
21129
21255
  This can be up to 4 decimal places represented as a string.
21256
+ ProrationSettings:
21257
+ type: object
21258
+ title: Proration Settings
21259
+ description: Allows you to control how any resulting charges and credits will
21260
+ be calculated and prorated.
21261
+ properties:
21262
+ charge:
21263
+ "$ref": "#/components/schemas/ProrationSettingsChargeEnum"
21264
+ credit:
21265
+ "$ref": "#/components/schemas/ProrationSettingsCreditEnum"
21266
+ ProrationSettingsChargeEnum:
21267
+ type: string
21268
+ title: Charge
21269
+ description: Determines how the amount charged is determined for this change
21270
+ default: prorated_amount
21271
+ enum:
21272
+ - full_amount
21273
+ - prorated_amount
21274
+ - none
21275
+ ProrationSettingsCreditEnum:
21276
+ type: string
21277
+ title: Credit
21278
+ description: Determines how the amount credited is determined for this change
21279
+ default: prorated_amount
21280
+ enum:
21281
+ - full_amount
21282
+ - prorated_amount
21283
+ - none
21130
21284
  Settings:
21131
21285
  type: object
21132
21286
  properties:
@@ -22350,6 +22504,8 @@ components:
22350
22504
  description: The new set of ramp intervals for the subscription.
22351
22505
  items:
22352
22506
  "$ref": "#/components/schemas/SubscriptionRampInterval"
22507
+ proration_settings:
22508
+ "$ref": "#/components/schemas/ProrationSettings"
22353
22509
  SubscriptionChangeShippingCreate:
22354
22510
  type: object
22355
22511
  title: Shipping details that will be changed on a subscription
@@ -25178,8 +25334,6 @@ components:
25178
25334
  Optionally supplied string that may be either `net` or `eom` (end-of-month).
25179
25335
  When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
25180
25336
  When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
25181
-
25182
- This field is only available when the EOM Net Terms feature is enabled.
25183
25337
  enum:
25184
25338
  - net
25185
25339
  - eom
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.48.1
4
+ version: 4.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-02 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -201,6 +201,7 @@ files:
201
201
  - lib/recurly/requests/plan_ramp_pricing.rb
202
202
  - lib/recurly/requests/plan_update.rb
203
203
  - lib/recurly/requests/pricing.rb
204
+ - lib/recurly/requests/proration_settings.rb
204
205
  - lib/recurly/requests/purchase_create.rb
205
206
  - lib/recurly/requests/shipping_address_create.rb
206
207
  - lib/recurly/requests/shipping_address_update.rb
@@ -350,8 +351,8 @@ metadata:
350
351
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
351
352
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
352
353
  homepage_uri: https://github.com/recurly/recurly-client-ruby
353
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.48.1
354
- post_install_message:
354
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.50.0
355
+ post_install_message:
355
356
  rdoc_options: []
356
357
  require_paths:
357
358
  - lib
@@ -366,8 +367,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
366
367
  - !ruby/object:Gem::Version
367
368
  version: '0'
368
369
  requirements: []
369
- rubygems_version: 3.4.10
370
- signing_key:
370
+ rubygems_version: 3.0.3.1
371
+ signing_key:
371
372
  specification_version: 4
372
373
  summary: The ruby client for Recurly's V3 API
373
374
  test_files: []