terminal-shop 2.0.0 → 2.1.1
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 +4 -4
- data/README.md +2 -8
- data/lib/terminal-shop/client.rb +4 -4
- data/lib/terminal-shop/models/address_create_params.rb +1 -1
- data/lib/terminal-shop/models/address_delete_params.rb +1 -1
- data/lib/terminal-shop/models/address_get_params.rb +1 -1
- data/lib/terminal-shop/models/address_list_params.rb +1 -1
- data/lib/terminal-shop/models/app_create_params.rb +1 -1
- data/lib/terminal-shop/models/app_delete_params.rb +1 -1
- data/lib/terminal-shop/models/app_get_params.rb +1 -1
- data/lib/terminal-shop/models/app_list_params.rb +1 -1
- data/lib/terminal-shop/models/card_collect_params.rb +1 -1
- data/lib/terminal-shop/models/card_create_params.rb +1 -1
- data/lib/terminal-shop/models/card_delete_params.rb +1 -1
- data/lib/terminal-shop/models/card_get_params.rb +1 -1
- data/lib/terminal-shop/models/card_list_params.rb +1 -1
- data/lib/terminal-shop/models/cart_clear_params.rb +1 -1
- data/lib/terminal-shop/models/cart_convert_params.rb +1 -1
- data/lib/terminal-shop/models/cart_get_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_address_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_card_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_item_params.rb +1 -1
- data/lib/terminal-shop/models/email_create_params.rb +1 -1
- data/lib/terminal-shop/models/order_create_params.rb +1 -1
- data/lib/terminal-shop/models/order_get_params.rb +1 -1
- data/lib/terminal-shop/models/order_list_params.rb +1 -1
- data/lib/terminal-shop/models/product_get_params.rb +1 -1
- data/lib/terminal-shop/models/product_list_params.rb +1 -1
- data/lib/terminal-shop/models/profile_me_params.rb +1 -1
- data/lib/terminal-shop/models/profile_update_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_create_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_delete_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_get_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_list_params.rb +1 -1
- data/lib/terminal-shop/models/token_create_params.rb +1 -1
- data/lib/terminal-shop/models/token_delete_params.rb +1 -1
- data/lib/terminal-shop/models/token_get_params.rb +1 -1
- data/lib/terminal-shop/models/token_list_params.rb +1 -1
- data/lib/terminal-shop/models/view_init_params.rb +1 -1
- data/lib/terminal-shop/request_options.rb +0 -33
- data/lib/terminal-shop/transport/base_client.rb +459 -0
- data/lib/terminal-shop/transport/pooled_net_requester.rb +182 -0
- data/lib/terminal-shop/type/array_of.rb +112 -0
- data/lib/terminal-shop/type/base_model.rb +364 -0
- data/lib/terminal-shop/type/base_page.rb +61 -0
- data/lib/terminal-shop/type/boolean_model.rb +52 -0
- data/lib/terminal-shop/type/converter.rb +217 -0
- data/lib/terminal-shop/type/enum.rb +101 -0
- data/lib/terminal-shop/type/hash_of.rb +138 -0
- data/lib/terminal-shop/type/request_parameters.rb +38 -0
- data/lib/terminal-shop/type/union.rb +185 -0
- data/lib/terminal-shop/type/unknown.rb +56 -0
- data/lib/terminal-shop/type.rb +23 -0
- data/lib/terminal-shop/util.rb +3 -5
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +29 -20
- data/manifest.yaml +1 -0
- data/rbi/lib/terminal-shop/client.rbi +4 -4
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +12 -2
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_collect_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_clear_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/order_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/profile_me_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +12 -1
- data/rbi/lib/terminal-shop/request_options.rbi +0 -15
- data/rbi/lib/terminal-shop/transport/base_client.rbi +208 -0
- data/rbi/lib/terminal-shop/transport/pooled_net_requester.rbi +64 -0
- data/rbi/lib/terminal-shop/type/array_of.rbi +82 -0
- data/rbi/lib/terminal-shop/type/base_model.rbi +194 -0
- data/rbi/lib/terminal-shop/type/base_page.rbi +38 -0
- data/rbi/lib/terminal-shop/type/boolean_model.rbi +41 -0
- data/rbi/lib/terminal-shop/type/converter.rbi +101 -0
- data/rbi/lib/terminal-shop/type/enum.rbi +58 -0
- data/rbi/lib/terminal-shop/type/hash_of.rbi +85 -0
- data/rbi/lib/terminal-shop/type/request_parameters.rbi +20 -0
- data/rbi/lib/terminal-shop/type/union.rbi +68 -0
- data/rbi/lib/terminal-shop/type/unknown.rbi +37 -0
- data/rbi/lib/terminal-shop/type.rbi +23 -0
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/client.rbs +3 -3
- data/sig/terminal-shop/models/address_create_params.rbs +1 -1
- data/sig/terminal-shop/models/address_delete_params.rbs +1 -1
- data/sig/terminal-shop/models/address_get_params.rbs +1 -1
- data/sig/terminal-shop/models/address_list_params.rbs +1 -1
- data/sig/terminal-shop/models/app_create_params.rbs +1 -1
- data/sig/terminal-shop/models/app_delete_params.rbs +1 -1
- data/sig/terminal-shop/models/app_get_params.rbs +1 -1
- data/sig/terminal-shop/models/app_list_params.rbs +1 -1
- data/sig/terminal-shop/models/card_collect_params.rbs +1 -1
- data/sig/terminal-shop/models/card_create_params.rbs +1 -1
- data/sig/terminal-shop/models/card_delete_params.rbs +1 -1
- data/sig/terminal-shop/models/card_get_params.rbs +1 -1
- data/sig/terminal-shop/models/card_list_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_clear_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_convert_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_get_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_set_address_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_set_card_params.rbs +1 -1
- data/sig/terminal-shop/models/cart_set_item_params.rbs +1 -1
- data/sig/terminal-shop/models/email_create_params.rbs +1 -1
- data/sig/terminal-shop/models/order_create_params.rbs +1 -1
- data/sig/terminal-shop/models/order_get_params.rbs +1 -1
- data/sig/terminal-shop/models/order_list_params.rbs +1 -1
- data/sig/terminal-shop/models/product_get_params.rbs +1 -1
- data/sig/terminal-shop/models/product_list_params.rbs +1 -1
- data/sig/terminal-shop/models/profile_me_params.rbs +1 -1
- data/sig/terminal-shop/models/profile_update_params.rbs +1 -1
- data/sig/terminal-shop/models/subscription_create_params.rbs +1 -1
- data/sig/terminal-shop/models/subscription_delete_params.rbs +1 -1
- data/sig/terminal-shop/models/subscription_get_params.rbs +1 -1
- data/sig/terminal-shop/models/subscription_list_params.rbs +1 -1
- data/sig/terminal-shop/models/token_create_params.rbs +1 -1
- data/sig/terminal-shop/models/token_delete_params.rbs +1 -1
- data/sig/terminal-shop/models/token_get_params.rbs +1 -1
- data/sig/terminal-shop/models/token_list_params.rbs +1 -1
- data/sig/terminal-shop/models/view_init_params.rbs +1 -1
- data/sig/terminal-shop/request_options.rbs +0 -10
- data/sig/terminal-shop/transport/base_client.rbs +110 -0
- data/sig/terminal-shop/transport/pooled_net_requester.rbs +39 -0
- data/sig/terminal-shop/type/array_of.rbs +36 -0
- data/sig/terminal-shop/type/base_model.rbs +73 -0
- data/sig/terminal-shop/type/base_page.rbs +22 -0
- data/sig/terminal-shop/type/boolean_model.rbs +18 -0
- data/sig/terminal-shop/type/converter.rbs +42 -0
- data/sig/terminal-shop/type/enum.rbs +22 -0
- data/sig/terminal-shop/type/hash_of.rbs +36 -0
- data/sig/terminal-shop/type/request_parameters.rbs +13 -0
- data/sig/terminal-shop/type/union.rbs +40 -0
- data/sig/terminal-shop/type/unknown.rbs +18 -0
- data/sig/terminal-shop/type.rbs +22 -0
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +41 -17
- data/lib/terminal-shop/base_client.rb +0 -457
- data/lib/terminal-shop/base_model.rb +0 -1201
- data/lib/terminal-shop/base_page.rb +0 -59
- data/lib/terminal-shop/extern.rb +0 -7
- data/lib/terminal-shop/pooled_net_requester.rb +0 -180
- data/rbi/lib/terminal-shop/base_client.rbi +0 -197
- data/rbi/lib/terminal-shop/base_model.rbi +0 -645
- data/rbi/lib/terminal-shop/base_page.rbi +0 -36
- data/rbi/lib/terminal-shop/extern.rbi +0 -7
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +0 -59
- data/sig/terminal-shop/base_client.rbs +0 -108
- data/sig/terminal-shop/base_model.rbs +0 -262
- data/sig/terminal-shop/base_page.rbs +0 -20
- data/sig/terminal-shop/extern.rbs +0 -4
- data/sig/terminal-shop/pooled_net_requester.rbs +0 -37
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Type
|
5
|
+
# @api private
|
6
|
+
#
|
7
|
+
# @abstract
|
8
|
+
#
|
9
|
+
# When we don't know what to expect for the value.
|
10
|
+
class Unknown
|
11
|
+
extend TerminalShop::Type::Converter
|
12
|
+
|
13
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
14
|
+
|
15
|
+
# @param other [Object]
|
16
|
+
#
|
17
|
+
# @return [Boolean]
|
18
|
+
def self.===(other) = true
|
19
|
+
|
20
|
+
# @param other [Object]
|
21
|
+
#
|
22
|
+
# @return [Boolean]
|
23
|
+
def self.==(other) = other.is_a?(Class) && other <= TerminalShop::Unknown
|
24
|
+
|
25
|
+
class << self
|
26
|
+
# @api private
|
27
|
+
#
|
28
|
+
# @param value [Object]
|
29
|
+
#
|
30
|
+
# @param state [Hash{Symbol=>Object}] .
|
31
|
+
#
|
32
|
+
# @option state [Boolean, :strong] :strictness
|
33
|
+
#
|
34
|
+
# @option state [Hash{Symbol=>Object}] :exactness
|
35
|
+
#
|
36
|
+
# @option state [Integer] :branched
|
37
|
+
#
|
38
|
+
# @return [Object]
|
39
|
+
def coerce(value, state:)
|
40
|
+
state.fetch(:exactness)[:yes] += 1
|
41
|
+
value
|
42
|
+
end
|
43
|
+
|
44
|
+
# @!parse
|
45
|
+
# # @api private
|
46
|
+
# #
|
47
|
+
# # @param value [Object]
|
48
|
+
# #
|
49
|
+
# # @return [Object]
|
50
|
+
# def dump(value) = super
|
51
|
+
end
|
52
|
+
|
53
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
Unknown = TerminalShop::Type::Unknown
|
5
|
+
|
6
|
+
BooleanModel = TerminalShop::Type::BooleanModel
|
7
|
+
|
8
|
+
Enum = TerminalShop::Type::Enum
|
9
|
+
|
10
|
+
Union = TerminalShop::Type::Union
|
11
|
+
|
12
|
+
ArrayOf = TerminalShop::Type::ArrayOf
|
13
|
+
|
14
|
+
HashOf = TerminalShop::Type::HashOf
|
15
|
+
|
16
|
+
BaseModel = TerminalShop::Type::BaseModel
|
17
|
+
|
18
|
+
RequestParameters = TerminalShop::Type::RequestParameters
|
19
|
+
|
20
|
+
# This module contains various type declarations.
|
21
|
+
module Type
|
22
|
+
end
|
23
|
+
end
|
data/lib/terminal-shop/util.rb
CHANGED
@@ -75,7 +75,7 @@ module TerminalShop
|
|
75
75
|
def coerce_boolean(input)
|
76
76
|
case input.is_a?(String) ? input.downcase : input
|
77
77
|
in Numeric
|
78
|
-
|
78
|
+
input.nonzero?
|
79
79
|
in "true"
|
80
80
|
true
|
81
81
|
in "false"
|
@@ -165,14 +165,12 @@ module TerminalShop
|
|
165
165
|
private def deep_merge_lr(lhs, rhs, concat: false)
|
166
166
|
case [lhs, rhs, concat]
|
167
167
|
in [Hash, Hash, _]
|
168
|
-
|
169
|
-
rhs_cleaned = rhs.reject { |_, val| OMIT == val }
|
168
|
+
rhs_cleaned = rhs.reject { _2 == TerminalShop::Util::OMIT }
|
170
169
|
lhs
|
171
|
-
.reject { |key, _|
|
170
|
+
.reject { |key, _| rhs[key] == TerminalShop::Util::OMIT }
|
172
171
|
.merge(rhs_cleaned) do |_, old_val, new_val|
|
173
172
|
deep_merge_lr(old_val, new_val, concat: concat)
|
174
173
|
end
|
175
|
-
# rubocop:enable Style/YodaCondition
|
176
174
|
in [Array, Array, true]
|
177
175
|
lhs.concat(rhs)
|
178
176
|
else
|
data/lib/terminal-shop.rb
CHANGED
@@ -1,21 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# We already ship the preferred sorbet manifests in the package itself.
|
4
|
-
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
|
5
|
-
if Object.const_defined?(:Tapioca) && caller_locations.any? { _1.path.end_with?("tapioca/cli.rb") }
|
6
|
-
Warning.warn(
|
7
|
-
<<~WARN
|
8
|
-
\n
|
9
|
-
⚠️ skipped loading of "terminal-shop" gem under `tapioca`.
|
10
|
-
|
11
|
-
This message is normal and expected if you are running a `tapioca` command, and does not impact `.rbi` generation.
|
12
|
-
\n
|
13
|
-
WARN
|
14
|
-
)
|
15
|
-
return
|
16
|
-
end
|
17
|
-
|
18
3
|
# Standard libraries.
|
4
|
+
require "English"
|
19
5
|
require "cgi"
|
20
6
|
require "date"
|
21
7
|
require "erb"
|
@@ -30,19 +16,42 @@ require "stringio"
|
|
30
16
|
require "time"
|
31
17
|
require "uri"
|
32
18
|
|
19
|
+
# We already ship the preferred sorbet manifests in the package itself.
|
20
|
+
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
|
21
|
+
if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
|
22
|
+
Warning.warn(
|
23
|
+
<<~WARN
|
24
|
+
\n
|
25
|
+
⚠️ skipped loading of "terminal-shop" gem under `tapioca`.
|
26
|
+
|
27
|
+
This message is normal and expected if you are running a `tapioca` command, and does not impact `.rbi` generation.
|
28
|
+
\n
|
29
|
+
WARN
|
30
|
+
)
|
31
|
+
return
|
32
|
+
end
|
33
|
+
|
33
34
|
# Gems.
|
34
35
|
require "connection_pool"
|
35
36
|
|
36
37
|
# Package files.
|
37
38
|
require_relative "terminal-shop/version"
|
38
39
|
require_relative "terminal-shop/util"
|
39
|
-
require_relative "terminal-shop/
|
40
|
-
require_relative "terminal-shop/
|
41
|
-
require_relative "terminal-shop/
|
40
|
+
require_relative "terminal-shop/type/converter"
|
41
|
+
require_relative "terminal-shop/type/unknown"
|
42
|
+
require_relative "terminal-shop/type/boolean_model"
|
43
|
+
require_relative "terminal-shop/type/enum"
|
44
|
+
require_relative "terminal-shop/type/union"
|
45
|
+
require_relative "terminal-shop/type/array_of"
|
46
|
+
require_relative "terminal-shop/type/hash_of"
|
47
|
+
require_relative "terminal-shop/type/base_model"
|
48
|
+
require_relative "terminal-shop/type/base_page"
|
49
|
+
require_relative "terminal-shop/type/request_parameters"
|
50
|
+
require_relative "terminal-shop/type"
|
42
51
|
require_relative "terminal-shop/request_options"
|
43
52
|
require_relative "terminal-shop/errors"
|
44
|
-
require_relative "terminal-shop/base_client"
|
45
|
-
require_relative "terminal-shop/pooled_net_requester"
|
53
|
+
require_relative "terminal-shop/transport/base_client"
|
54
|
+
require_relative "terminal-shop/transport/pooled_net_requester"
|
46
55
|
require_relative "terminal-shop/client"
|
47
56
|
require_relative "terminal-shop/models/subscription"
|
48
57
|
require_relative "terminal-shop/models/address"
|
data/manifest.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# typed: strong
|
2
2
|
|
3
3
|
module TerminalShop
|
4
|
-
class Client < TerminalShop::BaseClient
|
4
|
+
class Client < TerminalShop::Transport::BaseClient
|
5
5
|
DEFAULT_MAX_RETRIES = 2
|
6
6
|
|
7
7
|
DEFAULT_TIMEOUT_IN_SECONDS = T.let(60.0, Float)
|
@@ -12,7 +12,7 @@ module TerminalShop
|
|
12
12
|
|
13
13
|
ENVIRONMENTS =
|
14
14
|
T.let(
|
15
|
-
{production: "https://api.terminal.shop
|
15
|
+
{production: "https://api.terminal.shop", dev: "https://api.dev.terminal.shop"},
|
16
16
|
T::Hash[Symbol, String]
|
17
17
|
)
|
18
18
|
|
@@ -79,8 +79,8 @@ module TerminalShop
|
|
79
79
|
#
|
80
80
|
# Each environment maps to a different base URL:
|
81
81
|
#
|
82
|
-
# - `production` corresponds to `https://api.terminal.shop
|
83
|
-
# - `dev` corresponds to `https://api.dev.terminal.shop
|
82
|
+
# - `production` corresponds to `https://api.terminal.shop`
|
83
|
+
# - `dev` corresponds to `https://api.dev.terminal.shop`
|
84
84
|
environment: nil,
|
85
85
|
# Override the default base URL for the API, e.g., `"https://api.example.com/v2/"`
|
86
86
|
base_url: nil,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class AddressCreateParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# City of the address.
|
@@ -61,7 +61,17 @@ module TerminalShop
|
|
61
61
|
)
|
62
62
|
.returns(T.attached_class)
|
63
63
|
end
|
64
|
-
def self.new(
|
64
|
+
def self.new(
|
65
|
+
city:,
|
66
|
+
country:,
|
67
|
+
name:,
|
68
|
+
street1:,
|
69
|
+
zip:,
|
70
|
+
phone: nil,
|
71
|
+
province: nil,
|
72
|
+
street2: nil,
|
73
|
+
request_options: {}
|
74
|
+
)
|
65
75
|
end
|
66
76
|
|
67
77
|
sig do
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class CardCreateParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# Stripe card token. Learn how to
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class CartSetAddressParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# ID of the shipping address to set for the current user's cart.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class CartSetCardParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# ID of the credit card to set for the current user's cart.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class CartSetItemParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# ID of the product variant to add to the cart.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class EmailCreateParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# Email address to subscribe to Terminal updates with.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class OrderCreateParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
# Shipping address ID.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class ProfileUpdateParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
sig { returns(String) }
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
5
|
class SubscriptionCreateParams < TerminalShop::Models::SubscriptionAPI
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
6
|
+
extend TerminalShop::Type::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
9
|
sig do
|
@@ -77,7 +77,18 @@ module TerminalShop
|
|
77
77
|
)
|
78
78
|
.returns(T.attached_class)
|
79
79
|
end
|
80
|
-
def self.new(
|
80
|
+
def self.new(
|
81
|
+
addresses:,
|
82
|
+
apps:,
|
83
|
+
cards:,
|
84
|
+
cart:,
|
85
|
+
orders:,
|
86
|
+
products:,
|
87
|
+
profile:,
|
88
|
+
region:,
|
89
|
+
subscriptions:,
|
90
|
+
tokens:
|
91
|
+
)
|
81
92
|
end
|
82
93
|
|
83
94
|
sig do
|
@@ -1,21 +1,6 @@
|
|
1
1
|
# typed: strong
|
2
2
|
|
3
3
|
module TerminalShop
|
4
|
-
# @api private
|
5
|
-
module RequestParameters
|
6
|
-
# Options to specify HTTP behaviour for this request.
|
7
|
-
sig { returns(T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash)) }
|
8
|
-
attr_accessor :request_options
|
9
|
-
|
10
|
-
# @api private
|
11
|
-
module Converter
|
12
|
-
# @api private
|
13
|
-
sig { params(params: T.anything).returns([T.anything, TerminalShop::Util::AnyHash]) }
|
14
|
-
def dump_request(params)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
4
|
# Specify HTTP behaviour to use for a specific request. These options supplement
|
20
5
|
# or override those provided at the client level.
|
21
6
|
#
|