test-test-ignore-123123 0.0.1.pre.alpha.0

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.
Files changed (244) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +128 -0
  3. data/lib/sink/base_client.rb +383 -0
  4. data/lib/sink/base_model.rb +203 -0
  5. data/lib/sink/client.rb +381 -0
  6. data/lib/sink/fake_page.rb +39 -0
  7. data/lib/sink/models/allof_base_parent.rb +11 -0
  8. data/lib/sink/models/allof_multiple_inline_entries.rb +15 -0
  9. data/lib/sink/models/api_status.rb +11 -0
  10. data/lib/sink/models/array_float_items_response.rb +6 -0
  11. data/lib/sink/models/array_missing_items_response.rb +11 -0
  12. data/lib/sink/models/array_object_items.rb +11 -0
  13. data/lib/sink/models/array_object_items_response.rb +11 -0
  14. data/lib/sink/models/array_recursion.rb +6 -0
  15. data/lib/sink/models/balance.rb +11 -0
  16. data/lib/sink/models/basic_shared_model_object.rb +15 -0
  17. data/lib/sink/models/body_param_top_level_all_of_response.rb +20 -0
  18. data/lib/sink/models/body_param_union_overlapping_prop_response.rb +11 -0
  19. data/lib/sink/models/card.rb +144 -0
  20. data/lib/sink/models/card_list_response.rb +26 -0
  21. data/lib/sink/models/card_provision_foo_response.rb +11 -0
  22. data/lib/sink/models/child_inlined_response_response.rb +11 -0
  23. data/lib/sink/models/child_model.rb +21 -0
  24. data/lib/sink/models/class_.rb +11 -0
  25. data/lib/sink/models/client.rb +15 -0
  26. data/lib/sink/models/company.rb +11 -0
  27. data/lib/sink/models/company_payment.rb +11 -0
  28. data/lib/sink/models/complex_query_array_query_response.rb +22 -0
  29. data/lib/sink/models/config_tool_model_ref_from_nested_response_body_response.rb +17 -0
  30. data/lib/sink/models/currency.rb +23 -0
  31. data/lib/sink/models/decorator_test_keep_me_response.rb +11 -0
  32. data/lib/sink/models/docstring_leading_double_quote_response.rb +12 -0
  33. data/lib/sink/models/docstring_trailing_double_quote_response.rb +22 -0
  34. data/lib/sink/models/documents.rb +15 -0
  35. data/lib/sink/models/eeoc.rb +11 -0
  36. data/lib/sink/models/employment_data.rb +11 -0
  37. data/lib/sink/models/enum_basic_response.rb +51 -0
  38. data/lib/sink/models/export.rb +12 -0
  39. data/lib/sink/models/funding_account.rb +73 -0
  40. data/lib/sink/models/import.rb +11 -0
  41. data/lib/sink/models/interface.rb +11 -0
  42. data/lib/sink/models/keep_this_resource_keep_this_method_response.rb +11 -0
  43. data/lib/sink/models/make_ambiguous_schemas_explicit_make_ambiguous_schemas_explicit_response.rb +31 -0
  44. data/lib/sink/models/make_ambiguous_schemas_looser_make_ambiguous_schemas_looser_response.rb +31 -0
  45. data/lib/sink/models/map_nullable_items_response.rb +19 -0
  46. data/lib/sink/models/method_config_skipped_tests_all_response.rb +11 -0
  47. data/lib/sink/models/method_config_skipped_tests_go_response.rb +11 -0
  48. data/lib/sink/models/method_config_skipped_tests_java_response.rb +11 -0
  49. data/lib/sink/models/method_config_skipped_tests_kotlin_response.rb +11 -0
  50. data/lib/sink/models/method_config_skipped_tests_node_and_python_response.rb +11 -0
  51. data/lib/sink/models/method_config_skipped_tests_node_response.rb +11 -0
  52. data/lib/sink/models/method_config_skipped_tests_python_response.rb +11 -0
  53. data/lib/sink/models/method_config_skipped_tests_ruby_response.rb +11 -0
  54. data/lib/sink/models/model_from_nested_path.rb +30 -0
  55. data/lib/sink/models/model_from_nested_response_body_ref.rb +11 -0
  56. data/lib/sink/models/model_from_schemas_ref.rb +11 -0
  57. data/lib/sink/models/model_from_schemas_ref_openapi_uri.rb +11 -0
  58. data/lib/sink/models/model_from_schemas_ref_openapi_uri_jmespath.rb +11 -0
  59. data/lib/sink/models/model_from_schemas_ref_openapi_uri_jsonpath.rb +11 -0
  60. data/lib/sink/models/model_level_1.rb +15 -0
  61. data/lib/sink/models/model_level_2.rb +15 -0
  62. data/lib/sink/models/model_level_3.rb +15 -0
  63. data/lib/sink/models/model_referenced_in_parent_and_child.rb +11 -0
  64. data/lib/sink/models/model_with_nested_model.rb +16 -0
  65. data/lib/sink/models/my_model.rb +11 -0
  66. data/lib/sink/models/name_child_prop_import_clash_response.rb +21 -0
  67. data/lib/sink/models/name_properties_common_conflicts_response.rb +59 -0
  68. data/lib/sink/models/name_properties_illegal_javascript_identifiers_response.rb +6 -0
  69. data/lib/sink/models/name_response_property_clashes_model_import_response.rb +15 -0
  70. data/lib/sink/models/name_response_shadows_pydantic_response.rb +15 -0
  71. data/lib/sink/models/nested_request_model_a.rb +11 -0
  72. data/lib/sink/models/nested_request_model_b.rb +11 -0
  73. data/lib/sink/models/nested_request_model_c.rb +17 -0
  74. data/lib/sink/models/object_missing_items_response.rb +11 -0
  75. data/lib/sink/models/object_mixed_known_and_unknown_response.rb +11 -0
  76. data/lib/sink/models/object_multiple_array_properties_same_ref_response.rb +42 -0
  77. data/lib/sink/models/object_multiple_properties_same_model_response.rb +19 -0
  78. data/lib/sink/models/object_multiple_properties_same_ref_response.rb +37 -0
  79. data/lib/sink/models/object_skipped_props.rb +27 -0
  80. data/lib/sink/models/object_two_dimensional_array_primitive_property_response.rb +23 -0
  81. data/lib/sink/models/object_with_any_of_null_property.rb +17 -0
  82. data/lib/sink/models/object_with_child_ref.rb +15 -0
  83. data/lib/sink/models/object_with_one_of_null_property.rb +17 -0
  84. data/lib/sink/models/object_with_union_properties.rb +15 -0
  85. data/lib/sink/models/openapi_format_array_type_one_entry_response.rb +11 -0
  86. data/lib/sink/models/openapi_format_array_type_one_entry_with_null_response.rb +11 -0
  87. data/lib/sink/models/openapi_special_used_used_as_property_name_response.rb +11 -0
  88. data/lib/sink/models/page_cursor_shared_ref_pagination.rb +15 -0
  89. data/lib/sink/models/parent_model_with_child_ref.rb +19 -0
  90. data/lib/sink/models/path_param_colon_suffix_response.rb +11 -0
  91. data/lib/sink/models/path_param_file_extension_response.rb +11 -0
  92. data/lib/sink/models/path_param_multiple_response.rb +11 -0
  93. data/lib/sink/models/path_param_query_param_response.rb +11 -0
  94. data/lib/sink/models/path_param_singular_response.rb +11 -0
  95. data/lib/sink/models/primitive_strings_response.rb +11 -0
  96. data/lib/sink/models/private.rb +11 -0
  97. data/lib/sink/models/public.rb +11 -0
  98. data/lib/sink/models/recursion_create_envelope_response.rb +11 -0
  99. data/lib/sink/models/response_allof_simple_response.rb +15 -0
  100. data/lib/sink/models/response_array_object_with_union_properties_response.rb +6 -0
  101. data/lib/sink/models/response_array_response_response.rb +6 -0
  102. data/lib/sink/models/response_missing_required_response.rb +15 -0
  103. data/lib/sink/models/response_nested_array_response.rb +21 -0
  104. data/lib/sink/models/response_object_all_properties_response.rb +49 -0
  105. data/lib/sink/models/response_object_no_properties_response.rb +8 -0
  106. data/lib/sink/models/response_object_with_additional_properties_prop_response.rb +17 -0
  107. data/lib/sink/models/response_object_with_heavily_nested_union_response.rb +11 -0
  108. data/lib/sink/models/response_only_read_only_properties_response.rb +16 -0
  109. data/lib/sink/models/responses_allof_cross_object.rb +15 -0
  110. data/lib/sink/models/return_.rb +11 -0
  111. data/lib/sink/models/root_response.rb +19 -0
  112. data/lib/sink/models/self_recursion.rb +15 -0
  113. data/lib/sink/models/shared_cursor_nested_response_prop_meta.rb +18 -0
  114. data/lib/sink/models/shared_self_recursion.rb +15 -0
  115. data/lib/sink/models/shipping_address.rb +62 -0
  116. data/lib/sink/models/simple_allof.rb +20 -0
  117. data/lib/sink/models/simple_object.rb +19 -0
  118. data/lib/sink/models/skip_this_resource_i_never_appear_response.rb +11 -0
  119. data/lib/sink/models/streaming_basic_response.rb +15 -0
  120. data/lib/sink/models/streaming_nested_params_response.rb +15 -0
  121. data/lib/sink/models/streaming_no_discriminator_response.rb +15 -0
  122. data/lib/sink/models/streaming_query_param_discriminator_response.rb +15 -0
  123. data/lib/sink/models/streaming_with_unrelated_default_param_response.rb +15 -0
  124. data/lib/sink/models/type_dates_response.rb +27 -0
  125. data/lib/sink/models/type_datetimes_response.rb +27 -0
  126. data/lib/sink/models/union_discriminated_variant_a.rb +19 -0
  127. data/lib/sink/models/union_discriminated_variant_b.rb +19 -0
  128. data/lib/sink/models/union_response_discriminated_by_property_name_response.rb +6 -0
  129. data/lib/sink/models/union_response_discriminated_with_basic_mapping_response.rb +6 -0
  130. data/lib/sink/models/union_type_mixed_types_response.rb +6 -0
  131. data/lib/sink/models/union_type_nullable_union_response.rb +6 -0
  132. data/lib/sink/models/union_type_objects_response.rb +6 -0
  133. data/lib/sink/models/union_type_super_mixed_types_response.rb +6 -0
  134. data/lib/sink/models/union_type_unknown_variant_response.rb +6 -0
  135. data/lib/sink/models/version_1_30_name_create_response.rb +11 -0
  136. data/lib/sink/models/widget.rb +12 -0
  137. data/lib/sink/models/write_only_response_simple_response.rb +12 -0
  138. data/lib/sink/page_cursor.rb +49 -0
  139. data/lib/sink/page_cursor_from_headers.rb +49 -0
  140. data/lib/sink/page_cursor_id.rb +45 -0
  141. data/lib/sink/page_cursor_nested_items.rb +65 -0
  142. data/lib/sink/page_cursor_nested_object_ref.rb +59 -0
  143. data/lib/sink/page_cursor_shared_ref.rb +59 -0
  144. data/lib/sink/page_cursor_top_level_array.rb +46 -0
  145. data/lib/sink/page_cursor_url.rb +46 -0
  146. data/lib/sink/page_offset.rb +49 -0
  147. data/lib/sink/page_offset_no_start_field.rb +45 -0
  148. data/lib/sink/page_offset_total_count.rb +53 -0
  149. data/lib/sink/page_page_number.rb +53 -0
  150. data/lib/sink/page_page_number_without_current_page_response.rb +45 -0
  151. data/lib/sink/pooled_net_requester.rb +63 -0
  152. data/lib/sink/request_options.rb +84 -0
  153. data/lib/sink/resources/body_params/objects.rb +31 -0
  154. data/lib/sink/resources/body_params/unions.rb +31 -0
  155. data/lib/sink/resources/body_params.rb +475 -0
  156. data/lib/sink/resources/cards.rb +488 -0
  157. data/lib/sink/resources/casing/eeoc.rb +32 -0
  158. data/lib/sink/resources/casing.rb +15 -0
  159. data/lib/sink/resources/clients.rb +27 -0
  160. data/lib/sink/resources/company/payments.rb +28 -0
  161. data/lib/sink/resources/company.rb +17 -0
  162. data/lib/sink/resources/complex_queries.rb +56 -0
  163. data/lib/sink/resources/config_tools/parent_with_skip_node_python/child_only_skip_python.rb +96 -0
  164. data/lib/sink/resources/config_tools/parent_with_skip_node_python.rb +98 -0
  165. data/lib/sink/resources/config_tools.rb +37 -0
  166. data/lib/sink/resources/decorator_tests/keep_this_resource.rb +27 -0
  167. data/lib/sink/resources/decorator_tests/languages.rb +55 -0
  168. data/lib/sink/resources/decorator_tests/skip_this_resource.rb +26 -0
  169. data/lib/sink/resources/decorator_tests.rb +36 -0
  170. data/lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb +31 -0
  171. data/lib/sink/resources/deeply_nested/level_one/level_two.rb +33 -0
  172. data/lib/sink/resources/deeply_nested/level_one.rb +31 -0
  173. data/lib/sink/resources/deeply_nested.rb +15 -0
  174. data/lib/sink/resources/docstrings.rb +77 -0
  175. data/lib/sink/resources/empty_body.rb +55 -0
  176. data/lib/sink/resources/header_params.rb +33 -0
  177. data/lib/sink/resources/invalid_schemas/arrays.rb +24 -0
  178. data/lib/sink/resources/invalid_schemas/objects.rb +24 -0
  179. data/lib/sink/resources/invalid_schemas.rb +19 -0
  180. data/lib/sink/resources/make_ambiguous_schemas_explicit.rb +24 -0
  181. data/lib/sink/resources/make_ambiguous_schemas_looser.rb +24 -0
  182. data/lib/sink/resources/method_config.rb +156 -0
  183. data/lib/sink/resources/mixed_params/duplicates.rb +73 -0
  184. data/lib/sink/resources/mixed_params.rb +81 -0
  185. data/lib/sink/resources/model_referenced_in_parent_and_child/child.rb +24 -0
  186. data/lib/sink/resources/model_referenced_in_parent_and_child.rb +26 -0
  187. data/lib/sink/resources/names/can_cause_clashes/employment_data.rb +15 -0
  188. data/lib/sink/resources/names/can_cause_clashes/response.rb +30 -0
  189. data/lib/sink/resources/names/can_cause_clashes.rb +22 -0
  190. data/lib/sink/resources/names/documents.rb +26 -0
  191. data/lib/sink/resources/names/openapi_specials.rb +24 -0
  192. data/lib/sink/resources/names/params.rb +47 -0
  193. data/lib/sink/resources/names/reserved_names/import.rb +29 -0
  194. data/lib/sink/resources/names/reserved_names/methods.rb +37 -0
  195. data/lib/sink/resources/names/reserved_names/public/class_.rb +28 -0
  196. data/lib/sink/resources/names/reserved_names/public/interface.rb +28 -0
  197. data/lib/sink/resources/names/reserved_names/public/private.rb +28 -0
  198. data/lib/sink/resources/names/reserved_names/public.rb +38 -0
  199. data/lib/sink/resources/names/reserved_names.rb +43 -0
  200. data/lib/sink/resources/names.rb +139 -0
  201. data/lib/sink/resources/openapi_formats.rb +48 -0
  202. data/lib/sink/resources/pagination_tests/cursor.rb +32 -0
  203. data/lib/sink/resources/pagination_tests/items_types.rb +32 -0
  204. data/lib/sink/resources/pagination_tests/nested_items.rb +32 -0
  205. data/lib/sink/resources/pagination_tests/offset.rb +70 -0
  206. data/lib/sink/resources/pagination_tests/schema_types.rb +51 -0
  207. data/lib/sink/resources/pagination_tests.rb +31 -0
  208. data/lib/sink/resources/parent/child.rb +28 -0
  209. data/lib/sink/resources/parent.rb +17 -0
  210. data/lib/sink/resources/path_params.rb +196 -0
  211. data/lib/sink/resources/positional_params.rb +219 -0
  212. data/lib/sink/resources/query_params.rb +157 -0
  213. data/lib/sink/resources/recursion/shared_responses.rb +24 -0
  214. data/lib/sink/resources/recursion.rb +61 -0
  215. data/lib/sink/resources/resource_refs/paginated_model_first_ref.rb +13 -0
  216. data/lib/sink/resources/resource_refs/paginated_model_second_ref.rb +13 -0
  217. data/lib/sink/resources/resource_refs/parent/child.rb +29 -0
  218. data/lib/sink/resources/resource_refs/parent.rb +30 -0
  219. data/lib/sink/resources/resource_refs.rb +23 -0
  220. data/lib/sink/resources/resources.rb +24 -0
  221. data/lib/sink/resources/responses/union_types.rb +91 -0
  222. data/lib/sink/resources/responses.rb +297 -0
  223. data/lib/sink/resources/shared_query_params.rb +45 -0
  224. data/lib/sink/resources/streaming.rb +96 -0
  225. data/lib/sink/resources/testing.rb +22 -0
  226. data/lib/sink/resources/tests.rb +24 -0
  227. data/lib/sink/resources/tools.rb +30 -0
  228. data/lib/sink/resources/types/allofs.rb +13 -0
  229. data/lib/sink/resources/types/arrays.rb +57 -0
  230. data/lib/sink/resources/types/enums.rb +86 -0
  231. data/lib/sink/resources/types/maps.rb +27 -0
  232. data/lib/sink/resources/types/objects.rb +98 -0
  233. data/lib/sink/resources/types/primitives.rb +31 -0
  234. data/lib/sink/resources/types/read_only_params.rb +31 -0
  235. data/lib/sink/resources/types/unions.rb +115 -0
  236. data/lib/sink/resources/types/write_only_responses.rb +26 -0
  237. data/lib/sink/resources/types.rb +90 -0
  238. data/lib/sink/resources/undocumented_resource.rb +44 -0
  239. data/lib/sink/resources/version_1_30_names.rb +38 -0
  240. data/lib/sink/resources/widgets.rb +28 -0
  241. data/lib/sink/util.rb +78 -0
  242. data/lib/sink/version.rb +5 -0
  243. data/lib/sink.rb +253 -0
  244. metadata +301 -0
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Tests
6
+ def initialize(client:)
7
+ @client = client
8
+ end
9
+
10
+ # Testing codegen change with new Github action
11
+ #
12
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
13
+ #
14
+ # @return [nil]
15
+ def run_codegen(opts = {})
16
+ req = {}
17
+ req[:method] = :get
18
+ req[:path] = "/tests/run_codegen"
19
+ req[:model] = NilClass
20
+ @client.request(req, opts)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Tools
6
+ def initialize(client:)
7
+ @client = client
8
+ end
9
+
10
+ # @param params [Hash] Attributes to send in this request.
11
+ # @option params [String, nil] :skipped_go
12
+ # @option params [String, nil] :skipped_java
13
+ # @option params [String, nil] :skipped_node
14
+ # @option params [String, nil] :skipped_python
15
+ # @option params [String, nil] :skipped_python_and_node
16
+ #
17
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
18
+ #
19
+ # @return [Sink::Models::ObjectSkippedProps]
20
+ def skipped_params(params = {}, opts = {})
21
+ req = {}
22
+ req[:method] = :post
23
+ req[:path] = "/tools/skipped_params"
24
+ req[:body] = params
25
+ req[:model] = Sink::Models::ObjectSkippedProps
26
+ @client.request(req, opts)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Allofs
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Arrays
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with a response schema that is an array of number types.
12
+ #
13
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
14
+ #
15
+ # @return [Array<Float>]
16
+ def float_items(opts = {})
17
+ req = {}
18
+ req[:method] = :get
19
+ req[:path] = "/types/array/float_items"
20
+ req[:model] = Sink::ArrayOf.new(Float)
21
+ @client.request(req, opts)
22
+ end
23
+
24
+ # Endpoint with a request schema that has a property that points to an array
25
+ # model.
26
+ #
27
+ # @param params [Hash] Attributes to send in this request.
28
+ # @option params [Object, nil] :array_param
29
+ #
30
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
31
+ #
32
+ # @return [nil]
33
+ def nested_in_params(params = {}, opts = {})
34
+ req = {}
35
+ req[:method] = :post
36
+ req[:path] = "/types/array/model_nested_in_params"
37
+ req[:body] = params
38
+ req[:model] = NilClass
39
+ @client.request(req, opts)
40
+ end
41
+
42
+ # Endpoint with a response schema that is an array of in-line object types.
43
+ #
44
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
45
+ #
46
+ # @return [Array<Sink::Models::ArrayObjectItemsResponse::ArrayObjectItemsResponse>]
47
+ def object_items(opts = {})
48
+ req = {}
49
+ req[:method] = :get
50
+ req[:path] = "/types/array/object_items"
51
+ req[:model] = Sink::ArrayOf.new(Sink::Models::ArrayObjectItemsResponse::ArrayObjectItemsResponse)
52
+ @client.request(req, opts)
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Enums
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint that has an array of enum that should generate a valid test with
12
+ # non-repeating values in the array.
13
+ #
14
+ # @param params [Hash] Attributes to send in this request.
15
+ # @option params [Array<Symbol, Body>] :body
16
+ #
17
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
18
+ #
19
+ # @return [nil]
20
+ def array_unique_values(params = {}, opts = {})
21
+ req = {}
22
+ req[:method] = :post
23
+ req[:path] = "/types/enum_tests_array_unique_values"
24
+ req[:body] = params[:body]
25
+ req[:model] = NilClass
26
+ @client.request(req, opts)
27
+ end
28
+
29
+ # Endpoint that has an array of enum that should generate a valid test with 2
30
+ # non-repeating values in the array.
31
+ #
32
+ # @param params [Hash] Attributes to send in this request.
33
+ # @option params [Array<Symbol, Body>] :body
34
+ #
35
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
36
+ #
37
+ # @return [nil]
38
+ def array_unique_values_2_values(params = {}, opts = {})
39
+ req = {}
40
+ req[:method] = :post
41
+ req[:path] = "/types/enum_tests_array_unique_values_2_values"
42
+ req[:body] = params[:body]
43
+ req[:model] = NilClass
44
+ @client.request(req, opts)
45
+ end
46
+
47
+ # Endpoint that has an array of enum that should generate a valid test with 2
48
+ # non-repeating values in the array.
49
+ #
50
+ # @param params [Hash] Attributes to send in this request.
51
+ # @option params [Array<Float>] :body
52
+ #
53
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
54
+ #
55
+ # @return [nil]
56
+ def array_unique_values_numbers(params = {}, opts = {})
57
+ req = {}
58
+ req[:method] = :post
59
+ req[:path] = "/types/enum_tests_array_unique_values_numbers"
60
+ req[:body] = params[:body]
61
+ req[:model] = NilClass
62
+ @client.request(req, opts)
63
+ end
64
+
65
+ # Endpoint that has a `$ref`d enum type in the request body and the response body.
66
+ #
67
+ # @param params [Hash] Attributes to send in this request.
68
+ # @option params [Symbol, Sink::Models::Currency, nil] :input_currency This is my description for the Currency enum
69
+ # @option params [Symbol, ProblematicEnum, nil] :problematic_enum
70
+ # @option params [Symbol, UsesConst, nil] :uses_const
71
+ #
72
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
73
+ #
74
+ # @return [Sink::Models::EnumBasicResponse]
75
+ def basic(params = {}, opts = {})
76
+ req = {}
77
+ req[:method] = :post
78
+ req[:path] = "/types/enums"
79
+ req[:body] = params
80
+ req[:model] = Sink::Models::EnumBasicResponse
81
+ @client.request(req, opts)
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Maps
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with a response schema object that contains properties that use
12
+ # `additionalProperties` with a nullable items type.
13
+ #
14
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
15
+ #
16
+ # @return [Sink::Models::MapNullableItemsResponse]
17
+ def nullable_items(opts = {})
18
+ req = {}
19
+ req[:method] = :get
20
+ req[:path] = "/types/map/nullable_items"
21
+ req[:model] = Sink::Models::MapNullableItemsResponse
22
+ @client.request(req, opts)
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Objects
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with a response schema object that contains a mix of known & unknown
12
+ # properties with the same value types.
13
+ #
14
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
15
+ #
16
+ # @return [Sink::Models::ObjectMixedKnownAndUnknownResponse]
17
+ def mixed_known_and_unknown(opts = {})
18
+ req = {}
19
+ req[:method] = :get
20
+ req[:path] = "/types/object/mixed_known_and_unknown"
21
+ req[:model] = Sink::Models::ObjectMixedKnownAndUnknownResponse
22
+ @client.request(req, opts)
23
+ end
24
+
25
+ # Endpoint with a response schema object that contains multiple properties that
26
+ # reference the same $ref in array items that is _not_ a model in the config.
27
+ # Three child types should be generated, one for each property.
28
+ #
29
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
30
+ #
31
+ # @return [Sink::Models::ObjectMultipleArrayPropertiesSameRefResponse]
32
+ def multiple_array_properties_same_ref(opts = {})
33
+ req = {}
34
+ req[:method] = :get
35
+ req[:path] = "/types/object/multiple_array_properties_same_ref"
36
+ req[:model] = Sink::Models::ObjectMultipleArrayPropertiesSameRefResponse
37
+ @client.request(req, opts)
38
+ end
39
+
40
+ # Endpoint with a response schema object that contains multiple properties that
41
+ # reference the same model.
42
+ #
43
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
44
+ #
45
+ # @return [Sink::Models::ObjectMultiplePropertiesSameModelResponse]
46
+ def multiple_properties_same_model(opts = {})
47
+ req = {}
48
+ req[:method] = :get
49
+ req[:path] = "/types/object/multiple_properties_same_model"
50
+ req[:model] = Sink::Models::ObjectMultiplePropertiesSameModelResponse
51
+ @client.request(req, opts)
52
+ end
53
+
54
+ # Endpoint with a response schema object that contains multiple properties that
55
+ # reference the same $ref that is _not_ a model in the config. Three child types
56
+ # should be generated. One for each property.
57
+ #
58
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
59
+ #
60
+ # @return [Sink::Models::ObjectMultiplePropertiesSameRefResponse]
61
+ def multiple_properties_same_ref(opts = {})
62
+ req = {}
63
+ req[:method] = :get
64
+ req[:path] = "/types/object/multiple_properties_same_ref"
65
+ req[:model] = Sink::Models::ObjectMultiplePropertiesSameRefResponse
66
+ @client.request(req, opts)
67
+ end
68
+
69
+ # Endpoint with a response schema object that contains properties that are
70
+ # primitive 2d arrays
71
+ #
72
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
73
+ #
74
+ # @return [Sink::Models::ObjectTwoDimensionalArrayPrimitivePropertyResponse]
75
+ def two_dimensional_array_primitive_property(opts = {})
76
+ req = {}
77
+ req[:method] = :get
78
+ req[:path] = "/types/object/2d_array_primitive_properties"
79
+ req[:model] = Sink::Models::ObjectTwoDimensionalArrayPrimitivePropertyResponse
80
+ @client.request(req, opts)
81
+ end
82
+
83
+ # Endpoint with a response schema object that does not define any properties
84
+ #
85
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
86
+ #
87
+ # @return [Object]
88
+ def unknown_object(opts = {})
89
+ req = {}
90
+ req[:method] = :get
91
+ req[:path] = "/types/object/unknown_object"
92
+ req[:model] = Sink::Unknown
93
+ @client.request(req, opts)
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Primitives
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint that has a request body property that points to a string model &
12
+ # returns an object with a string model prop
13
+ #
14
+ # @param params [Hash] Attributes to send in this request.
15
+ # @option params [String, nil] :string_param
16
+ #
17
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
18
+ #
19
+ # @return [Sink::Models::PrimitiveStringsResponse]
20
+ def strings(params = {}, opts = {})
21
+ req = {}
22
+ req[:method] = :post
23
+ req[:path] = "/types/primitives/strings"
24
+ req[:body] = params
25
+ req[:model] = Sink::Models::PrimitiveStringsResponse
26
+ @client.request(req, opts)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class ReadOnlyParams
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with a request params schema object that contains a `readOnly`
12
+ # property.
13
+ #
14
+ # @param params [Hash] Attributes to send in this request.
15
+ # @option params [String, nil] :should_show_up This should be generated in the request params type.
16
+ #
17
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
18
+ #
19
+ # @return [Hash]
20
+ def simple(params = {}, opts = {})
21
+ req = {}
22
+ req[:method] = :post
23
+ req[:path] = "/types/read_only_params/simple"
24
+ req[:body] = params
25
+ req[:model] = Hash
26
+ @client.request(req, opts)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class Unions
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with an array request param schema with items discriminated union that
12
+ # just defines the `propertyName` config
13
+ #
14
+ # @param params [Hash] Attributes to send in this request.
15
+ # @option params [Array<Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB>] :body
16
+ #
17
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
18
+ #
19
+ # @return [String]
20
+ def array_param_discriminated_by_property_name(params = {}, opts = {})
21
+ req = {}
22
+ req[:method] = :post
23
+ req[:path] = "/types/unions/array_param_discriminated_by_property_name"
24
+ req[:body] = params[:body]
25
+ req[:model] = String
26
+ @client.request(req, opts)
27
+ end
28
+
29
+ # Endpoint with an array request param schema with items discriminated union that
30
+ # also defines the `mapping` config
31
+ #
32
+ # @param params [Hash] Attributes to send in this request.
33
+ # @option params [Array<Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB>] :body
34
+ #
35
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
36
+ #
37
+ # @return [String]
38
+ def array_param_discriminated_with_basic_mapping(params = {}, opts = {})
39
+ req = {}
40
+ req[:method] = :post
41
+ req[:path] = "/types/unions/array_param_discriminated_with_basic_mapping"
42
+ req[:body] = params[:body]
43
+ req[:model] = String
44
+ @client.request(req, opts)
45
+ end
46
+
47
+ # Endpoint with a request param schema that is a discriminated union that just
48
+ # defines the `propertyName` config
49
+ #
50
+ # @param params [Hash] Attributes to send in this request.
51
+ # @option params [String] :value
52
+ # @option params [Symbol, Type, nil] :type
53
+ #
54
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
55
+ #
56
+ # @return [String]
57
+ def param_discriminated_by_property_name(params = {}, opts = {})
58
+ req = {}
59
+ req[:method] = :post
60
+ req[:path] = "/types/unions/param_discriminated_by_property_name"
61
+ req[:body] = params
62
+ req[:model] = String
63
+ @client.request(req, opts)
64
+ end
65
+
66
+ # Endpoint with a request param schema that is a discriminated union that also
67
+ # defines the `mapping` config
68
+ #
69
+ # @param params [Hash] Attributes to send in this request.
70
+ # @option params [String] :value
71
+ # @option params [Symbol, Type, nil] :type
72
+ #
73
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
74
+ #
75
+ # @return [String]
76
+ def param_discriminated_with_basic_mapping(params = {}, opts = {})
77
+ req = {}
78
+ req[:method] = :post
79
+ req[:path] = "/types/unions/param_discriminated_with_basic_mapping"
80
+ req[:body] = params
81
+ req[:model] = String
82
+ @client.request(req, opts)
83
+ end
84
+
85
+ # Endpoint with a response schema that is a discriminated union that just defines
86
+ # the `propertyName` config
87
+ #
88
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
89
+ #
90
+ # @return [Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB]
91
+ def response_discriminated_by_property_name(opts = {})
92
+ req = {}
93
+ req[:method] = :get
94
+ req[:path] = "/types/unions/response_discriminated_by_property_name"
95
+ req[:model] = Sink::Unknown
96
+ @client.request(req, opts)
97
+ end
98
+
99
+ # Endpoint with a response schema that is a discriminated union that also defines
100
+ # the `mapping` config
101
+ #
102
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
103
+ #
104
+ # @return [Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB]
105
+ def response_discriminated_with_basic_mapping(opts = {})
106
+ req = {}
107
+ req[:method] = :get
108
+ req[:path] = "/types/unions/response_discriminated_with_basic_mapping"
109
+ req[:model] = Sink::Unknown
110
+ @client.request(req, opts)
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ class WriteOnlyResponses
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Endpoint with a response schema object that contains a `writeOnly` property.
12
+ #
13
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
14
+ #
15
+ # @return [Sink::Models::WriteOnlyResponseSimpleResponse]
16
+ def simple(opts = {})
17
+ req = {}
18
+ req[:method] = :get
19
+ req[:path] = "/types/write_only_responses/simple"
20
+ req[:model] = Sink::Models::WriteOnlyResponseSimpleResponse
21
+ @client.request(req, opts)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class Types
6
+ # @return [Sink::Resources::Types::Primitives]
7
+ attr_reader :primitives
8
+
9
+ # @return [Sink::Resources::Types::ReadOnlyParams]
10
+ attr_reader :read_only_params
11
+
12
+ # @return [Sink::Resources::Types::WriteOnlyResponses]
13
+ attr_reader :write_only_responses
14
+
15
+ # @return [Sink::Resources::Types::Maps]
16
+ attr_reader :maps
17
+
18
+ # @return [Sink::Resources::Types::Enums]
19
+ attr_reader :enums
20
+
21
+ # @return [Sink::Resources::Types::Allofs]
22
+ attr_reader :allofs
23
+
24
+ # @return [Sink::Resources::Types::Unions]
25
+ attr_reader :unions
26
+
27
+ # @return [Sink::Resources::Types::Objects]
28
+ attr_reader :objects
29
+
30
+ # @return [Sink::Resources::Types::Arrays]
31
+ attr_reader :arrays
32
+
33
+ def initialize(client:)
34
+ @client = client
35
+ @primitives = Sink::Resources::Types::Primitives.new(client: client)
36
+ @read_only_params = Sink::Resources::Types::ReadOnlyParams.new(client: client)
37
+ @write_only_responses = Sink::Resources::Types::WriteOnlyResponses.new(client: client)
38
+ @maps = Sink::Resources::Types::Maps.new(client: client)
39
+ @enums = Sink::Resources::Types::Enums.new(client: client)
40
+ @allofs = Sink::Resources::Types::Allofs.new(client: client)
41
+ @unions = Sink::Resources::Types::Unions.new(client: client)
42
+ @objects = Sink::Resources::Types::Objects.new(client: client)
43
+ @arrays = Sink::Resources::Types::Arrays.new(client: client)
44
+ end
45
+
46
+ # Endpoint that has date types should generate params/responses with rich date
47
+ # types.
48
+ #
49
+ # @param params [Hash] Attributes to send in this request.
50
+ # @option params [Date] :required_date
51
+ # @option params [Date] :required_nullable_date
52
+ # @option params [Array<Date>, nil] :list_date
53
+ # @option params [Date, Integer, nil] :oneof_date
54
+ # @option params [Date, nil] :optional_date
55
+ #
56
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
57
+ #
58
+ # @return [Sink::Models::TypeDatesResponse]
59
+ def dates(params = {}, opts = {})
60
+ req = {}
61
+ req[:method] = :post
62
+ req[:path] = "/types/dates"
63
+ req[:body] = params
64
+ req[:model] = Sink::Models::TypeDatesResponse
65
+ @client.request(req, opts)
66
+ end
67
+
68
+ # Endpoint that has date-time types.
69
+ #
70
+ # @param params [Hash] Attributes to send in this request.
71
+ # @option params [DateTime] :required_datetime
72
+ # @option params [DateTime] :required_nullable_datetime
73
+ # @option params [Array<DateTime>, nil] :list_datetime
74
+ # @option params [DateTime, Integer, nil] :oneof_datetime union type coming from the `oneof_datetime` property
75
+ # @option params [DateTime, nil] :optional_datetime
76
+ #
77
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
78
+ #
79
+ # @return [Sink::Models::TypeDatetimesResponse]
80
+ def datetimes(params = {}, opts = {})
81
+ req = {}
82
+ req[:method] = :post
83
+ req[:path] = "/types/datetimes"
84
+ req[:body] = params
85
+ req[:model] = Sink::Models::TypeDatetimesResponse
86
+ @client.request(req, opts)
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class UndocumentedResource
6
+ def initialize(client:)
7
+ @client = client
8
+ end
9
+
10
+ # Initiate print and shipment of a duplicate card.
11
+ #
12
+ # Only applies to cards of type `PHYSICAL` [beta].
13
+ #
14
+ # @param card_token [String]
15
+ #
16
+ # @param params [Hash] Attributes to send in this request.
17
+ # @option params [String, nil] :product_id Specifies the configuration (e.g. physical card art) that the card should be
18
+ # manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
19
+ # must be configured with Lithic before use.
20
+ # @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Use of options besides `STANDARD` require
21
+ # additional permissions.
22
+ #
23
+ # - `STANDARD` - USPS regular mail or similar international option, with no
24
+ # tracking
25
+ # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
26
+ # with tracking
27
+ # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
28
+ # tracking
29
+ # @option params [Sink::Models::ShippingAddress, nil] :shipping_address If omitted, the previous shipping address will be used.
30
+ #
31
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
32
+ #
33
+ # @return [Sink::Models::Card]
34
+ def reissue(card_token, params = {}, opts = {})
35
+ req = {}
36
+ req[:method] = :post
37
+ req[:path] = "/cards/#{card_token}/reissue"
38
+ req[:body] = params
39
+ req[:model] = Sink::Models::Card
40
+ @client.request(req, opts)
41
+ end
42
+ end
43
+ end
44
+ end