recurly 3.8.0 → 3.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -2
  3. data/CHANGELOG.md +64 -2
  4. data/CODE_OF_CONDUCT.md +130 -0
  5. data/CONTRIBUTING.md +4 -0
  6. data/GETTING_STARTED.md +1 -1
  7. data/README.md +3 -0
  8. data/lib/recurly/client/operations.rb +399 -56
  9. data/lib/recurly/errors/api_errors.rb +59 -17
  10. data/lib/recurly/requests/add_on_create.rb +29 -1
  11. data/lib/recurly/requests/add_on_update.rb +20 -0
  12. data/lib/recurly/requests/coupon_create.rb +1 -1
  13. data/lib/recurly/requests/item_create.rb +8 -0
  14. data/lib/recurly/requests/item_update.rb +8 -0
  15. data/lib/recurly/requests/line_item_create.rb +9 -1
  16. data/lib/recurly/requests/measured_unit_create.rb +22 -0
  17. data/lib/recurly/requests/measured_unit_update.rb +22 -0
  18. data/lib/recurly/requests/plan_create.rb +8 -0
  19. data/lib/recurly/requests/plan_update.rb +8 -0
  20. data/lib/recurly/requests/shipping_purchase.rb +1 -1
  21. data/lib/recurly/requests/subscription_add_on_create.rb +6 -2
  22. data/lib/recurly/requests/subscription_add_on_update.rb +9 -1
  23. data/lib/recurly/requests/subscription_change_create.rb +5 -1
  24. data/lib/recurly/requests/subscription_purchase.rb +4 -0
  25. data/lib/recurly/requests/usage_create.rb +26 -0
  26. data/lib/recurly/resources/add_on.rb +24 -0
  27. data/lib/recurly/resources/add_on_mini.rb +16 -0
  28. data/lib/recurly/resources/coupon.rb +9 -1
  29. data/lib/recurly/resources/export_dates.rb +18 -0
  30. data/lib/recurly/resources/export_file.rb +22 -0
  31. data/lib/recurly/resources/export_files.rb +18 -0
  32. data/lib/recurly/resources/item.rb +8 -0
  33. data/lib/recurly/resources/line_item.rb +8 -0
  34. data/lib/recurly/resources/measured_unit.rb +46 -0
  35. data/lib/recurly/resources/plan.rb +8 -0
  36. data/lib/recurly/resources/subscription_add_on.rb +5 -1
  37. data/lib/recurly/resources/subscription_change.rb +8 -0
  38. data/lib/recurly/resources/subscription_change_preview.rb +5 -1
  39. data/lib/recurly/resources/unique_coupon_code.rb +8 -0
  40. data/lib/recurly/resources/usage.rb +70 -0
  41. data/lib/recurly/version.rb +1 -1
  42. data/openapi/api.yaml +1420 -145
  43. metadata +15 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e07115aaa76b090899e7a8b3fbd473aa4c3d9b53f1a0c2e6610bb48e3cfd2c0
4
- data.tar.gz: 0e9dd8516ed793916175fb8e500894925cfe030f8fa6a3b1457420ab3b23a12f
3
+ metadata.gz: 7c48112c86ab321b7bb9d86cfcccf0e1189cd202c83a075c4432b7c626364a07
4
+ data.tar.gz: 7e43cc5263d62818e7520468a23de1e8a7f80cf7d3060a9e08651aeb7c424e82
5
5
  SHA512:
6
- metadata.gz: 1b159f6322d33ebdac54a9645c9f791c2bbbc22f42b1b398c4f478b657322f001bfc3275870918e2bca88d599d2409fdf3863a485afd0ee5e2d17c67db012362
7
- data.tar.gz: 06ed96e99e5e910accf623edd708d36bfa38d439ee4ec7b7e59cdfb8b13cba09e4061ce827e03e66144823c5cd95df4c2741e9e5dd9ee746611ba4a8ef55e817
6
+ metadata.gz: d5e0f86d3a84696d2f3b23bb19ecd5188f49befd73350e2db32a2aa833e0e0c94e1ad1dbcf20d1f0ed964b1e0e1c8b581038c3beece02e452e7e81878e47bc5e
7
+ data.tar.gz: 0c4f56e756ded152b7a25399168a4a595c003678f52ef14cce0c7e41d3f716aff94fc9b21d5cec9ce4ab9d95b0ae160bcba210b75fa4941fc67f5ebe2f4c268f
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.8.0
2
+ current_version = 3.13.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
@@ -13,4 +13,3 @@ serialize =
13
13
  [bumpversion:file:GETTING_STARTED.md]
14
14
  parse = (?P<major>\d+)\.(?P<minor>\d+)
15
15
  serialize = {major}.{minor}
16
-
@@ -1,8 +1,70 @@
1
1
  # Changelog
2
2
 
