recurly 3.0.0.beta.2 → 3.0.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +1 -1
  4. data/lib/recurly/client.rb +39 -37
  5. data/lib/recurly/client/adapter.rb +46 -0
  6. data/lib/recurly/client/operations.rb +626 -170
  7. data/lib/recurly/errors.rb +1 -1
  8. data/lib/recurly/requests/{create_account.rb → account_create.rb} +5 -1
  9. data/lib/recurly/requests/{account_updatable.rb → account_update.rb} +5 -1
  10. data/lib/recurly/requests/add_on_create.rb +2 -2
  11. data/lib/recurly/requests/add_on_update.rb +2 -2
  12. data/lib/recurly/requests/coupon_bulk_create.rb +10 -0
  13. data/lib/recurly/requests/{create_coupon.rb → coupon_create.rb} +3 -3
  14. data/lib/recurly/requests/coupon_redemption_create.rb +14 -0
  15. data/lib/recurly/requests/{update_coupon.rb → coupon_update.rb} +1 -1
  16. data/lib/recurly/requests/invoice_refund.rb +2 -2
  17. data/lib/recurly/requests/line_item_refund.rb +18 -0
  18. data/lib/recurly/requests/plan_create.rb +8 -4
  19. data/lib/recurly/requests/plan_update.rb +8 -12
  20. data/lib/recurly/requests/subscription_add_on_create.rb +0 -4
  21. data/lib/recurly/requests/subscription_create.rb +21 -9
  22. data/lib/recurly/requests/subscription_pause.rb +10 -0
  23. data/lib/recurly/requests/subscription_update.rb +16 -4
  24. data/lib/recurly/resources/account.rb +4 -0
  25. data/lib/recurly/resources/account_acquisition.rb +2 -2
  26. data/lib/recurly/resources/account_balance.rb +2 -2
  27. data/lib/recurly/resources/add_on.rb +2 -2
  28. data/lib/recurly/resources/coupon.rb +2 -2
  29. data/lib/recurly/resources/coupon_discount.rb +2 -2
  30. data/lib/recurly/resources/coupon_redemption_mini.rb +2 -2
  31. data/lib/recurly/resources/credit_payment.rb +6 -6
  32. data/lib/recurly/resources/custom_field.rb +14 -0
  33. data/lib/recurly/resources/custom_field_definition.rb +46 -0
  34. data/lib/recurly/resources/error.rb +2 -2
  35. data/lib/recurly/resources/error_may_have_transaction.rb +2 -2
  36. data/lib/recurly/resources/invoice.rb +4 -4
  37. data/lib/recurly/resources/line_item.rb +3 -3
  38. data/lib/recurly/resources/line_item_list.rb +22 -0
  39. data/lib/recurly/resources/plan.rb +6 -2
  40. data/lib/recurly/resources/subscription.rb +37 -5
  41. data/lib/recurly/resources/subscription_add_on.rb +2 -2
  42. data/lib/recurly/resources/subscription_change.rb +2 -2
  43. data/lib/recurly/resources/transaction.rb +6 -6
  44. data/lib/recurly/version.rb +1 -1
  45. data/recurly.gemspec +1 -0
  46. metadata +28 -21
  47. data/bin/bundle +0 -105
  48. data/bin/coderay +0 -29
  49. data/bin/console +0 -14
  50. data/bin/htmldiff +0 -29
  51. data/bin/ldiff +0 -29
  52. data/bin/pry +0 -29
  53. data/bin/rake +0 -29
  54. data/bin/rspec +0 -29
  55. data/bin/setup +0 -8
  56. data/bin/yard +0 -29
  57. data/bin/yardoc +0 -29
  58. data/bin/yri +0 -29
  59. data/lib/recurly/requests/account_create_only.rb +0 -18
  60. data/lib/recurly/requests/coupon_create_only.rb +0 -66
  61. data/lib/recurly/requests/coupon_updatable.rb +0 -30
