recurly 3.13.0 → 3.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +68 -2
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client.rb +7 -2
- data/lib/recurly/client/operations.rb +148 -1
- data/lib/recurly/errors/api_errors.rb +2 -0
- data/lib/recurly/requests/billing_info_create.rb +12 -0
- data/lib/recurly/requests/coupon_create.rb +8 -0
- data/lib/recurly/requests/coupon_redemption_create.rb +4 -0
- data/lib/recurly/requests/invoice_collect.rb +4 -0
- data/lib/recurly/requests/plan_update.rb +0 -4
- data/lib/recurly/requests/purchase_create.rb +4 -0
- data/lib/recurly/requests/subscription_create.rb +4 -0
- data/lib/recurly/requests/subscription_update.rb +4 -0
- data/lib/recurly/resources/billing_info.rb +4 -0
- data/lib/recurly/resources/coupon.rb +8 -0
- data/lib/recurly/resources/coupon_redemption.rb +4 -0
- data/lib/recurly/resources/invoice.rb +4 -0
- data/lib/recurly/resources/subscription.rb +5 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +689 -36
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f73605b156b9fb01202aa7e645dc1b63425d93bd313066df8b15906e50c36bb6
|
4
|
+
data.tar.gz: 4cd5071da40d218c08ddda384f8e6a2038c20d40d8b272899412d53cddf432ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 465e7e473d60a4c6c158bd3a373146f218da96b3dc39f07e2d844d90c0e83a68ed554f61885df1283546d17c3b56eeb537b23aea9365282e94aa99f52eae6104
|
7
|
+
data.tar.gz: 51cde06f4c57df5d30aa5300e68497f7ea233257f77b1ee1a3900c43bd0a74e1abfd9511412f138dfcad5a7e0e93a154789fa55bd9f68f1e0586aa1cd2cc022c
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,74 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [3.
|
3
|
+
## [3.18.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.17.0...HEAD)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Latest Changes for 2019-10-10 [\#660](https://github.com/recurly/recurly-client-ruby/pull/660) ([douglasmiller](https://github.com/douglasmiller))
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Release 3.18.0 [\#661](https://github.com/recurly/recurly-client-ruby/pull/661) ([douglasmiller](https://github.com/douglasmiller))
|
14
|
+
|
15
|
+
## [3.17.0](https://github.com/recurly/recurly-client-ruby/tree/3.17.0) (2020-12-08)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.16.0...3.17.0)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Latest Changes for 2019-10-10 [\#657](https://github.com/recurly/recurly-client-ruby/pull/657) ([douglasmiller](https://github.com/douglasmiller))
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Release 3.17.0 [\#658](https://github.com/recurly/recurly-client-ruby/pull/658) ([douglasmiller](https://github.com/douglasmiller))
|
26
|
+
|
27
|
+
## [3.16.0](https://github.com/recurly/recurly-client-ruby/tree/3.16.0) (2020-11-24)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.15.0...3.16.0)
|
30
|
+
|
31
|
+
**Implemented enhancements:**
|
32
|
+
|
33
|
+
- Latest Changes for 2019-10-10 \(tax\_identifier / tax\_identifier\_type\) [\#654](https://github.com/recurly/recurly-client-ruby/pull/654) ([douglasmiller](https://github.com/douglasmiller))
|
34
|
+
- Latest Changes for 2019-10-10 [\#651](https://github.com/recurly/recurly-client-ruby/pull/651) ([douglasmiller](https://github.com/douglasmiller))
|
35
|
+
|
36
|
+
**Fixed bugs:**
|
37
|
+
|
38
|
+
- Refund API V2 Error Details [\#652](https://github.com/recurly/recurly-client-ruby/issues/652)
|
39
|
+
|
40
|
+
**Merged pull requests:**
|
41
|
+
|
42
|
+
- Release 3.16.0 [\#656](https://github.com/recurly/recurly-client-ruby/pull/656) ([douglasmiller](https://github.com/douglasmiller))
|
43
|
+
|
44
|
+
## [3.15.0](https://github.com/recurly/recurly-client-ruby/tree/3.15.0) (2020-11-06)
|
45
|
+
|
46
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.14.0...3.15.0)
|
47
|
+
|
48
|
+
**Implemented enhancements:**
|
49
|
+
|
50
|
+
- Latest Changes for 2019-10-10 \(Wallet, Item Coupons\) [\#645](https://github.com/recurly/recurly-client-ruby/pull/645) ([douglasmiller](https://github.com/douglasmiller))
|
51
|
+
|
52
|
+
**Merged pull requests:**
|
53
|
+
|
54
|
+
- Release 3.15.0 [\#647](https://github.com/recurly/recurly-client-ruby/pull/647) ([douglasmiller](https://github.com/douglasmiller))
|
55
|
+
|
56
|
+
## [3.14.0](https://github.com/recurly/recurly-client-ruby/tree/3.14.0) (2020-10-20)
|
57
|
+
|
58
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.13.0...3.14.0)
|
59
|
+
|
60
|
+
**Implemented enhancements:**
|
61
|
+
|
62
|
+
- Mon Oct 19 20:38:03 UTC 2020 Upgrade API version v2019-10-10 [\#642](https://github.com/recurly/recurly-client-ruby/pull/642) ([douglasmiller](https://github.com/douglasmiller))
|
63
|
+
|
64
|
+
**Merged pull requests:**
|
65
|
+
|
66
|
+
- Release 3.14.0 [\#643](https://github.com/recurly/recurly-client-ruby/pull/643) ([douglasmiller](https://github.com/douglasmiller))
|
67
|
+
- Fixes uninitialized constant `Recurly::Errors::ServiceNotAvailableError` [\#641](https://github.com/recurly/recurly-client-ruby/pull/641) ([ruyrocha](https://github.com/ruyrocha))
|
68
|
+
|
69
|
+
## [3.13.0](https://github.com/recurly/recurly-client-ruby/tree/3.13.0) (2020-09-22)
|
70
|
+
|
71
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.12.0...3.13.0)
|
6
72
|
|
7
73
|
**Implemented enhancements:**
|
8
74
|
|
data/GETTING_STARTED.md
CHANGED
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
|
|
5
5
|
In your Gemfile, add `recurly` as a dependency.
|
6
6
|
|
7
7
|
```ruby
|
8
|
-
gem 'recurly', '~> 3.
|
8
|
+
gem 'recurly', '~> 3.18'
|
9
9
|
```
|
10
10
|
|
11
11
|
> *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
|
data/lib/recurly/client.rb
CHANGED
@@ -253,8 +253,13 @@ module Recurly
|
|
253
253
|
def raise_api_error!(http_response, response)
|
254
254
|
if response.content_type.include?(JSON_CONTENT_TYPE)
|
255
255
|
error = JSONParser.parse(self, response.body)
|
256
|
-
|
257
|
-
|
256
|
+
begin
|
257
|
+
error_class = Errors::APIError.error_class(error.type)
|
258
|
+
raise error_class.new(response, error)
|
259
|
+
rescue NameError
|
260
|
+
error_class = Errors::APIError.from_response(http_response)
|
261
|
+
raise error_class.new(response, error)
|
262
|
+
end
|
258
263
|
end
|
259
264
|
|
260
265
|
error_class = Errors::APIError.from_response(http_response)
|
@@ -444,6 +444,103 @@ module Recurly
|
|
444
444
|
delete(path, **options)
|
445
445
|
end
|
446
446
|
|
447
|
+
# Get the list of billing information associated with an account
|
448
|
+
#
|
449
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/list_billing_infos list_billing_infos api documenation}
|
450
|
+
#
|
451
|
+
# @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+.
|
452
|
+
# @param ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
453
|
+
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
454
|
+
#
|
455
|
+
# *Important notes:*
|
456
|
+
#
|
457
|
+
# * The +ids+ parameter cannot be used with any other ordering or filtering
|
458
|
+
# parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
|
459
|
+
# * Invalid or unknown IDs will be ignored, so you should check that the
|
460
|
+
# results correspond to your request.
|
461
|
+
# * Records are returned in an arbitrary order. Since results are all
|
462
|
+
# returned at once you can sort the records yourself.
|
463
|
+
#
|
464
|
+
# @param sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
465
|
+
# order. In descending order updated records will move behind the cursor and could
|
466
|
+
# prevent some records from being returned.
|
467
|
+
#
|
468
|
+
# @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
469
|
+
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
470
|
+
#
|
471
|
+
# @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
472
|
+
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
473
|
+
#
|
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
|
+
#
|
476
|
+
# @return [Pager<Resources::BillingInfo>] A list of the the billing information for an account's
|
477
|
+
#
|
478
|
+
def list_billing_infos(account_id:, **options)
|
479
|
+
path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id)
|
480
|
+
pager(path, **options)
|
481
|
+
end
|
482
|
+
|
483
|
+
# Set an account's billing information when the wallet feature is enabled
|
484
|
+
#
|
485
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/create_billing_info create_billing_info api documenation}
|
486
|
+
#
|
487
|
+
# @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+.
|
488
|
+
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
489
|
+
# @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+.
|
490
|
+
#
|
491
|
+
# @return [Resources::BillingInfo] Updated billing information.
|
492
|
+
#
|
493
|
+
def create_billing_info(account_id:, body:, **options)
|
494
|
+
path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id)
|
495
|
+
post(path, body, Requests::BillingInfoCreate, **options)
|
496
|
+
end
|
497
|
+
|
498
|
+
# Fetch a billing info
|
499
|
+
#
|
500
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/get_a_billing_info get_a_billing_info api documenation}
|
501
|
+
#
|
502
|
+
# @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+.
|
503
|
+
# @param billing_info_id [String] Billing Info ID.
|
504
|
+
# @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+.
|
505
|
+
#
|
506
|
+
# @return [Resources::BillingInfo] A billing info.
|
507
|
+
#
|
508
|
+
def get_a_billing_info(account_id:, billing_info_id:, **options)
|
509
|
+
path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
|
510
|
+
get(path, **options)
|
511
|
+
end
|
512
|
+
|
513
|
+
# Update an account's billing information
|
514
|
+
#
|
515
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/update_a_billing_info update_a_billing_info api documenation}
|
516
|
+
#
|
517
|
+
# @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+.
|
518
|
+
# @param billing_info_id [String] Billing Info ID.
|
519
|
+
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
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
|
+
#
|
522
|
+
# @return [Resources::BillingInfo] Updated billing information.
|
523
|
+
#
|
524
|
+
def update_a_billing_info(account_id:, billing_info_id:, body:, **options)
|
525
|
+
path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
|
526
|
+
put(path, body, Requests::BillingInfoCreate, **options)
|
527
|
+
end
|
528
|
+
|
529
|
+
# Remove an account's billing information
|
530
|
+
#
|
531
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/remove_a_billing_info remove_a_billing_info api documenation}
|
532
|
+
#
|
533
|
+
# @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+.
|
534
|
+
# @param billing_info_id [String] Billing Info ID.
|
535
|
+
# @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+.
|
536
|
+
#
|
537
|
+
# @return [Resources::Empty] Billing information deleted
|
538
|
+
#
|
539
|
+
def remove_a_billing_info(account_id:, billing_info_id:, **options)
|
540
|
+
path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
|
541
|
+
delete(path, **options)
|
542
|
+
end
|
543
|
+
|
447
544
|
# Show the coupon redemptions for an account
|
448
545
|
#
|
449
546
|
# {https://developers.recurly.com/api/v2019-10-10#operation/list_account_coupon_redemptions list_account_coupon_redemptions api documenation}
|
@@ -471,6 +568,7 @@ module Recurly
|
|
471
568
|
# @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
472
569
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
473
570
|
#
|
571
|
+
# @param state [String] Filter by state.
|
474
572
|
# @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
573
|
#
|
476
574
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on an account.
|
@@ -511,7 +609,7 @@ module Recurly
|
|
511
609
|
get(path, **options)
|
512
610
|
end
|
513
611
|
|
514
|
-
# Generate an active coupon redemption on an account
|
612
|
+
# Generate an active coupon redemption on an account or subscription
|
515
613
|
#
|
516
614
|
# {https://developers.recurly.com/api/v2019-10-10#operation/create_coupon_redemption create_coupon_redemption api documenation}
|
517
615
|
#
|
@@ -1364,6 +1462,32 @@ module Recurly
|
|
1364
1462
|
delete(path, **options)
|
1365
1463
|
end
|
1366
1464
|
|
1465
|
+
# Restore an inactive coupon
|
1466
|
+
#
|
1467
|
+
# {https://developers.recurly.com/api/v2019-10-10#operation/restore_coupon restore_coupon api documenation}
|
1468
|
+
#
|
1469
|
+
# @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+.
|
1470
|
+
# @param body [Requests::CouponUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponUpdate}
|
1471
|
+
# @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+.
|
1472
|
+
#
|
1473
|
+
# @return [Resources::Coupon] The restored coupon.
|
1474
|
+
# @example
|
1475
|
+
# begin
|
1476
|
+
# coupon = @client.restore_coupon(coupon_id: coupon_id, body: {
|
1477
|
+
# name: "New Coupon Name"
|
1478
|
+
# })
|
1479
|
+
# puts "Restored coupon #{coupon}"
|
1480
|
+
# rescue Recurly::Errors::NotFoundError
|
1481
|
+
# # If the resource was not found, you may want to alert the user or
|
1482
|
+
# # just return nil
|
1483
|
+
# puts "Resource Not Found"
|
1484
|
+
# end
|
1485
|
+
#
|
1486
|
+
def restore_coupon(coupon_id:, body:, **options)
|
1487
|
+
path = interpolate_path("/coupons/{coupon_id}/restore", coupon_id: coupon_id)
|
1488
|
+
put(path, body, Requests::CouponUpdate, **options)
|
1489
|
+
end
|
1490
|
+
|
1367
1491
|
# List unique coupon codes associated with a bulk coupon
|
1368
1492
|
#
|
1369
1493
|
# {https://developers.recurly.com/api/v2019-10-10#operation/list_unique_coupon_codes list_unique_coupon_codes api documenation}
|
@@ -2929,6 +3053,7 @@ module Recurly
|
|
2929
3053
|
#
|
2930
3054
|
# You may also terminate a subscription with no refund and then manually refund specific invoices.
|
2931
3055
|
#
|
3056
|
+
# @param charge [Boolean] Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.
|
2932
3057
|
# @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
3058
|
#
|
2934
3059
|
# @return [Resources::Subscription] An expired subscription.
|
@@ -3605,6 +3730,17 @@ module Recurly
|
|
3605
3730
|
# @param site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3606
3731
|
#
|
3607
3732
|
# @return [Resources::ExportDates] Returns a list of dates.
|
3733
|
+
# @example
|
3734
|
+
# begin
|
3735
|
+
# export_dates = @client.get_export_dates()
|
3736
|
+
# export_dates.dates.each do |date|
|
3737
|
+
# puts "Exports are available for: #{date}"
|
3738
|
+
# end
|
3739
|
+
# rescue Recurly::Errors::NotFoundError
|
3740
|
+
# # If the resource was not found, you may want to alert the user or
|
3741
|
+
# # just return nil
|
3742
|
+
# puts "Resource Not Found"
|
3743
|
+
# end
|
3608
3744
|
#
|
3609
3745
|
def get_export_dates(**options)
|
3610
3746
|
path = interpolate_path("/export_dates")
|
@@ -3619,6 +3755,17 @@ module Recurly
|
|
3619
3755
|
# @param site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3620
3756
|
#
|
3621
3757
|
# @return [Resources::ExportFiles] Returns a list of export files to download.
|
3758
|
+
# @example
|
3759
|
+
# begin
|
3760
|
+
# export_files = @client.get_export_files(export_date: export_date)
|
3761
|
+
# export_files.files.each do |file|
|
3762
|
+
# puts "Export file download URL: #{file.href}"
|
3763
|
+
# end
|
3764
|
+
# rescue Recurly::Errors::NotFoundError
|
3765
|
+
# # If the resource was not found, you may want to alert the user or
|
3766
|
+
# # just return nil
|
3767
|
+
# puts "Resource Not Found"
|
3768
|
+
# end
|
3622
3769
|
#
|
3623
3770
|
def get_export_files(export_date:, **options)
|
3624
3771
|
path = interpolate_path("/export_dates/{export_date}/export_files", export_date: export_date)
|
@@ -74,6 +74,10 @@ module Recurly
|
|
74
74
|
# @return [String] PayPal billing agreement ID
|
75
75
|
define_attribute :paypal_billing_agreement_id, String
|
76
76
|
|
77
|
+
# @!attribute primary_payment_method
|
78
|
+
# @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
|
79
|
+
define_attribute :primary_payment_method, :Boolean
|
80
|
+
|
77
81
|
# @!attribute routing_number
|
78
82
|
# @return [String] The bank's rounting number. (ACH only)
|
79
83
|
define_attribute :routing_number, String
|
@@ -82,6 +86,14 @@ module Recurly
|
|
82
86
|
# @return [String] Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)
|
83
87
|
define_attribute :sort_code, String
|
84
88
|
|
89
|
+
# @!attribute tax_identifier
|
90
|
+
# @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil. This would be the customer's CPF, CPF is a Brazilian tax identifier for all tax paying residents.
|
91
|
+
define_attribute :tax_identifier, String
|
92
|
+
|
93
|
+
# @!attribute tax_identifier_type
|
94
|
+
# @return [String] this field and a value of 'cpf' are required if adding a billing info that is an elo or hipercard type in Brazil.
|
95
|
+
define_attribute :tax_identifier_type, String
|
96
|
+
|
85
97
|
# @!attribute three_d_secure_action_result_token_id
|
86
98
|
# @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
|
87
99
|
define_attribute :three_d_secure_action_result_token_id, String
|
@@ -6,6 +6,10 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class CouponCreate < Request
|
8
8
|
|
9
|
+
# @!attribute applies_to_all_items
|
10
|
+
# @return [Boolean] To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`.
|
11
|
+
define_attribute :applies_to_all_items, :Boolean
|
12
|
+
|
9
13
|
# @!attribute applies_to_all_plans
|
10
14
|
# @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
|
11
15
|
define_attribute :applies_to_all_plans, :Boolean
|
@@ -54,6 +58,10 @@ module Recurly
|
|
54
58
|
# @return [String] Description of the coupon on the invoice.
|
55
59
|
define_attribute :invoice_description, String
|
56
60
|
|
61
|
+
# @!attribute item_codes
|
62
|
+
# @return [Array[String]] List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`.
|
63
|
+
define_attribute :item_codes, Array, { :item_type => String }
|
64
|
+
|
57
65
|
# @!attribute max_redemptions
|
58
66
|
# @return [Integer] A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
|
59
67
|
define_attribute :max_redemptions, Integer
|
@@ -13,6 +13,10 @@ module Recurly
|
|
13
13
|
# @!attribute currency
|
14
14
|
# @return [String] 3-letter ISO 4217 currency code.
|
15
15
|
define_attribute :currency, String
|
16
|
+
|
17
|
+
# @!attribute subscription_id
|
18
|
+
# @return [String] Subscription ID
|
19
|
+
define_attribute :subscription_id, String
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -6,6 +6,10 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class InvoiceCollect < Request
|
8
8
|
|
9
|
+
# @!attribute billing_info_id
|
10
|
+
# @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
|
11
|
+
define_attribute :billing_info_id, String
|
12
|
+
|
9
13
|
# @!attribute three_d_secure_action_result_token_id
|
10
14
|
# @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
|
11
15
|
define_attribute :three_d_secure_action_result_token_id, String
|
@@ -10,10 +10,6 @@ module Recurly
|
|
10
10
|
# @return [String] Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.
|
11
11
|
define_attribute :accounting_code, String
|
12
12
|
|
13
|
-
# @!attribute add_ons
|
14
|
-
# @return [Array[AddOnCreate]] Add Ons
|
15
|
-
define_attribute :add_ons, Array, { :item_type => :AddOnCreate }
|
16
|
-
|
17
13
|
# @!attribute allow_any_item_on_subscriptions
|
18
14
|
# @return [Boolean] Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used.
|
19
15
|
define_attribute :allow_any_item_on_subscriptions, :Boolean
|
@@ -10,6 +10,10 @@ module Recurly
|
|
10
10
|
# @return [AccountPurchase]
|
11
11
|
define_attribute :account, :AccountPurchase
|
12
12
|
|
13
|
+
# @!attribute billing_info_id
|
14
|
+
# @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
|
15
|
+
define_attribute :billing_info_id, String
|
16
|
+
|
13
17
|
# @!attribute collection_method
|
14
18
|
# @return [String] Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info.
|
15
19
|
define_attribute :collection_method, String
|
@@ -18,6 +18,10 @@ module Recurly
|
|
18
18
|
# @return [Boolean] Whether the subscription renews at the end of its term.
|
19
19
|
define_attribute :auto_renew, :Boolean
|
20
20
|
|
21
|
+
# @!attribute billing_info_id
|
22
|
+
# @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
|
23
|
+
define_attribute :billing_info_id, String
|
24
|
+
|
21
25
|
# @!attribute collection_method
|
22
26
|
# @return [String] Collection method
|
23
27
|
define_attribute :collection_method, String
|
@@ -10,6 +10,10 @@ module Recurly
|
|
10
10
|
# @return [Boolean] Whether the subscription renews at the end of its term.
|
11
11
|
define_attribute :auto_renew, :Boolean
|
12
12
|
|
13
|
+
# @!attribute billing_info_id
|
14
|
+
# @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
|
15
|
+
define_attribute :billing_info_id, String
|
16
|
+
|
13
17
|
# @!attribute collection_method
|
14
18
|
# @return [String] Change collection method
|
15
19
|
define_attribute :collection_method, String
|