stripe 6.3.0 → 6.6.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +31 -3
 - data/Makefile +1 -1
 - data/OPENAPI_VERSION +1 -1
 - data/VERSION +1 -1
 - data/lib/stripe/api_operations/create.rb +6 -2
 - data/lib/stripe/api_operations/delete.rb +12 -7
 - data/lib/stripe/api_operations/list.rb +6 -9
 - data/lib/stripe/api_operations/nested_resource.rb +62 -34
 - data/lib/stripe/api_operations/request.rb +10 -0
 - data/lib/stripe/api_operations/save.rb +6 -3
 - data/lib/stripe/api_operations/search.rb +6 -9
 - data/lib/stripe/api_resource.rb +1 -1
 - data/lib/stripe/api_version.rb +8 -0
 - data/lib/stripe/object_types.rb +1 -0
 - data/lib/stripe/resources/account.rb +28 -8
 - data/lib/stripe/resources/apps/secret.rb +10 -12
 - data/lib/stripe/resources/charge.rb +10 -3
 - data/lib/stripe/resources/checkout/session.rb +10 -3
 - data/lib/stripe/resources/credit_note.rb +24 -9
 - data/lib/stripe/resources/customer.rb +67 -27
 - data/lib/stripe/resources/dispute.rb +10 -3
 - data/lib/stripe/resources/financial_connections/account.rb +30 -7
 - data/lib/stripe/resources/identity/verification_session.rb +20 -5
 - data/lib/stripe/resources/invoice.rb +64 -17
 - data/lib/stripe/resources/issuing/authorization.rb +20 -5
 - data/lib/stripe/resources/issuing/card.rb +90 -3
 - data/lib/stripe/resources/issuing/dispute.rb +10 -3
 - data/lib/stripe/resources/order.rb +40 -9
 - data/lib/stripe/resources/payment_intent.rb +60 -13
 - data/lib/stripe/resources/payment_link.rb +10 -3
 - data/lib/stripe/resources/payment_method.rb +20 -5
 - data/lib/stripe/resources/payout.rb +20 -5
 - data/lib/stripe/resources/quote.rb +50 -11
 - data/lib/stripe/resources/quote_phase.rb +28 -0
 - data/lib/stripe/resources/refund.rb +19 -5
 - data/lib/stripe/resources/review.rb +10 -3
 - data/lib/stripe/resources/setup_intent.rb +30 -7
 - data/lib/stripe/resources/source.rb +16 -6
 - data/lib/stripe/resources/subscription.rb +10 -3
 - data/lib/stripe/resources/subscription_item.rb +6 -2
 - data/lib/stripe/resources/subscription_schedule.rb +37 -4
 - data/lib/stripe/resources/terminal/reader.rb +49 -11
 - data/lib/stripe/resources/test_helpers/test_clock.rb +10 -3
 - data/lib/stripe/resources/topup.rb +10 -3
 - data/lib/stripe/resources/transfer.rb +10 -3
 - data/lib/stripe/resources/treasury/financial_account.rb +20 -5
 - data/lib/stripe/resources/treasury/inbound_transfer.rb +39 -9
 - data/lib/stripe/resources/treasury/outbound_payment.rb +39 -9
 - data/lib/stripe/resources/treasury/outbound_transfer.rb +43 -9
 - data/lib/stripe/resources/treasury/received_credit.rb +5 -6
 - data/lib/stripe/resources/treasury/received_debit.rb +5 -6
 - data/lib/stripe/resources.rb +1 -0
 - data/lib/stripe/stripe_configuration.rb +2 -0
 - data/lib/stripe/util.rb +38 -3
 - data/lib/stripe/version.rb +1 -1
 - data/lib/stripe.rb +1 -0
 - metadata +6 -4
 
| 
         @@ -10,17 +10,10 @@ module Stripe 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                OBJECT_NAME = "payment_intent"
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                custom_method :apply_customer_balance, http_verb: :post
         
     | 
| 
       14 
     | 
    
         
            -
                custom_method :cancel, http_verb: :post
         
     | 
| 
       15 
     | 
    
         
            -
                custom_method :capture, http_verb: :post
         
     | 
| 
       16 
     | 
    
         
            -
                custom_method :confirm, http_verb: :post
         
     | 