@@ -0,0 +1,14 @@
1
+ module Recurly
2
+ module Resources
3
+ class CustomField < Resource
4
+
5
+ # @!attribute name
6
+ # @return [String] Fields must be created in the UI before values can be assigned to them.
7
+ define_attribute :name, String
8
+
9
+ # @!attribute value
10
+ # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
11
+ define_attribute :value, String
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,46 @@
1
+ module Recurly
2
+ module Resources
3
+ class CustomFieldDefinition < Resource
4
+
5
+ # @!attribute [r] created_at
6
+ # @return [DateTime] Created at
7
+ define_attribute :created_at, DateTime, {:read_only => true}
8
+
9
+ # @!attribute [r] deleted_at
10
+ # @return [DateTime] Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible.
11
+ define_attribute :deleted_at, DateTime, {:read_only => true}
12
+
13
+ # @!attribute display_name
14
+ # @return [String] Used to label the field when viewing and editing the field in Recurly's admin UI.
15
+ define_attribute :display_name, String
16
+
17
+ # @!attribute [r] id
18
+ # @return [String] Custom field definition ID
19
+ define_attribute :id, String, {:read_only => true}
20
+
21
+ # @!attribute name
22
+ # @return [String] Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type.
23
+ define_attribute :name, String
24
+
25
+ # @!attribute [r] object
26
+ # @return [String] Object type
27
+ define_attribute :object, String, {:read_only => true}
28
+
29
+ # @!attribute related_type
30
+ # @return [String] Related Recurly object type
31
+ define_attribute :related_type, String, {:enum => ["account", "subscription"]}
32
+
33
+ # @!attribute tooltip
34
+ # @return [String] Displayed as a tooltip when editing the field in the Recurly admin UI.
35
+ define_attribute :tooltip, String
36
+
37
+ # @!attribute [r] updated_at
38
+ # @return [DateTime] Last updated at
39
+ define_attribute :updated_at, DateTime, {:read_only => true}
40
+
41
+ # @!attribute user_access
42
+ # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
43
+ define_attribute :user_access, String, {:enum => ["api_only", "read_only", "write"]}
44
+ end
45
+ end
46
+ end
@@ -7,8 +7,8 @@ module Recurly
7
7
  define_attribute :message, String
8
8
 
9
9
  # @!attribute params
10
- # @return [Array[String]] Parameter specific errors
11
- define_attribute :params, Array, {:item_type => String}
10
+ # @return [Array[Hash]] Parameter specific errors
11
+ define_attribute :params, Array, {:item_type => Hash}
12
12
 
13
13
  # @!attribute type
14
14
  # @return [String] Type
@@ -7,8 +7,8 @@ module Recurly
7
7
  define_attribute :message, String
8
8
 
9
9
  # @!attribute params
10
- # @return [Array[String]] Parameter specific errors
11
- define_attribute :params, Array, {:item_type => String}
10
+ # @return [Array[Hash]] Parameter specific errors
11
+ define_attribute :params, Array, {:item_type => Hash}
12
12
 
13
13
  # @!attribute transaction_error
14
14
  # @return [Hash] This is only included on errors with `type=transaction`.
@@ -3,8 +3,8 @@ module Recurly
3
3
  class Invoice < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute address
10
10
  # @return [Address]
@@ -51,8 +51,8 @@ module Recurly
51
51
  define_attribute :id, String, {:read_only => true}
52
52
 
53
53
  # @!attribute line_items
54
- # @return [Array[LineItem]] Line items
55
- define_attribute :line_items, Array, {:item_type => :LineItem}
54
+ # @return [LineItemList]
55
+ define_attribute :line_items, :LineItemList
56
56
 
57
57
  # @!attribute net_terms
58
58
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
@@ -3,8 +3,8 @@ module Recurly
3
3
  class LineItem < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute accounting_code
10
10
  # @return [String] Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.
@@ -63,7 +63,7 @@ module Recurly
63
63
  define_attribute :invoice_number, String
64
64
 
65
65
  # @!attribute legacy_category
66
- # @return [String] Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their `original_line_item_invoice_id` to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
66
+ # @return [String] Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
67
67
  define_attribute :legacy_category, String, {:enum => ["charge", "credit", "applied_credit", "carryforward"]}
68
68
 
69
69
  # @!attribute object