3
- ## [3.8.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
3
+ ## [3.13.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.7.0...HEAD)
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.12.0...HEAD)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Latest Changes for 2019-10-10 \(Automated Exports, additional resource data attributes\) [\#638](https://github.com/recurly/recurly-client-ruby/pull/638) ([douglasmiller](https://github.com/douglasmiller))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Release 3.13.0 [\#639](https://github.com/recurly/recurly-client-ruby/pull/639) ([douglasmiller](https://github.com/douglasmiller))
14
+
15
+ ## [3.12.0](https://github.com/recurly/recurly-client-ruby/tree/3.12.0) (2020-08-31)
16
+
17
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.11.0...3.12.0)
18
+
19
+ **Implemented enhancements:**
20
+
21
+ - Mon Aug 31 19:44:58 UTC 2020 Upgrade API version v2019-10-10 [\#632](https://github.com/recurly/recurly-client-ruby/pull/632) ([douglasmiller](https://github.com/douglasmiller))
22
+
23
+ **Merged pull requests:**
24
+
25
+ - Release 3.12.0 [\#633](https://github.com/recurly/recurly-client-ruby/pull/633) ([douglasmiller](https://github.com/douglasmiller))
26
+ - Code of Conduct [\#631](https://github.com/recurly/recurly-client-ruby/pull/631) ([bhelx](https://github.com/bhelx))
27
+
28
+ ## [3.11.0](https://github.com/recurly/recurly-client-ruby/tree/3.11.0) (2020-08-21)
29
+
30
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.10.0...3.11.0)
31
+
32
+ **Implemented enhancements:**
33
+
34
+ - Fri Aug 21 16:17:28 UTC 2020 Upgrade API version v2019-10-10 [\#629](https://github.com/recurly/recurly-client-ruby/pull/629) ([douglasmiller](https://github.com/douglasmiller))
35
+
36
+ **Merged pull requests:**
37
+
38
+ - Release 3.11.0 [\#630](https://github.com/recurly/recurly-client-ruby/pull/630) ([douglasmiller](https://github.com/douglasmiller))
39
+
40
+ ## [3.10.0](https://github.com/recurly/recurly-client-ruby/tree/3.10.0) (2020-07-31)
41
+
42
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.9.0...3.10.0)
43
+
44
+ **Implemented enhancements:**
45
+
46
+ - Latest Changes for 2019-10-10 \(usage, measured units, etc\) [\#621](https://github.com/recurly/recurly-client-ruby/pull/621) ([bhelx](https://github.com/bhelx))
47
+ - Adding hierarchical errors [\#610](https://github.com/recurly/recurly-client-ruby/pull/610) ([douglasmiller](https://github.com/douglasmiller))
48
+
49
+ **Merged pull requests:**
50
+
51
+ - Release 3.10.0 [\#623](https://github.com/recurly/recurly-client-ruby/pull/623) ([douglasmiller](https://github.com/douglasmiller))
52
+
53
+ ## [3.9.0](https://github.com/recurly/recurly-client-ruby/tree/3.9.0) (2020-07-06)
54
+
55
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.8.0...3.9.0)
56
+
57
+ **Implemented enhancements:**
58
+
59
+ - Mon Jul 6 14:48:05 UTC 2020 Upgrade API version v2019-10-10 [\#608](https://github.com/recurly/recurly-client-ruby/pull/608) ([douglasmiller](https://github.com/douglasmiller))
60
+
61
+ **Merged pull requests:**
62
+
63
+ - Release 3.9.0 [\#609](https://github.com/recurly/recurly-client-ruby/pull/609) ([douglasmiller](https://github.com/douglasmiller))
64
+
65
+ ## [3.8.0](https://github.com/recurly/recurly-client-ruby/tree/3.8.0) (2020-07-01)
66
+
67
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.7.0...3.8.0)
6
68
 
7
69
  **Implemented enhancements:**
8
70
 
@@ -0,0 +1,130 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, religion, or sexual identity
11
+ and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the
27
+ overall community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or
32
+ advances of any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email
36
+ address, without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ dx@recurly.com.
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.0, available at
120
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
121
+
122
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
123
+ enforcement ladder](https://github.com/mozilla/diversity).
124
+
125
+ [homepage]: https://www.contributor-covenant.org
126
+
127
+ For answers to common questions about this code of conduct, see the FAQ at
128
+ https://www.contributor-covenant.org/faq. Translations are available at
129
+ https://www.contributor-covenant.org/translations.
130
+
@@ -7,6 +7,10 @@ however, we may not get to these right away. Although we try to be quick, our pr
7
7
  writing code. If you want a timely response (especially if you have an emergency), we recommend
8
8
  you contact our [official support team](https://support.recurly.com/).
9
9
 
10
+ ## Code of Conduct
11
+
12
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
13
+
10
14
  #### Table Of Contents
11
15
 
12
16
  * [I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
@@ -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'
8
+ gem 'recurly', '~> 3.13'
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.
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Recurly
2
2
 
3
+ [![Rubygems](https://img.shields.io/static/v1?label=rubygems&message=recurly&color=purple)](https://rubygems.org/gems/recurly)
4
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
5
+
3
6
  This repository houses the official ruby client for Recurly's V3 API.
4
7
 
5
8
  > *Note*:
@@ -31,6 +31,7 @@ module Recurly
31
31
  # prevent some records from being returned.
32
32
  #
33
33
  # @param state [String] Filter by state.
34
+ #
34
35
  # @return [Pager<Resources::Site>] A list of sites.
35
36
  # @example
36
37
  # sites = @client.list_sites(limit: 200)
@@ -48,6 +49,7 @@ module Recurly
48
49
  # {https://developers.recurly.com/api/v2019-10-10#operation/get_site get_site api documenation}
49
50
  #
50
51
  # @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+.
52
+ #
51
53
  # @return [Resources::Site] A site.
52
54
  # @example
53
55
  # begin
@@ -86,10 +88,10 @@ module Recurly
86
88
  # order. In descending order updated records will move behind the cursor and could
87
89
  # prevent some records from being returned.
88
90
  #
89
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
91
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
90
92
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
91
93
  #
92
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
94
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
93
95
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
94
96
  #
95
97
  # @param 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.
@@ -98,6 +100,7 @@ module Recurly
98
100
  #
99
101
  # @param past_due [String] Filter for accounts with an invoice in the +past_due+ state.
100
102
  # @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+.
103
+ #
101
104
  # @return [Pager<Resources::Account>] A list of the site's accounts.
102
105
  # @example
103
106
  # accounts = @client.list_accounts(limit: 200)
@@ -116,6 +119,7 @@ module Recurly
116
119
  #
117
120
  # @param body [Requests::AccountCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountCreate}
118
121
  # @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+.
122
+ #
119
123
  # @return [Resources::Account] An account.
120
124
  # @example
121
125
  # begin
@@ -164,6 +168,7 @@ module Recurly
164
168
  #
165
169
  # @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+.
166
170
  # @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+.
171
+ #
167
172
  # @return [Resources::Account] An account.
168
173
  # @example
169
174
  # begin
@@ -187,6 +192,7 @@ module Recurly
187
192
  # @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+.
188
193
  # @param body [Requests::AccountUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountUpdate}
189
194
  # @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+.
195
+ #
190
196
  # @return [Resources::Account] An account.
191
197
  # @example
192
198
  # begin
@@ -216,6 +222,7 @@ module Recurly
216
222
  #
217
223
  # @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+.
218
224
  # @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+.
225
+ #
219
226
  # @return [Resources::Account] An account.
220
227
  # @example
221
228
  # begin
@@ -238,6 +245,7 @@ module Recurly
238
245
  #
239
246
  # @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+.
240
247
  # @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+.
248
+ #
241
249
  # @return [Resources::AccountAcquisition] An account's acquisition data.
242
250
  # @example
243
251
  # begin
@@ -261,6 +269,7 @@ module Recurly
261
269
  # @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+.
262
270
  # @param body [Requests::AccountAcquisitionUpdatable] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountAcquisitionUpdatable}
263
271
  # @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+.
272
+ #
264
273
  # @return [Resources::AccountAcquisition] An account's updated acquisition data.
265
274
  # @example
266
275
  # begin
@@ -295,6 +304,7 @@ module Recurly
295
304
  #
296
305
  # @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+.
297
306
  # @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+.
307
+ #
298
308
  # @return [Resources::Empty] Acquisition data was succesfully deleted.
299
309
  # @example
300
310
  # begin
@@ -317,6 +327,7 @@ module Recurly
317
327
  #
318
328
  # @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+.
319
329
  # @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+.
330
+ #
320
331
  # @return [Resources::Account] An account.
321
332
  # @example
322
333
  # begin
@@ -339,6 +350,7 @@ module Recurly
339
350
  #
340
351
  # @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+.
341
352
  # @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+.
353
+ #
342
354
  # @return [Resources::AccountBalance] An account's balance.
343
355
  # @example
344
356
  # begin
@@ -361,6 +373,7 @@ module Recurly
361
373
  #
362
374
  # @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+.
363
375
  # @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+.
376
+ #
364
377
  # @return [Resources::BillingInfo] An account's billing information.
365
378
  # @example
366
379
  # begin
@@ -384,6 +397,7 @@ module Recurly
384
397
  # @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+.
385
398
  # @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
386
399
  # @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+.
400
+ #
387
401
  # @return [Resources::BillingInfo] Updated billing information.
388
402
  # @example
389
403
  # begin
@@ -413,6 +427,7 @@ module Recurly
413
427
  #
414
428
  # @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+.
415
429
  # @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+.
430
+ #
416
431
  # @return [Resources::Empty] Billing information deleted
417
432
  # @example
418
433
  # begin
@@ -450,13 +465,14 @@ module Recurly
450
465
  # order. In descending order updated records will move behind the cursor and could
451
466
  # prevent some records from being returned.
452
467
  #
453
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
468
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
454
469
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
455
470
  #
456
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
471
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
457
472
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
458
473
  #
459
474
  # @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+.
475
+ #
460
476
  # @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on an account.
461
477
  # @example
462
478
  # redemptions = @client.list_account_coupon_redemptions(
@@ -478,6 +494,7 @@ module Recurly
478
494
  #
479
495
  # @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+.
480
496
  # @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+.
497
+ #
481
498
  # @return [Resources::CouponRedemption] An active coupon redemption on an account.
482
499
  # @example
483
500
  # begin
@@ -501,6 +518,7 @@ module Recurly
501
518
  # @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+.
502
519
  # @param body [Requests::CouponRedemptionCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponRedemptionCreate}
503
520
  # @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+.
521
+ #
504
522
  # @return [Resources::CouponRedemption] Returns the new coupon redemption.
505
523
  # @example
506
524
  # begin
@@ -530,6 +548,7 @@ module Recurly
530
548
  #
531
549
  # @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+.
532
550
  # @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+.
551
+ #
533
552
  # @return [Resources::CouponRedemption] Coupon redemption deleted.
534
553
  # @example
535
554
  # begin
@@ -557,13 +576,14 @@ module Recurly
557
576
  # order. In descending order updated records will move behind the cursor and could
558
577
  # prevent some records from being returned.
559
578
  #
560
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
579
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
561
580
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
562
581
  #
563
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
582
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
564
583
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
565
584
  #
566
585
  # @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+.
586
+ #
567
587
  # @return [Pager<Resources::CreditPayment>] A list of the account's credit payments.
568
588
  # @example
569
589
  # payments = @client.list_account_credit_payments(
@@ -602,10 +622,10 @@ module Recurly
602
622
  # order. In descending order updated records will move behind the cursor and could
603
623
  # prevent some records from being returned.
604
624
  #
605
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
625
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
606
626
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
607
627
  #
608
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
628
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
609
629
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
610
630
  #
611
631
  # @param type [String] Filter by type when:
@@ -615,6 +635,7 @@ module Recurly
615
635
  # - +type=legacy+, only legacy invoices will be returned.
616
636
  #
617
637
  # @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+.
638
+ #
618
639
  # @return [Pager<Resources::Invoice>] A list of the account's invoices.
619
640
  # @example
620
641
  # invoices = @client.list_account_invoices(
@@ -637,6 +658,7 @@ module Recurly
637
658
  # @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+.
638
659
  # @param body [Requests::InvoiceCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCreate}
639
660
  # @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+.
661
+ #
640
662
  # @return [Resources::InvoiceCollection] Returns the new invoices.
641
663
  # @example
642
664
  # begin
@@ -667,6 +689,7 @@ module Recurly
667
689
  # @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+.
668
690
  # @param body [Requests::InvoiceCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCreate}
669
691
  # @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+.
692
+ #
670
693
  # @return [Resources::InvoiceCollection] Returns the invoice previews.
671
694
  # @example
672
695
  # begin
@@ -713,16 +736,17 @@ module Recurly
713
736
  # order. In descending order updated records will move behind the cursor and could
714
737
  # prevent some records from being returned.
715
738
  #
716
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
739
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
717
740
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
718
741
  #
719
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
742
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
720
743
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
721
744
  #
722
745
  # @param original [String] Filter by original field.
723
746
  # @param state [String] Filter by state field.
724
747
  # @param type [String] Filter by type field.
725
748
  # @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+.
749
+ #
726
750
  # @return [Pager<Resources::LineItem>] A list of the account's line items.
727
751
  # @example
728
752
  # line_items = @client.list_account_line_items(
@@ -745,6 +769,7 @@ module Recurly
745
769
  # @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+.
746
770
  # @param body [Requests::LineItemCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::LineItemCreate}
747
771
  # @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+.
772
+ #
748
773
  # @return [Resources::LineItem] Returns the new line item.
749
774
  # @example
750
775
  # begin
@@ -787,6 +812,7 @@ module Recurly
787
812
  # returned at once you can sort the records yourself.
788
813
  #
789
814
  # @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+.
815
+ #
790
816
  # @return [Pager<Resources::AccountNote>] A list of an account's notes.
791
817
  # @example
792
818
  # account_notes = @client.list_account_notes(account_id: account_id, limit: 200)
@@ -806,6 +832,7 @@ module Recurly
806
832
  # @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+.
807
833
  # @param account_note_id [String] Account Note ID.
808
834
  # @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+.
835
+ #
809
836
  # @return [Resources::AccountNote] An account note.
810
837
  # @example
811
838
  # begin
@@ -848,13 +875,14 @@ module Recurly
848
875
  # order. In descending order updated records will move behind the cursor and could
849
876
  # prevent some records from being returned.
850
877
  #
851
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
878
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
852
879
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
853
880
  #
854
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
881
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
855
882
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
856
883
  #
857
884
  # @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+.
885
+ #
858
886
  # @return [Pager<Resources::ShippingAddress>] A list of an account's shipping addresses.
859
887
  # @example
860
888
  # shipping_addresses = @client.list_shipping_addresses(
@@ -877,6 +905,7 @@ module Recurly
877
905
  # @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+.
878
906
  # @param body [Requests::ShippingAddressCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingAddressCreate}
879
907
  # @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+.
908
+ #
880
909
  # @return [Resources::ShippingAddress] Returns the new shipping address.
881
910
  # @example
882
911
  # begin
@@ -910,6 +939,7 @@ module Recurly
910
939
  # @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+.
911
940
  # @param shipping_address_id [String] Shipping Address ID.
912
941
  # @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+.
942
+ #
913
943
  # @return [Resources::ShippingAddress] A shipping address.
914
944
  # @example
915
945
  # begin
@@ -937,6 +967,7 @@ module Recurly
937
967
  # @param shipping_address_id [String] Shipping Address ID.
938
968
  # @param body [Requests::ShippingAddressUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingAddressUpdate}
939
969
  # @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+.
970
+ #
940
971
  # @return [Resources::ShippingAddress] The updated shipping address.
941
972
  # @example
942
973
  # begin
@@ -969,6 +1000,7 @@ module Recurly
969
1000
  # @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+.
970
1001
  # @param shipping_address_id [String] Shipping Address ID.
971
1002
  # @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+.
1003
+ #
972
1004
  # @return [Resources::Empty] Shipping address deleted.
973
1005
  # @example
974
1006
  # begin
@@ -1011,10 +1043,10 @@ module Recurly
1011
1043
  # order. In descending order updated records will move behind the cursor and could
1012
1044
  # prevent some records from being returned.
1013
1045
  #
1014
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1046
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1015
1047
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1016
1048
  #
1017
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1049
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1018
1050
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1019
1051
  #
1020
1052
  # @param state [String] Filter by state.
@@ -1024,6 +1056,7 @@ module Recurly
1024
1056
  # - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
1025
1057
  #
1026
1058
  # @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+.
1059
+ #
1027
1060
  # @return [Pager<Resources::Subscription>] A list of the account's subscriptions.
1028
1061
  # @example
1029
1062
  # subscriptions = @client.list_account_subscriptions(
@@ -1062,15 +1095,16 @@ module Recurly
1062
1095
  # order. In descending order updated records will move behind the cursor and could
1063
1096
  # prevent some records from being returned.
1064
1097
  #
1065
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1098
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1066
1099
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1067
1100
  #
1068
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1101
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1069
1102
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1070
1103
  #
1071
1104
  # @param type [String] Filter by type field. The value +payment+ will return both +purchase+ and +capture+ transactions.
1072
1105
  # @param success [String] Filter by success field.
1073
1106
  # @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+.
1107
+ #
1074
1108
  # @return [Pager<Resources::Transaction>] A list of the account's transactions.
1075
1109
  # @example
1076
1110
  # transactions = @client.list_account_transactions(
@@ -1109,10 +1143,10 @@ module Recurly
1109
1143
  # order. In descending order updated records will move behind the cursor and could
1110
1144
  # prevent some records from being returned.
1111
1145
  #
1112
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1146
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1113
1147
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1114
1148
  #
1115
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1149
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1116
1150
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1117
1151
  #
1118
1152
  # @param 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.
@@ -1121,6 +1155,7 @@ module Recurly
1121
1155
  #
1122
1156
  # @param past_due [String] Filter for accounts with an invoice in the +past_due+ state.
1123
1157
  # @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+.
1158
+ #
1124
1159
  # @return [Pager<Resources::Account>] A list of an account's child accounts.
1125
1160
  # @example
1126
1161
  # child_accounts = @client.list_child_accounts(
@@ -1158,13 +1193,14 @@ module Recurly
1158
1193
  # order. In descending order updated records will move behind the cursor and could
1159
1194
  # prevent some records from being returned.
1160
1195
  #
1161
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1196
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1162
1197
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1163
1198
  #
1164
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1199
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1165
1200
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1166
1201
  #
1167
1202
  # @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+.
1203
+ #
1168
1204
  # @return [Pager<Resources::AccountAcquisition>] A list of the site's account acquisition data.
1169
1205
  # @example
1170
1206
  # acquisitions = @client.list_account_acquisition(limit: 200)
@@ -1199,13 +1235,14 @@ module Recurly
1199
1235
  # order. In descending order updated records will move behind the cursor and could
1200
1236
  # prevent some records from being returned.
1201
1237
  #
1202
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1238
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1203
1239
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1204
1240
  #
1205
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1241
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1206
1242
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1207
1243
  #
1208
1244
  # @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+.
1245
+ #
1209
1246
  # @return [Pager<Resources::Coupon>] A list of the site's coupons.
1210
1247
  # @example
1211
1248
  # coupons = @client.list_coupons(limit: 200)
@@ -1224,6 +1261,7 @@ module Recurly
1224
1261
  #
1225
1262
  # @param body [Requests::CouponCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponCreate}
1226
1263
  # @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+.
1264
+ #
1227
1265
  # @return [Resources::Coupon] A new coupon.
1228
1266
  # @example
1229
1267
  # begin
@@ -1259,6 +1297,7 @@ module Recurly
1259
1297
  #
1260
1298
  # @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
1261
1299
  # @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+.
1300
+ #
1262
1301
  # @return [Resources::Coupon] A coupon.
1263
1302
  # @example
1264
1303
  # begin
@@ -1282,6 +1321,7 @@ module Recurly
1282
1321
  # @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
1283
1322
  # @param body [Requests::CouponUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponUpdate}
1284
1323
  # @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+.
1324
+ #
1285
1325
  # @return [Resources::Coupon] The updated coupon.
1286
1326
  # @example
1287
1327
  # begin
@@ -1307,6 +1347,7 @@ module Recurly
1307
1347
  #
1308
1348
  # @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
1309
1349
  # @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+.
1350
+ #
1310
1351
  # @return [Resources::Coupon] The expired Coupon
1311
1352
  # @example
1312
1353
  # begin
@@ -1346,14 +1387,16 @@ module Recurly
1346
1387
  # order. In descending order updated records will move behind the cursor and could
1347
1388
  # prevent some records from being returned.
1348
1389
  #
1349
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1390
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1350
1391
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1351
1392
  #
1352
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1393
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1353
1394
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1354
1395
  #
1355
1396
  # @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+.
1397
+ #
1356
1398
  # @return [Pager<Resources::UniqueCouponCode>] A list of unique coupon codes that were generated
1399
+ #
1357
1400
  def list_unique_coupon_codes(coupon_id:, **options)
1358
1401
  path = interpolate_path("/coupons/{coupon_id}/unique_coupon_codes", coupon_id: coupon_id)
1359
1402
  pager(path, **options)
@@ -1369,13 +1412,14 @@ module Recurly
1369
1412
  # order. In descending order updated records will move behind the cursor and could
1370
1413
  # prevent some records from being returned.
1371
1414
  #
1372
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1415
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1373
1416
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1374
1417
  #
1375
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1418
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1376
1419
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1377
1420
  #
1378
1421
  # @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+.
1422
+ #
1379
1423
  # @return [Pager<Resources::CreditPayment>] A list of the site's credit payments.
1380
1424
  # @example
1381
1425
  # payments = @client.list_credit_payments(limit: 200)
@@ -1394,7 +1438,9 @@ module Recurly
1394
1438
  #
1395
1439
  # @param credit_payment_id [String] Credit Payment ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
1396
1440
  # @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+.
1441
+ #
1397
1442
  # @return [Resources::CreditPayment] A credit payment.
1443
+ #
1398
1444
  def get_credit_payment(credit_payment_id:, **options)
1399
1445
  path = interpolate_path("/credit_payments/{credit_payment_id}", credit_payment_id: credit_payment_id)
1400
1446
  get(path, **options)
@@ -1422,14 +1468,15 @@ module Recurly
1422
1468
  # order. In descending order updated records will move behind the cursor and could
1423
1469
  # prevent some records from being returned.
1424
1470
  #
1425
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1471
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1426
1472
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1427
1473
  #
1428
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1474
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1429
1475
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1430
1476
  #
1431
1477
  # @param related_type [String] Filter by related type.
1432
1478
  # @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+.
1479
+ #
1433
1480
  # @return [Pager<Resources::CustomFieldDefinition>] A list of the site's custom field definitions.
1434
1481
  # @example
1435
1482
  # custom_fields = @client.list_custom_field_definitions(limit: 200)
@@ -1448,6 +1495,7 @@ module Recurly
1448
1495
  #
1449
1496
  # @param custom_field_definition_id [String] Custom Field Definition ID
1450
1497
  # @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+.
1498
+ #
1451
1499
  # @return [Resources::CustomFieldDefinition] An custom field definition.
1452
1500
  # @example
1453
1501
  # begin
@@ -1488,14 +1536,15 @@ module Recurly
1488
1536
  # order. In descending order updated records will move behind the cursor and could
1489
1537
  # prevent some records from being returned.
1490
1538
  #
1491
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1539
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1492
1540
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1493
1541
  #
1494
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1542
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1495
1543
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1496
1544
  #
1497
1545
  # @param state [String] Filter by state.
1498
1546
  # @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+.
1547
+ #
1499
1548
  # @return [Pager<Resources::Item>] A list of the site's items.
1500
1549
  # @example
1501
1550
  # items = @client.list_items(limit: 200)
@@ -1514,6 +1563,7 @@ module Recurly
1514
1563
  #
1515
1564
  # @param body [Requests::ItemCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ItemCreate}
1516
1565
  # @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+.
1566
+ #
1517
1567
  # @return [Resources::Item] A new item.
1518
1568
  # @example
1519
1569
  # begin
@@ -1548,6 +1598,7 @@ module Recurly
1548
1598
  #
1549
1599
  # @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
1550
1600
  # @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+.
1601
+ #
1551
1602
  # @return [Resources::Item] An item.
1552
1603
  # @example
1553
1604
  # begin
@@ -1571,6 +1622,7 @@ module Recurly
1571
1622
  # @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
1572
1623
  # @param body [Requests::ItemUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ItemUpdate}
1573
1624
  # @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+.
1625
+ #
1574
1626
  # @return [Resources::Item] The updated item.
1575
1627
  # @example
1576
1628
  # begin
@@ -1600,6 +1652,7 @@ module Recurly
1600
1652
  #
1601
1653
  # @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
1602
1654
  # @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+.
1655
+ #
1603
1656
  # @return [Resources::Item] An item.
1604
1657
  # @example
1605
1658
  # begin
@@ -1622,6 +1675,7 @@ module Recurly
1622
1675
  #
1623
1676
  # @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
1624
1677
  # @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+.
1678
+ #
1625
1679
  # @return [Resources::Item] An item.
1626
1680
  # @example
1627
1681
  # begin
@@ -1638,6 +1692,101 @@ module Recurly
1638
1692
  put(path, **options)
1639
1693
  end
1640
1694
 
1695
+ # List a site's measured units
1696
+ #
1697
+ # {https://developers.recurly.com/api/v2019-10-10#operation/list_measured_unit list_measured_unit api documenation}
1698
+ #
1699
+ # @param ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
1700
+ # commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
1701
+ #
1702
+ # *Important notes:*
1703
+ #
1704
+ # * The +ids+ parameter cannot be used with any other ordering or filtering
1705
+ # parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
1706
+ # * Invalid or unknown IDs will be ignored, so you should check that the
1707
+ # results correspond to your request.
1708
+ # * Records are returned in an arbitrary order. Since results are all
1709
+ # returned at once you can sort the records yourself.
1710
+ #
1711
+ # @param limit [Integer] Limit number of records 1-200.
1712
+ # @param order [String] Sort order.
1713
+ # @param sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
1714
+ # order. In descending order updated records will move behind the cursor and could
1715
+ # prevent some records from being returned.
1716
+ #
1717
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1718
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1719
+ #
1720
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1721
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1722
+ #
1723
+ # @param state [String] Filter by state.
1724
+ # @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+.
1725
+ #
1726
+ # @return [Pager<Resources::MeasuredUnit>] A list of the site's measured units.
1727
+ #
1728
+ def list_measured_unit(**options)
1729
+ path = interpolate_path("/measured_units")
1730
+ pager(path, **options)
1731
+ end
1732
+
1733
+ # Create a new measured unit
1734
+ #
1735
+ # {https://developers.recurly.com/api/v2019-10-10#operation/create_measured_unit create_measured_unit api documenation}
1736
+ #
1737
+ # @param body [Requests::MeasuredUnitCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::MeasuredUnitCreate}
1738
+ # @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+.
1739
+ #
1740
+ # @return [Resources::MeasuredUnit] A new measured unit.
1741
+ #
1742
+ def create_measured_unit(body:, **options)
1743
+ path = interpolate_path("/measured_units")
1744
+ post(path, body, Requests::MeasuredUnitCreate, **options)
1745
+ end
1746
+
1747
+ # Fetch a measured unit
1748
+ #
1749
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_measured_unit get_measured_unit api documenation}
1750
+ #
1751
+ # @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
1752
+ # @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+.
1753
+ #
1754
+ # @return [Resources::MeasuredUnit] An item.
1755
+ #
1756
+ def get_measured_unit(measured_unit_id:, **options)
1757
+ path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id)
1758
+ get(path, **options)
1759
+ end
1760
+
1761
+ # Update a measured unit
1762
+ #
1763
+ # {https://developers.recurly.com/api/v2019-10-10#operation/update_measured_unit update_measured_unit api documenation}
1764
+ #
1765
+ # @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
1766
+ # @param body [Requests::MeasuredUnitUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::MeasuredUnitUpdate}
1767
+ # @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+.
1768
+ #
1769
+ # @return [Resources::MeasuredUnit] The updated measured_unit.
1770
+ #
1771
+ def update_measured_unit(measured_unit_id:, body:, **options)
1772
+ path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id)
1773
+ put(path, body, Requests::MeasuredUnitUpdate, **options)
1774
+ end
1775
+
1776
+ # Remove a measured unit
1777
+ #
1778
+ # {https://developers.recurly.com/api/v2019-10-10#operation/remove_measured_unit remove_measured_unit api documenation}
1779
+ #
1780
+ # @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
1781
+ # @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+.
1782
+ #
1783
+ # @return [Resources::MeasuredUnit] A measured unit.
1784
+ #
1785
+ def remove_measured_unit(measured_unit_id:, **options)
1786
+ path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id)
1787
+ delete(path, **options)
1788
+ end
1789
+
1641
1790
  # List a site's invoices
1642
1791
  #
1643
1792
  # {https://developers.recurly.com/api/v2019-10-10#operation/list_invoices list_invoices api documenation}
@@ -1660,10 +1809,10 @@ module Recurly
1660
1809
  # order. In descending order updated records will move behind the cursor and could
1661
1810
  # prevent some records from being returned.
1662
1811
  #
1663
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1812
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1664
1813
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1665
1814
  #
1666
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
1815
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1667
1816
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1668
1817
  #
1669
1818
  # @param type [String] Filter by type when:
@@ -1673,6 +1822,7 @@ module Recurly
1673
1822
  # - +type=legacy+, only legacy invoices will be returned.
1674
1823
  #
1675
1824
  # @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+.
1825
+ #
1676
1826
  # @return [Pager<Resources::Invoice>] A list of the site's invoices.
1677
1827
  # @example
1678
1828
  # invoices = @client.list_invoices(limit: 200)
@@ -1691,6 +1841,7 @@ module Recurly
1691
1841
  #
1692
1842
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1693
1843
  # @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+.
1844
+ #
1694
1845
  # @return [Resources::Invoice] An invoice.
1695
1846
  # @example
1696
1847
  # begin
@@ -1714,6 +1865,7 @@ module Recurly
1714
1865
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1715
1866
  # @param body [Requests::InvoiceUpdatable] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceUpdatable}
1716
1867
  # @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+.
1868
+ #
1717
1869
  # @return [Resources::Invoice] An invoice.
1718
1870
  # @example
1719
1871
  # begin
@@ -1740,6 +1892,7 @@ module Recurly
1740
1892
  #
1741
1893
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1742
1894
  # @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+.
1895
+ #
1743
1896
  # @return [Resources::BinaryFile] An invoice as a PDF.
1744
1897
  # @example
1745
1898
  # begin
@@ -1766,6 +1919,7 @@ module Recurly
1766
1919
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1767
1920
  # @param body [Requests::InvoiceCollect] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCollect}
1768
1921
  # @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+.
1922
+ #
1769
1923
  # @return [Resources::Invoice] The updated invoice.
1770
1924
  # @example
1771
1925
  # begin
@@ -1788,6 +1942,7 @@ module Recurly
1788
1942
  #
1789
1943
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1790
1944
  # @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+.
1945
+ #
1791
1946
  # @return [Resources::Invoice] The updated invoice.
1792
1947
  # @example
1793
1948
  # begin
@@ -1810,6 +1965,7 @@ module Recurly
1810
1965
  #
1811
1966
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1812
1967
  # @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+.
1968
+ #
1813
1969
  # @return [Resources::Invoice] The updated invoice.
1814
1970
  # @example
1815
1971
  # begin
@@ -1832,6 +1988,7 @@ module Recurly
1832
1988
  #
1833
1989
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1834
1990
  # @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+.
1991
+ #
1835
1992
  # @return [Resources::Invoice] The updated invoice.
1836
1993
  # @example
1837
1994
  # begin
@@ -1854,6 +2011,7 @@ module Recurly
1854
2011
  #
1855
2012
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1856
2013
  # @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+.
2014
+ #
1857
2015
  # @return [Resources::Invoice] The updated invoice.
1858
2016
  # @example
1859
2017
  # begin
@@ -1877,7 +2035,9 @@ module Recurly
1877
2035
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1878
2036
  # @param body [Requests::ExternalTransaction] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalTransaction}
1879
2037
  # @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+.
2038
+ #
1880
2039
  # @return [Resources::Transaction] The recorded transaction.
2040
+ #
1881
2041
  def record_external_transaction(invoice_id:, body:, **options)
1882
2042
  path = interpolate_path("/invoices/{invoice_id}/transactions", invoice_id: invoice_id)
1883
2043
  post(path, body, Requests::ExternalTransaction, **options)
@@ -1906,16 +2066,17 @@ module Recurly
1906
2066
  # order. In descending order updated records will move behind the cursor and could
1907
2067
  # prevent some records from being returned.
1908
2068
  #
1909
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2069
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1910
2070
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1911
2071
  #
1912
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2072
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1913
2073
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1914
2074
  #
1915
2075
  # @param original [String] Filter by original field.
1916
2076
  # @param state [String] Filter by state field.
1917
2077
  # @param type [String] Filter by type field.
1918
2078
  # @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+.
2079
+ #
1919
2080
  # @return [Pager<Resources::LineItem>] A list of the invoice's line items.
1920
2081
  # @example
1921
2082
  # line_items = @client.list_invoice_line_items(
@@ -1952,13 +2113,14 @@ module Recurly
1952
2113
  # order. In descending order updated records will move behind the cursor and could
1953
2114
  # prevent some records from being returned.
1954
2115
  #
1955
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2116
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
1956
2117
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1957
2118
  #
1958
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2119
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
1959
2120
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1960
2121
  #
1961
2122
  # @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+.
2123
+ #
1962
2124
  # @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions associated with the invoice.
1963
2125
  # @example
1964
2126
  # coupon_redemptions = @client.list_invoice_coupon_redemptions(
@@ -1980,6 +2142,7 @@ module Recurly
1980
2142
  #
1981
2143
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
1982
2144
  # @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+.
2145
+ #
1983
2146
  # @return [Pager<Resources::Invoice>] A list of the credit or charge invoices associated with the invoice.
1984
2147
  # @example
1985
2148
  # invoices = @client.list_related_invoices(
@@ -2002,6 +2165,7 @@ module Recurly
2002
2165
  # @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
2003
2166
  # @param body [Requests::InvoiceRefund] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceRefund}
2004
2167
  # @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+.
2168
+ #
2005
2169
  # @return [Resources::Invoice] Returns the new credit invoice.
2006
2170
  # @example
2007
2171
  # begin
@@ -2047,16 +2211,17 @@ module Recurly
2047
2211
  # order. In descending order updated records will move behind the cursor and could
2048
2212
  # prevent some records from being returned.
2049
2213
  #
2050
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2214
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2051
2215
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2052
2216
  #
2053
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2217
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2054
2218
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2055
2219
  #
2056
2220
  # @param original [String] Filter by original field.
2057
2221
  # @param state [String] Filter by state field.
2058
2222
  # @param type [String] Filter by type field.
2059
2223
  # @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+.
2224
+ #
2060
2225
  # @return [Pager<Resources::LineItem>] A list of the site's line items.
2061
2226
  # @example
2062
2227
  # line_items = @client.list_line_items(
@@ -2077,6 +2242,7 @@ module Recurly
2077
2242
  #
2078
2243
  # @param line_item_id [String] Line Item ID.
2079
2244
  # @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+.
2245
+ #
2080
2246
  # @return [Resources::LineItem] A line item.
2081
2247
  # @example
2082
2248
  # begin
@@ -2099,6 +2265,7 @@ module Recurly
2099
2265
  #
2100
2266
  # @param line_item_id [String] Line Item ID.
2101
2267
  # @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+.
2268
+ #
2102
2269
  # @return [Resources::Empty] Line item deleted.
2103
2270
  # @example
2104
2271
  # begin
@@ -2139,14 +2306,15 @@ module Recurly
2139
2306
  # order. In descending order updated records will move behind the cursor and could
2140
2307
  # prevent some records from being returned.
2141
2308
  #
2142
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2309
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2143
2310
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2144
2311
  #
2145
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2312
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2146
2313
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2147
2314
  #
2148
2315
  # @param state [String] Filter by state.
2149
2316
  # @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+.
2317
+ #
2150
2318
  # @return [Pager<Resources::Plan>] A list of plans.
2151
2319
  # @example
2152
2320
  # plans = @client.list_plans(limit: 200)
@@ -2165,6 +2333,7 @@ module Recurly
2165
2333
  #
2166
2334
  # @param body [Requests::PlanCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PlanCreate}
2167
2335
  # @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+.
2336
+ #
2168
2337
  # @return [Resources::Plan] A plan.
2169
2338
  # @example
2170
2339
  # begin
@@ -2204,6 +2373,7 @@ module Recurly
2204
2373
  #
2205
2374
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2206
2375
  # @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+.
2376
+ #
2207
2377
  # @return [Resources::Plan] A plan.
2208
2378
  # @example
2209
2379
  # begin
@@ -2227,6 +2397,7 @@ module Recurly
2227
2397
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2228
2398
  # @param body [Requests::PlanUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PlanUpdate}
2229
2399
  # @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+.
2400
+ #
2230
2401
  # @return [Resources::Plan] A plan.
2231
2402
  # @example
2232
2403
  # begin
@@ -2252,6 +2423,7 @@ module Recurly
2252
2423
  #
2253
2424
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2254
2425
  # @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+.
2426
+ #
2255
2427
  # @return [Resources::Plan] Plan deleted
2256
2428
  # @example
2257
2429
  # begin
@@ -2291,14 +2463,15 @@ module Recurly
2291
2463
  # order. In descending order updated records will move behind the cursor and could
2292
2464
  # prevent some records from being returned.
2293
2465
  #
2294
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2466
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2295
2467
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2296
2468
  #
2297
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2469
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2298
2470
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2299
2471
  #
2300
2472
  # @param state [String] Filter by state.
2301
2473
  # @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+.
2474
+ #
2302
2475
  # @return [Pager<Resources::AddOn>] A list of add-ons.
2303
2476
  # @example
2304
2477
  # add_ons = @client.list_plan_add_ons(
@@ -2321,6 +2494,7 @@ module Recurly
2321
2494
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2322
2495
  # @param body [Requests::AddOnCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AddOnCreate}
2323
2496
  # @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+.
2497
+ #
2324
2498
  # @return [Resources::AddOn] An add-on.
2325
2499
  # @example
2326
2500
  # begin
@@ -2355,6 +2529,7 @@ module Recurly
2355
2529
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2356
2530
  # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2357
2531
  # @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+.
2532
+ #
2358
2533
  # @return [Resources::AddOn] An add-on.
2359
2534
  # @example
2360
2535
  # begin
@@ -2381,6 +2556,7 @@ module Recurly
2381
2556
  # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2382
2557
  # @param body [Requests::AddOnUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AddOnUpdate}
2383
2558
  # @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+.
2559
+ #
2384
2560
  # @return [Resources::AddOn] An add-on.
2385
2561
  # @example
2386
2562
  # begin
@@ -2411,6 +2587,7 @@ module Recurly
2411
2587
  # @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2412
2588
  # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2413
2589
  # @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+.
2590
+ #
2414
2591
  # @return [Resources::AddOn] Add-on deleted
2415
2592
  # @example
2416
2593
  # begin
@@ -2452,14 +2629,15 @@ module Recurly
2452
2629
  # order. In descending order updated records will move behind the cursor and could
2453
2630
  # prevent some records from being returned.
2454
2631
  #
2455
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2632
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2456
2633
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2457
2634
  #
2458
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2635
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2459
2636
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2460
2637
  #
2461
2638
  # @param state [String] Filter by state.
2462
2639
  # @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+.
2640
+ #
2463
2641
  # @return [Pager<Resources::AddOn>] A list of add-ons.
2464
2642
  # @example
2465
2643
  # add_ons = @client.list_add_ons(
@@ -2480,6 +2658,7 @@ module Recurly
2480
2658
  #
2481
2659
  # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
2482
2660
  # @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+.
2661
+ #
2483
2662
  # @return [Resources::AddOn] An add-on.
2484
2663
  # @example
2485
2664
  # begin
@@ -2518,13 +2697,14 @@ module Recurly
2518
2697
  # order. In descending order updated records will move behind the cursor and could
2519
2698
  # prevent some records from being returned.
2520
2699
  #
2521
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2700
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2522
2701
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2523
2702
  #
2524
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2703
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2525
2704
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2526
2705
  #
2527
2706
  # @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+.
2707
+ #
2528
2708
  # @return [Pager<Resources::ShippingMethod>] A list of the site's shipping methods.
2529
2709
  # @example
2530
2710
  # shipping_methods = @client.list_shipping_methods(
@@ -2545,7 +2725,9 @@ module Recurly
2545
2725
  #
2546
2726
  # @param body [Requests::ShippingMethodCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingMethodCreate}
2547
2727
  # @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+.
2728
+ #
2548
2729
  # @return [Resources::ShippingMethod] A new shipping method.
2730
+ #
2549
2731
  def create_shipping_method(body:, **options)
2550
2732
  path = interpolate_path("/shipping_methods")
2551
2733
  post(path, body, Requests::ShippingMethodCreate, **options)
@@ -2557,7 +2739,9 @@ module Recurly
2557
2739
  #
2558
2740
  # @param id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
2559
2741
  # @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+.
2742
+ #
2560
2743
  # @return [Resources::ShippingMethod] A shipping method.
2744
+ #
2561
2745
  def get_shipping_method(id:, **options)
2562
2746
  path = interpolate_path("/shipping_methods/{id}", id: id)
2563
2747
  get(path, **options)
@@ -2570,7 +2754,9 @@ module Recurly
2570
2754
  # @param shipping_method_id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
2571
2755
  # @param body [Requests::ShippingMethodUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingMethodUpdate}
2572
2756
  # @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+.
2757
+ #
2573
2758
  # @return [Resources::ShippingMethod] The updated shipping method.
2759
+ #
2574
2760
  def update_shipping_method(shipping_method_id:, body:, **options)
2575
2761
  path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id)
2576
2762
  put(path, body, Requests::ShippingMethodUpdate, **options)
@@ -2582,7 +2768,9 @@ module Recurly
2582
2768
  #
2583
2769
  # @param shipping_method_id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
2584
2770
  # @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+.
2771
+ #
2585
2772
  # @return [Resources::ShippingMethod] A shipping method.
2773
+ #
2586
2774
  def deactivate_shipping_method(shipping_method_id:, **options)
2587
2775
  path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id)
2588
2776
  delete(path, **options)
@@ -2610,10 +2798,10 @@ module Recurly
2610
2798
  # order. In descending order updated records will move behind the cursor and could
2611
2799
  # prevent some records from being returned.
2612
2800
  #
2613
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2801
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2614
2802
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2615
2803
  #
2616
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
2804
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2617
2805
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2618
2806
  #
2619
2807
  # @param state [String] Filter by state.
@@ -2623,6 +2811,7 @@ module Recurly
2623
2811
  # - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
2624
2812
  #
2625
2813
  # @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+.
2814
+ #
2626
2815
  # @return [Pager<Resources::Subscription>] A list of the site's subscriptions.
2627
2816
  # @example
2628
2817
  # subscriptions = @client.list_subscriptions(limit: 200)
@@ -2641,6 +2830,7 @@ module Recurly
2641
2830
  #
2642
2831
  # @param body [Requests::SubscriptionCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionCreate}
2643
2832
  # @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+.
2833
+ #
2644
2834
  # @return [Resources::Subscription] A subscription.
2645
2835
  # @example
2646
2836
  # begin
@@ -2674,6 +2864,7 @@ module Recurly
2674
2864
  #
2675
2865
  # @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+.
2676
2866
  # @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+.
2867
+ #
2677
2868
  # @return [Resources::Subscription] A subscription.
2678
2869
  # @example
2679
2870
  # begin
@@ -2699,6 +2890,7 @@ module Recurly
2699
2890
  # @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+.
2700
2891
  # @param body [Requests::SubscriptionUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionUpdate}
2701
2892
  # @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+.
2893
+ #
2702
2894
  # @return [Resources::Subscription] A subscription.
2703
2895
  # @example
2704
2896
  # begin
@@ -2738,6 +2930,7 @@ module Recurly
2738
2930
  # You may also terminate a subscription with no refund and then manually refund specific invoices.
2739
2931
  #
2740
2932
  # @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+.
2933
+ #
2741
2934
  # @return [Resources::Subscription] An expired subscription.
2742
2935
  # @example
2743
2936
  # begin
@@ -2763,6 +2956,7 @@ module Recurly
2763
2956
  # @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+.
2764
2957
  # @param body [Requests::SubscriptionCancel] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionCancel}
2765
2958
  # @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+.
2959
+ #
2766
2960
  # @return [Resources::Subscription] A canceled or failed subscription.
2767
2961
  # @example
2768
2962
  # begin
@@ -2787,6 +2981,7 @@ module Recurly
2787
2981
  #
2788
2982
  # @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+.
2789
2983
  # @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+.
2984
+ #
2790
2985
  # @return [Resources::Subscription] An active subscription.
2791
2986
  # @example
2792
2987
  # begin
@@ -2812,6 +3007,7 @@ module Recurly
2812
3007
  # @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+.
2813
3008
  # @param body [Requests::SubscriptionPause] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionPause}
2814
3009
  # @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+.
3010
+ #
2815
3011
  # @return [Resources::Subscription] A subscription.
2816
3012
  # @example
2817
3013
  # begin
@@ -2840,6 +3036,7 @@ module Recurly
2840
3036
  #
2841
3037
  # @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+.
2842
3038
  # @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+.
3039
+ #
2843
3040
  # @return [Resources::Subscription] A subscription.
2844
3041
  # @example
2845
3042
  # begin
@@ -2864,7 +3061,9 @@ module Recurly
2864
3061
  #
2865
3062
  # @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+.
2866
3063
  # @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+.
3064
+ #
2867
3065
  # @return [Resources::Subscription] A subscription.
3066
+ #
2868
3067
  def convert_trial(subscription_id:, **options)
2869
3068
  path = interpolate_path("/subscriptions/{subscription_id}/convert_trial", subscription_id: subscription_id)
2870
3069
  put(path, **options)
@@ -2876,6 +3075,7 @@ module Recurly
2876
3075
  #
2877
3076
  # @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+.
2878
3077
  # @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+.
3078
+ #
2879
3079
  # @return [Resources::SubscriptionChange] A subscription's pending change.
2880
3080
  # @example
2881
3081
  # begin
@@ -2901,6 +3101,7 @@ module Recurly
2901
3101
  # @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+.
2902
3102
  # @param body [Requests::SubscriptionChangeCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionChangeCreate}
2903
3103
  # @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+.
3104
+ #
2904
3105
  # @return [Resources::SubscriptionChange] A subscription change.
2905
3106
  # @example
2906
3107
  # begin
@@ -2930,6 +3131,7 @@ module Recurly
2930
3131
  #
2931
3132
  # @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+.
2932
3133
  # @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+.
3134
+ #
2933
3135
  # @return [Resources::Empty] Subscription change was deleted.
2934
3136
  # @example
2935
3137
  # begin
@@ -2955,7 +3157,9 @@ module Recurly
2955
3157
  # @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
3158
  # @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
3159
  # @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+.
3160
+ #
2958
3161
  # @return [Resources::SubscriptionChangePreview] A subscription change.
3162
+ #
2959
3163
  def preview_subscription_change(subscription_id:, body:, **options)
2960
3164
  path = interpolate_path("/subscriptions/{subscription_id}/change/preview", subscription_id: subscription_id)
2961
3165
  post(path, body, Requests::SubscriptionChangeCreate, **options)
@@ -2984,10 +3188,10 @@ module Recurly
2984
3188
  # order. In descending order updated records will move behind the cursor and could
2985
3189
  # prevent some records from being returned.
2986
3190
  #
2987
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3191
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
2988
3192
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2989
3193
  #
2990
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
3194
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
2991
3195
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
2992
3196
  #
2993
3197
  # @param type [String] Filter by type when:
@@ -2997,6 +3201,7 @@ module Recurly
2997
3201
  # - +type=legacy+, only legacy invoices will be returned.
2998
3202
  #
2999
3203
  # @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+.
3204
+ #
3000
3205
  # @return [Pager<Resources::Invoice>] A list of the subscription's invoices.
3001
3206
  # @example
3002
3207
  # invoices = @client.list_subscription_invoices(
@@ -3035,16 +3240,17 @@ module Recurly
3035
3240
  # order. In descending order updated records will move behind the cursor and could
3036
3241
  # prevent some records from being returned.
3037
3242
  #
3038
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3243
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3039
3244
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3040
3245
  #
3041
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
3246
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
3042
3247
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3043
3248
  #
3044
3249
  # @param original [String] Filter by original field.
3045
3250
  # @param state [String] Filter by state field.
3046
3251
  # @param type [String] Filter by type field.
3047
3252
  # @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+.
3253
+ #
3048
3254
  # @return [Pager<Resources::LineItem>] A list of the subscription's line items.
3049
3255
  # @example
3050
3256
  # line_items = @client.list_subscription_line_items(
@@ -3081,13 +3287,14 @@ module Recurly
3081
3287
  # order. In descending order updated records will move behind the cursor and could
3082
3288
  # prevent some records from being returned.
3083
3289
  #
3084
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3290
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3085
3291
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3086
3292
  #
3087
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
3293
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
3088
3294
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3089
3295
  #
3090
3296
  # @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+.
3297
+ #
3091
3298
  # @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on a subscription.
3092
3299
  # @example
3093
3300
  # coupon_redemptions = @client.list_subscription_coupon_redemptions(
@@ -3103,6 +3310,105 @@ module Recurly
3103
3310
  pager(path, **options)
3104
3311
  end
3105
3312
 
3313
+ # List a subscription add-on's usage records
3314
+ #
3315
+ # {https://developers.recurly.com/api/v2019-10-10#operation/list_usage list_usage api documenation}
3316
+ #
3317
+ # @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+.
3318
+ # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
3319
+ # @param ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
3320
+ # commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
3321
+ #
3322
+ # *Important notes:*
3323
+ #
3324
+ # * The +ids+ parameter cannot be used with any other ordering or filtering
3325
+ # parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
3326
+ # * Invalid or unknown IDs will be ignored, so you should check that the
3327
+ # results correspond to your request.
3328
+ # * Records are returned in an arbitrary order. Since results are all
3329
+ # returned at once you can sort the records yourself.
3330
+ #
3331
+ # @param limit [Integer] Limit number of records 1-200.
3332
+ # @param order [String] Sort order.
3333
+ # @param sort [String] Sort field. You *really* only want to sort by +usage_timestamp+ in ascending
3334
+ # order. In descending order updated records will move behind the cursor and could
3335
+ # prevent some records from being returned.
3336
+ #
3337
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
3338
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3339
+ #
3340
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
3341
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3342
+ #
3343
+ # @param billing_status [String] Filter by usage record's billing status
3344
+ # @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+.
3345
+ #
3346
+ # @return [Pager<Resources::Usage>] A list of the subscription add-on's usage records.
3347
+ #
3348
+ def list_usage(subscription_id:, add_on_id:, **options)
3349
+ path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id)
3350
+ pager(path, **options)
3351
+ end
3352
+
3353
+ # Log a usage record on this subscription add-on
3354
+ #
3355
+ # {https://developers.recurly.com/api/v2019-10-10#operation/create_usage create_usage api documenation}
3356
+ #
3357
+ # @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+.
3358
+ # @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
3359
+ # @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
3360
+ # @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+.
3361
+ #
3362
+ # @return [Resources::Usage] The created usage record.
3363
+ #
3364
+ def create_usage(subscription_id:, add_on_id:, body:, **options)
3365
+ path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id)
3366
+ post(path, body, Requests::UsageCreate, **options)
3367
+ end
3368
+
3369
+ # Get a usage record
3370
+ #
3371
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_usage get_usage api documenation}
3372
+ #
3373
+ # @param usage_id [String] Usage Record ID.
3374
+ # @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+.
3375
+ #
3376
+ # @return [Resources::Usage] The usage record.
3377
+ #
3378
+ def get_usage(usage_id:, **options)
3379
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3380
+ get(path, **options)
3381
+ end
3382
+
3383
+ # Update a usage record
3384
+ #
3385
+ # {https://developers.recurly.com/api/v2019-10-10#operation/update_usage update_usage api documenation}
3386
+ #
3387
+ # @param usage_id [String] Usage Record ID.
3388
+ # @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
3389
+ # @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+.
3390
+ #
3391
+ # @return [Resources::Usage] The updated usage record.
3392
+ #
3393
+ def update_usage(usage_id:, body:, **options)
3394
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3395
+ put(path, body, Requests::UsageCreate, **options)
3396
+ end
3397
+
3398
+ # Delete a usage record.
3399
+ #
3400
+ # {https://developers.recurly.com/api/v2019-10-10#operation/remove_usage remove_usage api documenation}
3401
+ #
3402
+ # @param usage_id [String] Usage Record ID.
3403
+ # @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+.
3404
+ #
3405
+ # @return [Resources::Empty] Usage was successfully deleted.
3406
+ #
3407
+ def remove_usage(usage_id:, **options)
3408
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3409
+ delete(path, **options)
3410
+ end
3411
+
3106
3412
  # List a site's transactions
3107
3413
  #
3108
3414
  # {https://developers.recurly.com/api/v2019-10-10#operation/list_transactions list_transactions api documenation}
@@ -3125,15 +3431,16 @@ module Recurly
3125
3431
  # order. In descending order updated records will move behind the cursor and could
3126
3432
  # prevent some records from being returned.
3127
3433
  #
3128
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3434
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3129
3435
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3130
3436
  #
3131
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
3437
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
3132
3438
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3133
3439
  #
3134
3440
  # @param type [String] Filter by type field. The value +payment+ will return both +purchase+ and +capture+ transactions.
3135
3441
  # @param success [String] Filter by success field.
3136
3442
  # @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+.
3443
+ #
3137
3444
  # @return [Pager<Resources::Transaction>] A list of the site's transactions.
3138
3445
  # @example
3139
3446
  # transactions = @client.list_transactions(limit: 200)
@@ -3152,6 +3459,7 @@ module Recurly
3152
3459
  #
3153
3460
  # @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+.
3154
3461
  # @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+.
3462
+ #
3155
3463
  # @return [Resources::Transaction] A transaction.
3156
3464
  # @example
3157
3465
  # begin
@@ -3174,7 +3482,9 @@ module Recurly
3174
3482
  #
3175
3483
  # @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
3176
3484
  # @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+.
3485
+ #
3177
3486
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3487
+ #
3178
3488
  def get_unique_coupon_code(unique_coupon_code_id:, **options)
3179
3489
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id)
3180
3490
  get(path, **options)