| 
       17 
     | 
    
         
            -
                custom_method :increment_authorization, http_verb: :post
         
     | 
| 
       18 
     | 
    
         
            -
                custom_method :verify_microdeposits, http_verb: :post
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
13 
     | 
    
         
             
                def apply_customer_balance(params = {}, opts = {})
         
     | 
| 
       21 
14 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       22 
15 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       23 
     | 
    
         
            -
                    path:  
     | 
| 
      
 16 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/apply_customer_balance", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       24 
17 
     | 
    
         
             
                    params: params,
         
     | 
| 
       25 
18 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       26 
19 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -29,7 +22,7 @@ module Stripe 
     | 
|
| 
       29 
22 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       30 
23 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       31 
24 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       32 
     | 
    
         
            -
                    path:  
     | 
| 
      
 25 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/cancel", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       33 
26 
     | 
    
         
             
                    params: params,
         
     | 
| 
       34 
27 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       35 
28 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -38,7 +31,7 @@ module Stripe 
     | 
|
| 
       38 
31 
     | 
    
         
             
                def capture(params = {}, opts = {})
         
     | 
| 
       39 
32 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       40 
33 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       41 
     | 
    
         
            -
                    path:  
     | 
| 
      
 34 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/capture", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       42 
35 
     | 
    
         
             
                    params: params,
         
     | 
| 
       43 
36 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       44 
37 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -47,7 +40,7 @@ module Stripe 
     | 
|
| 
       47 
40 
     | 
    
         
             
                def confirm(params = {}, opts = {})
         
     | 
| 
       48 
41 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       49 
42 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       50 
     | 
    
         
            -
                    path:  
     | 
| 
      
 43 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/confirm", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       51 
44 
     | 
    
         
             
                    params: params,
         
     | 
| 
       52 
45 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       53 
46 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -56,7 +49,7 @@ module Stripe 
     | 
|
| 
       56 
49 
     | 
    
         
             
                def increment_authorization(params = {}, opts = {})
         
     | 
| 
       57 
50 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       58 
51 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       59 
     | 
    
         
            -
                    path:  
     | 
| 
      
 52 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/increment_authorization", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       60 
53 
     | 
    
         
             
                    params: params,
         
     | 
| 
       61 
54 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       62 
55 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -65,7 +58,61 @@ module Stripe 
     | 
|
| 
       65 
58 
     | 
    
         
             
                def verify_microdeposits(params = {}, opts = {})
         
     | 
| 
       66 
59 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       67 
60 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       68 
     | 
    
         
            -
                    path:  
     | 
| 
      
 61 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
      
 62 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 63 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 64 
     | 
    
         
            +
                  )
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
                def self.apply_customer_balance(intent, params = {}, opts = {})
         
     | 
| 
      
 68 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 69 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 70 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/apply_customer_balance", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 71 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 72 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 73 
     | 
    
         
            +
                  )
         
     | 
| 
      
 74 
     | 
    
         
            +
                end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                def self.cancel(intent, params = {}, opts = {})
         
     | 
| 
      
 77 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 78 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 79 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/cancel", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 80 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 81 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 82 
     | 
    
         
            +
                  )
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                def self.capture(intent, params = {}, opts = {})
         
     | 
| 
      
 86 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 87 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 88 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/capture", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 89 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 90 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 91 
     | 
    
         
            +
                  )
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                def self.confirm(intent, params = {}, opts = {})
         
     | 
| 
      
 95 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 96 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 97 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/confirm", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 98 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 99 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 100 
     | 
    
         
            +
                  )
         
     | 
| 
      
 101 
     | 
    
         
            +
                end
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                def self.increment_authorization(intent, params = {}, opts = {})
         
     | 
| 
      
 104 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 105 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 106 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/increment_authorization", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 107 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 108 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 109 
     | 
    
         
            +
                  )
         
     | 
| 
      
 110 
     | 
    
         
            +
                end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                def self.verify_microdeposits(intent, params = {}, opts = {})
         
     | 
| 
      
 113 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 114 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 115 
     | 
    
         
            +
                    path: format("/v1/payment_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(intent) }),
         
     | 
| 
       69 
116 
     | 
    
         
             
                    params: params,
         
     | 
| 
       70 
117 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       71 
118 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,12 +9,19 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "payment_link"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :list_line_items, http_verb: :get, http_path: "line_items"
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
12 
     | 
    
         
             
                def list_line_items(params = {}, opts = {})
         
     | 
| 
       15 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       16 
14 
     | 
    
         
             
                    method: :get,
         
     | 
| 
       17 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/payment_links/%<payment_link>s/line_items", { payment_link: CGI.escape(self["id"]) }),
         
     | 
| 
      
 16 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 18 
     | 
    
         
            +
                  )
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def self.list_line_items(payment_link, params = {}, opts = {})
         
     | 
| 
      
 22 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 23 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/payment_links/%<payment_link>s/line_items", { payment_link: CGI.escape(payment_link) }),
         
     | 
| 
       18 
25 
     | 
    
         
             
                    params: params,
         
     | 
| 
       19 
26 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       20 
27 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,13 +9,10 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "payment_method"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :attach, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
                custom_method :detach, http_verb: :post
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
12 
     | 
    
         
             
                def attach(params = {}, opts = {})
         
     | 
| 
       16 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       17 
14 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       18 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/payment_methods/%<payment_method>s/attach", { payment_method: CGI.escape(self["id"]) }),
         
     | 
| 
       19 
16 
     | 
    
         
             
                    params: params,
         
     | 
| 
       20 
17 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       21 
18 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -24,7 +21,25 @@ module Stripe 
     | 
|
| 
       24 
21 
     | 
    
         
             
                def detach(params = {}, opts = {})
         
     | 
| 
       25 
22 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       26 
23 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       27 
     | 
    
         
            -
                    path:  
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/payment_methods/%<payment_method>s/detach", { payment_method: CGI.escape(self["id"]) }),
         
     | 
| 
      
 25 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 27 
     | 
    
         
            +
                  )
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def self.attach(payment_method, params = {}, opts = {})
         
     | 
| 
      
 31 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 32 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 33 
     | 
    
         
            +
                    path: format("/v1/payment_methods/%<payment_method>s/attach", { payment_method: CGI.escape(payment_method) }),
         
     | 
| 
      
 34 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 36 
     | 
    
         
            +
                  )
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                def self.detach(payment_method, params = {}, opts = {})
         
     | 
| 
      
 40 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 41 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    path: format("/v1/payment_methods/%<payment_method>s/detach", { payment_method: CGI.escape(payment_method) }),
         
     | 
| 
       28 
43 
     | 
    
         
             
                    params: params,
         
     | 
| 
       29 
44 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       30 
45 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,13 +9,10 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "payout"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :cancel, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
                custom_method :reverse, http_verb: :post
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
12 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       16 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       17 
14 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       18 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/payouts/%<payout>s/cancel", { payout: CGI.escape(self["id"]) }),
         
     | 
| 
       19 
16 
     | 
    
         
             
                    params: params,
         
     | 
| 
       20 
17 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       21 
18 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -24,7 +21,25 @@ module Stripe 
     | 
|
| 
       24 
21 
     | 
    
         
             
                def reverse(params = {}, opts = {})
         
     | 
| 
       25 
22 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       26 
23 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       27 
     | 
    
         
            -
                    path:  
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/payouts/%<payout>s/reverse", { payout: CGI.escape(self["id"]) }),
         
     | 
| 
      
 25 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 27 
     | 
    
         
            +
                  )
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def self.cancel(payout, params = {}, opts = {})
         
     | 
| 
      
 31 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 32 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 33 
     | 
    
         
            +
                    path: format("/v1/payouts/%<payout>s/cancel", { payout: CGI.escape(payout) }),
         
     | 
| 
      
 34 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 36 
     | 
    
         
            +
                  )
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                def self.reverse(payout, params = {}, opts = {})
         
     | 
| 
      
 40 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 41 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    path: format("/v1/payouts/%<payout>s/reverse", { payout: CGI.escape(payout) }),
         
     | 
| 
       28 
43 
     | 
    
         
             
                    params: params,
         
     | 
| 
       29 
44 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       30 
45 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,16 +9,10 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "quote"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :accept, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
                custom_method :cancel, http_verb: :post
         
     | 
| 
       14 
     | 
    
         
            -
                custom_method :finalize_quote, http_verb: :post, http_path: "finalize"
         
     | 
| 
       15 
     | 
    
         
            -
                custom_method :list_computed_upfront_line_items, http_verb: :get, http_path: "computed_upfront_line_items"
         
     | 
| 
       16 
     | 
    
         
            -
                custom_method :list_line_items, http_verb: :get, http_path: "line_items"
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
12 
     | 
    
         
             
                def accept(params = {}, opts = {})
         
     | 
| 
       19 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       20 
14 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       21 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/accept", { quote: CGI.escape(self["id"]) }),
         
     | 
| 
       22 
16 
     | 
    
         
             
                    params: params,
         
     | 
| 
       23 
17 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       24 
18 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -27,7 +21,7 @@ module Stripe 
     | 
|
| 
       27 
21 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       28 
22 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       29 
23 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       30 
     | 
    
         
            -
                    path:  
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/cancel", { quote: CGI.escape(self["id"]) }),
         
     | 
| 
       31 
25 
     | 
    
         
             
                    params: params,
         
     | 
| 
       32 
26 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       33 
27 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -36,7 +30,7 @@ module Stripe 
     | 
|
| 
       36 
30 
     | 
    
         
             
                def finalize_quote(params = {}, opts = {})
         
     | 
| 
       37 
31 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       38 
32 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       39 
     | 
    
         
            -
                    path:  
     | 
| 
      
 33 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/finalize", { quote: CGI.escape(self["id"]) }),
         
     | 
| 
       40 
34 
     | 
    
         
             
                    params: params,
         
     | 
| 
       41 
35 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       42 
36 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -45,7 +39,7 @@ module Stripe 
     | 
|
| 
       45 
39 
     | 
    
         
             
                def list_computed_upfront_line_items(params = {}, opts = {})
         
     | 
| 
       46 
40 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       47 
41 
     | 
    
         
             
                    method: :get,
         
     | 
| 
       48 
     | 
    
         
            -
                    path:  
     | 
| 
      
 42 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/computed_upfront_line_items", { quote: CGI.escape(self["id"]) }),
         
     | 
| 
       49 
43 
     | 
    
         
             
                    params: params,
         
     | 
| 
       50 
44 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       51 
45 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -54,7 +48,52 @@ module Stripe 
     | 
|
| 
       54 
48 
     | 
    
         
             
                def list_line_items(params = {}, opts = {})
         
     | 
| 
       55 
49 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       56 
50 
     | 
    
         
             
                    method: :get,
         
     | 
| 
       57 
     | 
    
         
            -
                    path:  
     | 
| 
      
 51 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/line_items", { quote: CGI.escape(self["id"]) }),
         
     | 
| 
      
 52 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 53 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 54 
     | 
    
         
            +
                  )
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def self.accept(quote, params = {}, opts = {})
         
     | 
| 
      
 58 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 59 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 60 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/accept", { quote: CGI.escape(quote) }),
         
     | 
| 
      
 61 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 62 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 63 
     | 
    
         
            +
                  )
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                def self.cancel(quote, params = {}, opts = {})
         
     | 
| 
      
 67 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 68 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 69 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/cancel", { quote: CGI.escape(quote) }),
         
     | 
| 
      
 70 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 71 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 72 
     | 
    
         
            +
                  )
         
     | 
| 
      
 73 
     | 
    
         
            +
                end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
                def self.finalize_quote(quote, params = {}, opts = {})
         
     | 
| 
      
 76 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 77 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 78 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/finalize", { quote: CGI.escape(quote) }),
         
     | 
| 
      
 79 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 80 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 81 
     | 
    
         
            +
                  )
         
     | 
| 
      
 82 
     | 
    
         
            +
                end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                def self.list_computed_upfront_line_items(quote, params = {}, opts = {})
         
     | 
| 
      
 85 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 86 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 87 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/computed_upfront_line_items", { quote: CGI.escape(quote) }),
         
     | 
| 
      
 88 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 89 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 90 
     | 
    
         
            +
                  )
         
     | 
| 
      
 91 
     | 
    
         
            +
                end
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
                def self.list_line_items(quote, params = {}, opts = {})
         
     | 
| 
      
 94 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 95 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 96 
     | 
    
         
            +
                    path: format("/v1/quotes/%<quote>s/line_items", { quote: CGI.escape(quote) }),
         
     | 
| 
       58 
97 
     | 
    
         
             
                    params: params,
         
     | 
| 
       59 
98 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       60 
99 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # File generated from our OpenAPI spec
         
     | 
| 
      
 2 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module Stripe
         
     | 
| 
      
 5 
     | 
    
         
            +
              class QuotePhase < APIResource
         
     | 
| 
      
 6 
     | 
    
         
            +
                extend Stripe::APIOperations::List
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                OBJECT_NAME = "quote_phase"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                def list_line_items(params = {}, opts = {})
         
     | 
| 
      
 11 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 12 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 13 
     | 
    
         
            +
                    path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(self["id"]) }),
         
     | 
| 
      
 14 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 16 
     | 
    
         
            +
                  )
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                def self.list_line_items(quote_phase, params = {}, opts = {})
         
     | 
| 
      
 20 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 21 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(quote_phase) }),
         
     | 
| 
      
 23 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 25 
     | 
    
         
            +
                  )
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -9,12 +9,19 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "refund"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :cancel, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
12 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       15 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       16 
14 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       17 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/refunds/%<refund>s/cancel", { refund: CGI.escape(self["id"]) }),
         
     | 
| 
      
 16 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 18 
     | 
    
         
            +
                  )
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def self.cancel(refund, params = {}, opts = {})
         
     | 
| 
      
 22 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 23 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/refunds/%<refund>s/cancel", { refund: CGI.escape(refund) }),
         
     | 
| 
       18 
25 
     | 
    
         
             
                    params: params,
         
     | 
| 
       19 
26 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       20 
27 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -27,12 +34,19 @@ module Stripe 
     | 
|
| 
       27 
34 
     | 
    
         
             
                class TestHelpers < APIResourceTestHelpers
         
     | 
| 
       28 
35 
     | 
    
         
             
                  RESOURCE_CLASS = Refund
         
     | 
| 
       29 
36 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
                   
     | 
| 
      
 37 
     | 
    
         
            +
                  def self.expire(refund, params = {}, opts = {})
         
     | 
| 
      
 38 
     | 
    
         
            +
                    request_stripe_object(
         
     | 
| 
      
 39 
     | 
    
         
            +
                      method: :post,
         
     | 
| 
      
 40 
     | 
    
         
            +
                      path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(refund) }),
         
     | 
| 
      
 41 
     | 
    
         
            +
                      params: params,
         
     | 
| 
      
 42 
     | 
    
         
            +
                      opts: opts
         
     | 
| 
      
 43 
     | 
    
         
            +
                    )
         
     | 
| 
      
 44 
     | 
    
         
            +
                  end
         
     | 
| 
       31 
45 
     | 
    
         | 
| 
       32 
46 
     | 
    
         
             
                  def expire(params = {}, opts = {})
         
     | 
| 
       33 
47 
     | 
    
         
             
                    @resource.request_stripe_object(
         
     | 
| 
       34 
48 
     | 
    
         
             
                      method: :post,
         
     | 
| 
       35 
     | 
    
         
            -
                      path:  
     | 
| 
      
 49 
     | 
    
         
            +
                      path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(@resource["id"]) }),
         
     | 
| 
       36 
50 
     | 
    
         
             
                      params: params,
         
     | 
| 
       37 
51 
     | 
    
         
             
                      opts: opts
         
     | 
| 
       38 
52 
     | 
    
         
             
                    )
         
     | 
| 
         @@ -7,12 +7,19 @@ module Stripe 
     | 
|
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                OBJECT_NAME = "review"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
                custom_method :approve, http_verb: :post
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
10 
     | 
    
         
             
                def approve(params = {}, opts = {})
         
     | 
| 
       13 
11 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       14 
12 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       15 
     | 
    
         
            -
                    path:  
     | 
| 
      
 13 
     | 
    
         
            +
                    path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(self["id"]) }),
         
     | 
| 
      
 14 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 16 
     | 
    
         
            +
                  )
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                def self.approve(review, params = {}, opts = {})
         
     | 
| 
      
 20 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 21 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(review) }),
         
     | 
| 
       16 
23 
     | 
    
         
             
                    params: params,
         
     | 
| 
       17 
24 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       18 
25 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,14 +9,10 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "setup_intent"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :cancel, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
                custom_method :confirm, http_verb: :post
         
     | 
| 
       14 
     | 
    
         
            -
                custom_method :verify_microdeposits, http_verb: :post
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
12 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       17 
13 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       18 
14 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       19 
     | 
    
         
            -
                    path:  
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       20 
16 
     | 
    
         
             
                    params: params,
         
     | 
| 
       21 
17 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       22 
18 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -25,7 +21,7 @@ module Stripe 
     | 
|
| 
       25 
21 
     | 
    
         
             
                def confirm(params = {}, opts = {})
         
     | 
| 
       26 
22 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       27 
23 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       28 
     | 
    
         
            -
                    path:  
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
       29 
25 
     | 
    
         
             
                    params: params,
         
     | 
| 
       30 
26 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       31 
27 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -34,7 +30,34 @@ module Stripe 
     | 
|
| 
       34 
30 
     | 
    
         
             
                def verify_microdeposits(params = {}, opts = {})
         
     | 
| 
       35 
31 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       36 
32 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       37 
     | 
    
         
            -
                    path:  
     | 
| 
      
 33 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(self["id"]) }),
         
     | 
| 
      
 34 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 36 
     | 
    
         
            +
                  )
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                def self.cancel(intent, params = {}, opts = {})
         
     | 
| 
      
 40 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 41 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 43 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 45 
     | 
    
         
            +
                  )
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                def self.confirm(intent, params = {}, opts = {})
         
     | 
| 
      
 49 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 50 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 51 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(intent) }),
         
     | 
| 
      
 52 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 53 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 54 
     | 
    
         
            +
                  )
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def self.verify_microdeposits(intent, params = {}, opts = {})
         
     | 
| 
      
 58 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 59 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 60 
     | 
    
         
            +
                    path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(intent) }),
         
     | 
| 
       38 
61 
     | 
    
         
             
                    params: params,
         
     | 
| 
       39 
62 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       40 
63 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -9,15 +9,22 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "source"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                custom_method :verify, http_verb: :post
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
12 
     | 
    
         
             
                nested_resource_class_methods :source_transaction,
         
     | 
| 
       15 
13 
     | 
    
         
             
                                              operations: %i[retrieve list]
         
     | 
| 
       16 
14 
     | 
    
         | 
| 
       17 
15 
     | 
    
         
             
                def verify(params = {}, opts = {})
         
     | 
| 
       18 
16 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       19 
17 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       20 
     | 
    
         
            -
                    path:  
     | 
| 
      
 18 
     | 
    
         
            +
                    path: format("/v1/sources/%<source>s/verify", { source: CGI.escape(self["id"]) }),
         
     | 
| 
      
 19 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 20 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 21 
     | 
    
         
            +
                  )
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def self.verify(source, params = {}, opts = {})
         
     | 
| 
      
 25 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 26 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 27 
     | 
    
         
            +
                    path: format("/v1/sources/%<source>s/verify", { source: CGI.escape(source) }),
         
     | 
| 
       21 
28 
     | 
    
         
             
                    params: params,
         
     | 
| 
       22 
29 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       23 
30 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -37,9 +44,12 @@ module Stripe 
     | 
|
| 
       37 
44 
     | 
    
         
             
                end
         
     | 
| 
       38 
45 
     | 
    
         | 
| 
       39 
46 
     | 
    
         
             
                def source_transactions(params = {}, opts = {})
         
     | 
| 
       40 
     | 
    
         
            -
                   
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
      
 47 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 48 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 49 
     | 
    
         
            +
                    path: resource_url + "/source_transactions",
         
     | 
| 
      
 50 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 51 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 52 
     | 
    
         
            +
                  )
         
     | 
| 
       43 
53 
     | 
    
         
             
                end
         
     | 
| 
       44 
54 
     | 
    
         
             
                extend Gem::Deprecate
         
     | 
| 
       45 
55 
     | 
    
         
             
                deprecate :source_transactions, :"Source.list_source_transactions", 2020, 1
         
     | 
| 
         @@ -11,12 +11,19 @@ module Stripe 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                OBJECT_NAME = "subscription"
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                custom_method :delete_discount, http_verb: :delete, http_path: "discount"
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
14 
     | 
    
         
             
                def delete_discount(params = {}, opts = {})
         
     | 
| 
       17 
15 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       18 
16 
     | 
    
         
             
                    method: :delete,
         
     | 
| 
       19 
     | 
    
         
            -
                    path:  
     | 
| 
      
 17 
     | 
    
         
            +
                    path: format("/v1/subscriptions/%<subscription_exposed_id>s/discount", { subscription_exposed_id: CGI.escape(self["id"]) }),
         
     | 
| 
      
 18 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 20 
     | 
    
         
            +
                  )
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                def self.delete_discount(subscription_exposed_id, params = {}, opts = {})
         
     | 
| 
      
 24 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 25 
     | 
    
         
            +
                    method: :delete,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    path: format("/v1/subscriptions/%<subscription_exposed_id>s/discount", { subscription_exposed_id: CGI.escape(subscription_exposed_id) }),
         
     | 
| 
       20 
27 
     | 
    
         
             
                    params: params,
         
     | 
| 
       21 
28 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       22 
29 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -17,8 +17,12 @@ module Stripe 
     | 
|
| 
       17 
17 
     | 
    
         
             
                                              resource_plural: "usage_record_summaries"
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                def usage_record_summaries(params = {}, opts = {})
         
     | 
| 
       20 
     | 
    
         
            -
                   
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 21 
     | 
    
         
            +
                    method: :get,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    path: resource_url + "/usage_record_summaries",
         
     | 
| 
      
 23 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 25 
     | 
    
         
            +
                  )
         
     | 
| 
       22 
26 
     | 
    
         
             
                end
         
     | 
| 
       23 
27 
     | 
    
         
             
                extend Gem::Deprecate
         
     | 
| 
       24 
28 
     | 
    
         
             
                deprecate :usage_record_summaries, :"SubscriptionItem.list_usage_record_summaries", 2020, 1
         
     | 
| 
         @@ -9,13 +9,19 @@ module Stripe 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                OBJECT_NAME = "subscription_schedule"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                 
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
      
 12 
     | 
    
         
            +
                def amend(params = {}, opts = {})
         
     | 
| 
      
 13 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 14 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
         
     | 
| 
      
 16 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 18 
     | 
    
         
            +
                  )
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
       14 
20 
     | 
    
         | 
| 
       15 
21 
     | 
    
         
             
                def cancel(params = {}, opts = {})
         
     | 
| 
       16 
22 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       17 
23 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       18 
     | 
    
         
            -
                    path:  
     | 
| 
      
 24 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(self["id"]) }),
         
     | 
| 
       19 
25 
     | 
    
         
             
                    params: params,
         
     | 
| 
       20 
26 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       21 
27 
     | 
    
         
             
                  )
         
     | 
| 
         @@ -24,7 +30,34 @@ module Stripe 
     | 
|
| 
       24 
30 
     | 
    
         
             
                def release(params = {}, opts = {})
         
     | 
| 
       25 
31 
     | 
    
         
             
                  request_stripe_object(
         
     | 
| 
       26 
32 
     | 
    
         
             
                    method: :post,
         
     | 
| 
       27 
     | 
    
         
            -
                    path:  
     | 
| 
      
 33 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(self["id"]) }),
         
     | 
| 
      
 34 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 36 
     | 
    
         
            +
                  )
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                def self.amend(schedule, params = {}, opts = {})
         
     | 
| 
      
 40 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 41 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
         
     | 
| 
      
 43 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 45 
     | 
    
         
            +
                  )
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                def self.cancel(schedule, params = {}, opts = {})
         
     | 
| 
      
 49 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 50 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 51 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(schedule) }),
         
     | 
| 
      
 52 
     | 
    
         
            +
                    params: params,
         
     | 
| 
      
 53 
     | 
    
         
            +
                    opts: opts
         
     | 
| 
      
 54 
     | 
    
         
            +
                  )
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def self.release(schedule, params = {}, opts = {})
         
     | 
| 
      
 58 
     | 
    
         
            +
                  request_stripe_object(
         
     | 
| 
      
 59 
     | 
    
         
            +
                    method: :post,
         
     | 
| 
      
 60 
     | 
    
         
            +
                    path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(schedule) }),
         
     | 
| 
       28 
61 
     | 
    
         
             
                    params: params,
         
     | 
| 
       29 
62 
     | 
    
         
             
                    opts: opts
         
     | 
| 
       30 
63 
     | 
    
         
             
                  )
         
     |