@@ -0,0 +1,22 @@
1
+ module Recurly
2
+ module Resources
3
+ class LineItemList < Resource
4
+
5
+ # @!attribute data
6
+ # @return [Array[LineItem]]
7
+ define_attribute :data, Array, {:item_type => :LineItem}
8
+
9
+ # @!attribute has_more
10
+ # @return [Boolean] Indicates there are more results on subsequent pages.
11
+ define_attribute :has_more, :Boolean
12
+
13
+ # @!attribute next
14
+ # @return [String] Path to subsequent page of results.
15
+ define_attribute :next, String
16
+
17
+ # @!attribute object
18
+ # @return [String] Will always be List.
19
+ define_attribute :object, String
20
+ end
21
+ end
22
+ end
@@ -6,6 +6,10 @@ module Recurly
6
6
  # @return [String] Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.
7
7
  define_attribute :accounting_code, String
8
8
 
9
+ # @!attribute auto_renew
10
+ # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
11
+ define_attribute :auto_renew, :Boolean
12
+
9
13
  # @!attribute code
10
14
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
11
15
  define_attribute :code, String
@@ -15,8 +19,8 @@ module Recurly
15
19
  define_attribute :created_at, DateTime, {:read_only => true}
16
20
 
17
21
  # @!attribute currencies
18
- # @return [Array[String]] Pricing
19
- define_attribute :currencies, Array, {:item_type => String}
22
+ # @return [Array[Hash]] Pricing
23
+ define_attribute :currencies, Array, {:item_type => Hash}
20
24
 
21
25
  # @!attribute [r] deleted_at
22
26
  # @return [DateTime] Deleted at
@@ -3,8 +3,8 @@ module Recurly
3
3
  class Subscription < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute activated_at
10
10
  # @return [DateTime] Activated at
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [Float] Total price of add-ons
19
19
  define_attribute :add_ons_total, Float
20
20
 
21
+ # @!attribute auto_renew
22
+ # @return [Boolean] Whether the subscription renews at the end of its term.
23
+ define_attribute :auto_renew, :Boolean
24
+
21
25
  # @!attribute bank_account_authorized_at
22
26
  # @return [DateTime] Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
23
27
  define_attribute :bank_account_authorized_at, DateTime
@@ -50,6 +54,18 @@ module Recurly
50
54
  # @return [DateTime] Current billing period started at
51
55
  define_attribute :current_period_started_at, DateTime
52
56
 
57
+ # @!attribute current_term_ends_at
58
+ # @return [DateTime] When the term ends. This is calculated by a plan's interval and `total_billing_cycles` in a term. Subscription changes with a `timeframe=renewal` will be applied on this date.
59
+ define_attribute :current_term_ends_at, DateTime
60
+
61
+ # @!attribute current_term_started_at
62
+ # @return [DateTime] The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods.
63
+ define_attribute :current_term_started_at, DateTime
64
+
65
+ # @!attribute custom_fields
66
+ # @return [Array[CustomField]]
67
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
68
+
53
69
  # @!attribute customer_notes
54
70
  # @return [String] Customer notes
55
71
  define_attribute :customer_notes, String
@@ -74,13 +90,17 @@ module Recurly
74
90
  # @return [String] Object type
75
91
  define_attribute :object, String
76
92
 
93
+ # @!attribute paused_at
94
+ # @return [DateTime] Null unless subscription is paused or will pause at the end of the current billing period.
95
+ define_attribute :paused_at, DateTime
96
+
77
97
  # @!attribute pending_change
78
98
  # @return [SubscriptionChange]
79
99
  define_attribute :pending_change, :SubscriptionChange
80
100
 
81
101
  # @!attribute plan
82
- # @return [Plan]
83
- define_attribute :plan, :Plan
102
+ # @return [PlanMini]
103
+ define_attribute :plan, :PlanMini
84
104
 
85
105
  # @!attribute po_number
86
106
  # @return [String] For manual invoicing, this identifies the PO number associated with the subscription.
@@ -91,9 +111,17 @@ module Recurly
91
111
  define_attribute :quantity, Integer
92
112
 
93
113
  # @!attribute remaining_billing_cycles
94
- # @return [Integer] Remaining billing cycles
114
+ # @return [Integer] The remaining billing cycles in the current term.
95
115
  define_attribute :remaining_billing_cycles, Integer
96
116
 
