stripe 10.10.0.pre.beta.1 → 10.11.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +18 -0
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/resources/invoice_line_item.rb +15 -0
- data/lib/stripe/resources/tax_id.rb +14 -16
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1903d66d648151dffe456532457d6ae62369c49f60b9b6617f677229bf68bcfb
|
4
|
+
data.tar.gz: 275568d472af593e83f32c70b9451123b62ccc6683bb5b1280c2c71b2e734d03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c09ecf5f0b3803e01e62a143c4fe19b4c2836fff37cc86a9b2de432af383377a87ddd026104222fb644f69c88a8d4ab66d219e94e03a6cc40f3200f57ab93d1
|
7
|
+
data.tar.gz: 6d7b088894ff02817dcd2bc7cc69e9b42f86fb02620f3d91e923e271ca590eb7d44dafd7e8d43f001970f12e18046e755bd5a6b50651c9bd0d9b98fcb7492ce3
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 10.11.0-beta.1 - 2024-02-22
|
4
|
+
* [#1335](https://github.com/stripe/stripe-ruby/pull/1335) Update generated code for beta
|
5
|
+
|
6
|
+
|
7
|
+
## 10.10.0 - 2024-02-22
|
8
|
+
* [#1336](https://github.com/stripe/stripe-ruby/pull/1336) Update generated code
|
9
|
+
- Add `InvoiceLineItem.update` method.
|
10
|
+
* [#1334](https://github.com/stripe/stripe-ruby/pull/1334) Add TaxIds API
|
11
|
+
* Add support for `all`, `create`, and `retrieve` methods on resource `TaxId`
|
12
|
+
* The `delete` method now sends a DELETE request to `/v1/tax_ids/{id}` instead of `/v1/customers/{customer}/tax_ids/{id}`. The endpoints are functionally the same when operating on a Customer Tax ID.
|
13
|
+
* The `resource_url` method on `TaxId` now returns the top-level `/v1/tax_ids/{id}` path instead of the `/v1/customers/{customer}/tax_ids/{id}` path.
|
14
|
+
|
3
15
|
## 10.10.0-beta.1 - 2024-02-16
|
4
16
|
* [#1332](https://github.com/stripe/stripe-ruby/pull/1332) Update generated code for beta
|
5
17
|
* Add support for `decrement_authorization` method on resource `PaymentIntent`
|
6
18
|
* [#1328](https://github.com/stripe/stripe-ruby/pull/1328) Update generated code for beta
|
7
19
|
|
8
|
-
|
9
20
|
## 10.9.0 - 2024-02-15
|
10
21
|
* [#1329](https://github.com/stripe/stripe-ruby/pull/1329) Update generated code
|
11
22
|
* Fixed bug where `TaxId` resource `delete` method sent request to wrong URL (https://github.com/stripe/stripe-ruby/issues/1333)
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v840
|
data/README.md
CHANGED
@@ -131,6 +131,24 @@ Keep in mind that there are different method signatures depending on the action:
|
|
131
131
|
`retrieve(id, opts)`. In addition, it will accept a Hash for the `id` param but will extract the
|
132
132
|
`id` key out and use the others as options.
|
133
133
|
|
134
|
+
### Accessing resource properties
|
135
|
+
|
136
|
+
Both indexer and accessors can be used to retrieve values of resource properties.
|
137
|
+
|
138
|
+
```ruby
|
139
|
+
customer = Stripe::Customer.retrieve('cus_123456789')
|
140
|
+
puts customer['id']
|
141
|
+
puts customer.id
|
142
|
+
```
|
143
|
+
|
144
|
+
NOTE: If the resource property is not defined, the accessors will raise an exception, while the indexer will return `nil`.
|
145
|
+
|
146
|
+
```ruby
|
147
|
+
customer = Stripe::Customer.retrieve('cus_123456789')
|
148
|
+
puts customer['unknown'] # nil
|
149
|
+
puts customer.unknown # raises NoMethodError
|
150
|
+
```
|
151
|
+
|
134
152
|
### Accessing a response object
|
135
153
|
|
136
154
|
Get access to response objects by initializing a client and using its `request`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.
|
1
|
+
10.11.0-beta.1
|
data/lib/stripe/api_version.rb
CHANGED
@@ -3,9 +3,24 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class InvoiceLineItem < StripeObject
|
6
|
+
include Stripe::APIOperations::Save
|
7
|
+
|
6
8
|
OBJECT_NAME = "line_item"
|
7
9
|
def self.object_name
|
8
10
|
"line_item"
|
9
11
|
end
|
12
|
+
|
13
|
+
# Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
|
14
|
+
# so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
|
15
|
+
# item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
|
16
|
+
# Updating an invoice's line item is only possible before the invoice is finalized.
|
17
|
+
def self.update(id, params = {}, opts = {})
|
18
|
+
request_stripe_object(
|
19
|
+
method: :post,
|
20
|
+
path: format("/v1/invoices/%<invoice>s/lines/%<id>s", { invoice: CGI.escape(invoice), id: CGI.escape(id) }),
|
21
|
+
params: params,
|
22
|
+
opts: opts
|
23
|
+
)
|
24
|
+
end
|
10
25
|
end
|
11
26
|
end
|
@@ -7,45 +7,43 @@ module Stripe
|
|
7
7
|
#
|
8
8
|
# Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids)
|
9
9
|
class TaxId < APIResource
|
10
|
+
extend Stripe::APIOperations::Create
|
10
11
|
include Stripe::APIOperations::Delete
|
12
|
+
extend Stripe::APIOperations::List
|
11
13
|
|
12
14
|
OBJECT_NAME = "tax_id"
|
13
15
|
def self.object_name
|
14
16
|
"tax_id"
|
15
17
|
end
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"Tax IDs cannot be accessed without a customer ID."
|
21
|
-
end
|
22
|
-
"#{Customer.resource_url}/#{CGI.escape(customer)}/tax_ids" \
|
23
|
-
"/#{CGI.escape(id)}"
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.retrieve(_id, _opts = {})
|
27
|
-
raise NotImplementedError,
|
28
|
-
"Tax IDs cannot be retrieved without a customer ID. Retrieve a " \
|
29
|
-
"tax ID using `Customer.retrieve_tax_id('customer_id', " \
|
30
|
-
"'tax_id_id')`"
|
19
|
+
# Creates a new account or customer tax_id object.
|
20
|
+
def self.create(params = {}, opts = {})
|
21
|
+
request_stripe_object(method: :post, path: "/v1/tax_ids", params: params, opts: opts)
|
31
22
|
end
|
32
23
|
|
24
|
+
# Deletes an existing account or customer tax_id object.
|
33
25
|
def self.delete(id, params = {}, opts = {})
|
34
26
|
request_stripe_object(
|
35
27
|
method: :delete,
|
36
|
-
path: "
|
28
|
+
path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(id) }),
|
37
29
|
params: params,
|
38
30
|
opts: opts
|
39
31
|
)
|
40
32
|
end
|
41
33
|
|
34
|
+
# Deletes an existing account or customer tax_id object.
|
42
35
|
def delete(params = {}, opts = {})
|
43
36
|
request_stripe_object(
|
44
37
|
method: :delete,
|
45
|
-
path:
|
38
|
+
path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(self["id"]) }),
|
46
39
|
params: params,
|
47
40
|
opts: opts
|
48
41
|
)
|
49
42
|
end
|
43
|
+
|
44
|
+
# Returns a list of tax IDs.
|
45
|
+
def self.list(filters = {}, opts = {})
|
46
|
+
request_stripe_object(method: :get, path: "/v1/tax_ids", params: filters, opts: opts)
|
47
|
+
end
|
50
48
|
end
|
51
49
|
end
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.11.0.pre.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
14
14
|
for details.
|