recurly 3.7.0 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +14 -2
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +13 -0
- data/lib/recurly/requests/subscription_add_on_create.rb +4 -0
- data/lib/recurly/resources/subscription_add_on.rb +4 -0
- data/lib/recurly/resources/subscription_change_preview.rb +74 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +70 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e07115aaa76b090899e7a8b3fbd473aa4c3d9b53f1a0c2e6610bb48e3cfd2c0
|
4
|
+
data.tar.gz: 0e9dd8516ed793916175fb8e500894925cfe030f8fa6a3b1457420ab3b23a12f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b159f6322d33ebdac54a9645c9f791c2bbbc22f42b1b398c4f478b657322f001bfc3275870918e2bca88d599d2409fdf3863a485afd0ee5e2d17c67db012362
|
7
|
+
data.tar.gz: 06ed96e99e5e910accf623edd708d36bfa38d439ee4ec7b7e59cdfb8b13cba09e4061ce827e03e66144823c5cd95df4c2741e9e5dd9ee746611ba4a8ef55e817
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [3.
|
3
|
+
## [3.8.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.7.0...HEAD)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Wed Jul 1 02:06:24 UTC 2020 Upgrade API version v2019-10-10 [\#605](https://github.com/recurly/recurly-client-ruby/pull/605) ([douglasmiller](https://github.com/douglasmiller))
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Release 3.8.0 [\#606](https://github.com/recurly/recurly-client-ruby/pull/606) ([douglasmiller](https://github.com/douglasmiller))
|
14
|
+
|
15
|
+
## [3.7.0](https://github.com/recurly/recurly-client-ruby/tree/3.7.0) (2020-06-30)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.6.0...3.7.0)
|
6
18
|
|
7
19
|
**Implemented enhancements:**
|
8
20
|
|
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', '~> 3.
|
8
|
+
gem 'recurly', '~> 3.8'
|
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.
|
@@ -2948,6 +2948,19 @@ module Recurly
|
|
2948
2948
|
delete(path, **options)
|
2949
2949
|
end
|
2950
2950
|
|
2951
|
+
# Preview a new subscription change
|
2952
|
+
#
|
2953
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/preview_subscription_change preview_subscription_change api documenation}
|
2954
|
+
#
|
2955
|
+
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
2956
|
+
# @param body [Requests::SubscriptionChangeCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionChangeCreate}
|
2957
|
+
# @param 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+.
|
2958
|
+
# @return [Resources::SubscriptionChangePreview] A subscription change.
|
2959
|
+
def preview_subscription_change(subscription_id:, body:, **options)
|
2960
|
+
path = interpolate_path("/subscriptions/{subscription_id}/change/preview", subscription_id: subscription_id)
|
2961
|
+
post(path, body, Requests::SubscriptionChangeCreate, **options)
|
2962
|
+
end
|
2963
|
+
|
2951
2964
|
# List a subscription's invoices
|
2952
2965
|
#
|
2953
2966
|
# {https://developers.recurly.com/api/v2019-10-10#operation/list_subscription_invoices list_subscription_invoices api documenation}
|
@@ -6,6 +6,10 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class SubscriptionAddOnCreate < Request
|
8
8
|
|
9
|
+
# @!attribute add_on_source
|
10
|
+
# @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add_on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
|
11
|
+
define_attribute :add_on_source, String
|
12
|
+
|
9
13
|
# @!attribute code
|
10
14
|
# @return [String] Add-on code
|
11
15
|
define_attribute :code, String
|
@@ -10,6 +10,10 @@ module Recurly
|
|
10
10
|
# @return [AddOnMini] Just the important parts.
|
11
11
|
define_attribute :add_on, :AddOnMini
|
12
12
|
|
13
|
+
# @!attribute add_on_source
|
14
|
+
# @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
|
15
|
+
define_attribute :add_on_source, String
|
16
|
+
|
13
17
|
# @!attribute created_at
|
14
18
|
# @return [DateTime] Created at
|
15
19
|
define_attribute :created_at, DateTime
|
@@ -0,0 +1,74 @@
|
|
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 SubscriptionChangePreview < Resource
|
8
|
+
|
9
|
+
# @!attribute activate_at
|
10
|
+
# @return [DateTime] Activated at
|
11
|
+
define_attribute :activate_at, DateTime
|
12
|
+
|
13
|
+
# @!attribute activated
|
14
|
+
# @return [Boolean] Returns `true` if the subscription change is activated.
|
15
|
+
define_attribute :activated, :Boolean
|
16
|
+
|
17
|
+
# @!attribute add_ons
|
18
|
+
# @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
|
19
|
+
define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
|
20
|
+
|
21
|
+
# @!attribute created_at
|
22
|
+
# @return [DateTime] Created at
|
23
|
+
define_attribute :created_at, DateTime
|
24
|
+
|
25
|
+
# @!attribute deleted_at
|
26
|
+
# @return [DateTime] Deleted at
|
27
|
+
define_attribute :deleted_at, DateTime
|
28
|
+
|
29
|
+
# @!attribute id
|
30
|
+
# @return [String] The ID of the Subscription Change.
|
31
|
+
define_attribute :id, String
|
32
|
+
|
33
|
+
# @!attribute invoice_collection
|
34
|
+
# @return [InvoiceCollection] Invoice collection
|
35
|
+
define_attribute :invoice_collection, :InvoiceCollection
|
36
|
+
|
37
|
+
# @!attribute object
|
38
|
+
# @return [String] Object type
|
39
|
+
define_attribute :object, String
|
40
|
+
|
41
|
+
# @!attribute plan
|
42
|
+
# @return [PlanMini] Just the important parts.
|
43
|
+
define_attribute :plan, :PlanMini
|
44
|
+
|
45
|
+
# @!attribute quantity
|
46
|
+
# @return [Integer] Subscription quantity
|
47
|
+
define_attribute :quantity, Integer
|
48
|
+
|
49
|
+
# @!attribute revenue_schedule_type
|
50
|
+
# @return [String] Revenue schedule type
|
51
|
+
define_attribute :revenue_schedule_type, String
|
52
|
+
|
53
|
+
# @!attribute setup_fee_revenue_schedule_type
|
54
|
+
# @return [String] Setup fee revenue schedule type
|
55
|
+
define_attribute :setup_fee_revenue_schedule_type, String
|
56
|
+
|
57
|
+
# @!attribute shipping
|
58
|
+
# @return [SubscriptionShipping] Subscription shipping details
|
59
|
+
define_attribute :shipping, :SubscriptionShipping
|
60
|
+
|
61
|
+
# @!attribute subscription_id
|
62
|
+
# @return [String] The ID of the subscription that is going to be changed.
|
63
|
+
define_attribute :subscription_id, String
|
64
|
+
|
65
|
+
# @!attribute unit_amount
|
66
|
+
# @return [Float] Unit amount
|
67
|
+
define_attribute :unit_amount, Float
|
68
|
+
|
69
|
+
# @!attribute updated_at
|
70
|
+
# @return [DateTime] Updated at
|
71
|
+
define_attribute :updated_at, DateTime
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/lib/recurly/version.rb
CHANGED
data/openapi/api.yaml
CHANGED
@@ -12056,6 +12056,51 @@ paths:
|
|
12056
12056
|
{\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
|
12057
12057
|
Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Removed Subscription
|
12058
12058
|
Change: %v\", subscriptionChange)"
|
12059
|
+
"/sites/{site_id}/subscriptions/{subscription_id}/change/preview":
|
12060
|
+
post:
|
12061
|
+
tags:
|
12062
|
+
- subscription
|
12063
|
+
- subscription_change
|
12064
|
+
operationId: preview_subscription_change
|
12065
|
+
summary: Preview a new subscription change
|
12066
|
+
description: Calling this will not save the subscription change or overwrite
|
12067
|
+
an existing change.
|
12068
|
+
parameters:
|
12069
|
+
- "$ref": "#/components/parameters/site_id"
|
12070
|
+
- "$ref": "#/components/parameters/subscription_id"
|
12071
|
+
requestBody:
|
12072
|
+
content:
|
12073
|
+
application/json:
|
12074
|
+
schema:
|
12075
|
+
"$ref": "#/components/schemas/SubscriptionChangeCreate"
|
12076
|
+
required: true
|
12077
|
+
responses:
|
12078
|
+
'200':
|
12079
|
+
description: A subscription change.
|
12080
|
+
content:
|
12081
|
+
application/json:
|
12082
|
+
schema:
|
12083
|
+
"$ref": "#/components/schemas/SubscriptionChangePreview"
|
12084
|
+
'404':
|
12085
|
+
description: Incorrect site ID.
|
12086
|
+
content:
|
12087
|
+
application/json:
|
12088
|
+
schema:
|
12089
|
+
"$ref": "#/components/schemas/Error"
|
12090
|
+
'422':
|
12091
|
+
description: A validation error such as "Subscription hasn't been changed"
|
12092
|
+
or error running the verification transaction.
|
12093
|
+
content:
|
12094
|
+
application/json:
|
12095
|
+
schema:
|
12096
|
+
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
|
12097
|
+
default:
|
12098
|
+
description: Unexpected error.
|
12099
|
+
content:
|
12100
|
+
application/json:
|
12101
|
+
schema:
|
12102
|
+
"$ref": "#/components/schemas/Error"
|
12103
|
+
x-code-samples: []
|
12059
12104
|
"/sites/{site_id}/subscriptions/{subscription_id}/invoices":
|
12060
12105
|
get:
|
12061
12106
|
tags:
|
@@ -17894,6 +17939,15 @@ components:
|
|
17894
17939
|
maxLength: 13
|
17895
17940
|
add_on:
|
17896
17941
|
"$ref": "#/components/schemas/AddOnMini"
|
17942
|
+
add_on_source:
|
17943
|
+
type: string
|
17944
|
+
title: Add-on source
|
17945
|
+
description: |
|
17946
|
+
Used to determine where the associated add-on data is pulled from. If this value is set to
|
17947
|
+
`plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated
|
17948
|
+
`plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then
|
17949
|
+
the associated add-on data will be pulled from the site's item catalog.
|
17950
|
+
default: plan_add_on
|
17897
17951
|
quantity:
|
17898
17952
|
type: integer
|
17899
17953
|
title: Add-on quantity
|
@@ -17947,6 +18001,15 @@ components:
|
|
17947
18001
|
type: string
|
17948
18002
|
title: Add-on code
|
17949
18003
|
maxLength: 50
|
18004
|
+
add_on_source:
|
18005
|
+
type: string
|
18006
|
+
title: Add-on source
|
18007
|
+
description: |
|
18008
|
+
Used to determine where the associated add-on data is pulled from. If this value is set to
|
18009
|
+
`plan_add_on` or left blank, then add_on data will be pulled from the plan's add-ons. If the associated
|
18010
|
+
`plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then
|
18011
|
+
the associated add-on data will be pulled from the site's item catalog.
|
18012
|
+
default: plan_add_on
|
17950
18013
|
quantity:
|
17951
18014
|
type: integer
|
17952
18015
|
title: Quantity
|
@@ -18245,6 +18308,13 @@ components:
|
|
18245
18308
|
mail order and telephone transactions.
|
18246
18309
|
enum:
|
18247
18310
|
- moto
|
18311
|
+
SubscriptionChangePreview:
|
18312
|
+
allOf:
|
18313
|
+
- "$ref": "#/components/schemas/SubscriptionChange"
|
18314
|
+
type: object
|
18315
|
+
properties:
|
18316
|
+
invoice_collection:
|
18317
|
+
"$ref": "#/components/schemas/InvoiceCollection"
|
18248
18318
|
SubscriptionChangeShippingCreate:
|
18249
18319
|
type: object
|
18250
18320
|
title: Shipping details that will be changed on a subscription
|
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: 3.
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/recurly/resources/subscription_add_on.rb
|
250
250
|
- lib/recurly/resources/subscription_add_on_tier.rb
|
251
251
|
- lib/recurly/resources/subscription_change.rb
|
252
|
+
- lib/recurly/resources/subscription_change_preview.rb
|
252
253
|
- lib/recurly/resources/subscription_shipping.rb
|
253
254
|
- lib/recurly/resources/tax_info.rb
|
254
255
|
- lib/recurly/resources/tier.rb
|
@@ -283,7 +284,7 @@ metadata:
|
|
283
284
|
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
284
285
|
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
285
286
|
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
286
|
-
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.
|
287
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.8.0
|
287
288
|
post_install_message:
|
288
289
|
rdoc_options: []
|
289
290
|
require_paths:
|