recurly 3.9.0 → 3.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c78adbb9e018c19c91b8e026154020e76d7fff8e7ebc9baf607fadec225fb098
4
- data.tar.gz: d7b030ca1ac7685f7e64cc0dfebd004e2d8d80e5a09d302a4c5c19eeff5ccc5e
3
+ metadata.gz: a7d857cb4a3518eff0cb56f9518a8f93b2829ac45d65f4d6f429e10daa3eae5d
4
+ data.tar.gz: cb9e846114ce261826384d9b31c07e3bea034b66c9b620f282881bf54da4bbdc
5
5
  SHA512:
6
- metadata.gz: e1e5228bcb2376263a5c295bb848742961f36859f5b4f473bbbcada42b3ade93ef92630087cf9cedf008e1abd92a89bfcc937cd780ef5ecefb23603ad2c87c28
7
- data.tar.gz: 915f88d6ef1e03e955d3e45d46920993c4f08a04539fde04d879d6d7a39c9cf6049d36e3a1c0fe570269e999006dc03e94546b708ce6474a5e935108e2aa5017
6
+ metadata.gz: d7fd02b347d535184984466a90f912175ee66c2430d3be37b709bb5111f54ee431a69d92973f1c956e54b6fbfaf541e273c3de32e0314fecdb2cb9bf1f118a37
7
+ data.tar.gz: 6b00f68f2b06058c1a6591cbee95b0f25cfb4cdfd269b627209464955dc3078fbbdedf66f3ca1df94e17382d0067345f6440cb0f00590e976d368654c5fd7a21
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.9.0
2
+ current_version = 3.10.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
@@ -1,8 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [3.9.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
3
+ ## [3.10.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.8.0...HEAD)
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.9.0...HEAD)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - 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))
10
+ - Adding hierarchical errors [\#610](https://github.com/recurly/recurly-client-ruby/pull/610) ([douglasmiller](https://github.com/douglasmiller))
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Release 3.10.0 [\#623](https://github.com/recurly/recurly-client-ruby/pull/623) ([douglasmiller](https://github.com/douglasmiller))
15
+
16
+ ## [3.9.0](https://github.com/recurly/recurly-client-ruby/tree/3.9.0) (2020-07-06)
17
+
18
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.8.0...3.9.0)
6
19
 
7
20
  **Implemented enhancements:**
8
21
 
@@ -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.9'
8
+ gem 'recurly', '~> 3.10'
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.
@@ -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,93 @@ 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 limit [Integer] Limit number of records 1-200.
3320
+ # @param order [String] Sort order.
3321
+ # @param sort [String] Sort field. You *really* only want to sort by +usage_timestamp+ in ascending
3322
+ # order. In descending order updated records will move behind the cursor and could
3323
+ # prevent some records from being returned.
3324
+ #
3325
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
3326
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3327
+ #
3328
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
3329
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3330
+ #
3331
+ # @param billing_status [String] Filter by usage record's billing status
3332
+ # @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+.
3333
+ #
3334
+ # @return [Pager<Resources::Usage>] A list of the subscription add-on's usage records.
3335
+ #
3336
+ def list_usage(subscription_id:, add_on_id:, **options)
3337
+ path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id)
3338
+ pager(path, **options)
3339
+ end
3340
+
3341
+ # Log a usage record on this subscription add-on
3342
+ #
3343
+ # {https://developers.recurly.com/api/v2019-10-10#operation/create_usage create_usage api documenation}
3344
+ #
3345
+ # @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+.
3346
+ # @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+.
3347
+ # @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
3348
+ # @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+.
3349
+ #
3350
+ # @return [Resources::Usage] The created usage record.
3351
+ #
3352
+ def create_usage(subscription_id:, add_on_id:, body:, **options)
3353
+ path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id)
3354
+ post(path, body, Requests::UsageCreate, **options)
3355
+ end
3356
+
3357
+ # Get a usage record
3358
+ #
3359
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_usage get_usage api documenation}
3360
+ #
3361
+ # @param usage_id [String] Usage Record ID.
3362
+ # @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+.
3363
+ #
3364
+ # @return [Resources::Usage] The usage record.
3365
+ #
3366
+ def get_usage(usage_id:, **options)
3367
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3368
+ get(path, **options)
3369
+ end
3370
+
3371
+ # Update a usage record
3372
+ #
3373
+ # {https://developers.recurly.com/api/v2019-10-10#operation/update_usage update_usage api documenation}
3374
+ #
3375
+ # @param usage_id [String] Usage Record ID.
3376
+ # @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
3377
+ # @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+.
3378
+ #
3379
+ # @return [Resources::Usage] The updated usage record.
3380
+ #
3381
+ def update_usage(usage_id:, body:, **options)
3382
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3383
+ put(path, body, Requests::UsageCreate, **options)
3384
+ end
3385
+
3386
+ # Delete a usage record.
3387
+ #
3388
+ # {https://developers.recurly.com/api/v2019-10-10#operation/remove_usage remove_usage api documenation}
3389
+ #
3390
+ # @param usage_id [String] Usage Record ID.
3391
+ # @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+.
3392
+ #
3393
+ # @return [Resources::Empty] Usage was successfully deleted.
3394
+ #
3395
+ def remove_usage(usage_id:, **options)
3396
+ path = interpolate_path("/usage/{usage_id}", usage_id: usage_id)
3397
+ delete(path, **options)
3398
+ end
3399
+
3106
3400
  # List a site's transactions
