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.
- 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,488 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Cards
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# Create a new virtual or physical card. Parameters `pin`, `shippingAddress`, and
|
11
|
+
# `product_id` only apply to physical cards.
|
12
|
+
#
|
13
|
+
# @param params [Hash] Attributes to send in this request.
|
14
|
+
# @option params [Symbol, Type] :type
|
15
|
+
# Card types:
|
16
|
+
#
|
17
|
+
# - `MERCHANT_LOCKED` - Card is locked to first merchant that successfully
|
18
|
+
# authorizes the card.
|
19
|
+
# - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
|
20
|
+
# branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
|
21
|
+
# Reach out at [lithic.com/contact](https://lithic.com/contact) for more
|
22
|
+
# information.
|
23
|
+
# - `SINGLE_USE` - Card will close shortly after the first transaction.
|
24
|
+
# - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
|
25
|
+
# wallet like Apple Pay or Google Pay (if the card program is digital
|
26
|
+
# wallet-enabled).
|
27
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
28
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
29
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
30
|
+
# more information.
|
31
|
+
# @option params [String, nil] :card_program_token Identifies the card program under which to create the card. Different card
|
32
|
+
# programs may have their own configurations (e.g., digital wallet card art, BIN
|
33
|
+
# type). This must be configured with Lithic before use.
|
34
|
+
# @option params [String, nil] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
35
|
+
# an expiration date will be generated.
|
36
|
+
# @option params [String, nil] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
37
|
+
# provided, an expiration date will be generated.
|
38
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
39
|
+
# this card.
|
40
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
41
|
+
# @option params [String, nil] :not_ Used to test the PythonSDKs ability to handle reserved keywords as parameters
|
42
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
43
|
+
# `VIRTUAL`. See
|
44
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
45
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g., physical card art) that the card should be
|
46
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
47
|
+
# must be configured with Lithic before use.
|
48
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL [beta]. Use
|
49
|
+
# of options besides `STANDARD` require additional permissions.
|
50
|
+
#
|
51
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
52
|
+
# tracking
|
53
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
54
|
+
# with tracking
|
55
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
56
|
+
# tracking
|
57
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address
|
58
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
59
|
+
# the spend limit will be declined.
|
60
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
61
|
+
# Spend limit duration values:
|
62
|
+
#
|
63
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
64
|
+
# year.
|
65
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
66
|
+
# of the card.
|
67
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
68
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
69
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
70
|
+
# transaction is under the spend limit.
|
71
|
+
# @option params [Symbol, State, nil] :state
|
72
|
+
# Card state values:
|
73
|
+
#
|
74
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
75
|
+
# parameters).
|
76
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
77
|
+
# time.
|
78
|
+
#
|
79
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
80
|
+
#
|
81
|
+
# @return [Sink::Models::Card]
|
82
|
+
def create(params = {}, opts = {})
|
83
|
+
req = {}
|
84
|
+
req[:method] = :post
|
85
|
+
req[:path] = "/cards"
|
86
|
+
req[:body] = params
|
87
|
+
req[:model] = Sink::Models::Card
|
88
|
+
@client.request(req, opts)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Get card configuration such as spend limit and state.
|
92
|
+
#
|
93
|
+
# @param card_token [String]
|
94
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
95
|
+
#
|
96
|
+
# @return [Sink::Models::Card]
|
97
|
+
def retrieve(card_token, opts = {})
|
98
|
+
req = {}
|
99
|
+
req[:method] = :get
|
100
|
+
req[:path] = "/cards/#{card_token}"
|
101
|
+
req[:model] = Sink::Models::Card
|
102
|
+
@client.request(req, opts)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Update the specified properties of the card. Unsupplied properties will remain
|
106
|
+
# unchanged. `pin` parameter only applies to physical cards.
|
107
|
+
#
|
108
|
+
# _Note: setting a card to a `CLOSED` state is a final action that cannot be
|
109
|
+
# undone._
|
110
|
+
#
|
111
|
+
# @param card_token [String]
|
112
|
+
#
|
113
|
+
# @param params [Hash] Attributes to send in this request.
|
114
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
115
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
116
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
117
|
+
# more information.
|
118
|
+
# @option params [String, nil] :auth_rule_token Identifier for any Auth Rules that will be applied to transactions taking place
|
119
|
+
# with the card.
|
120
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
121
|
+
# this card.
|
122
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
123
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
124
|
+
# `VIRTUAL`. See
|
125
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
126
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
127
|
+
# the spend limit will be declined.
|
128
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
129
|
+
# Spend limit duration values:
|
130
|
+
#
|
131
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
132
|
+
# year.
|
133
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
134
|
+
# of the card.
|
135
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
136
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
137
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
138
|
+
# transaction is under the spend limit.
|
139
|
+
# @option params [Symbol, State, nil] :state
|
140
|
+
# Card state values:
|
141
|
+
#
|
142
|
+
# - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot
|
143
|
+
# be undone.
|
144
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
145
|
+
# parameters).
|
146
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
147
|
+
# time.
|
148
|
+
#
|
149
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
150
|
+
#
|
151
|
+
# @return [Sink::Models::Card]
|
152
|
+
def update(card_token, params = {}, opts = {})
|
153
|
+
req = {}
|
154
|
+
req[:method] = :patch
|
155
|
+
req[:path] = "/cards/#{card_token}"
|
156
|
+
req[:body] = params
|
157
|
+
req[:model] = Sink::Models::Card
|
158
|
+
@client.request(req, opts)
|
159
|
+
end
|
160
|
+
|
161
|
+
# List cards.
|
162
|
+
#
|
163
|
+
# @param params [Hash] Attributes to send in this request.
|
164
|
+
# @option params [DateTime] :begin_ Date string in 8601 format. Only entries created after the specified date will
|
165
|
+
# be included. UTC time zone.
|
166
|
+
# @option params [DateTime] :end_ Date string in 8601 format. Only entries created before the specified date will
|
167
|
+
# be included. UTC time zone.
|
168
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Returns cards associated with this
|
169
|
+
# account. Only applicable if using account holder enrollment. See
|
170
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
171
|
+
# more information.
|
172
|
+
# @option params [Integer, nil] :page Page (for pagination).
|
173
|
+
# @option params [Integer, nil] :page_size Page size (for pagination).
|
174
|
+
#
|
175
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
176
|
+
#
|
177
|
+
# @return [Sink::Models::CardListResponse]
|
178
|
+
def list(params = {}, opts = {})
|
179
|
+
req = {}
|
180
|
+
req[:method] = :get
|
181
|
+
req[:path] = "/cards"
|
182
|
+
req[:query] = params
|
183
|
+
req[:model] = Sink::Models::CardListResponse
|
184
|
+
@client.request(req, opts)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Create a new virtual or physical card. Parameters `pin`, `shippingAddress`, and
|
188
|
+
# `product_id` only apply to physical cards.
|
189
|
+
#
|
190
|
+
# @param params [Hash] Attributes to send in this request.
|
191
|
+
# @option params [Symbol, Type] :type
|
192
|
+
# Card types:
|
193
|
+
#
|
194
|
+
# - `MERCHANT_LOCKED` - Card is locked to first merchant that successfully
|
195
|
+
# authorizes the card.
|
196
|
+
# - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
|
197
|
+
# branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
|
198
|
+
# Reach out at [lithic.com/contact](https://lithic.com/contact) for more
|
199
|
+
# information.
|
200
|
+
# - `SINGLE_USE` - Card will close shortly after the first transaction.
|
201
|
+
# - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
|
202
|
+
# wallet like Apple Pay or Google Pay (if the card program is digital
|
203
|
+
# wallet-enabled).
|
204
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
205
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
206
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
207
|
+
# more information.
|
208
|
+
# @option params [String, nil] :card_program_token Identifies the card program under which to create the card. Different card
|
209
|
+
# programs may have their own configurations (e.g., digital wallet card art, BIN
|
210
|
+
# type). This must be configured with Lithic before use.
|
211
|
+
# @option params [String, nil] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
212
|
+
# an expiration date will be generated.
|
213
|
+
# @option params [String, nil] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
214
|
+
# provided, an expiration date will be generated.
|
215
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
216
|
+
# this card.
|
217
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
218
|
+
# @option params [String, nil] :not_ Used to test the PythonSDKs ability to handle reserved keywords as parameters
|
219
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
220
|
+
# `VIRTUAL`. See
|
221
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
222
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g., physical card art) that the card should be
|
223
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
224
|
+
# must be configured with Lithic before use.
|
225
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL [beta]. Use
|
226
|
+
# of options besides `STANDARD` require additional permissions.
|
227
|
+
#
|
228
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
229
|
+
# tracking
|
230
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
231
|
+
# with tracking
|
232
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
233
|
+
# tracking
|
234
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address
|
235
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
236
|
+
# the spend limit will be declined.
|
237
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
238
|
+
# Spend limit duration values:
|
239
|
+
#
|
240
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
241
|
+
# year.
|
242
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
243
|
+
# of the card.
|
244
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
245
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
246
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
247
|
+
# transaction is under the spend limit.
|
248
|
+
# @option params [Symbol, State, nil] :state
|
249
|
+
# Card state values:
|
250
|
+
#
|
251
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
252
|
+
# parameters).
|
253
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
254
|
+
# time.
|
255
|
+
#
|
256
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
257
|
+
#
|
258
|
+
# @return [Sink::Models::Card]
|
259
|
+
def create_aliased(params = {}, opts = {})
|
260
|
+
req = {}
|
261
|
+
req[:method] = :post
|
262
|
+
req[:path] = "/cards"
|
263
|
+
req[:body] = params
|
264
|
+
req[:model] = Sink::Models::Card
|
265
|
+
@client.request(req, opts)
|
266
|
+
end
|
267
|
+
|
268
|
+
# Create a new virtual or physical card. Parameters `pin`, `shippingAddress`, and
|
269
|
+
# `product_id` only apply to physical cards.
|
270
|
+
#
|
271
|
+
# @param params [Hash] Attributes to send in this request.
|
272
|
+
# @option params [Symbol, Type] :type
|
273
|
+
# Card types:
|
274
|
+
#
|
275
|
+
# - `MERCHANT_LOCKED` - Card is locked to first merchant that successfully
|
276
|
+
# authorizes the card.
|
277
|
+
# - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
|
278
|
+
# branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
|
279
|
+
# Reach out at [lithic.com/contact](https://lithic.com/contact) for more
|
280
|
+
# information.
|
281
|
+
# - `SINGLE_USE` - Card will close shortly after the first transaction.
|
282
|
+
# - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
|
283
|
+
# wallet like Apple Pay or Google Pay (if the card program is digital
|
284
|
+
# wallet-enabled).
|
285
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
286
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
287
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
288
|
+
# more information.
|
289
|
+
# @option params [String, nil] :card_program_token Identifies the card program under which to create the card. Different card
|
290
|
+
# programs may have their own configurations (e.g., digital wallet card art, BIN
|
291
|
+
# type). This must be configured with Lithic before use.
|
292
|
+
# @option params [String, nil] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
|
293
|
+
# an expiration date will be generated.
|
294
|
+
# @option params [String, nil] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
|
295
|
+
# provided, an expiration date will be generated.
|
296
|
+
# @option params [String, nil] :funding_token The token for the desired `FundingAccount` to use when making transactions with
|
297
|
+
# this card.
|
298
|
+
# @option params [String, nil] :memo Friendly name to identify the card.
|
299
|
+
# @option params [String, nil] :not_ Used to test the PythonSDKs ability to handle reserved keywords as parameters
|
300
|
+
# @option params [String, nil] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
|
301
|
+
# `VIRTUAL`. See
|
302
|
+
# [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise).
|
303
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g., physical card art) that the card should be
|
304
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
305
|
+
# must be configured with Lithic before use.
|
306
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL [beta]. Use
|
307
|
+
# of options besides `STANDARD` require additional permissions.
|
308
|
+
#
|
309
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
310
|
+
# tracking
|
311
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
312
|
+
# with tracking
|
313
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
314
|
+
# tracking
|
315
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address
|
316
|
+
# @option params [Integer, nil] :spend_limit Amount (in cents) to limit approved authorizations. Transaction requests above
|
317
|
+
# the spend limit will be declined.
|
318
|
+
# @option params [Symbol, SpendLimitDuration, nil] :spend_limit_duration
|
319
|
+
# Spend limit duration values:
|
320
|
+
#
|
321
|
+
# - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar
|
322
|
+
# year.
|
323
|
+
# - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
|
324
|
+
# of the card.
|
325
|
+
# - `MONTHLY` - Card will authorize transactions up to spend limit for the
|
326
|
+
# trailing month. Month is calculated as this calendar date one month prior.
|
327
|
+
# - `TRANSACTION` - Card will authorizate multiple transactions if each individual
|
328
|
+
# transaction is under the spend limit.
|
329
|
+
# @option params [Symbol, State, nil] :state
|
330
|
+
# Card state values:
|
331
|
+
#
|
332
|
+
# - `OPEN` - Card will approve authorizations (if they match card and account
|
333
|
+
# parameters).
|
334
|
+
# - `PAUSED` - Card will decline authorizations, but can be resumed at a later
|
335
|
+
# time.
|
336
|
+
#
|
337
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
338
|
+
#
|
339
|
+
# @return [Sink::Models::Card]
|
340
|
+
def create_aliased_deprecated(params = {}, opts = {})
|
341
|
+
req = {}
|
342
|
+
req[:method] = :post
|
343
|
+
req[:path] = "/cards"
|
344
|
+
req[:body] = params
|
345
|
+
req[:model] = Sink::Models::Card
|
346
|
+
@client.request(req, opts)
|
347
|
+
end
|
348
|
+
|
349
|
+
# Endpoint that represents a method that has been marked as deprecated in the
|
350
|
+
# stainless config for all languages, but with a different method in go.
|
351
|
+
#
|
352
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
353
|
+
#
|
354
|
+
# @return [nil]
|
355
|
+
def deprecated_all_but_go_diff_message(opts = {})
|
356
|
+
req = {}
|
357
|
+
req[:method] = :post
|
358
|
+
req[:path] = "/deprecations/method_all_but_go_diff_message"
|
359
|
+
req[:model] = NilClass
|
360
|
+
@client.request(req, opts)
|
361
|
+
end
|
362
|
+
|
363
|
+
# Endpoint that represents a method that has been marked as deprecated in the
|
364
|
+
# stainless config for all languages, but with a different method in go.
|
365
|
+
#
|
366
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
367
|
+
#
|
368
|
+
# @return [nil]
|
369
|
+
def deprecated_all_diff_message(opts = {})
|
370
|
+
req = {}
|
371
|
+
req[:method] = :post
|
372
|
+
req[:path] = "/deprecations/method_all_but_go_diff_message"
|
373
|
+
req[:model] = NilClass
|
374
|
+
@client.request(req, opts)
|
375
|
+
end
|
376
|
+
|
377
|
+
# Endpoint that represents a method that has been marked as deprecated in the
|
378
|
+
# stainless config.
|
379
|
+
#
|
380
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
381
|
+
#
|
382
|
+
# @return [nil]
|
383
|
+
def deprecated_method(opts = {})
|
384
|
+
req = {}
|
385
|
+
req[:method] = :post
|
386
|
+
req[:path] = "/deprecations/method"
|
387
|
+
req[:model] = NilClass
|
388
|
+
@client.request(req, opts)
|
389
|
+
end
|
390
|
+
|
391
|
+
# Endpoint that represents a method that has been marked as deprecated in the
|
392
|
+
# stainless config for go only.
|
393
|
+
#
|
394
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
395
|
+
#
|
396
|
+
# @return [nil]
|
397
|
+
def deprecated_only_go(opts = {})
|
398
|
+
req = {}
|
399
|
+
req[:method] = :post
|
400
|
+
req[:path] = "/deprecations/method_only_go"
|
401
|
+
req[:model] = NilClass
|
402
|
+
@client.request(req, opts)
|
403
|
+
end
|
404
|
+
|
405
|
+
# Get card configuration such as spend limit and state.
|
406
|
+
#
|
407
|
+
# @param card_token [String]
|
408
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
409
|
+
#
|
410
|
+
# @return [Sink::Models::Card]
|
411
|
+
def list_not_paginated(card_token, opts = {})
|
412
|
+
req = {}
|
413
|
+
req[:method] = :get
|
414
|
+
req[:path] = "/cards/#{card_token}"
|
415
|
+
req[:model] = Sink::Models::Card
|
416
|
+
@client.request(req, opts)
|
417
|
+
end
|
418
|
+
|
419
|
+
# Allow your cardholders to directly add payment cards to the device's digital
|
420
|
+
# wallet (e.g. Apple Pay) with one touch from your app.
|
421
|
+
#
|
422
|
+
# This requires some additional setup and configuration. Please
|
423
|
+
# [Contact Us](https://lithic.com/contact) or your Customer Success representative
|
424
|
+
# for more information.
|
425
|
+
#
|
426
|
+
# @param card_token [String] The unique token of the card to add to the device's digital wallet.
|
427
|
+
#
|
428
|
+
# @param params [Hash] Attributes to send in this request.
|
429
|
+
# @option params [String, nil] :account_token Only required for multi-account users. Token identifying the account the card
|
430
|
+
# will be associated with. Only applicable if using account holder enrollment. See
|
431
|
+
# [Managing Your Program](https://docs.lithic.com/docs/managing-your-program) for
|
432
|
+
# more information.
|
433
|
+
# @option params [String, nil] :certificate Required for `APPLE_PAY`. Apple's public leaf certificate. Base64 encoded in PEM
|
434
|
+
# format with headers `(-----BEGIN CERTIFICATE-----)` and trailers omitted.
|
435
|
+
# Provided by the device's wallet.
|
436
|
+
# @option params [Symbol, DigitalWallet, nil] :digital_wallet Name of digital wallet provider.
|
437
|
+
# @option params [String, nil] :nonce Required for `APPLE_PAY`. Base64 cryptographic nonce provided by the device's
|
438
|
+
# wallet.
|
439
|
+
# @option params [String, nil] :nonce_signature Required for `APPLE_PAY`. Base64 cryptographic nonce provided by the device's
|
440
|
+
# wallet.
|
441
|
+
#
|
442
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
443
|
+
#
|
444
|
+
# @return [Sink::Models::CardProvisionFooResponse]
|
445
|
+
def provision_foo(card_token, params = {}, opts = {})
|
446
|
+
req = {}
|
447
|
+
req[:method] = :post
|
448
|
+
req[:path] = "/cards/#{card_token}/provision"
|
449
|
+
req[:body] = params
|
450
|
+
req[:model] = Sink::Models::CardProvisionFooResponse
|
451
|
+
@client.request(req, opts)
|
452
|
+
end
|
453
|
+
|
454
|
+
# Initiate print and shipment of a duplicate card.
|
455
|
+
#
|
456
|
+
# Only applies to cards of type `PHYSICAL` [beta].
|
457
|
+
#
|
458
|
+
# @param card_token [String]
|
459
|
+
#
|
460
|
+
# @param params [Hash] Attributes to send in this request.
|
461
|
+
# @option params [String, nil] :product_id Specifies the configuration (e.g. physical card art) that the card should be
|
462
|
+
# manufactured with, and only applies to cards of type `PHYSICAL` [beta]. This
|
463
|
+
# must be configured with Lithic before use.
|
464
|
+
# @option params [Symbol, ShippingMethod, nil] :shipping_method Shipping method for the card. Use of options besides `STANDARD` require
|
465
|
+
# additional permissions.
|
466
|
+
#
|
467
|
+
# - `STANDARD` - USPS regular mail or similar international option, with no
|
468
|
+
# tracking
|
469
|
+
# - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
|
470
|
+
# with tracking
|
471
|
+
# - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
|
472
|
+
# tracking
|
473
|
+
# @option params [Sink::Models::ShippingAddress, nil] :shipping_address If omitted, the previous shipping address will be used.
|
474
|
+
#
|
475
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
476
|
+
#
|
477
|
+
# @return [Sink::Models::Card]
|
478
|
+
def reissue(card_token, params = {}, opts = {})
|
479
|
+
req = {}
|
480
|
+
req[:method] = :post
|
481
|
+
req[:path] = "/cards/#{card_token}/reissue"
|
482
|
+
req[:body] = params
|
483
|
+
req[:model] = Sink::Models::Card
|
484
|
+
@client.request(req, opts)
|
485
|
+
end
|
486
|
+
end
|
487
|
+
end
|
488
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Casing
|
6
|
+
class EEOC
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Test case for paginated initialism model
|
12
|
+
#
|
13
|
+
# @param params [Hash] Attributes to send in this request.
|
14
|
+
# @option params [String, nil] :cursor
|
15
|
+
# @option params [Integer, nil] :limit
|
16
|
+
#
|
17
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
18
|
+
#
|
19
|
+
# @return [Sink::PageCursor<Sink::Models::EEOC>]
|
20
|
+
def list(params = {}, opts = {})
|
21
|
+
req = {}
|
22
|
+
req[:method] = :get
|
23
|
+
req[:path] = "/casing/eeoc"
|
24
|
+
req[:query] = params
|
25
|
+
req[:page] = Sink::PageCursor
|
26
|
+
req[:model] = Sink::Models::EEOC
|
27
|
+
@client.request(req, opts)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Casing
|
6
|
+
# @return [Sink::Resources::Casing::EEOC]
|
7
|
+
attr_reader :eeoc
|
8
|
+
|
9
|
+
def initialize(client:)
|
10
|
+
@client = client
|
11
|
+
@eeoc = Sink::Resources::Casing::EEOC.new(client: client)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Clients
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# @param params [Hash] Attributes to send in this request.
|
11
|
+
# @option params [String] :account_token
|
12
|
+
# @option params [String] :name
|
13
|
+
#
|
14
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
15
|
+
#
|
16
|
+
# @return [Sink::Models::Client]
|
17
|
+
def create(params = {}, opts = {})
|
18
|
+
req = {}
|
19
|
+
req[:method] = :post
|
20
|
+
req[:path] = "/clients"
|
21
|
+
req[:body] = params
|
22
|
+
req[:model] = Sink::Models::Client
|
23
|
+
@client.request(req, opts)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Company
|
6
|
+
# For paying Stainless $$$
|
7
|
+
class Payments
|
8
|
+
def initialize(client:)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get a payment that the company made.
|
13
|
+
#
|
14
|
+
# @param payment_id [String]
|
15
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
16
|
+
#
|
17
|
+
# @return [Sink::Models::CompanyPayment]
|
18
|
+
def retrieve(payment_id, opts = {})
|
19
|
+
req = {}
|
20
|
+
req[:method] = :get
|
21
|
+
req[:path] = "/company/payments/#{payment_id}"
|
22
|
+
req[:model] = Sink::Models::CompanyPayment
|
23
|
+
@client.request(req, opts)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
# Stainless API company
|
6
|
+
class Company
|
7
|
+
# For paying Stainless $$$
|
8
|
+
# @return [Sink::Resources::Company::Payments]
|
9
|
+
attr_reader :payments
|
10
|
+
|
11
|
+
def initialize(client:)
|
12
|
+
@client = client
|
13
|
+
@payments = Sink::Resources::Company::Payments.new(client: client)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ComplexQueries
|
6
|
+
def initialize(client:)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
# @param params [Hash] Attributes to send in this request.
|
11
|
+
# @option params [Array<Symbol, Include>, nil] :include
|
12
|
+
#
|
13
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
14
|
+
#
|
15
|
+
# @return [Sink::Models::ComplexQueryArrayQueryResponse]
|
16
|
+
def array_query(params = {}, opts = {})
|
17
|
+
req = {}
|
18
|
+
req[:method] = :get
|
19
|
+
req[:path] = "/array_query"
|
20
|
+
req[:query] = params
|
21
|
+
req[:model] = Sink::Models::ComplexQueryArrayQueryResponse
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param params [Hash] Attributes to send in this request.
|
26
|
+
# @option params [Hash, nil] :include
|
27
|
+
#
|
28
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
29
|
+
#
|
30
|
+
# @return [Hash]
|
31
|
+
def object_query(params = {}, opts = {})
|
32
|
+
req = {}
|
33
|
+
req[:method] = :get
|
34
|
+
req[:path] = "/object_query"
|
35
|
+
req[:query] = params
|
36
|
+
req[:model] = Hash
|
37
|
+
@client.request(req, opts)
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param params [Hash] Attributes to send in this request.
|
41
|
+
# @option params [Array<String>, Float, String, nil] :include
|
42
|
+
#
|
43
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
44
|
+
#
|
45
|
+
# @return [Hash]
|
46
|
+
def union_query(params = {}, opts = {})
|
47
|
+
req = {}
|
48
|
+
req[:method] = :get
|
49
|
+
req[:path] = "/union_query"
|
50
|
+
req[:query] = params
|
51
|
+
req[:model] = Hash
|
52
|
+
@client.request(req, opts)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|