@@ -3186,7 +3496,9 @@ module Recurly
3186
3496
  #
3187
3497
  # @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
3188
3498
  # @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+.
3499
+ #
3189
3500
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3501
+ #
3190
3502
  def deactivate_unique_coupon_code(unique_coupon_code_id:, **options)
3191
3503
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id)
3192
3504
  delete(path, **options)
@@ -3198,7 +3510,9 @@ module Recurly
3198
3510
  #
3199
3511
  # @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
3200
3512
  # @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+.
3513
+ #
3201
3514
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3515
+ #
3202
3516
  def reactivate_unique_coupon_code(unique_coupon_code_id:, **options)
3203
3517
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}/restore", unique_coupon_code_id: unique_coupon_code_id)
3204
3518
  put(path, **options)
@@ -3210,6 +3524,7 @@ module Recurly
3210
3524
  #
3211
3525
  # @param body [Requests::PurchaseCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PurchaseCreate}
3212
3526
  # @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+.
3527
+ #
3213
3528
  # @return [Resources::InvoiceCollection] Returns the new invoices
3214
3529
  # @example
3215
3530
  # begin
@@ -3249,6 +3564,7 @@ module Recurly
3249
3564
  #
3250
3565
  # @param body [Requests::PurchaseCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PurchaseCreate}
