testttttttttttttttomgomgomg12 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.
- checksums.yaml +7 -0
- data/README.md +128 -0
- data/lib/sink/base_client.rb +383 -0
- data/lib/sink/base_model.rb +203 -0
- data/lib/sink/client.rb +381 -0
- data/lib/sink/fake_page.rb +39 -0
- data/lib/sink/models/allof_base_parent.rb +11 -0
- data/lib/sink/models/allof_multiple_inline_entries.rb +15 -0
- data/lib/sink/models/api_status.rb +11 -0
- data/lib/sink/models/array_float_items_response.rb +6 -0
- data/lib/sink/models/array_missing_items_response.rb +11 -0
- data/lib/sink/models/array_object_items.rb +11 -0
- data/lib/sink/models/array_object_items_response.rb +11 -0
- data/lib/sink/models/array_recursion.rb +6 -0
- data/lib/sink/models/balance.rb +11 -0
- data/lib/sink/models/basic_shared_model_object.rb +15 -0
- data/lib/sink/models/body_param_top_level_all_of_response.rb +20 -0
- data/lib/sink/models/body_param_union_overlapping_prop_response.rb +11 -0
- data/lib/sink/models/card.rb +144 -0
- data/lib/sink/models/card_list_response.rb +26 -0
- data/lib/sink/models/card_provision_foo_response.rb +11 -0
- data/lib/sink/models/child_inlined_response_response.rb +11 -0
- data/lib/sink/models/child_model.rb +21 -0
- data/lib/sink/models/class_.rb +11 -0
- data/lib/sink/models/client.rb +15 -0
- data/lib/sink/models/company.rb +11 -0
- data/lib/sink/models/company_payment.rb +11 -0
- data/lib/sink/models/complex_query_array_query_response.rb +22 -0
- data/lib/sink/models/config_tool_model_ref_from_nested_response_body_response.rb +17 -0
- data/lib/sink/models/currency.rb +23 -0
- data/lib/sink/models/decorator_test_keep_me_response.rb +11 -0
- data/lib/sink/models/docstring_leading_double_quote_response.rb +12 -0
- data/lib/sink/models/docstring_trailing_double_quote_response.rb +22 -0
- data/lib/sink/models/documents.rb +15 -0
- data/lib/sink/models/eeoc.rb +11 -0
- data/lib/sink/models/employment_data.rb +11 -0
- data/lib/sink/models/enum_basic_response.rb +51 -0
- data/lib/sink/models/export.rb +12 -0
- data/lib/sink/models/funding_account.rb +73 -0
- data/lib/sink/models/import.rb +11 -0
- data/lib/sink/models/interface.rb +11 -0
- data/lib/sink/models/keep_this_resource_keep_this_method_response.rb +11 -0
- data/lib/sink/models/make_ambiguous_schemas_explicit_make_ambiguous_schemas_explicit_response.rb +31 -0
- data/lib/sink/models/make_ambiguous_schemas_looser_make_ambiguous_schemas_looser_response.rb +31 -0
- data/lib/sink/models/map_nullable_items_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_all_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_go_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_java_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_kotlin_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_node_and_python_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_node_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_python_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_ruby_response.rb +11 -0
- data/lib/sink/models/model_from_nested_path.rb +30 -0
- data/lib/sink/models/model_from_nested_response_body_ref.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jmespath.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jsonpath.rb +11 -0
- data/lib/sink/models/model_level_1.rb +15 -0
- data/lib/sink/models/model_level_2.rb +15 -0
- data/lib/sink/models/model_level_3.rb +15 -0
- data/lib/sink/models/model_referenced_in_parent_and_child.rb +11 -0
- data/lib/sink/models/model_with_nested_model.rb +16 -0
- data/lib/sink/models/my_model.rb +11 -0
- data/lib/sink/models/name_child_prop_import_clash_response.rb +21 -0
- data/lib/sink/models/name_properties_common_conflicts_response.rb +59 -0
- data/lib/sink/models/name_properties_illegal_javascript_identifiers_response.rb +6 -0
- data/lib/sink/models/name_response_property_clashes_model_import_response.rb +15 -0
- data/lib/sink/models/name_response_shadows_pydantic_response.rb +15 -0
- data/lib/sink/models/nested_request_model_a.rb +11 -0
- data/lib/sink/models/nested_request_model_b.rb +11 -0
- data/lib/sink/models/nested_request_model_c.rb +17 -0
- data/lib/sink/models/object_missing_items_response.rb +11 -0
- data/lib/sink/models/object_mixed_known_and_unknown_response.rb +11 -0
- data/lib/sink/models/object_multiple_array_properties_same_ref_response.rb +42 -0
- data/lib/sink/models/object_multiple_properties_same_model_response.rb +19 -0
- data/lib/sink/models/object_multiple_properties_same_ref_response.rb +37 -0
- data/lib/sink/models/object_skipped_props.rb +27 -0
- data/lib/sink/models/object_two_dimensional_array_primitive_property_response.rb +23 -0
- data/lib/sink/models/object_with_any_of_null_property.rb +17 -0
- data/lib/sink/models/object_with_child_ref.rb +15 -0
- data/lib/sink/models/object_with_one_of_null_property.rb +17 -0
- data/lib/sink/models/object_with_union_properties.rb +15 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_response.rb +11 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_with_null_response.rb +11 -0
- data/lib/sink/models/openapi_special_used_used_as_property_name_response.rb +11 -0
- data/lib/sink/models/page_cursor_shared_ref_pagination.rb +15 -0
- data/lib/sink/models/parent_model_with_child_ref.rb +19 -0
- data/lib/sink/models/path_param_colon_suffix_response.rb +11 -0
- data/lib/sink/models/path_param_file_extension_response.rb +11 -0
- data/lib/sink/models/path_param_multiple_response.rb +11 -0
- data/lib/sink/models/path_param_query_param_response.rb +11 -0
- data/lib/sink/models/path_param_singular_response.rb +11 -0
- data/lib/sink/models/primitive_strings_response.rb +11 -0
- data/lib/sink/models/private.rb +11 -0
- data/lib/sink/models/public.rb +11 -0
- data/lib/sink/models/recursion_create_envelope_response.rb +11 -0
- data/lib/sink/models/response_allof_simple_response.rb +15 -0
- data/lib/sink/models/response_array_object_with_union_properties_response.rb +6 -0
- data/lib/sink/models/response_array_response_response.rb +6 -0
- data/lib/sink/models/response_missing_required_response.rb +15 -0
- data/lib/sink/models/response_nested_array_response.rb +21 -0
- data/lib/sink/models/response_object_all_properties_response.rb +49 -0
- data/lib/sink/models/response_object_no_properties_response.rb +8 -0
- data/lib/sink/models/response_object_with_additional_properties_prop_response.rb +17 -0
- data/lib/sink/models/response_object_with_heavily_nested_union_response.rb +11 -0
- data/lib/sink/models/response_only_read_only_properties_response.rb +16 -0
- data/lib/sink/models/responses_allof_cross_object.rb +15 -0
- data/lib/sink/models/return_.rb +11 -0
- data/lib/sink/models/root_response.rb +19 -0
- data/lib/sink/models/self_recursion.rb +15 -0
- data/lib/sink/models/shared_cursor_nested_response_prop_meta.rb +18 -0
- data/lib/sink/models/shared_self_recursion.rb +15 -0
- data/lib/sink/models/shipping_address.rb +62 -0
- data/lib/sink/models/simple_allof.rb +20 -0
- data/lib/sink/models/simple_object.rb +19 -0
- data/lib/sink/models/skip_this_resource_i_never_appear_response.rb +11 -0
- data/lib/sink/models/streaming_basic_response.rb +15 -0
- data/lib/sink/models/streaming_nested_params_response.rb +15 -0
- data/lib/sink/models/streaming_no_discriminator_response.rb +15 -0
- data/lib/sink/models/streaming_query_param_discriminator_response.rb +15 -0
- data/lib/sink/models/streaming_with_unrelated_default_param_response.rb +15 -0
- data/lib/sink/models/type_dates_response.rb +27 -0
- data/lib/sink/models/type_datetimes_response.rb +27 -0
- data/lib/sink/models/union_discriminated_variant_a.rb +19 -0
- data/lib/sink/models/union_discriminated_variant_b.rb +19 -0
- data/lib/sink/models/union_response_discriminated_by_property_name_response.rb +6 -0
- data/lib/sink/models/union_response_discriminated_with_basic_mapping_response.rb +6 -0
- data/lib/sink/models/union_type_mixed_types_response.rb +6 -0
- data/lib/sink/models/union_type_nullable_union_response.rb +6 -0
- data/lib/sink/models/union_type_objects_response.rb +6 -0
- data/lib/sink/models/union_type_super_mixed_types_response.rb +6 -0
- data/lib/sink/models/union_type_unknown_variant_response.rb +6 -0
- data/lib/sink/models/version_1_30_name_create_response.rb +11 -0
- data/lib/sink/models/widget.rb +12 -0
- data/lib/sink/models/write_only_response_simple_response.rb +12 -0
- data/lib/sink/page_cursor.rb +49 -0
- data/lib/sink/page_cursor_from_headers.rb +49 -0
- data/lib/sink/page_cursor_id.rb +45 -0
- data/lib/sink/page_cursor_nested_items.rb +65 -0
- data/lib/sink/page_cursor_nested_object_ref.rb +59 -0
- data/lib/sink/page_cursor_shared_ref.rb +59 -0
- data/lib/sink/page_cursor_top_level_array.rb +46 -0
- data/lib/sink/page_cursor_url.rb +46 -0
- data/lib/sink/page_offset.rb +49 -0
- data/lib/sink/page_offset_no_start_field.rb +45 -0
- data/lib/sink/page_offset_total_count.rb +53 -0
- data/lib/sink/page_page_number.rb +53 -0
- data/lib/sink/page_page_number_without_current_page_response.rb +45 -0
- data/lib/sink/pooled_net_requester.rb +63 -0
- data/lib/sink/request_options.rb +84 -0
- data/lib/sink/resources/body_params/objects.rb +31 -0
- data/lib/sink/resources/body_params/unions.rb +31 -0
- data/lib/sink/resources/body_params.rb +475 -0
- data/lib/sink/resources/cards.rb +488 -0
- data/lib/sink/resources/casing/eeoc.rb +32 -0
- data/lib/sink/resources/casing.rb +15 -0
- data/lib/sink/resources/clients.rb +27 -0
- data/lib/sink/resources/company/payments.rb +28 -0
- data/lib/sink/resources/company.rb +17 -0
- data/lib/sink/resources/complex_queries.rb +56 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python/child_only_skip_python.rb +96 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python.rb +98 -0
- data/lib/sink/resources/config_tools.rb +37 -0
- data/lib/sink/resources/decorator_tests/keep_this_resource.rb +27 -0
- data/lib/sink/resources/decorator_tests/languages.rb +55 -0
- data/lib/sink/resources/decorator_tests/skip_this_resource.rb +26 -0
- data/lib/sink/resources/decorator_tests.rb +36 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb +31 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two.rb +33 -0
- data/lib/sink/resources/deeply_nested/level_one.rb +31 -0
- data/lib/sink/resources/deeply_nested.rb +15 -0
- data/lib/sink/resources/docstrings.rb +77 -0
- data/lib/sink/resources/empty_body.rb +55 -0
- data/lib/sink/resources/header_params.rb +33 -0
- data/lib/sink/resources/invalid_schemas/arrays.rb +24 -0
- data/lib/sink/resources/invalid_schemas/objects.rb +24 -0
- data/lib/sink/resources/invalid_schemas.rb +19 -0
- data/lib/sink/resources/make_ambiguous_schemas_explicit.rb +24 -0
- data/lib/sink/resources/make_ambiguous_schemas_looser.rb +24 -0
- data/lib/sink/resources/method_config.rb +156 -0
- data/lib/sink/resources/mixed_params/duplicates.rb +73 -0
- data/lib/sink/resources/mixed_params.rb +81 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child/child.rb +24 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child.rb +26 -0
- data/lib/sink/resources/names/can_cause_clashes/employment_data.rb +15 -0
- data/lib/sink/resources/names/can_cause_clashes/response.rb +30 -0
- data/lib/sink/resources/names/can_cause_clashes.rb +22 -0
- data/lib/sink/resources/names/documents.rb +26 -0
- data/lib/sink/resources/names/openapi_specials.rb +24 -0
- data/lib/sink/resources/names/params.rb +47 -0
- data/lib/sink/resources/names/reserved_names/import.rb +29 -0
- data/lib/sink/resources/names/reserved_names/methods.rb +37 -0
- data/lib/sink/resources/names/reserved_names/public/class_.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public/interface.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public/private.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public.rb +38 -0
- data/lib/sink/resources/names/reserved_names.rb +43 -0
- data/lib/sink/resources/names.rb +139 -0
- data/lib/sink/resources/openapi_formats.rb +48 -0
- data/lib/sink/resources/pagination_tests/cursor.rb +32 -0
- data/lib/sink/resources/pagination_tests/items_types.rb +32 -0
- data/lib/sink/resources/pagination_tests/nested_items.rb +32 -0
- data/lib/sink/resources/pagination_tests/offset.rb +70 -0
- data/lib/sink/resources/pagination_tests/schema_types.rb +51 -0
- data/lib/sink/resources/pagination_tests.rb +31 -0
- data/lib/sink/resources/parent/child.rb +28 -0
- data/lib/sink/resources/parent.rb +17 -0
- data/lib/sink/resources/path_params.rb +196 -0
- data/lib/sink/resources/positional_params.rb +219 -0
- data/lib/sink/resources/query_params.rb +157 -0
- data/lib/sink/resources/recursion/shared_responses.rb +24 -0
- data/lib/sink/resources/recursion.rb +61 -0
- data/lib/sink/resources/resource_refs/paginated_model_first_ref.rb +13 -0
- data/lib/sink/resources/resource_refs/paginated_model_second_ref.rb +13 -0
- data/lib/sink/resources/resource_refs/parent/child.rb +29 -0
- data/lib/sink/resources/resource_refs/parent.rb +30 -0
- data/lib/sink/resources/resource_refs.rb +23 -0
- data/lib/sink/resources/resources.rb +24 -0
- data/lib/sink/resources/responses/union_types.rb +91 -0
- data/lib/sink/resources/responses.rb +297 -0
- data/lib/sink/resources/shared_query_params.rb +45 -0
- data/lib/sink/resources/streaming.rb +96 -0
- data/lib/sink/resources/testing.rb +22 -0
- data/lib/sink/resources/tests.rb +24 -0
- data/lib/sink/resources/tools.rb +30 -0
- data/lib/sink/resources/types/allofs.rb +13 -0
- data/lib/sink/resources/types/arrays.rb +57 -0
- data/lib/sink/resources/types/enums.rb +86 -0
- data/lib/sink/resources/types/maps.rb +27 -0
- data/lib/sink/resources/types/objects.rb +98 -0
- data/lib/sink/resources/types/primitives.rb +31 -0
- data/lib/sink/resources/types/read_only_params.rb +31 -0
- data/lib/sink/resources/types/unions.rb +115 -0
- data/lib/sink/resources/types/write_only_responses.rb +26 -0
- data/lib/sink/resources/types.rb +90 -0
- data/lib/sink/resources/undocumented_resource.rb +44 -0
- data/lib/sink/resources/version_1_30_names.rb +38 -0
- data/lib/sink/resources/widgets.rb +28 -0
- data/lib/sink/util.rb +78 -0
- data/lib/sink/version.rb +5 -0
- data/lib/sink.rb +253 -0
- metadata +301 -0
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ConfigTools
|
6
|
+
class ParentWithSkipNodePython
|
7
|
+
class ChildOnlySkipPython
|
8
|
+
def initialize(client:)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
# Create a new virtual or physical card. Parameters `pin`, `shippingAddress`, and
|
13
|
+
# `product_id` only apply to physical cards.
|
14
|
+
#
|
15
|
+
# @param params [Hash] Attributes to send in this request.
|
16
|
+
# @option params [Symbol, Type] :type
|
17
|
+
# Card types:
|
18
|
+
#
|
19
|
+
# - `MERCHANT_LOCKED` - Card is locked to first merchant that successfully
|
20
|
+
# authorizes the card.
|
21
|
+
# - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
|
22
|
+
# branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
|
23
|
+
# Reach out at [lithic.com/contact](https://lithic.com/contact) for more
|
24
|
+
# information.
|
25
|
+
# - `SINGLE_USE` - Card will close shortly after the first transaction.
|
26
|
+
# - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
|
27
|
+
# wallet like Apple Pay or Google Pay (if the card program is digital
|
28
|
+
# wallet-enabled).
|
29
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
30
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
31
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
32
|
+
# more information.
|
33
|
+
# @option params [String, nil] :card_program_token Identifies the card program under which to create the card. Different card
|
34
|
+
# programs may have their own configurations (e.g., digital wallet card art, BIN
|
35
|
+
# type). This must be configured with Lithic before use.
|
36
|
+
# @option params [String, nil] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
37
|
+
# an expiration date will be generated.
|
38
|
+
# @option params [String, nil] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
39
|
+
# provided, an expiration date will be generated.
|
40
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
41
|
+
# this card.
|
42
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
43
|
+
# @option params [String, nil] :not_ Used to test the PythonSDKs ability to handle reserved keywords as parameters
|
44
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
45
|
+
# `VIRTUAL`. See
|
46
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
47
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g., physical card art) that the card should be
|
48
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
49
|
+
# must be configured with Lithic before use.
|
50
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL [beta]. Use
|
51
|
+
# of options besides `STANDARD` require additional permissions.
|
52
|
+
#
|
53
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
54
|
+
# tracking
|
55
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
56
|
+
# with tracking
|
57
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
58
|
+
# tracking
|
59
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address
|
60
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
61
|
+
# the spend limit will be declined.
|
62
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
63
|
+
# Spend limit duration values:
|
64
|
+
#
|
65
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
66
|
+
# year.
|
67
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
68
|
+
# of the card.
|
69
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
70
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
71
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
72
|
+
# transaction is under the spend limit.
|
73
|
+
# @option params [Symbol, State, nil] :state
|
74
|
+
# Card state values:
|
75
|
+
#
|
76
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
77
|
+
# parameters).
|
78
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
79
|
+
# time.
|
80
|
+
#
|
81
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
82
|
+
#
|
83
|
+
# @return [Sink::Models::Card]
|
84
|
+
def not_in_node_python(params = {}, opts = {})
|
85
|
+
req = {}
|
86
|
+
req[:method] = :post
|
87
|
+
req[:path] = "/cards"
|
88
|
+
req[:body] = params
|
89
|
+
req[:model] = Sink::Models::Card
|
90
|
+
@client.request(req, opts)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ConfigTools
|
6
|
+
class ParentWithSkipNodePython
|
7
|
+
# @return [Sink::Resources::ConfigTools::ParentWithSkipNodePython::ChildOnlySkipPython]
|
8
|
+
attr_reader :child_only_skip_python
|
9
|
+
|
10
|
+
def initialize(client:)
|
11
|
+
@client = client
|
12
|
+
@child_only_skip_python = Sink::Resources::ConfigTools::ParentWithSkipNodePython::ChildOnlySkipPython.new(client: client)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Create a new virtual or physical card. Parameters `pin`, `shippingAddress`, and
|
16
|
+
# `product_id` only apply to physical cards.
|
17
|
+
#
|
18
|
+
# @param params [Hash] Attributes to send in this request.
|
19
|
+
# @option params [Symbol, Type] :type
|
20
|
+
# Card types:
|
21
|
+
#
|
22
|
+
# - `MERCHANT_LOCKED` - Card is locked to first merchant that successfully
|
23
|
+
# authorizes the card.
|
24
|
+
# - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
|
25
|
+
# branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
|
26
|
+
# Reach out at [lithic.com/contact](https://lithic.com/contact) for more
|
27
|
+
# information.
|
28
|
+
# - `SINGLE_USE` - Card will close shortly after the first transaction.
|
29
|
+
# - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
|
30
|
+
# wallet like Apple Pay or Google Pay (if the card program is digital
|
31
|
+
# wallet-enabled).
|
32
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
33
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
34
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
35
|
+
# more information.
|
36
|
+
# @option params [String, nil] :card_program_token Identifies the card program under which to create the card. Different card
|
37
|
+
# programs may have their own configurations (e.g., digital wallet card art, BIN
|
38
|
+
# type). This must be configured with Lithic before use.
|
39
|
+
# @option params [String, nil] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
40
|
+
# an expiration date will be generated.
|
41
|
+
# @option params [String, nil] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
42
|
+
# provided, an expiration date will be generated.
|
43
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
44
|
+
# this card.
|
45
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
46
|
+
# @option params [String, nil] :not_ Used to test the PythonSDKs ability to handle reserved keywords as parameters
|
47
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
48
|
+
# `VIRTUAL`. See
|
49
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
50
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g., physical card art) that the card should be
|
51
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
52
|
+
# must be configured with Lithic before use.
|
53
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL [beta]. Use
|
54
|
+
# of options besides `STANDARD` require additional permissions.
|
55
|
+
#
|
56
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
57
|
+
# tracking
|
58
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
59
|
+
# with tracking
|
60
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
61
|
+
# tracking
|
62
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address
|
63
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
64
|
+
# the spend limit will be declined.
|
65
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
66
|
+
# Spend limit duration values:
|
67
|
+
#
|
68
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
69
|
+
# year.
|
70
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
71
|
+
# of the card.
|
72
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
73
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
74
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
75
|
+
# transaction is under the spend limit.
|
76
|
+
# @option params [Symbol, State, nil] :state
|
77
|
+
# Card state values:
|
78
|
+
#
|
79
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
80
|
+
# parameters).
|
81
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
82
|
+
# time.
|
83
|
+
#
|
84
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
85
|
+
#
|
86
|
+
# @return [Sink::Models::Card]
|
87
|
+
def not_in_node_python(params = {}, opts = {})
|
88
|
+
req = {}
|
89
|
+
req[:method] = :post
|
90
|
+
req[:path] = "/cards"
|
91
|
+
req[:body] = params
|
92
|
+
req[:model] = Sink::Models::Card
|
93
|
+
@client.request(req, opts)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ConfigTools
|
6
|
+
# @return [Sink::Resources::ConfigTools::ParentWithSkipNodePython]
|
7
|
+
attr_reader :parent_with_skip_node_python
|
8
|
+
|
9
|
+
def initialize(client:)
|
10
|
+
@client = client
|
11
|
+
@parent_with_skip_node_python = Sink::Resources::ConfigTools::ParentWithSkipNodePython.new(client: client)
|
12
|
+
end
|
13
|
+
|
14
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
15
|
+
#
|
16
|
+
# @return [Sink::Models::ConfigToolModelRefFromNestedResponseBodyResponse]
|
17
|
+
def model_ref_from_nested_response_body(opts = {})
|
18
|
+
req = {}
|
19
|
+
req[:method] = :get
|
20
|
+
req[:path] = "/config_tools/model_refs/from_nested_response"
|
21
|
+
req[:model] = Sink::Models::ConfigToolModelRefFromNestedResponseBodyResponse
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
26
|
+
#
|
27
|
+
# @return [Sink::Models::ModelFromSchemasRef]
|
28
|
+
def model_ref_from_schemas(opts = {})
|
29
|
+
req = {}
|
30
|
+
req[:method] = :get
|
31
|
+
req[:path] = "/config_tools/model_refs/from_schemas"
|
32
|
+
req[:model] = Sink::Models::ModelFromSchemasRef
|
33
|
+
@client.request(req, opts)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DecoratorTests
|
6
|
+
class KeepThisResource
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Nested method that should render because it is not skipped nor are its
|
12
|
+
# ancestors.
|
13
|
+
#
|
14
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
15
|
+
#
|
16
|
+
# @return [Sink::Models::KeepThisResourceKeepThisMethodResponse]
|
17
|
+
def keep_this_method(opts = {})
|
18
|
+
req = {}
|
19
|
+
req[:method] = :get
|
20
|
+
req[:path] = "/decorator_tests/nested/keep/this/method"
|
21
|
+
req[:model] = Sink::Models::KeepThisResourceKeepThisMethodResponse
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DecoratorTests
|
6
|
+
class Languages
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Endpoint that returns a $ref to SimpleObject. This is used to test shared
|
12
|
+
# response models.
|
13
|
+
#
|
14
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
15
|
+
#
|
16
|
+
# @return [Sink::Models::SimpleObject]
|
17
|
+
def skipped_for_node(opts = {})
|
18
|
+
req = {}
|
19
|
+
req[:method] = :get
|
20
|
+
req[:path] = "/responses/shared_simple_object"
|
21
|
+
req[:model] = Sink::Models::SimpleObject
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Endpoint that returns a $ref to SimpleObject. This is used to test shared
|
26
|
+
# response models.
|
27
|
+
#
|
28
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
29
|
+
#
|
30
|
+
# @return [Sink::Models::SimpleObject]
|
31
|
+
def skipped_for_python(opts = {})
|
32
|
+
req = {}
|
33
|
+
req[:method] = :get
|
34
|
+
req[:path] = "/responses/shared_simple_object"
|
35
|
+
req[:model] = Sink::Models::SimpleObject
|
36
|
+
@client.request(req, opts)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Endpoint that returns a $ref to SimpleObject. This is used to test shared
|
40
|
+
# response models.
|
41
|
+
#
|
42
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
43
|
+
#
|
44
|
+
# @return [Sink::Models::SimpleObject]
|
45
|
+
def skipped_for_python_and_node(opts = {})
|
46
|
+
req = {}
|
47
|
+
req[:method] = :get
|
48
|
+
req[:path] = "/responses/shared_simple_object"
|
49
|
+
req[:model] = Sink::Models::SimpleObject
|
50
|
+
@client.request(req, opts)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DecoratorTests
|
6
|
+
class SkipThisResource
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Nested method that should never render because its parent resource is skipped.
|
12
|
+
#
|
13
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
14
|
+
#
|
15
|
+
# @return [Sink::Models::SkipThisResourceINeverAppearResponse]
|
16
|
+
def i_never_appear(opts = {})
|
17
|
+
req = {}
|
18
|
+
req[:method] = :get
|
19
|
+
req[:path] = "/decorator_tests/nested/i/never/appear"
|
20
|
+
req[:model] = Sink::Models::SkipThisResourceINeverAppearResponse
|
21
|
+
@client.request(req, opts)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DecoratorTests
|
6
|
+
# @return [Sink::Resources::DecoratorTests::Languages]
|
7
|
+
attr_reader :languages
|
8
|
+
|
9
|
+
# @return [Sink::Resources::DecoratorTests::KeepThisResource]
|
10
|
+
attr_reader :keep_this_resource
|
11
|
+
|
12
|
+
# @return [Sink::Resources::DecoratorTests::SkipThisResource]
|
13
|
+
attr_reader :skip_this_resource
|
14
|
+
|
15
|
+
def initialize(client:)
|
16
|
+
@client = client
|
17
|
+
@languages = Sink::Resources::DecoratorTests::Languages.new(client: client)
|
18
|
+
@keep_this_resource = Sink::Resources::DecoratorTests::KeepThisResource.new(client: client)
|
19
|
+
@skip_this_resource = Sink::Resources::DecoratorTests::SkipThisResource.new(client: client)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Top-level method that should not be skipped.
|
23
|
+
#
|
24
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
25
|
+
#
|
26
|
+
# @return [Sink::Models::DecoratorTestKeepMeResponse]
|
27
|
+
def keep_me(opts = {})
|
28
|
+
req = {}
|
29
|
+
req[:method] = :get
|
30
|
+
req[:path] = "/decorator_tests/keep/me"
|
31
|
+
req[:model] = Sink::Models::DecoratorTestKeepMeResponse
|
32
|
+
@client.request(req, opts)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DeeplyNested
|
6
|
+
class LevelOne
|
7
|
+
class LevelTwo
|
8
|
+
class LevelThree
|
9
|
+
def initialize(client:)
|
10
|
+
@client = client
|
11
|
+
end
|
12
|
+
|
13
|
+
# Get card configuration such as spend limit and state.
|
14
|
+
#
|
15
|
+
# @param card_token [String]
|
16
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
17
|
+
#
|
18
|
+
# @return [Sink::Models::Card]
|
19
|
+
def method_level_3(card_token, opts = {})
|
20
|
+
req = {}
|
21
|
+
req[:method] = :get
|
22
|
+
req[:path] = "/cards/#{card_token}"
|
23
|
+
req[:model] = Sink::Models::Card
|
24
|
+
@client.request(req, opts)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DeeplyNested
|
6
|
+
class LevelOne
|
7
|
+
class LevelTwo
|
8
|
+
# @return [Sink::Resources::DeeplyNested::LevelOne::LevelTwo::LevelThree]
|
9
|
+
attr_reader :level_three
|
10
|
+
|
11
|
+
def initialize(client:)
|
12
|
+
@client = client
|
13
|
+
@level_three = Sink::Resources::DeeplyNested::LevelOne::LevelTwo::LevelThree.new(client: client)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Get card configuration such as spend limit and state.
|
17
|
+
#
|
18
|
+
# @param card_token [String]
|
19
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
20
|
+
#
|
21
|
+
# @return [Sink::Models::Card]
|
22
|
+
def method_level_2(card_token, opts = {})
|
23
|
+
req = {}
|
24
|
+
req[:method] = :get
|
25
|
+
req[:path] = "/cards/#{card_token}"
|
26
|
+
req[:model] = Sink::Models::Card
|
27
|
+
@client.request(req, opts)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DeeplyNested
|
6
|
+
class LevelOne
|
7
|
+
# @return [Sink::Resources::DeeplyNested::LevelOne::LevelTwo]
|
8
|
+
attr_reader :level_two
|
9
|
+
|
10
|
+
def initialize(client:)
|
11
|
+
@client = client
|
12
|
+
@level_two = Sink::Resources::DeeplyNested::LevelOne::LevelTwo.new(client: client)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get card configuration such as spend limit and state.
|
16
|
+
#
|
17
|
+
# @param card_token [String]
|
18
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
19
|
+
#
|
20
|
+
# @return [Sink::Models::Card]
|
21
|
+
def method_level_1(card_token, opts = {})
|
22
|
+
req = {}
|
23
|
+
req[:method] = :get
|
24
|
+
req[:path] = "/cards/#{card_token}"
|
25
|
+
req[:model] = Sink::Models::Card
|
26
|
+
@client.request(req, opts)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class DeeplyNested
|
6
|
+
# @return [Sink::Resources::DeeplyNested::LevelOne]
|
7
|
+
attr_reader :level_one
|
8
|
+
|
9
|
+
def initialize(client:)
|
10
|
+
@client = client
|
11
|
+
@level_one = Sink::Resources::DeeplyNested::LevelOne.new(client: client)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Docstrings
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# This is the method description.
|
11
|
+
#
|
12
|
+
# Hello _/ console.log('evil code') /_ Goodbye """ """" """"" """"""
|
13
|
+
# console.log('more evil code'); """ \
|
14
|
+
#
|
15
|
+
# these need stay (valid escapes)
|
16
|
+
#
|
17
|
+
# \'\"\ \\ \n\r\t\b\f\v\x63\uFE63\U0000FE63\N{HYPHEN}\1\12\123\1234a
|
18
|
+
#
|
19
|
+
# these need be escaped in python (invalid escapes)
|
20
|
+
#
|
21
|
+
# \a\g\*\(\&\@\x2z\u11z1\U1111z111\N{HYPHEN#}
|
22
|
+
#
|
23
|
+
# \
|
24
|
+
# Other text
|
25
|
+
#
|
26
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
27
|
+
#
|
28
|
+
# @return [Sink::Models::BasicSharedModelObject]
|
29
|
+
def description_contains_js_doc(opts = {})
|
30
|
+
req = {}
|
31
|
+
req[:method] = :get
|
32
|
+
req[:path] = "/docstrings/description_contains_comments"
|
33
|
+
req[:model] = Sink::Models::BasicSharedModelObject
|
34
|
+
@client.request(req, opts)
|
35
|
+
end
|
36
|
+
|
37
|
+
# This is the method description.
|
38
|
+
#
|
39
|
+
# In the middle it contains a \*\*/ Or ```
|
40
|
+
#
|
41
|
+
# Other text
|
42
|
+
#
|
43
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
44
|
+
#
|
45
|
+
# @return [Sink::Models::BasicSharedModelObject]
|
46
|
+
def description_contains_js_doc_end(opts = {})
|
47
|
+
req = {}
|
48
|
+
req[:method] = :get
|
49
|
+
req[:path] = "/docstrings/description_contains_comment_enders"
|
50
|
+
req[:model] = Sink::Models::BasicSharedModelObject
|
51
|
+
@client.request(req, opts)
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
55
|
+
#
|
56
|
+
# @return [Sink::Models::DocstringLeadingDoubleQuoteResponse]
|
57
|
+
def leading_double_quote(opts = {})
|
58
|
+
req = {}
|
59
|
+
req[:method] = :get
|
60
|
+
req[:path] = "/docstrings/property_leading_double_quote"
|
61
|
+
req[:model] = Sink::Models::DocstringLeadingDoubleQuoteResponse
|
62
|
+
@client.request(req, opts)
|
63
|
+
end
|
64
|
+
|
65
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
66
|
+
#
|
67
|
+
# @return [Sink::Models::DocstringTrailingDoubleQuoteResponse]
|
68
|
+
def trailing_double_quote(opts = {})
|
69
|
+
req = {}
|
70
|
+
req[:method] = :get
|
71
|
+
req[:path] = "/docstrings/property_trailing_double_quote"
|
72
|
+
req[:model] = Sink::Models::DocstringTrailingDoubleQuoteResponse
|
73
|
+
@client.request(req, opts)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class EmptyBody
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# Endpoint with x-stainless-empty-object should still have types for params
|
11
|
+
#
|
12
|
+
# @param path_param [String] Path param: Path param description
|
13
|
+
#
|
14
|
+
# @param params [Hash] Attributes to send in this request.
|
15
|
+
# @option params [Body] :body Body param:
|
16
|
+
# @option params [String, nil] :query_param Query param: Query param description
|
17
|
+
# @option params [String, nil] :second_query_param Query param: Query param description
|
18
|
+
#
|
19
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
20
|
+
#
|
21
|
+
# @return [Sink::Models::BasicSharedModelObject]
|
22
|
+
def stainless_empty_object(path_param = nil, params = {}, opts = {})
|
23
|
+
req = {}
|
24
|
+
req[:method] = :post
|
25
|
+
req[:path] = "/mixed_params/with_empty_body/#{path_param}/x_stainless_empty_object"
|
26
|
+
req[:body] = params[:body]
|
27
|
+
req[:query] = params.except(:body)
|
28
|
+
req[:model] = Sink::Models::BasicSharedModelObject
|
29
|
+
@client.request(req, opts)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Endpoint with an empty `requestBody` should still have types for params
|
33
|
+
#
|
34
|
+
# @param path_param [String] Path param: Path param description
|
35
|
+
#
|
36
|
+
# @param params [Hash] Attributes to send in this request.
|
37
|
+
# @option params [Object] :body Body param:
|
38
|
+
# @option params [String, nil] :query_param Query param: Query param description
|
39
|
+
# @option params [String, nil] :second_query_param Query param: Query param description
|
40
|
+
#
|
41
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
42
|
+
#
|
43
|
+
# @return [Sink::Models::BasicSharedModelObject]
|
44
|
+
def typed_params(path_param = nil, params = {}, opts = {})
|
45
|
+
req = {}
|
46
|
+
req[:method] = :post
|
47
|
+
req[:path] = "/mixed_params/with_empty_body/#{path_param}"
|
48
|
+
req[:body] = params[:body]
|
49
|
+
req[:query] = params.except(:body)
|
50
|
+
req[:model] = Sink::Models::BasicSharedModelObject
|
51
|
+
@client.request(req, opts)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class HeaderParams
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# The `X-Client-Secret` header shouldn't be included in params definitions as it
|
11
|
+
# is already sent as a client argument.
|
12
|
+
#
|
13
|
+
# Whereas the `X-Custom-Endpoint-Header` should be included as it is only used
|
14
|
+
# here.
|
15
|
+
#
|
16
|
+
# @param params [Hash] Attributes to send in this request.
|
17
|
+
# @option params [String, nil] :foo Body param:
|
18
|
+
# @option params [String, nil] :x_custom_endpoint_header Header param:
|
19
|
+
#
|
20
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
21
|
+
#
|
22
|
+
# @return [nil]
|
23
|
+
def client_argument(params = {}, opts = {})
|
24
|
+
req = {}
|
25
|
+
req[:method] = :post
|
26
|
+
req[:path] = "/header_params/client_argument"
|
27
|
+
req[:body] = params
|
28
|
+
req[:model] = NilClass
|
29
|
+
@client.request(req, opts)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|