recurly 3.14.0 → 3.18.1
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/.travis.yml +1 -0
- data/CHANGELOG.md +72 -3
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client.rb +2 -2
- data/lib/recurly/client/operations.rb +111 -1
- data/lib/recurly/errors/api_errors.rb +2 -0
- data/lib/recurly/pager.rb +1 -1
- 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 +487 -35
- 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: 116deeff1797454126fb1dcdf1aa3b4c597706b801108db0fe733e03f29e2d96
|
4
|
+
data.tar.gz: 1393beaf04029829abef57a7daf685891bdf1181f32452af2d772d1bce8eb1ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7712df32a93b5091d892b77b5dacba27c2f6bb3fe48fffedce730b652c466c2e02e772243c5c5c43a83434490c15b172295e1df93d4287b975b36f42aeebdc
|
7
|
+
data.tar.gz: 53b2ded880393c1c81909b6d2ec7e5fc7da73827ede6b6fdd7030defa15a9f707821d28de4d8aee9951f1c99e7a80ef8d0685feaced8c330fce9dfe1ea4ef927
|
data/.bumpversion.cfg
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,69 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [3.
|
3
|
+
## [3.18.1](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.18.0...HEAD)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Fixing issues with ruby 3.0 [\#665](https://github.com/recurly/recurly-client-ruby/pull/665) ([douglasmiller](https://github.com/douglasmiller))
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Release 3.18.1 [\#666](https://github.com/recurly/recurly-client-ruby/pull/666) ([douglasmiller](https://github.com/douglasmiller))
|
14
|
+
|
15
|
+
## [3.18.0](https://github.com/recurly/recurly-client-ruby/tree/3.18.0) (2021-01-22)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.17.0...3.18.0)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Latest Changes for 2019-10-10 [\#660](https://github.com/recurly/recurly-client-ruby/pull/660) ([douglasmiller](https://github.com/douglasmiller))
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Release 3.18.0 [\#661](https://github.com/recurly/recurly-client-ruby/pull/661) ([douglasmiller](https://github.com/douglasmiller))
|
26
|
+
|
27
|
+
## [3.17.0](https://github.com/recurly/recurly-client-ruby/tree/3.17.0) (2020-12-08)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.16.0...3.17.0)
|
30
|
+
|
31
|
+
**Implemented enhancements:**
|
32
|
+
|
33
|
+
- Latest Changes for 2019-10-10 [\#657](https://github.com/recurly/recurly-client-ruby/pull/657) ([douglasmiller](https://github.com/douglasmiller))
|
34
|
+
|
35
|
+
**Merged pull requests:**
|
36
|
+
|
37
|
+
- Release 3.17.0 [\#658](https://github.com/recurly/recurly-client-ruby/pull/658) ([douglasmiller](https://github.com/douglasmiller))
|
38
|
+
|
39
|
+
## [3.16.0](https://github.com/recurly/recurly-client-ruby/tree/3.16.0) (2020-11-24)
|
40
|
+
|
41
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.15.0...3.16.0)
|
42
|
+
|
43
|
+
**Implemented enhancements:**
|
44
|
+
|
45
|
+
- 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))
|
46
|
+
- Latest Changes for 2019-10-10 [\#651](https://github.com/recurly/recurly-client-ruby/pull/651) ([douglasmiller](https://github.com/douglasmiller))
|
47
|
+
|
48
|
+
**Merged pull requests:**
|
49
|
+
|
50
|
+
- Release 3.16.0 [\#656](https://github.com/recurly/recurly-client-ruby/pull/656) ([douglasmiller](https://github.com/douglasmiller))
|
51
|
+
|
52
|
+
## [3.15.0](https://github.com/recurly/recurly-client-ruby/tree/3.15.0) (2020-11-06)
|
53
|
+
|
54
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.14.0...3.15.0)
|
55
|
+
|
56
|
+
**Implemented enhancements:**
|
57
|
+
|
58
|
+
- Latest Changes for 2019-10-10 \(Wallet, Item Coupons\) [\#645](https://github.com/recurly/recurly-client-ruby/pull/645) ([douglasmiller](https://github.com/douglasmiller))
|
59
|
+
|
60
|
+
**Merged pull requests:**
|
61
|
+
|
62
|
+
- Release 3.15.0 [\#647](https://github.com/recurly/recurly-client-ruby/pull/647) ([douglasmiller](https://github.com/douglasmiller))
|
63
|
+
|
64
|
+
## [3.14.0](https://github.com/recurly/recurly-client-ruby/tree/3.14.0) (2020-10-20)
|
65
|
+
|
66
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.13.0...3.14.0)
|
6
67
|
|
7
68
|
**Implemented enhancements:**
|
8
69
|
|
@@ -295,7 +356,7 @@
|
|
295
356
|
|
296
357
|
## [3.0.0.beta.4](https://github.com/recurly/recurly-client-ruby/tree/3.0.0.beta.4) (2019-04-04)
|
297
358
|
|
298
|
-
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.0.0.beta.
|
359
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.0.0.beta.3...3.0.0.beta.4)
|
299
360
|
|
300
361
|
**Merged pull requests:**
|
301
362
|
|
@@ -308,6 +369,14 @@
|
|
308
369
|
- \[V3\] Test more versions of ruby [\#397](https://github.com/recurly/recurly-client-ruby/pull/397) ([drewish](https://github.com/drewish))
|
309
370
|
- Allow faraday 0.12 for compatibility with oauth2 gem [\#396](https://github.com/recurly/recurly-client-ruby/pull/396) ([drewish](https://github.com/drewish))
|
310
371
|
|
372
|
+
## [3.0.0.beta.3](https://github.com/recurly/recurly-client-ruby/tree/3.0.0.beta.3) (2018-08-27)
|
373
|
+
|
374
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.0.0.beta.2...3.0.0.beta.3)
|
375
|
+
|
376
|
+
## [3.0.0.beta.2](https://github.com/recurly/recurly-client-ruby/tree/3.0.0.beta.2) (2018-07-17)
|
377
|
+
|
378
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.0.0.beta.1...3.0.0.beta.2)
|
379
|
+
|
311
380
|
|
312
381
|
|
313
382
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
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
@@ -299,7 +299,7 @@ module Recurly
|
|
299
299
|
end
|
300
300
|
|
301
301
|
def interpolate_path(path, **options)
|
302
|
-
validate_path_parameters!(options)
|
302
|
+
validate_path_parameters!(**options)
|
303
303
|
options.each do |k, v|
|
304
304
|
# We need to encode the values for the url
|
305
305
|
options[k] = ERB::Util.url_encode(v.to_s)
|
@@ -330,7 +330,7 @@ module Recurly
|
|
330
330
|
end
|
331
331
|
end
|
332
332
|
|
333
|
-
def scope_by_site(path,
|
333
|
+
def scope_by_site(path, options)
|
334
334
|
if site = site_id || options[:site_id]
|
335
335
|
# Ensure that we are only including the site_id once because the Pager operations
|
336
336
|
# will use the cursor returned from the API which may already have these components
|
@@ -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
|
#
|
@@ -1373,6 +1471,17 @@ module Recurly
|
|
1373
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+.
|
1374
1472
|
#
|
1375
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
|
1376
1485
|
#
|
1377
1486
|
def restore_coupon(coupon_id:, body:, **options)
|
1378
1487
|
path = interpolate_path("/coupons/{coupon_id}/restore", coupon_id: coupon_id)
|
@@ -2944,6 +3053,7 @@ module Recurly
|
|
2944
3053
|
#
|
2945
3054
|
# You may also terminate a subscription with no refund and then manually refund specific invoices.
|
2946
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.
|
2947
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+.
|
2948
3058
|
#
|
2949
3059
|
# @return [Resources::Subscription] An expired subscription.
|
data/lib/recurly/pager.rb
CHANGED
@@ -116,7 +116,7 @@ module Recurly
|
|
116
116
|
|
117
117
|
def fetch_next!(options)
|
118
118
|
path = extract_path(self.next)
|
119
|
-
page = @client.send(:get, path, options)
|
119
|
+
page = @client.send(:get, path, **options)
|
120
120
|
@data = page.data.map { |d| JSONParser.from_json(d) }
|
121
121
|
@has_more = page.has_more
|
122
122
|
@next = page.next
|
@@ -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
|
@@ -46,6 +46,10 @@ module Recurly
|
|
46
46
|
# @return [PaymentMethod]
|
47
47
|
define_attribute :payment_method, :PaymentMethod
|
48
48
|
|
49
|
+
# @!attribute primary_payment_method
|
50
|
+
# @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.
|
51
|
+
define_attribute :primary_payment_method, :Boolean
|
52
|
+
|
49
53
|
# @!attribute updated_at
|
50
54
|
# @return [DateTime] When the billing information was last changed.
|
51
55
|
define_attribute :updated_at, DateTime
|