3107
3401
  #
3108
3402
  # {https://developers.recurly.com/api/v2019-10-10#operation/list_transactions list_transactions api documenation}
@@ -3125,15 +3419,16 @@ module Recurly
3125
3419
  # order. In descending order updated records will move behind the cursor and could
3126
3420
  # prevent some records from being returned.
3127
3421
  #
3128
- # @param begin_time [DateTime] Filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3422
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
3129
3423
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3130
3424
  #
3131
- # @param end_time [DateTime] Filter by end_time when +sort=created_at+ or +sort=updated_at+.
3425
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
3132
3426
  # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
3133
3427
  #
3134
3428
  # @param type [String] Filter by type field. The value +payment+ will return both +purchase+ and +capture+ transactions.
3135
3429
  # @param success [String] Filter by success field.
3136
3430
  # @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+.
3431
+ #
3137
3432
  # @return [Pager<Resources::Transaction>] A list of the site's transactions.
3138
3433
  # @example
3139
3434
  # transactions = @client.list_transactions(limit: 200)
@@ -3152,6 +3447,7 @@ module Recurly
3152
3447
  #
3153
3448
  # @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
3449
  # @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+.
3450
+ #
3155
3451
  # @return [Resources::Transaction] A transaction.
3156
3452
  # @example
3157
3453
  # begin
@@ -3174,7 +3470,9 @@ module Recurly
3174
3470
  #
3175
3471
  # @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
3472
  # @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+.
3473
+ #
3177
3474
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3475
+ #
3178
3476
  def get_unique_coupon_code(unique_coupon_code_id:, **options)
3179
3477
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id)
3180
3478
  get(path, **options)
@@ -3186,7 +3484,9 @@ module Recurly
3186
3484
  #
3187
3485
  # @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
3486
  # @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+.
3487
+ #
3189
3488
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3489
+ #
3190
3490
  def deactivate_unique_coupon_code(unique_coupon_code_id:, **options)
3191
3491
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id)
3192
3492
  delete(path, **options)
@@ -3198,7 +3498,9 @@ module Recurly
3198
3498
  #
3199
3499
  # @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
3500
  # @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+.
3501
+ #
3201
3502
  # @return [Resources::UniqueCouponCode] A unique coupon code.
3503
+ #
3202
3504
  def reactivate_unique_coupon_code(unique_coupon_code_id:, **options)
3203
3505
  path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}/restore", unique_coupon_code_id: unique_coupon_code_id)
3204
3506
  put(path, **options)
@@ -3210,6 +3512,7 @@ module Recurly
3210
3512
  #
3211
3513
  # @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
3514
  # @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+.
3515
+ #
3213
3516
  # @return [Resources::InvoiceCollection] Returns the new invoices
3214
3517
  # @example
3215
3518
  # begin
@@ -3249,6 +3552,7 @@ module Recurly
3249
3552
  #
3250
3553
  # @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
3554
  # @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+.
3555
+ #
3252
3556
  # @return [Resources::InvoiceCollection] Returns preview of the new invoices
3253
3557
  # @example
3254
3558
  # begin