117
+ # @!attribute remaining_pause_cycles
118
+ # @return [Integer] Null unless subscription is paused or will pause at the end of the current billing period.
119
+ define_attribute :remaining_pause_cycles, Integer
120
+
121
+ # @!attribute renewal_billing_cycles
122
+ # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
123
+ define_attribute :renewal_billing_cycles, Integer
124
+
97
125
  # @!attribute shipping_address
98
126
  # @return [ShippingAddress]
99
127
  define_attribute :shipping_address, :ShippingAddress
@@ -110,6 +138,10 @@ module Recurly
110
138
  # @return [String] Terms and conditions
111
139
  define_attribute :terms_and_conditions, String
112
140
 
141
+ # @!attribute total_billing_cycles
142
+ # @return [Integer] The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
143
+ define_attribute :total_billing_cycles, Integer
144
+
113
145
  # @!attribute trial_ends_at
114
146
  # @return [DateTime] Trial period ends at
115
147
  define_attribute :trial_ends_at, DateTime
@@ -3,8 +3,8 @@ module Recurly
3
3
  class SubscriptionAddOn < Resource
4
4
 
5
5
  # @!attribute add_on
6
- # @return [AddOn]
7
- define_attribute :add_on, :AddOn
6
+ # @return [AddOnMini]
7
+ define_attribute :add_on, :AddOnMini
8
8
 
9
9
  # @!attribute created_at
10
10
  # @return [DateTime] Created at
@@ -31,8 +31,8 @@ module Recurly
31
31
  define_attribute :object, String
32
32
 
33
33
  # @!attribute plan
34
- # @return [Plan]
35
- define_attribute :plan, :Plan
34
+ # @return [PlanMini]
35
+ define_attribute :plan, :PlanMini
36
36
 
37
37
  # @!attribute quantity
38
38
  # @return [Integer] Subscription quantity
@@ -3,8 +3,8 @@ module Recurly
3
3
  class Transaction < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute amount
10
10
  # @return [Float] Total transaction amount sent to the payment gateway.
@@ -71,8 +71,8 @@ module Recurly
71
71
  define_attribute :id, String
72
72
 
73
73
  # @!attribute invoice
74
- # @return [Invoice]
75
- define_attribute :invoice, :Invoice
74
+ # @return [InvoiceMini]
75
+ define_attribute :invoice, :InvoiceMini
76
76
 
77
77
  # @!attribute ip_address_country
78
78
  # @return [String] IP address's country
@@ -139,8 +139,8 @@ module Recurly
139
139
  define_attribute :voided_at, DateTime
140
140
 
141
141
  # @!attribute voided_by_invoice
142
- # @return [Invoice]
143
- define_attribute :voided_by_invoice, :Invoice
142
+ # @return [InvoiceMini]
143
+ define_attribute :voided_by_invoice, :InvoiceMini
144
144
  end
145
145
  end
146
146
  end
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "3.0.0.beta.2"
2
+ VERSION = "3.0.0.beta.3"
3
3
  end
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency "faraday", "~> 0.12"
25
25
 
26
+ spec.add_development_dependency "net-http-persistent", "~> 2.9.4"
26
27
  spec.add_development_dependency "bundler", "~> 1.14"
27
28
  spec.add_development_dependency "rake", "~> 10.0"
28
29
  spec.add_development_dependency "rspec", "~> 3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.2
4
+ version: 3.0.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: net-http-persistent
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.9.4
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.9.4
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -122,21 +136,10 @@ files:
122
136
  - LICENSE.txt
123
137
  - README.md
124
138
  - Rakefile
125
- - bin/bundle
126
- - bin/coderay
127
- - bin/console
128
- - bin/htmldiff
129
- - bin/ldiff
130
- - bin/pry
131
- - bin/rake
132
- - bin/rspec
133
- - bin/setup
134
- - bin/yard
135
- - bin/yardoc
136
- - bin/yri
137
139
  - lib/data/ca-certificates.crt
138
140
  - lib/recurly.rb
139
141
  - lib/recurly/client.rb
142
+ - lib/recurly/client/adapter.rb
140
143
  - lib/recurly/client/operations.rb
141
144
  - lib/recurly/errors.rb
142
145
  - lib/recurly/errors/api_errors.rb
@@ -144,19 +147,20 @@ files:
144
147
  - lib/recurly/pager.rb
145
148
  - lib/recurly/request.rb
146
149
  - lib/recurly/requests/account_acquisition_updatable.rb