3251
3566
  # @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+.
3567
+ #
3252
3568
  # @return [Resources::InvoiceCollection] Returns preview of the new invoices
3253
3569
  # @example
3254
3570
  # begin
@@ -3281,5 +3597,32 @@ module Recurly
3281
3597
  path = interpolate_path("/purchases/preview")
3282
3598
  post(path, body, Requests::PurchaseCreate, **options)
3283
3599
  end
3600
+
3601
+ # List the dates that have an available export to download.
3602
+ #
3603
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_export_dates get_export_dates api documenation}
3604
+ #
3605
+ # @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+.
3606
+ #
3607
+ # @return [Resources::ExportDates] Returns a list of dates.
3608
+ #
3609
+ def get_export_dates(**options)
3610
+ path = interpolate_path("/export_dates")
3611
+ get(path, **options)
3612
+ end
3613
+
3614
+ # List of the export files that are available to download.
3615
+ #
3616
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_export_files get_export_files api documenation}
3617
+ #
3618
+ # @param export_date [String] Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format.
3619
+ # @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+.
3620
+ #
3621
+ # @return [Resources::ExportFiles] Returns a list of export files to download.
3622
+ #
3623
+ def get_export_files(export_date:, **options)
3624
+ path = interpolate_path("/export_dates/{export_date}/export_files", export_date: export_date)
3625
+ get(path, **options)
3626
+ end
3284
3627
  end
3285
3628
  end