recurly 4.11.0 → 4.12.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: d45224bbd99e205cb61df3b688a47b73527e19b0cb12bc1dd64c01fabf035ec6
4
- data.tar.gz: c921de862702509c3b4929c610e4565dc4ad868ba72daa8668781b2162a06362
3
+ metadata.gz: '0876e485b804ec79b1a15203f09ffe4ee5d209775aa21b2c720d6fbf23b0aeb3'
4
+ data.tar.gz: 7cc1dc915610febad9e7fffe2617efdaa6ab27ed01cbac429765d1bbcf32df7a
5
5
  SHA512:
6
- metadata.gz: c3598292853a0f0a551fd653c46ab53cfe223276acf9155eb20dd1a0df1bf6e60d09a7f184838efaff53ecb6b910f33d5c26fe0d4f83efadb8ceadccb37c5708
7
- data.tar.gz: 2c5faf56692a870a199c94baff93aa4017564b32cce82104654b377a04bed36dd7623a90ce7c65a5020d57f4f3361732ddf9d43f1c3860d4d5544eaa4b61237b
6
+ metadata.gz: 4b513a3e05b7b7d01588900fe8ffeef0c01d6b10e95fa8dd3c0738e9786705cdcbffe4c1e8604983de8b4fc5e17fd884e24e5b12dc2cdf407ceacd6119f165fa
7
+ data.tar.gz: 5c0e860427fa02b6fbb4f31afe6d7ddee1bc842af631a380e85cde67a7d0dfa4ba3bc9a983b310d6060d32198f530d8a8bc706240ea33bda7ae11f9144bdcc44
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.11.0
2
+ current_version = 4.12.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.12.0](https://github.com/recurly/recurly-client-ruby/tree/4.12.0) (2022-01-28)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.11.0...4.12.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#746](https://github.com/recurly/recurly-client-ruby/pull/746) ([recurly-integrations](https://github.com/recurly-integrations))
11
+ - Generated Latest Changes for v2021-02-25 [#743](https://github.com/recurly/recurly-client-ruby/pull/743) ([recurly-integrations](https://github.com/recurly-integrations))
12
+
13
+
14
+
3
15
  ## [4.11.0](https://github.com/recurly/recurly-client-ruby/tree/4.11.0) (2021-12-29)
4
16
 
5
17
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.10.0...4.11.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.11'
8
+ gem 'recurly', '~> 4.12'
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.
@@ -1712,6 +1712,49 @@ module Recurly
1712
1712
  get(path, **options)
1713
1713
  end
1714
1714
 
1715
+ # List an invoice template's associated accounts
1716
+ #
1717
+ # {https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts list_invoice_template_accounts api documenation}
1718
+ #
1719
+ # @param invoice_template_id [String] Invoice template ID.
1720
+ # @param params [Hash] Optional query string parameters:
1721
+ # :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
1722
+ # commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
1723
+ #
1724
+ # *Important notes:*
1725
+ #
1726
+ # * The +ids+ parameter cannot be used with any other ordering or filtering
1727
+ # parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
1728
+ # * Invalid or unknown IDs will be ignored, so you should check that the
1729
+ # results correspond to your request.
1730
+ # * Records are returned in an arbitrary order. Since results are all
1731
+ # returned at once you can sort the records yourself.
1732
+ #
1733
+ # :limit [Integer] Limit number of records 1-200.
1734
+ # :order [String] Sort order.
1735
+ # :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
1736
+ # order. In descending order updated records will move behind the cursor and could
1737
+ # prevent some records from being returned.
1738
+ #
1739
+ # :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1740
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1741
+ #
1742
+ # :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1743
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1744
+ #
1745
+ # :email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
1746
+ # :subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
1747
+ # +canceled+, or +future+ state.
1748
+ #
1749
+ # :past_due [String] Filter for accounts with an invoice in the +past_due+ state.
1750
+ #
1751
+ # @return [Pager<Resources::Account>] A list of an invoice template's associated accounts.
1752
+ #
1753
+ def list_invoice_template_accounts(invoice_template_id:, **options)
1754
+ path = interpolate_path("/invoice_templates/{invoice_template_id}/accounts", invoice_template_id: invoice_template_id)
1755
+ pager(path, **options)
1756
+ end
1757
+
1715
1758
  # List a site's items
1716
1759
  #
1717
1760
  # {https://developers.recurly.com/api/v2021-02-25#operation/list_items list_items api documenation}
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [String]
55
55
  define_attribute :first_name, String
56
56
 
57
+ # @!attribute invoice_template_id
58
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
59
+ define_attribute :invoice_template_id, String
60
+
57
61
  # @!attribute last_name
58
62
  # @return [String]
59
63
  define_attribute :last_name, String
@@ -58,6 +58,10 @@ module Recurly
58
58
  # @return [String] Optional, but if present allows an existing account to be used and updated as part of the purchase.
59
59
  define_attribute :id, String
60
60
 
61
+ # @!attribute invoice_template_id
62
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
63
+ define_attribute :invoice_template_id, String
64
+
61
65
  # @!attribute last_name
62
66
  # @return [String]
63
67
  define_attribute :last_name, String
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [String]
47
47
  define_attribute :first_name, String
48
48
 
49
+ # @!attribute invoice_template_id
50
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
51
+ define_attribute :invoice_template_id, String
52
+
49
53
  # @!attribute last_name
50
54
  # @return [String]
51
55
  define_attribute :last_name, String
@@ -39,11 +39,11 @@ module Recurly
39
39
  define_attribute :display_quantity, :Boolean
40
40
 
41
41
  # @!attribute item_code
42
- # @return [String] Unique code to identify an item. Available when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
42
+ # @return [String] Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
43
43
  define_attribute :item_code, String
44
44
 
45
45
  # @!attribute item_id
46
- # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
46
+ # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
47
47
  define_attribute :item_id, String
48
48
 
49
49
  # @!attribute measured_unit_id
@@ -111,7 +111,7 @@ module Recurly
111
111
  define_attribute :transaction_type, String
112
112
 
113
113
  # @!attribute type
114
- # @return [String] The payment method type for a non-credit card based billing info. The value of `bacs` is the only accepted value (Bacs only)
114
+ # @return [String] The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values.
115
115
  define_attribute :type, String
116
116
 
117
117
  # @!attribute vat_number
@@ -35,11 +35,11 @@ module Recurly
35
35
  define_attribute :end_date, DateTime
36
36
 
37
37
  # @!attribute item_code
38
- # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
38
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
39
39
  define_attribute :item_code, String
40
40
 
41
41
  # @!attribute item_id
42
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
42
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
43
43
  define_attribute :item_id, String
44
44
 
45
45
  # @!attribute origin
@@ -90,6 +90,10 @@ module Recurly
90
90
  # @return [String]
91
91
  define_attribute :id, String
92
92
 
93
+ # @!attribute invoice_template
94
+ # @return [AccountInvoiceTemplate] Invoice template associated to the account. Available when invoice customization flag is enabled.
95
+ define_attribute :invoice_template, :AccountInvoiceTemplate
96
+
93
97
  # @!attribute last_name
94
98
  # @return [String]
95
99
  define_attribute :last_name, String
@@ -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 AccountInvoiceTemplate < Resource
8
+
9
+ # @!attribute id
10
+ # @return [String] Unique ID to identify the invoice template.
11
+ define_attribute :id, String
12
+
13
+ # @!attribute name
14
+ # @return [String] Template name
15
+ define_attribute :name, String
16
+ end
17
+ end
18
+ end
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :end_date, DateTime
68
68
 
69
69
  # @!attribute external_sku
70
- # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
70
+ # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
71
71
  define_attribute :external_sku, String
72
72
 
73
73
  # @!attribute id
@@ -83,11 +83,11 @@ module Recurly
83
83
  define_attribute :invoice_number, String
84
84
 
85
85
  # @!attribute item_code
86
- # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
86
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
87
87
  define_attribute :item_code, String
88
88
 
89
89
  # @!attribute item_id
90
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
90
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
91
91
  define_attribute :item_id, String
92
92
 
93
93
  # @!attribute legacy_category
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.11.0"
2
+ VERSION = "4.12.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -232,7 +232,7 @@ tags:
232
232
  description: |-
233
233
  For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items".
234
234
 
235
- Recurly's item catalog requires the Credit Invoices and Subscription Billing Terms features to be enabled.
235
+ Recurly's item catalog requires the Credit Invoices features to be enabled.
236
236
  - name: plan
237
237
  x-displayName: Plan
238
238
  description: A plan tells Recurly how often and how much to charge your customers.
@@ -6337,6 +6337,51 @@ paths:
6337
6337
  {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
6338
6338
  Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Custom
6339
6339
  Field Definition: %s\", definition.Id)"
6340
+ "/invoice_templates/{invoice_template_id}/accounts":
6341
+ get:
6342
+ tags:
6343
+ - account
6344
+ operationId: list_invoice_template_accounts
6345
+ summary: List an invoice template's associated accounts
6346
+ description: See the [Pagination Guide](/guides/pagination.html) to learn how
6347
+ to use pagination in the API and Client Libraries.
6348
+ parameters:
6349
+ - "$ref": "#/components/parameters/invoice_template_id"
6350
+ - "$ref": "#/components/parameters/ids"
6351
+ - "$ref": "#/components/parameters/limit"
6352
+ - "$ref": "#/components/parameters/order"
6353
+ - "$ref": "#/components/parameters/sort_dates"
6354
+ - "$ref": "#/components/parameters/filter_begin_time"
6355
+ - "$ref": "#/components/parameters/filter_end_time"
6356
+ - "$ref": "#/components/parameters/filter_account_email"
6357
+ - "$ref": "#/components/parameters/filter_account_subscriber"
6358
+ - "$ref": "#/components/parameters/filter_account_past_due"
6359
+ responses:
6360
+ '200':
6361
+ description: A list of an invoice template's associated accounts.
6362
+ content:
6363
+ application/json:
6364
+ schema:
6365
+ "$ref": "#/components/schemas/AccountList"
6366
+ '400':
6367
+ description: Invalid or unpermitted parameter.
6368
+ content:
6369
+ application/json:
6370
+ schema:
6371
+ "$ref": "#/components/schemas/Error"
6372
+ '404':
6373
+ description: Incorrect site or invoice template ID.
6374
+ content:
6375
+ application/json:
6376
+ schema:
6377
+ "$ref": "#/components/schemas/Error"
6378
+ default:
6379
+ description: Unexpected error.
6380
+ content:
6381
+ application/json:
6382
+ schema:
6383
+ "$ref": "#/components/schemas/Error"
6384
+ x-code-samples: []
6340
6385
  "/items":
6341
6386
  get:
6342
6387
  tags:
@@ -14614,6 +14659,13 @@ components:
14614
14659
  required: true
14615
14660
  schema:
14616
14661
  type: string
14662
+ invoice_template_id:
14663
+ name: invoice_template_id
14664
+ in: path
14665
+ description: Invoice template ID.
14666
+ required: true
14667
+ schema:
14668
+ type: string
14617
14669
  item_id:
14618
14670
  name: item_id
14619
14671
  in: path
@@ -15456,6 +15508,12 @@ components:
15456
15508
  dunning campaign should be assigned to this account. For sites without
15457
15509
  multiple dunning campaigns enabled, the default dunning campaign will
15458
15510
  always be used.
15511
+ invoice_template_id:
15512
+ type: string
15513
+ title: Invoice Template ID
15514
+ description: Unique ID to identify an invoice template. Available when
15515
+ the Invoice Customization feature is enabled. Used to specify which invoice
15516
+ template, if any, should be used to generate invoices for the account.
15459
15517
  address:
15460
15518
  "$ref": "#/components/schemas/Address"
15461
15519
  billing_info:
@@ -15540,6 +15598,8 @@ components:
15540
15598
  "$ref": "#/components/schemas/BillingInfo"
15541
15599
  custom_fields:
15542
15600
  "$ref": "#/components/schemas/CustomFields"
15601
+ invoice_template:
15602
+ "$ref": "#/components/schemas/AccountInvoiceTemplate"
15543
15603
  AccountNote:
15544
15604
  type: object
15545
15605
  required:
@@ -15636,6 +15696,20 @@ components:
15636
15696
  format: float
15637
15697
  title: Amount
15638
15698
  description: Total amount the account is past due.
15699
+ AccountInvoiceTemplate:
15700
+ type: object
15701
+ title: Invoice Template
15702
+ description: Invoice template associated to the account. Available when invoice
15703
+ customization flag is enabled.
15704
+ properties:
15705
+ id:
15706
+ type: string
15707
+ title: ID
15708
+ description: Unique ID to identify the invoice template.
15709
+ name:
15710
+ type: string
15711
+ title: Name
15712
+ description: Template name
15639
15713
  InvoiceAddress:
15640
15714
  allOf:
15641
15715
  - "$ref": "#/components/schemas/Address"
@@ -15900,16 +15974,16 @@ components:
15900
15974
  type: string
15901
15975
  title: Item Code
15902
15976
  description: Unique code to identify an item. Available when the `Credit
15903
- Invoices` and `Subscription Billing Terms` features are enabled. If `item_id`
15904
- and `item_code` are both present, `item_id` will be used.
15977
+ Invoices` feature are enabled. If `item_id` and `item_code` are both present,
15978
+ `item_id` will be used.
15905
15979
  pattern: "/^[a-z0-9_+-]+$/"
15906
15980
  maxLength: 50
15907
15981
  item_id:
15908
15982
  type: string
15909
15983
  title: Item ID
15910
15984
  description: System-generated unique identifier for an item. Available when
15911
- the `Credit Invoices` and `Subscription Billing Terms` features are enabled.
15912
- If `item_id` and `item_code` are both present, `item_id` will be used.
15985
+ the `Credit Invoices` feature is enabled. If `item_id` and `item_code`
15986
+ are both present, `item_id` will be used.
15913
15987
  maxLength: 13
15914
15988
  code:
15915
15989
  type: string
@@ -17888,20 +17962,20 @@ components:
17888
17962
  type: string
17889
17963
  title: Item Code
17890
17964
  description: Unique code to identify an item. Available when the Credit
17891
- Invoices and Subscription Billing Terms features are enabled.
17965
+ Invoices feature is enabled.
17892
17966
  pattern: "/^[a-z0-9_+-]+$/"
17893
17967
  maxLength: 50
17894
17968
  item_id:
17895
17969
  type: string
17896
17970
  title: Item ID
17897
17971
  description: System-generated unique identifier for an item. Available when
17898
- the Credit Invoices and Subscription Billing Terms features are enabled.
17972
+ the Credit Invoices feature is enabled.
17899
17973
  maxLength: 13
17900
17974
  external_sku:
17901
17975
  type: string
17902
17976
  title: External SKU
17903
17977
  description: Optional Stock Keeping Unit assigned to an item. Available
17904
- when the Credit Invoices and Subscription Billing Terms features are enabled.
17978
+ when the Credit Invoices feature is enabled.
17905
17979
  maxLength: 50
17906
17980
  revenue_schedule_type:
17907
17981
  title: Revenue schedule type
@@ -18204,14 +18278,14 @@ components:
18204
18278
  type: string
18205
18279
  title: Item Code
18206
18280
  description: Unique code to identify an item. Available when the Credit
18207
- Invoices and Subscription Billing Terms features are enabled.
18281
+ Invoices feature is enabled.
18208
18282
  pattern: "/^[a-z0-9_+-]+$/"
18209
18283
  maxLength: 50
18210
18284
  item_id:
18211
18285
  type: string
18212
18286
  title: Item ID
18213
18287
  description: System-generated unique identifier for an item. Available when
18214
- the Credit Invoices and Subscription Billing Terms features are enabled.
18288
+ the Credit Invoices feature is enabled.
18215
18289
  maxLength: 13
18216
18290
  revenue_schedule_type:
18217
18291
  title: Revenue schedule type
@@ -22160,9 +22234,10 @@ components:
22160
22234
  AchTypeEnum:
22161
22235
  type: string
22162
22236
  description: The payment method type for a non-credit card based billing info.
22163
- The value of `bacs` is the only accepted value (Bacs only)
22237
+ `bacs` and `becs` are the only accepted values.
22164
22238
  enum:
22165
22239
  - bacs
22240
+ - becs
22166
22241
  AchAccountTypeEnum:
22167
22242
  type: string
22168
22243
  description: The bank account type. (ACH only)
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.11.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -212,6 +212,7 @@ files:
212
212
  - lib/recurly/resources/account_acquisition_cost.rb
213
213
  - lib/recurly/resources/account_balance.rb
214
214
  - lib/recurly/resources/account_balance_amount.rb
215
+ - lib/recurly/resources/account_invoice_template.rb
215
216
  - lib/recurly/resources/account_mini.rb
216
217
  - lib/recurly/resources/account_note.rb
217
218
  - lib/recurly/resources/add_on.rb
@@ -302,7 +303,7 @@ metadata:
302
303
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
303
304
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
304
305
  homepage_uri: https://github.com/recurly/recurly-client-ruby
305
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.11.0
306
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.12.0
306
307
  post_install_message:
307
308
  rdoc_options: []
308
309
  require_paths: