stripe 10.9.0.pre.beta.1 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -275
  3. data/Gemfile +3 -0
  4. data/Makefile +7 -0
  5. data/OPENAPI_VERSION +1 -1
  6. data/README.md +0 -11
  7. data/VERSION +1 -1
  8. data/bin/tapioca +27 -0
  9. data/lib/stripe/api_operations/request.rb +1 -2
  10. data/lib/stripe/api_resource.rb +10 -1
  11. data/lib/stripe/api_resource_test_helpers.rb +6 -2
  12. data/lib/stripe/api_version.rb +0 -1
  13. data/lib/stripe/list_object.rb +3 -0
  14. data/lib/stripe/object_types.rb +120 -141
  15. data/lib/stripe/resources/account.rb +6 -4
  16. data/lib/stripe/resources/account_link.rb +3 -0
  17. data/lib/stripe/resources/account_session.rb +3 -0
  18. data/lib/stripe/resources/apple_pay_domain.rb +3 -0
  19. data/lib/stripe/resources/application_fee.rb +3 -0
  20. data/lib/stripe/resources/application_fee_refund.rb +3 -0
  21. data/lib/stripe/resources/apps/secret.rb +3 -0
  22. data/lib/stripe/resources/balance.rb +3 -0
  23. data/lib/stripe/resources/balance_transaction.rb +3 -0
  24. data/lib/stripe/resources/bank_account.rb +3 -0
  25. data/lib/stripe/resources/billing_portal/configuration.rb +3 -0
  26. data/lib/stripe/resources/billing_portal/session.rb +3 -0
  27. data/lib/stripe/resources/capability.rb +3 -0
  28. data/lib/stripe/resources/card.rb +3 -0
  29. data/lib/stripe/resources/cash_balance.rb +3 -0
  30. data/lib/stripe/resources/charge.rb +3 -0
  31. data/lib/stripe/resources/checkout/session.rb +3 -0
  32. data/lib/stripe/resources/climate/order.rb +3 -0
  33. data/lib/stripe/resources/climate/product.rb +3 -0
  34. data/lib/stripe/resources/climate/supplier.rb +3 -0
  35. data/lib/stripe/resources/country_spec.rb +3 -0
  36. data/lib/stripe/resources/coupon.rb +3 -0
  37. data/lib/stripe/resources/credit_note.rb +3 -0
  38. data/lib/stripe/resources/credit_note_line_item.rb +3 -0
  39. data/lib/stripe/resources/customer.rb +7 -13
  40. data/lib/stripe/resources/customer_balance_transaction.rb +3 -0
  41. data/lib/stripe/resources/customer_cash_balance_transaction.rb +3 -0
  42. data/lib/stripe/resources/customer_session.rb +3 -0
  43. data/lib/stripe/resources/discount.rb +3 -0
  44. data/lib/stripe/resources/dispute.rb +3 -0
  45. data/lib/stripe/resources/ephemeral_key.rb +3 -0
  46. data/lib/stripe/resources/event.rb +3 -0
  47. data/lib/stripe/resources/exchange_rate.rb +3 -0
  48. data/lib/stripe/resources/file.rb +6 -0
  49. data/lib/stripe/resources/file_link.rb +3 -0
  50. data/lib/stripe/resources/financial_connections/account.rb +3 -3
  51. data/lib/stripe/resources/financial_connections/account_owner.rb +3 -0
  52. data/lib/stripe/resources/financial_connections/account_ownership.rb +3 -0
  53. data/lib/stripe/resources/financial_connections/session.rb +3 -0
  54. data/lib/stripe/resources/financial_connections/transaction.rb +3 -0
  55. data/lib/stripe/resources/funding_instructions.rb +3 -0
  56. data/lib/stripe/resources/identity/verification_report.rb +3 -0
  57. data/lib/stripe/resources/identity/verification_session.rb +3 -0
  58. data/lib/stripe/resources/invoice.rb +2 -52
  59. data/lib/stripe/resources/invoice_item.rb +3 -0
  60. data/lib/stripe/resources/invoice_line_item.rb +3 -0
  61. data/lib/stripe/resources/issuing/authorization.rb +6 -0
  62. data/lib/stripe/resources/issuing/card.rb +6 -0
  63. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  64. data/lib/stripe/resources/issuing/dispute.rb +3 -0
  65. data/lib/stripe/resources/issuing/token.rb +3 -0
  66. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  67. data/lib/stripe/resources/line_item.rb +3 -0
  68. data/lib/stripe/resources/login_link.rb +3 -0
  69. data/lib/stripe/resources/mandate.rb +3 -0
  70. data/lib/stripe/resources/payment_intent.rb +5 -4
  71. data/lib/stripe/resources/payment_link.rb +3 -0
  72. data/lib/stripe/resources/payment_method.rb +3 -0
  73. data/lib/stripe/resources/payment_method_configuration.rb +3 -0
  74. data/lib/stripe/resources/payment_method_domain.rb +3 -0
  75. data/lib/stripe/resources/payout.rb +3 -0
  76. data/lib/stripe/resources/person.rb +3 -0
  77. data/lib/stripe/resources/plan.rb +3 -0
  78. data/lib/stripe/resources/price.rb +3 -0
  79. data/lib/stripe/resources/product.rb +3 -0
  80. data/lib/stripe/resources/promotion_code.rb +3 -0
  81. data/lib/stripe/resources/quote.rb +3 -104
  82. data/lib/stripe/resources/radar/early_fraud_warning.rb +3 -0
  83. data/lib/stripe/resources/radar/value_list.rb +3 -0
  84. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  85. data/lib/stripe/resources/refund.rb +6 -0
  86. data/lib/stripe/resources/reporting/report_run.rb +3 -0
  87. data/lib/stripe/resources/reporting/report_type.rb +3 -0
  88. data/lib/stripe/resources/reversal.rb +3 -0
  89. data/lib/stripe/resources/review.rb +3 -0
  90. data/lib/stripe/resources/setup_attempt.rb +3 -0
  91. data/lib/stripe/resources/setup_intent.rb +3 -0
  92. data/lib/stripe/resources/shipping_rate.rb +3 -0
  93. data/lib/stripe/resources/sigma/scheduled_query_run.rb +3 -0
  94. data/lib/stripe/resources/source.rb +3 -0
  95. data/lib/stripe/resources/source_transaction.rb +3 -0
  96. data/lib/stripe/resources/subscription.rb +3 -0
  97. data/lib/stripe/resources/subscription_item.rb +3 -0
  98. data/lib/stripe/resources/subscription_schedule.rb +2 -19
  99. data/lib/stripe/resources/tax/calculation.rb +3 -0
  100. data/lib/stripe/resources/tax/calculation_line_item.rb +3 -0
  101. data/lib/stripe/resources/tax/registration.rb +3 -0
  102. data/lib/stripe/resources/tax/settings.rb +3 -0
  103. data/lib/stripe/resources/tax/transaction.rb +3 -0
  104. data/lib/stripe/resources/tax/transaction_line_item.rb +3 -0
  105. data/lib/stripe/resources/tax_code.rb +3 -0
  106. data/lib/stripe/resources/tax_id.rb +5 -4
  107. data/lib/stripe/resources/tax_rate.rb +3 -0
  108. data/lib/stripe/resources/terminal/configuration.rb +3 -0
  109. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  110. data/lib/stripe/resources/terminal/location.rb +3 -0
  111. data/lib/stripe/resources/terminal/reader.rb +6 -60
  112. data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
  113. data/lib/stripe/resources/token.rb +3 -0
  114. data/lib/stripe/resources/topup.rb +3 -0
  115. data/lib/stripe/resources/transfer.rb +3 -0
  116. data/lib/stripe/resources/treasury/credit_reversal.rb +3 -0
  117. data/lib/stripe/resources/treasury/debit_reversal.rb +3 -0
  118. data/lib/stripe/resources/treasury/financial_account.rb +3 -0
  119. data/lib/stripe/resources/treasury/financial_account_features.rb +3 -0
  120. data/lib/stripe/resources/treasury/inbound_transfer.rb +6 -0
  121. data/lib/stripe/resources/treasury/outbound_payment.rb +6 -0
  122. data/lib/stripe/resources/treasury/outbound_transfer.rb +6 -0
  123. data/lib/stripe/resources/treasury/received_credit.rb +6 -0
  124. data/lib/stripe/resources/treasury/received_debit.rb +6 -0
  125. data/lib/stripe/resources/treasury/transaction.rb +3 -0
  126. data/lib/stripe/resources/treasury/transaction_entry.rb +3 -0
  127. data/lib/stripe/resources/usage_record.rb +3 -0
  128. data/lib/stripe/resources/usage_record_summary.rb +3 -0
  129. data/lib/stripe/resources/webhook_endpoint.rb +3 -0
  130. data/lib/stripe/resources.rb +0 -22
  131. data/lib/stripe/search_result_object.rb +3 -0
  132. data/lib/stripe/singleton_api_resource.rb +1 -1
  133. data/lib/stripe/stripe_client.rb +28 -62
  134. data/lib/stripe/stripe_configuration.rb +1 -2
  135. data/lib/stripe/util.rb +1 -8
  136. data/lib/stripe/version.rb +1 -1
  137. data/lib/stripe.rb +0 -46
  138. data/sorbet/config +4 -0
  139. data/sorbet/rbi/annotations/.gitattributes +1 -0
  140. data/sorbet/rbi/annotations/coveralls_reborn.rbi +3 -0
  141. data/sorbet/rbi/gems/.gitattributes +1 -0
  142. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  143. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  144. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  145. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
  146. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +8 -0
  147. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  148. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  149. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  150. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  151. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +19 -0
  152. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  153. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  154. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  155. data/sorbet/rbi/gems/mocha@1.16.1.rbi +11 -0
  156. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  157. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  158. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +9454 -0
  159. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +414 -0
  160. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  161. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  162. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  163. data/sorbet/rbi/gems/pry@0.14.2.rbi +10085 -0
  164. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +931 -0
  165. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  166. data/sorbet/rbi/gems/rack@3.0.8.rbi +5193 -0
  167. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  168. data/sorbet/rbi/gems/rake@13.1.0.rbi +2884 -0
  169. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  170. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3766 -0
  171. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4887 -0
  172. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7004 -0
  173. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56919 -0
  174. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  175. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +555 -0
  176. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  177. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +8 -0
  178. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  179. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  180. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  181. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  182. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +3503 -0
  183. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  184. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +4403 -0
  185. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  186. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  187. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  188. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1740 -0
  189. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  190. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  191. data/sorbet/tapioca/config.yml +13 -0
  192. data/sorbet/tapioca/require.rb +4 -0
  193. metadata +61 -27
  194. data/lib/stripe/request_signing_authenticator.rb +0 -79
  195. data/lib/stripe/resources/account_notice.rb +0 -29
  196. data/lib/stripe/resources/capital/financing_offer.rb +0 -46
  197. data/lib/stripe/resources/capital/financing_summary.rb +0 -12
  198. data/lib/stripe/resources/capital/financing_transaction.rb +0 -24
  199. data/lib/stripe/resources/confirmation_token.rb +0 -13
  200. data/lib/stripe/resources/customer_entitlement.rb +0 -9
  201. data/lib/stripe/resources/customer_entitlement_summary.rb +0 -9
  202. data/lib/stripe/resources/entitlements/event.rb +0 -23
  203. data/lib/stripe/resources/entitlements/feature.rb +0 -35
  204. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -11
  205. data/lib/stripe/resources/gift_cards/card.rb +0 -56
  206. data/lib/stripe/resources/gift_cards/transaction.rb +0 -90
  207. data/lib/stripe/resources/invoice_payment.rb +0 -9
  208. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -85
  209. data/lib/stripe/resources/issuing/personalization_design.rb +0 -113
  210. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -23
  211. data/lib/stripe/resources/margin.rb +0 -34
  212. data/lib/stripe/resources/order.rb +0 -117
  213. data/lib/stripe/resources/quote_phase.rb +0 -36
  214. data/lib/stripe/resources/quote_preview_invoice.rb +0 -40
  215. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -8
  216. data/lib/stripe/resources/tax/form.rb +0 -46
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `coveralls_reborn` gem.
5
+ # Please instead update this file by running `bin/tapioca gem coveralls_reborn`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,144 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `crack` gem.
5
+ # Please instead update this file by running `bin/tapioca gem crack`.
6
+
7
+ # source://crack//lib/crack/xml.rb#196
8
+ module Crack; end
9
+
10
+ # source://crack//lib/crack/xml.rb#197
11
+ class Crack::REXMLParser
12
+ class << self
13
+ # source://crack//lib/crack/xml.rb#198
14
+ def parse(xml); end
15
+ end
16
+ end
17
+
18
+ # source://crack//lib/crack/xml.rb#225
19
+ class Crack::XML
20
+ class << self
21
+ # source://crack//lib/crack/xml.rb#234
22
+ def parse(xml); end
23
+
24
+ # source://crack//lib/crack/xml.rb#226
25
+ def parser; end
26
+
27
+ # source://crack//lib/crack/xml.rb#230
28
+ def parser=(parser); end
29
+ end
30
+ end
31
+
32
+ # This is a slighly modified version of the XMLUtilityNode from
33
+ # http://merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com)
34
+ # It's mainly just adding vowels, as I ht cd wth n vwls :)
35
+ # This represents the hard part of the work, all I did was change the
36
+ # underlying parser.
37
+ #
38
+ # source://crack//lib/crack/xml.rb#23
39
+ class REXMLUtilityNode
40
+ # @return [REXMLUtilityNode] a new instance of REXMLUtilityNode
41
+ #
42
+ # source://crack//lib/crack/xml.rb#56
43
+ def initialize(name, normalized_attributes = T.unsafe(nil)); end
44
+
45
+ # source://crack//lib/crack/xml.rb#73
46
+ def add_node(node); end
47
+
48
+ # source://crack//lib/crack/xml.rb#24
49
+ def attributes; end
50
+
51
+ # source://crack//lib/crack/xml.rb#24
52
+ def attributes=(_arg0); end
53
+
54
+ # source://crack//lib/crack/xml.rb#24
55
+ def children; end
56
+
57
+ # source://crack//lib/crack/xml.rb#24
58
+ def children=(_arg0); end
59
+
60
+ # Get the inner_html of the REXML node.
61
+ #
62
+ # source://crack//lib/crack/xml.rb#172
63
+ def inner_html; end
64
+
65
+ # source://crack//lib/crack/xml.rb#24
66
+ def name; end
67
+
68
+ # source://crack//lib/crack/xml.rb#24
69
+ def name=(_arg0); end
70
+
71
+ # source://crack//lib/crack/xml.rb#78
72
+ def to_hash; end
73
+
74
+ # Converts the node into a readable HTML node.
75
+ #
76
+ # @return [String] The HTML node in text form.
77
+ #
78
+ # source://crack//lib/crack/xml.rb#179
79
+ def to_html; end
80
+
81
+ # source://crack//lib/crack/xml.rb#185
82
+ def to_s; end
83
+
84
+ # source://crack//lib/crack/xml.rb#24
85
+ def type; end
86
+
87
+ # source://crack//lib/crack/xml.rb#24
88
+ def type=(_arg0); end
89
+
90
+ # Typecasts a value based upon its type. For instance, if
91
+ # +node+ has #type == "integer",
92
+ # {{[node.typecast_value("12") #=> 12]}}
93
+ #
94
+ # @note If +self+ does not have a "type" key, or if it's not one of the
95
+ # options specified above, the raw +value+ will be returned.
96
+ # @param value [String] The value that is being typecast.
97
+ # @return [Integer, TrueClass, FalseClass, Time, Date, Object] The result of typecasting +value+.
98
+ #
99
+ # source://crack//lib/crack/xml.rb#157
100
+ def typecast_value(value); end
101
+
102
+ # Take keys of the form foo-bar and convert them to foo_bar
103
+ #
104
+ # source://crack//lib/crack/xml.rb#164
105
+ def undasherize_keys(params); end
106
+
107
+ private
108
+
109
+ # source://crack//lib/crack/xml.rb#191
110
+ def unnormalize_xml_entities(value); end
111
+
112
+ class << self
113
+ # source://crack//lib/crack/xml.rb#34
114
+ def available_typecasts; end
115
+
116
+ # source://crack//lib/crack/xml.rb#38
117
+ def available_typecasts=(obj); end
118
+
119
+ # source://crack//lib/crack/xml.rb#26
120
+ def typecasts; end
121
+
122
+ # source://crack//lib/crack/xml.rb#30
123
+ def typecasts=(obj); end
124
+ end
125
+ end
126
+
127
+ # The Reason behind redefining the String Class for this specific plugin is to
128
+ # avoid the dynamic insertion of stuff on it (see version previous to this commit).
129
+ # Doing that disables the possibility of efectuating a dump on the structure. This way it goes.
130
+ #
131
+ # source://crack//lib/crack/xml.rb#14
132
+ class REXMLUtiliyNodeString < ::String
133
+ # Returns the value of attribute attributes.
134
+ #
135
+ # source://crack//lib/crack/xml.rb#15
136
+ def attributes; end
137
+
138
+ # Sets the attribute attributes
139
+ #
140
+ # @param value the value to set the attribute attributes to.
141
+ #
142
+ # source://crack//lib/crack/xml.rb#15
143
+ def attributes=(_arg0); end
144
+ end
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `docile` gem.
5
+ # Please instead update this file by running `bin/tapioca gem docile`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,146 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `erubi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem erubi`.
6
+
7
+ # source://erubi//lib/erubi.rb#3
8
+ module Erubi
9
+ class << self
10
+ # source://erubi//lib/erubi.rb#35
11
+ def h(value); end
12
+ end
13
+ end
14
+
15
+ # source://erubi//lib/erubi.rb#54
16
+ class Erubi::Engine
17
+ # Initialize a new Erubi::Engine. Options:
18
+ # +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
19
+ # +:bufvar+ :: The variable name to use for the buffer variable, as a string.
20
+ # +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
21
+ # performance, but can cause issues when the buffer variable is reassigned during
22
+ # template rendering (default +false+).
23
+ # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
24
+ # +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
25
+ # +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
26
+ # +:escape_html+ :: Same as +:escape+, with lower priority.
27
+ # +:filename+ :: The filename for the template.
28
+ # the resulting source code. Note this may cause problems if you are wrapping the resulting
29
+ # source code in other code, because the magic comment only has an effect at the beginning of
30
+ # the file, and having the magic comment later in the file can trigger warnings.
31
+ # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
32
+ # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
33
+ # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
34
+ # in order to improve performance.
35
+ # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
36
+ # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
37
+ # +:outvar+ :: Same as +:bufvar+, with lower priority.
38
+ # +:postamble+ :: The postamble for the template, by default returns the resulting source code.
39
+ # +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
40
+ # +:regexp+ :: The regexp to use for scanning.
41
+ # +:src+ :: The initial value to use for the source code, an empty string by default.
42
+ # +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
43
+ #
44
+ # @return [Engine] a new instance of Engine
45
+ #
46
+ # source://erubi//lib/erubi.rb#94
47
+ def initialize(input, properties = T.unsafe(nil)); end
48
+
49
+ # The variable name used for the buffer variable.
50
+ #
51
+ # source://erubi//lib/erubi.rb#65
52
+ def bufvar; end
53
+
54
+ # The filename of the template, if one was given.
55
+ #
56
+ # source://erubi//lib/erubi.rb#62
57
+ def filename; end
58
+
59
+ # The frozen ruby source code generated from the template, which can be evaled.
60
+ #
61
+ # source://erubi//lib/erubi.rb#59
62
+ def src; end
63
+
64
+ private
65
+
66
+ # Add ruby code to the template
67
+ #
68
+ # source://erubi//lib/erubi.rb#226
69
+ def add_code(code); end
70
+
71
+ # Add the given ruby expression result to the template,
72
+ # escaping it based on the indicator given and escape flag.
73
+ #
74
+ # source://erubi//lib/erubi.rb#235
75
+ def add_expression(indicator, code); end
76
+
77
+ # Add the result of Ruby expression to the template
78
+ #
79
+ # source://erubi//lib/erubi.rb#244
80
+ def add_expression_result(code); end
81
+
82
+ # Add the escaped result of Ruby expression to the template
83
+ #
84
+ # source://erubi//lib/erubi.rb#249
85
+ def add_expression_result_escaped(code); end
86
+
87
+ # Add the given postamble to the src. Can be overridden in subclasses
88
+ # to make additional changes to src that depend on the current state.
89
+ #
90
+ # source://erubi//lib/erubi.rb#255
91
+ def add_postamble(postamble); end
92
+
93
+ # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
94
+ # Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
95
+ #
96
+ # source://erubi//lib/erubi.rb#213
97
+ def add_text(text); end
98
+
99
+ # Raise an exception, as the base engine class does not support handling other indicators.
100
+ #
101
+ # @raise [ArgumentError]
102
+ #
103
+ # source://erubi//lib/erubi.rb#261
104
+ def handle(indicator, code, tailch, rspace, lspace); end
105
+
106
+ # Make sure that any current expression has been terminated.
107
+ # The default is to terminate all expressions, but when
108
+ # the chain_appends option is used, expressions may not be
109
+ # terminated.
110
+ #
111
+ # source://erubi//lib/erubi.rb#289
112
+ def terminate_expression; end
113
+
114
+ # Make sure the buffer variable is the target of the next append
115
+ # before yielding to the block. Mark that the buffer is the target
116
+ # of the next append after the block executes.
117
+ #
118
+ # This method should only be called if the block will result in
119
+ # code where << will append to the bufvar.
120
+ #
121
+ # source://erubi//lib/erubi.rb#271
122
+ def with_buffer; end
123
+ end
124
+
125
+ # The default regular expression used for scanning.
126
+ #
127
+ # source://erubi//lib/erubi.rb#56
128
+ Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
129
+
130
+ # source://erubi//lib/erubi.rb#17
131
+ Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
132
+
133
+ # source://erubi//lib/erubi.rb#15
134
+ Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
135
+
136
+ # source://erubi//lib/erubi.rb#8
137
+ Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
138
+
139
+ # source://erubi//lib/erubi.rb#9
140
+ Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
141
+
142
+ # source://erubi//lib/erubi.rb#16
143
+ Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
144
+
145
+ # source://erubi//lib/erubi.rb#4
146
+ Erubi::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,352 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `hashdiff` gem.
5
+ # Please instead update this file by running `bin/tapioca gem hashdiff`.
6
+
7
+ # This module provides methods to diff two hash, patch and unpatch hash
8
+ #
9
+ # source://hashdiff//lib/hashdiff/util.rb#3
10
+ module Hashdiff
11
+ class << self
12
+ # Best diff two objects, which tries to generate the smallest change set using different similarity values.
13
+ #
14
+ # Hashdiff.best_diff is useful in case of comparing two objects which include similar hashes in arrays.
15
+ #
16
+ # @example
17
+ # a = {'x' => [{'a' => 1, 'c' => 3, 'e' => 5}, {'y' => 3}]}
18
+ # b = {'x' => [{'a' => 1, 'b' => 2, 'e' => 5}] }
19
+ # diff = Hashdiff.best_diff(a, b)
20
+ # diff.should == [['-', 'x[0].c', 3], ['+', 'x[0].b', 2], ['-', 'x[1].y', 3], ['-', 'x[1]', {}]]
21
+ # @param obj1 [Array, Hash]
22
+ # @param obj2 [Array, Hash]
23
+ # @param options [Hash] the options to use when comparing
24
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
25
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
26
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
27
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
28
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
29
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
30
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
31
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
32
+ # @return [Array] an array of changes.
33
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
34
+ # @since 0.0.1
35
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
36
+ #
37
+ # source://hashdiff//lib/hashdiff/diff.rb#32
38
+ def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end
39
+
40
+ # check if objects are comparable
41
+ #
42
+ # @private
43
+ # @return [Boolean]
44
+ #
45
+ # source://hashdiff//lib/hashdiff/util.rb#108
46
+ def comparable?(obj1, obj2, strict = T.unsafe(nil)); end
47
+
48
+ # check for equality or "closeness" within given tolerance
49
+ #
50
+ # @private
51
+ #
52
+ # source://hashdiff//lib/hashdiff/util.rb#86
53
+ def compare_values(obj1, obj2, options = T.unsafe(nil)); end
54
+
55
+ # count node differences
56
+ #
57
+ # @private
58
+ #
59
+ # source://hashdiff//lib/hashdiff/util.rb#25
60
+ def count_diff(diffs); end
61
+
62
+ # count total nodes for an object
63
+ #
64
+ # @private
65
+ #
66
+ # source://hashdiff//lib/hashdiff/util.rb#36
67
+ def count_nodes(obj); end
68
+
69
+ # try custom comparison
70
+ #
71
+ # @private
72
+ #
73
+ # source://hashdiff//lib/hashdiff/util.rb#119
74
+ def custom_compare(method, key, obj1, obj2); end
75
+
76
+ # decode property path into an array
77
+ # e.g. "a.b[3].c" => ['a', 'b', 3, 'c']
78
+ #
79
+ # @param path [String] Property-string
80
+ # @param delimiter [String] Property-string delimiter
81
+ # @private
82
+ #
83
+ # source://hashdiff//lib/hashdiff/util.rb#58
84
+ def decode_property_path(path, delimiter = T.unsafe(nil)); end
85
+
86
+ # Compute the diff of two hashes or arrays
87
+ #
88
+ # @example
89
+ # a = {"a" => 1, "b" => {"b1" => 1, "b2" =>2}}
90
+ # b = {"a" => 1, "b" => {}}
91
+ #
92
+ # diff = Hashdiff.diff(a, b)
93
+ # diff.should == [['-', 'b.b1', 1], ['-', 'b.b2', 2]]
94
+ # @param obj1 [Array, Hash]
95
+ # @param obj2 [Array, Hash]
96
+ # @param options [Hash] the options to use when comparing
97
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
98
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
99
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
100
+ # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
101
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
102
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
103
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
104
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
105
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
106
+ # @return [Array] an array of changes.
107
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
108
+ # @since 0.0.1
109
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
110
+ #
111
+ # source://hashdiff//lib/hashdiff/diff.rb#80
112
+ def diff(obj1, obj2, options = T.unsafe(nil), &block); end
113
+
114
+ # diff array using LCS algorithm
115
+ #
116
+ # @private
117
+ # @yield [links]
118
+ #
119
+ # source://hashdiff//lib/hashdiff/diff.rb#124
120
+ def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end
121
+
122
+ # caculate array difference using LCS algorithm
123
+ # http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
124
+ #
125
+ # @private
126
+ #
127
+ # source://hashdiff//lib/hashdiff/lcs.rb#8
128
+ def lcs(arraya, arrayb, options = T.unsafe(nil)); end
129
+
130
+ # get the node of hash by given path parts
131
+ #
132
+ # @private
133
+ #
134
+ # source://hashdiff//lib/hashdiff/util.rb#75
135
+ def node(hash, parts); end
136
+
137
+ # Apply patch to object
138
+ #
139
+ # @param obj [Hash, Array] the object to be patched, can be an Array or a Hash
140
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
141
+ # @param options [Hash] supports following keys:
142
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
143
+ # @return the object after patch
144
+ # @since 0.0.1
145
+ #
146
+ # source://hashdiff//lib/hashdiff/patch.rb#17
147
+ def patch!(obj, changes, options = T.unsafe(nil)); end
148
+
149
+ # source://hashdiff//lib/hashdiff/util.rb#137
150
+ def prefix_append_array_index(prefix, array_index, opts); end
151
+
152
+ # source://hashdiff//lib/hashdiff/util.rb#129
153
+ def prefix_append_key(prefix, key, opts); end
154
+
155
+ # judge whether two objects are similar
156
+ #
157
+ # @private
158
+ # @return [Boolean]
159
+ #
160
+ # source://hashdiff//lib/hashdiff/util.rb#7
161
+ def similar?(obja, objb, options = T.unsafe(nil)); end
162
+
163
+ # Unpatch an object
164
+ #
165
+ # @param obj [Hash, Array] the object to be unpatched, can be an Array or a Hash
166
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
167
+ # @param options [Hash] supports following keys:
168
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
169
+ # @return the object after unpatch
170
+ # @since 0.0.1
171
+ #
172
+ # source://hashdiff//lib/hashdiff/patch.rb#58
173
+ def unpatch!(obj, changes, options = T.unsafe(nil)); end
174
+
175
+ private
176
+
177
+ # checks if both objects are Arrays or Hashes
178
+ #
179
+ # @private
180
+ # @return [Boolean]
181
+ #
182
+ # source://hashdiff//lib/hashdiff/util.rb#151
183
+ def any_hash_or_array?(obja, objb); end
184
+ end
185
+ end
186
+
187
+ # Used to compare hashes
188
+ #
189
+ # @private
190
+ #
191
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#6
192
+ class Hashdiff::CompareHashes
193
+ class << self
194
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#8
195
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
196
+ end
197
+ end
198
+
199
+ # Used to compare arrays using the lcs algorithm
200
+ #
201
+ # @private
202
+ #
203
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#6
204
+ class Hashdiff::LcsCompareArrays
205
+ class << self
206
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#8
207
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
208
+ end
209
+ end
210
+
211
+ # Used to compare arrays in a linear complexity, which produces longer diffs
212
+ # than using the lcs algorithm but is considerably faster
213
+ #
214
+ # @private
215
+ #
216
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#8
217
+ class Hashdiff::LinearCompareArray
218
+ # @return [LinearCompareArray] a new instance of LinearCompareArray
219
+ #
220
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#45
221
+ def initialize(old_array, new_array, options); end
222
+
223
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#14
224
+ def call; end
225
+
226
+ private
227
+
228
+ # Returns the value of attribute additions.
229
+ #
230
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
231
+ def additions; end
232
+
233
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#139
234
+ def append_addition(item, index); end
235
+
236
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#123
237
+ def append_addititions_before_match(match_index); end
238
+
239
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#144
240
+ def append_deletion(item, index); end
241
+
242
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#131
243
+ def append_deletions_before_match(match_index); end
244
+
245
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#149
246
+ def append_differences(difference); end
247
+
248
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#153
249
+ def changes; end
250
+
251
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#67
252
+ def compare_at_index; end
253
+
254
+ # Returns the value of attribute deletions.
255
+ #
256
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
257
+ def deletions; end
258
+
259
+ # Returns the value of attribute differences.
260
+ #
261
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
262
+ def differences; end
263
+
264
+ # Returns the value of attribute expected_additions.
265
+ #
266
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
267
+ def expected_additions; end
268
+
269
+ # Sets the attribute expected_additions
270
+ #
271
+ # @param value the value to set the attribute expected_additions to.
272
+ #
273
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
274
+ def expected_additions=(_arg0); end
275
+
276
+ # @return [Boolean]
277
+ #
278
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#59
279
+ def extra_items_in_new_array?; end
280
+
281
+ # @return [Boolean]
282
+ #
283
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#55
284
+ def extra_items_in_old_array?; end
285
+
286
+ # look ahead in the new array to see if the current item appears later
287
+ # thereby having new items added
288
+ #
289
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#89
290
+ def index_of_match_after_additions; end
291
+
292
+ # look ahead in the old array to see if the current item appears later
293
+ # thereby having items removed
294
+ #
295
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#107
296
+ def index_of_match_after_deletions; end
297
+
298
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#82
299
+ def item_difference(old_item, new_item, item_index); end
300
+
301
+ # @return [Boolean]
302
+ #
303
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#63
304
+ def iterated_through_both_arrays?; end
305
+
306
+ # Returns the value of attribute new_array.
307
+ #
308
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
309
+ def new_array; end
310
+
311
+ # Returns the value of attribute new_index.
312
+ #
313
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
314
+ def new_index; end
315
+
316
+ # Sets the attribute new_index
317
+ #
318
+ # @param value the value to set the attribute new_index to.
319
+ #
320
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
321
+ def new_index=(_arg0); end
322
+
323
+ # Returns the value of attribute old_array.
324
+ #
325
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
326
+ def old_array; end
327
+
328
+ # Returns the value of attribute old_index.
329
+ #
330
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
331
+ def old_index; end
332
+
333
+ # Sets the attribute old_index
334
+ #
335
+ # @param value the value to set the attribute old_index to.
336
+ #
337
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
338
+ def old_index=(_arg0); end
339
+
340
+ # Returns the value of attribute options.
341
+ #
342
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
343
+ def options; end
344
+
345
+ class << self
346
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#9
347
+ def call(old_array, new_array, options = T.unsafe(nil)); end
348
+ end
349
+ end
350
+
351
+ # source://hashdiff//lib/hashdiff/version.rb#4
352
+ Hashdiff::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,19 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `jaro_winkler` gem.
5
+ # Please instead update this file by running `bin/tapioca gem jaro_winkler`.
6
+
7
+ # source://jaro_winkler//lib/jaro_winkler/version.rb#3
8
+ module JaroWinkler
9
+ class << self
10
+ def distance(*_arg0); end
11
+ def jaro_distance(*_arg0); end
12
+ end
13
+ end
14
+
15
+ class JaroWinkler::Error < ::RuntimeError; end
16
+ class JaroWinkler::InvalidWeightError < ::JaroWinkler::Error; end
17
+
18
+ # source://jaro_winkler//lib/jaro_winkler/version.rb#4
19
+ JaroWinkler::VERSION = T.let(T.unsafe(nil), String)