147
- - lib/recurly/requests/account_create_only.rb
148
- - lib/recurly/requests/account_updatable.rb
150
+ - lib/recurly/requests/account_create.rb
151
+ - lib/recurly/requests/account_update.rb
149
152
  - lib/recurly/requests/add_on_create.rb
150
153
  - lib/recurly/requests/add_on_update.rb
151
154
  - lib/recurly/requests/address.rb
152
155
  - lib/recurly/requests/billing_info_create.rb
153
- - lib/recurly/requests/coupon_create_only.rb
154
- - lib/recurly/requests/coupon_updatable.rb
155
- - lib/recurly/requests/create_account.rb
156
- - lib/recurly/requests/create_coupon.rb
156
+ - lib/recurly/requests/coupon_bulk_create.rb
157
+ - lib/recurly/requests/coupon_create.rb
158
+ - lib/recurly/requests/coupon_redemption_create.rb
159
+ - lib/recurly/requests/coupon_update.rb
157
160
  - lib/recurly/requests/invoice_create.rb
158
161
  - lib/recurly/requests/invoice_refund.rb
159
162
  - lib/recurly/requests/line_item_create.rb
163
+ - lib/recurly/requests/line_item_refund.rb
160
164
  - lib/recurly/requests/plan_create.rb
161
165
  - lib/recurly/requests/plan_update.rb
162
166
  - lib/recurly/requests/shipping_address_create.rb
@@ -164,8 +168,8 @@ files:
164
168
  - lib/recurly/requests/subscription_add_on_create.rb
165
169
  - lib/recurly/requests/subscription_change_create.rb
166
170
  - lib/recurly/requests/subscription_create.rb
171
+ - lib/recurly/requests/subscription_pause.rb
167
172
  - lib/recurly/requests/subscription_update.rb
168
- - lib/recurly/requests/update_coupon.rb
169
173
  - lib/recurly/resource.rb
170
174
  - lib/recurly/resources/account.rb
171
175
  - lib/recurly/resources/account_acquisition.rb
@@ -182,12 +186,15 @@ files:
182
186
  - lib/recurly/resources/coupon_redemption.rb
183
187
  - lib/recurly/resources/coupon_redemption_mini.rb
184
188
  - lib/recurly/resources/credit_payment.rb
189
+ - lib/recurly/resources/custom_field.rb
190
+ - lib/recurly/resources/custom_field_definition.rb
185
191
  - lib/recurly/resources/error.rb
186
192
  - lib/recurly/resources/error_may_have_transaction.rb
187
193
  - lib/recurly/resources/invoice.rb
188
194
  - lib/recurly/resources/invoice_collection.rb
189
195
  - lib/recurly/resources/invoice_mini.rb
190
196
  - lib/recurly/resources/line_item.rb
197
+ - lib/recurly/resources/line_item_list.rb
191
198
  - lib/recurly/resources/plan.rb
192
199
  - lib/recurly/resources/plan_mini.rb
193
200
  - lib/recurly/resources/settings.rb
data/bin/bundle DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bundle' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1 || ">= 0.a"
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("../../Gemfile", __FILE__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_version
64
- @bundler_version ||= begin
65
- env_var_version || cli_arg_version ||
66
- lockfile_version || "#{Gem::Requirement.default}.a"
67
- end
68
- end
69
-
70
- def load_bundler!
71
- ENV["BUNDLE_GEMFILE"] ||= gemfile
72
-
73
- # must dup string for RG < 1.8 compatibility
74
- activate_bundler(bundler_version.dup)
75
- end
76
-
77
- def activate_bundler(bundler_version)
78
- if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
- bundler_version = "< 2"
80
- end
81
- gem_error = activation_error_handling do
82
- gem "bundler", bundler_version
83
- end
84
- return if gem_error.nil?
85
- require_error = activation_error_handling do
86
- require "bundler/version"
87
- end
88
- return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
- warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
90
- exit 42
91
- end
92
-
93
- def activation_error_handling
94
- yield
95
- nil
96
- rescue StandardError, LoadError => e
97
- e
98
- end
99
- end
100
-
101
- m.load_bundler!
102
-
103
- if m.invoked_as_script?
104
- load Gem.bin_path("bundler", "bundle")
105
- end