stripe 10.13.0.pre.beta.1 → 10.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -300
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +0 -11
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +1 -2
  7. data/lib/stripe/api_version.rb +0 -1
  8. data/lib/stripe/object_types.rb +1 -23
  9. data/lib/stripe/resources/customer.rb +0 -11
  10. data/lib/stripe/resources/financial_connections/account.rb +0 -3
  11. data/lib/stripe/resources/forwarding/request.rb +50 -0
  12. data/lib/stripe/resources/invoice.rb +0 -113
  13. data/lib/stripe/resources/payment_intent.rb +0 -50
  14. data/lib/stripe/resources/quote.rb +0 -104
  15. data/lib/stripe/resources/subscription_schedule.rb +0 -20
  16. data/lib/stripe/resources/terminal/reader.rb +0 -60
  17. data/lib/stripe/resources.rb +1 -22
  18. data/lib/stripe/stripe_client.rb +28 -62
  19. data/lib/stripe/stripe_configuration.rb +1 -2
  20. data/lib/stripe/util.rb +1 -8
  21. data/lib/stripe/version.rb +1 -1
  22. data/lib/stripe.rb +0 -54
  23. data/stripe.gemspec +3 -0
  24. metadata +5 -84
  25. data/bin/tapioca +0 -27
  26. data/lib/stripe/request_signing_authenticator.rb +0 -79
  27. data/lib/stripe/resources/account_notice.rb +0 -32
  28. data/lib/stripe/resources/billing/meter.rb +0 -83
  29. data/lib/stripe/resources/billing/meter_event.rb +0 -27
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -26
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
  32. data/lib/stripe/resources/capital/financing_offer.rb +0 -49
  33. data/lib/stripe/resources/capital/financing_summary.rb +0 -15
  34. data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
  35. data/lib/stripe/resources/customer_entitlement.rb +0 -12
  36. data/lib/stripe/resources/customer_entitlement_summary.rb +0 -12
  37. data/lib/stripe/resources/entitlements/feature.rb +0 -38
  38. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
  39. data/lib/stripe/resources/gift_cards/card.rb +0 -59
  40. data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
  41. data/lib/stripe/resources/invoice_payment.rb +0 -12
  42. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
  43. data/lib/stripe/resources/margin.rb +0 -37
  44. data/lib/stripe/resources/order.rb +0 -120
  45. data/lib/stripe/resources/quote_phase.rb +0 -39
  46. data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
  47. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
  48. data/lib/stripe/resources/tax/form.rb +0 -49
  49. data/sorbet/config +0 -4
  50. data/sorbet/rbi/annotations/.gitattributes +0 -1
  51. data/sorbet/rbi/annotations/coveralls_reborn.rbi +0 -3
  52. data/sorbet/rbi/gems/.gitattributes +0 -1
  53. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1993
  54. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
  55. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3606
  56. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3437
  57. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +0 -8
  58. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -144
  59. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -8
  60. data/sorbet/rbi/gems/erubi@1.12.0.rbi +0 -146
  61. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +0 -352
  62. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
  63. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1561
  64. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
  65. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
  66. data/sorbet/rbi/gems/mocha@1.16.1.rbi +0 -11
  67. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -161
  68. data/sorbet/rbi/gems/parallel@1.24.0.rbi +0 -280
  69. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -9454
  70. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +0 -414
  71. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
  72. data/sorbet/rbi/gems/prism@0.19.0.rbi +0 -29883
  73. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1150
  74. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10085
  75. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -931
  76. data/sorbet/rbi/gems/racc@1.7.3.rbi +0 -161
  77. data/sorbet/rbi/gems/rack@3.0.8.rbi +0 -5193
  78. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -402
  79. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -2884
  80. data/sorbet/rbi/gems/rbi@0.1.6.rbi +0 -2922
  81. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3766
  82. data/sorbet/rbi/gems/rexml@3.2.6.rbi +0 -4887
  83. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7004
  84. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +0 -56919
  85. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1317
  86. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +0 -555
  87. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -8
  88. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -8
  89. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -8
  90. data/sorbet/rbi/gems/spoom@1.2.4.rbi +0 -3777
  91. data/sorbet/rbi/gems/sync@0.5.0.rbi +0 -8
  92. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
  93. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +0 -3503
  94. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +0 -8
  95. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +0 -4403
  96. data/sorbet/rbi/gems/thor@1.3.0.rbi +0 -4345
  97. data/sorbet/rbi/gems/tins@1.32.1.rbi +0 -8
  98. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
  99. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1740
  100. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
  101. data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18219
  102. data/sorbet/tapioca/config.yml +0 -13
  103. data/sorbet/tapioca/require.rb +0 -4
@@ -1,8 +0,0 @@
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
@@ -1,144 +0,0 @@
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
@@ -1,8 +0,0 @@
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
@@ -1,146 +0,0 @@
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)
@@ -1,352 +0,0 @@
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)
@@ -1,19 +0,0 @@
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)