terminal-shop 1.3.0 → 1.4.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 +4 -4
- data/lib/terminal-shop/models/cart.rb +3 -25
- data/lib/terminal-shop/models/cart_convert_params.rb +1 -11
- data/lib/terminal-shop/resources/cart.rb +1 -43
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +0 -4
- data/rbi/lib/terminal-shop/models/cart.rbi +4 -29
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +3 -14
- data/rbi/lib/terminal-shop/resources/cart.rbi +2 -22
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/models/cart.rbs +2 -23
- data/sig/terminal-shop/models/cart_convert_params.rbs +2 -10
- data/sig/terminal-shop/resources/cart.rbs +0 -20
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +1 -13
- data/lib/terminal-shop/models/cart_redeem_gift_card_params.rb +0 -24
- data/lib/terminal-shop/models/cart_redeem_gift_card_response.rb +0 -48
- data/lib/terminal-shop/models/cart_remove_gift_card_params.rb +0 -18
- data/lib/terminal-shop/models/cart_remove_gift_card_response.rb +0 -19
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi +0 -32
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi +0 -66
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi +0 -23
- data/sig/terminal-shop/models/cart_redeem_gift_card_params.rbs +0 -25
- data/sig/terminal-shop/models/cart_redeem_gift_card_response.rbs +0 -47
- data/sig/terminal-shop/models/cart_remove_gift_card_params.rbs +0 -19
- data/sig/terminal-shop/models/cart_remove_gift_card_response.rbs +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768bdcebc5333de72d3b2d85a3fa97bc1abd1c6c5ec5277db2c97c0b368f733a
|
4
|
+
data.tar.gz: bc4f2911f1d7b441ae52da8ea310e75597799eada64b31ea009f7a48f1035be9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0dc39a0556ec3b66a4e765db6e519680c922132d35c5aecdb37b56cd4c6ae7cf52f2bd324820c96e5ce924afbfcac1801f62b11ec0f5759fe0c501ca70cec0b
|
7
|
+
data.tar.gz: 61532646f0b81b9dbf3fa30dda6cefd55fc7e01ccc5dd7d76eac43e9bb73ad2771373068cc7a5bdd130eca8d8f387443a246f9e5d5871dde4883c2a75e8c8aac
|
@@ -41,16 +41,6 @@ module TerminalShop
|
|
41
41
|
# # @return [String]
|
42
42
|
# attr_writer :card_id
|
43
43
|
|
44
|
-
# @!attribute [r] gift_card_id
|
45
|
-
# ID of the gift card applied to the current user's cart.
|
46
|
-
#
|
47
|
-
# @return [String, nil]
|
48
|
-
optional :gift_card_id, String, api_name: :giftCardID
|
49
|
-
|
50
|
-
# @!parse
|
51
|
-
# # @return [String]
|
52
|
-
# attr_writer :gift_card_id
|
53
|
-
|
54
44
|
# @!attribute [r] shipping
|
55
45
|
# Shipping information for the current user's cart.
|
56
46
|
#
|
@@ -69,10 +59,9 @@ module TerminalShop
|
|
69
59
|
# # @param subtotal [Integer]
|
70
60
|
# # @param address_id [String]
|
71
61
|
# # @param card_id [String]
|
72
|
-
# # @param gift_card_id [String]
|
73
62
|
# # @param shipping [TerminalShop::Models::CartAPI::Shipping]
|
74
63
|
# #
|
75
|
-
# def initialize(amount:, items:, subtotal:, address_id: nil, card_id: nil,
|
64
|
+
# def initialize(amount:, items:, subtotal:, address_id: nil, card_id: nil, shipping: nil, **) = super
|
76
65
|
|
77
66
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
78
67
|
|
@@ -83,16 +72,6 @@ module TerminalShop
|
|
83
72
|
# @return [Integer]
|
84
73
|
required :subtotal, Integer
|
85
74
|
|
86
|
-
# @!attribute [r] gift_card
|
87
|
-
# Amount applied from gift card on the current user's cart, in cents (USD).
|
88
|
-
#
|
89
|
-
# @return [Integer, nil]
|
90
|
-
optional :gift_card, Integer, api_name: :giftCard
|
91
|
-
|
92
|
-
# @!parse
|
93
|
-
# # @return [Integer]
|
94
|
-
# attr_writer :gift_card
|
95
|
-
|
96
75
|
# @!attribute [r] shipping
|
97
76
|
# Shipping amount of the current user's cart, in cents (USD).
|
98
77
|
#
|
@@ -104,7 +83,7 @@ module TerminalShop
|
|
104
83
|
# attr_writer :shipping
|
105
84
|
|
106
85
|
# @!attribute [r] total
|
107
|
-
# Total amount after
|
86
|
+
# Total amount after any discounts, in cents (USD).
|
108
87
|
#
|
109
88
|
# @return [Integer, nil]
|
110
89
|
optional :total, Integer
|
@@ -117,11 +96,10 @@ module TerminalShop
|
|
117
96
|
# # The subtotal and shipping amounts for the current user's cart.
|
118
97
|
# #
|
119
98
|
# # @param subtotal [Integer]
|
120
|
-
# # @param gift_card [Integer]
|
121
99
|
# # @param shipping [Integer]
|
122
100
|
# # @param total [Integer]
|
123
101
|
# #
|
124
|
-
# def initialize(subtotal:,
|
102
|
+
# def initialize(subtotal:, shipping: nil, total: nil, **) = super
|
125
103
|
|
126
104
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
127
105
|
end
|
@@ -7,20 +7,10 @@ module TerminalShop
|
|
7
7
|
# extend TerminalShop::RequestParameters::Converter
|
8
8
|
include TerminalShop::RequestParameters
|
9
9
|
|
10
|
-
# @!attribute [r] recipient_email
|
11
|
-
#
|
12
|
-
# @return [String, nil]
|
13
|
-
optional :recipient_email, String, api_name: :recipientEmail
|
14
|
-
|
15
|
-
# @!parse
|
16
|
-
# # @return [String]
|
17
|
-
# attr_writer :recipient_email
|
18
|
-
|
19
10
|
# @!parse
|
20
|
-
# # @param recipient_email [String]
|
21
11
|
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
22
12
|
# #
|
23
|
-
# def initialize(
|
13
|
+
# def initialize(request_options: {}, **) = super
|
24
14
|
|
25
15
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
26
16
|
end
|
@@ -24,20 +24,16 @@ module TerminalShop
|
|
24
24
|
#
|
25
25
|
# @param params [TerminalShop::Models::CartConvertParams, Hash{Symbol=>Object}] .
|
26
26
|
#
|
27
|
-
# @option params [String] :recipient_email
|
28
|
-
#
|
29
27
|
# @option params [TerminalShop::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
|
30
28
|
#
|
31
29
|
# @return [TerminalShop::Models::CartConvertResponse]
|
32
30
|
#
|
33
31
|
def convert(params = {})
|
34
|
-
parsed, options = TerminalShop::Models::CartConvertParams.dump_request(params)
|
35
32
|
@client.request(
|
36
33
|
method: :post,
|
37
34
|
path: "cart/convert",
|
38
|
-
body: parsed,
|
39
35
|
model: TerminalShop::Models::CartConvertResponse,
|
40
|
-
options:
|
36
|
+
options: params[:request_options]
|
41
37
|
)
|
42
38
|
end
|
43
39
|
|
@@ -58,44 +54,6 @@ module TerminalShop
|
|
58
54
|
)
|
59
55
|
end
|
60
56
|
|
61
|
-
# Apply a gift card to the current user's cart.
|
62
|
-
#
|
63
|
-
# @param params [TerminalShop::Models::CartRedeemGiftCardParams, Hash{Symbol=>Object}] .
|
64
|
-
#
|
65
|
-
# @option params [String] :gift_card_id
|
66
|
-
#
|
67
|
-
# @option params [TerminalShop::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
|
68
|
-
#
|
69
|
-
# @return [TerminalShop::Models::CartRedeemGiftCardResponse]
|
70
|
-
#
|
71
|
-
def redeem_gift_card(params)
|
72
|
-
parsed, options = TerminalShop::Models::CartRedeemGiftCardParams.dump_request(params)
|
73
|
-
@client.request(
|
74
|
-
method: :put,
|
75
|
-
path: "cart/gift-card",
|
76
|
-
body: parsed,
|
77
|
-
model: TerminalShop::Models::CartRedeemGiftCardResponse,
|
78
|
-
options: options
|
79
|
-
)
|
80
|
-
end
|
81
|
-
|
82
|
-
# Remove the gift card from the current user's cart.
|
83
|
-
#
|
84
|
-
# @param params [TerminalShop::Models::CartRemoveGiftCardParams, Hash{Symbol=>Object}] .
|
85
|
-
#
|
86
|
-
# @option params [TerminalShop::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
|
87
|
-
#
|
88
|
-
# @return [TerminalShop::Models::CartRemoveGiftCardResponse]
|
89
|
-
#
|
90
|
-
def remove_gift_card(params = {})
|
91
|
-
@client.request(
|
92
|
-
method: :delete,
|
93
|
-
path: "cart/gift-card",
|
94
|
-
model: TerminalShop::Models::CartRemoveGiftCardResponse,
|
95
|
-
options: params[:request_options]
|
96
|
-
)
|
97
|
-
end
|
98
|
-
|
99
57
|
# Set the shipping address for the current user's cart.
|
100
58
|
#
|
101
59
|
# @param params [TerminalShop::Models::CartSetAddressParams, Hash{Symbol=>Object}] .
|
data/lib/terminal-shop.rb
CHANGED
@@ -65,10 +65,6 @@ require_relative "terminal-shop/models/cart_convert_params"
|
|
65
65
|
require_relative "terminal-shop/models/cart_convert_response"
|
66
66
|
require_relative "terminal-shop/models/cart_get_params"
|
67
67
|
require_relative "terminal-shop/models/cart_get_response"
|
68
|
-
require_relative "terminal-shop/models/cart_redeem_gift_card_params"
|
69
|
-
require_relative "terminal-shop/models/cart_redeem_gift_card_response"
|
70
|
-
require_relative "terminal-shop/models/cart_remove_gift_card_params"
|
71
|
-
require_relative "terminal-shop/models/cart_remove_gift_card_response"
|
72
68
|
require_relative "terminal-shop/models/cart_set_address_params"
|
73
69
|
require_relative "terminal-shop/models/cart_set_address_response"
|
74
70
|
require_relative "terminal-shop/models/cart_set_card_params"
|
@@ -46,14 +46,6 @@ module TerminalShop
|
|
46
46
|
def card_id=(_)
|
47
47
|
end
|
48
48
|
|
49
|
-
sig { returns(T.nilable(String)) }
|
50
|
-
def gift_card_id
|
51
|
-
end
|
52
|
-
|
53
|
-
sig { params(_: String).returns(String) }
|
54
|
-
def gift_card_id=(_)
|
55
|
-
end
|
56
|
-
|
57
49
|
sig { returns(T.nilable(TerminalShop::Models::CartAPI::Shipping)) }
|
58
50
|
def shipping
|
59
51
|
end
|
@@ -69,12 +61,11 @@ module TerminalShop
|
|
69
61
|
subtotal: Integer,
|
70
62
|
address_id: String,
|
71
63
|
card_id: String,
|
72
|
-
gift_card_id: String,
|
73
64
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
74
65
|
)
|
75
66
|
.returns(T.attached_class)
|
76
67
|
end
|
77
|
-
def self.new(amount:, items:, subtotal:, address_id: nil, card_id: nil,
|
68
|
+
def self.new(amount:, items:, subtotal:, address_id: nil, card_id: nil, shipping: nil)
|
78
69
|
end
|
79
70
|
|
80
71
|
sig do
|
@@ -86,7 +77,6 @@ module TerminalShop
|
|
86
77
|
subtotal: Integer,
|
87
78
|
address_id: String,
|
88
79
|
card_id: String,
|
89
|
-
gift_card_id: String,
|
90
80
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
91
81
|
}
|
92
82
|
)
|
@@ -103,14 +93,6 @@ module TerminalShop
|
|
103
93
|
def subtotal=(_)
|
104
94
|
end
|
105
95
|
|
106
|
-
sig { returns(T.nilable(Integer)) }
|
107
|
-
def gift_card
|
108
|
-
end
|
109
|
-
|
110
|
-
sig { params(_: Integer).returns(Integer) }
|
111
|
-
def gift_card=(_)
|
112
|
-
end
|
113
|
-
|
114
96
|
sig { returns(T.nilable(Integer)) }
|
115
97
|
def shipping
|
116
98
|
end
|
@@ -127,18 +109,11 @@ module TerminalShop
|
|
127
109
|
def total=(_)
|
128
110
|
end
|
129
111
|
|
130
|
-
sig
|
131
|
-
|
132
|
-
subtotal: Integer,
|
133
|
-
gift_card: Integer,
|
134
|
-
shipping: Integer,
|
135
|
-
total: Integer
|
136
|
-
).returns(T.attached_class)
|
137
|
-
end
|
138
|
-
def self.new(subtotal:, gift_card: nil, shipping: nil, total: nil)
|
112
|
+
sig { params(subtotal: Integer, shipping: Integer, total: Integer).returns(T.attached_class) }
|
113
|
+
def self.new(subtotal:, shipping: nil, total: nil)
|
139
114
|
end
|
140
115
|
|
141
|
-
sig { override.returns({subtotal: Integer,
|
116
|
+
sig { override.returns({subtotal: Integer, shipping: Integer, total: Integer}) }
|
142
117
|
def to_hash
|
143
118
|
end
|
144
119
|
end
|
@@ -6,25 +6,14 @@ module TerminalShop
|
|
6
6
|
extend TerminalShop::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
|
-
sig { returns(T.nilable(String)) }
|
10
|
-
def recipient_email
|
11
|
-
end
|
12
|
-
|
13
|
-
sig { params(_: String).returns(String) }
|
14
|
-
def recipient_email=(_)
|
15
|
-
end
|
16
|
-
|
17
9
|
sig do
|
18
|
-
params(
|
19
|
-
recipient_email: String,
|
20
|
-
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
21
|
-
)
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
22
11
|
.returns(T.attached_class)
|
23
12
|
end
|
24
|
-
def self.new(
|
13
|
+
def self.new(request_options: {})
|
25
14
|
end
|
26
15
|
|
27
|
-
sig { override.returns({
|
16
|
+
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
28
17
|
def to_hash
|
29
18
|
end
|
30
19
|
end
|
@@ -11,13 +11,10 @@ module TerminalShop
|
|
11
11
|
end
|
12
12
|
|
13
13
|
sig do
|
14
|
-
params(
|
15
|
-
recipient_email: String,
|
16
|
-
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
17
|
-
)
|
14
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
18
15
|
.returns(TerminalShop::Models::CartConvertResponse)
|
19
16
|
end
|
20
|
-
def convert(
|
17
|
+
def convert(request_options: {})
|
21
18
|
end
|
22
19
|
|
23
20
|
sig do
|
@@ -27,23 +24,6 @@ module TerminalShop
|
|
27
24
|
def get(request_options: {})
|
28
25
|
end
|
29
26
|
|
30
|
-
sig do
|
31
|
-
params(
|
32
|
-
gift_card_id: String,
|
33
|
-
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
34
|
-
)
|
35
|
-
.returns(TerminalShop::Models::CartRedeemGiftCardResponse)
|
36
|
-
end
|
37
|
-
def redeem_gift_card(gift_card_id:, request_options: {})
|
38
|
-
end
|
39
|
-
|
40
|
-
sig do
|
41
|
-
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
42
|
-
.returns(TerminalShop::Models::CartRemoveGiftCardResponse)
|
43
|
-
end
|
44
|
-
def remove_gift_card(request_options: {})
|
45
|
-
end
|
46
|
-
|
47
27
|
sig do
|
48
28
|
params(
|
49
29
|
address_id: String,
|
@@ -7,7 +7,6 @@ module TerminalShop
|
|
7
7
|
subtotal: Integer,
|
8
8
|
address_id: String,
|
9
9
|
card_id: String,
|
10
|
-
gift_card_id: String,
|
11
10
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
12
11
|
}
|
13
12
|
|
@@ -26,10 +25,6 @@ module TerminalShop
|
|
26
25
|
|
27
26
|
def card_id=: (String) -> String
|
28
27
|
|
29
|
-
attr_reader gift_card_id: String?
|
30
|
-
|
31
|
-
def gift_card_id=: (String) -> String
|
32
|
-
|
33
28
|
attr_reader shipping: TerminalShop::Models::CartAPI::Shipping?
|
34
29
|
|
35
30
|
def shipping=: (
|
@@ -43,7 +38,6 @@ module TerminalShop
|
|
43
38
|
subtotal: Integer,
|
44
39
|
address_id: String,
|
45
40
|
card_id: String,
|
46
|
-
gift_card_id: String,
|
47
41
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
48
42
|
) -> void
|
49
43
|
| (
|
@@ -52,21 +46,11 @@ module TerminalShop
|
|
52
46
|
|
53
47
|
def to_hash: -> TerminalShop::Models::cart_api
|
54
48
|
|
55
|
-
type amount =
|
56
|
-
{
|
57
|
-
subtotal: Integer,
|
58
|
-
gift_card: Integer,
|
59
|
-
shipping: Integer,
|
60
|
-
total: Integer
|
61
|
-
}
|
49
|
+
type amount = { subtotal: Integer, shipping: Integer, total: Integer }
|
62
50
|
|
63
51
|
class Amount < TerminalShop::BaseModel
|
64
52
|
attr_accessor subtotal: Integer
|
65
53
|
|
66
|
-
attr_reader gift_card: Integer?
|
67
|
-
|
68
|
-
def gift_card=: (Integer) -> Integer
|
69
|
-
|
70
54
|
attr_reader shipping: Integer?
|
71
55
|
|
72
56
|
def shipping=: (Integer) -> Integer
|
@@ -76,12 +60,7 @@ module TerminalShop
|
|
76
60
|
def total=: (Integer) -> Integer
|
77
61
|
|
78
62
|
def initialize:
|
79
|
-
(
|
80
|
-
subtotal: Integer,
|
81
|
-
gift_card: Integer,
|
82
|
-
shipping: Integer,
|
83
|
-
total: Integer
|
84
|
-
) -> void
|
63
|
+
(subtotal: Integer, shipping: Integer, total: Integer) -> void
|
85
64
|
| (
|
86
65
|
?TerminalShop::Models::CartAPI::amount
|
87
66
|
| TerminalShop::BaseModel data
|
@@ -1,21 +1,13 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type cart_convert_params =
|
4
|
-
{ recipient_email: String } & TerminalShop::request_parameters
|
3
|
+
type cart_convert_params = { } & TerminalShop::request_parameters
|
5
4
|
|
6
5
|
class CartConvertParams < TerminalShop::BaseModel
|
7
6
|
extend TerminalShop::RequestParameters::Converter
|
8
7
|
include TerminalShop::RequestParameters
|
9
8
|
|
10
|
-
attr_reader recipient_email: String?
|
11
|
-
|
12
|
-
def recipient_email=: (String) -> String
|
13
|
-
|
14
9
|
def initialize:
|
15
|
-
(
|
16
|
-
recipient_email: String,
|
17
|
-
request_options: TerminalShop::request_opts
|
18
|
-
) -> void
|
10
|
+
(request_options: TerminalShop::request_opts) -> void
|
19
11
|
| (
|
20
12
|
?TerminalShop::Models::cart_convert_params
|
21
13
|
| TerminalShop::BaseModel data
|
@@ -14,7 +14,6 @@ module TerminalShop
|
|
14
14
|
?TerminalShop::Models::CartConvertParams | ::Hash[Symbol, top] params
|
15
15
|
) -> TerminalShop::Models::CartConvertResponse
|
16
16
|
| (
|
17
|
-
recipient_email: String,
|
18
17
|
request_options: TerminalShop::request_opts
|
19
18
|
) -> TerminalShop::Models::CartConvertResponse
|
20
19
|
|
@@ -26,25 +25,6 @@ module TerminalShop
|
|
26
25
|
request_options: TerminalShop::request_opts
|
27
26
|
) -> TerminalShop::Models::CartGetResponse
|
28
27
|
|
29
|
-
def redeem_gift_card:
|
30
|
-
(
|
31
|
-
TerminalShop::Models::CartRedeemGiftCardParams
|
32
|
-
| ::Hash[Symbol, top] params
|
33
|
-
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
34
|
-
| (
|
35
|
-
gift_card_id: String,
|
36
|
-
request_options: TerminalShop::request_opts
|
37
|
-
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
38
|
-
|
39
|
-
def remove_gift_card:
|
40
|
-
(
|
41
|
-
?TerminalShop::Models::CartRemoveGiftCardParams
|
42
|
-
| ::Hash[Symbol, top] params
|
43
|
-
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
44
|
-
| (
|
45
|
-
request_options: TerminalShop::request_opts
|
46
|
-
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
47
|
-
|
48
28
|
def set_address:
|
49
29
|
(
|
50
30
|
TerminalShop::Models::CartSetAddressParams
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal-shop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terminal
|
@@ -75,10 +75,6 @@ files:
|
|
75
75
|
- lib/terminal-shop/models/cart_convert_response.rb
|
76
76
|
- lib/terminal-shop/models/cart_get_params.rb
|
77
77
|
- lib/terminal-shop/models/cart_get_response.rb
|
78
|
-
- lib/terminal-shop/models/cart_redeem_gift_card_params.rb
|
79
|
-
- lib/terminal-shop/models/cart_redeem_gift_card_response.rb
|
80
|
-
- lib/terminal-shop/models/cart_remove_gift_card_params.rb
|
81
|
-
- lib/terminal-shop/models/cart_remove_gift_card_response.rb
|
82
78
|
- lib/terminal-shop/models/cart_set_address_params.rb
|
83
79
|
- lib/terminal-shop/models/cart_set_address_response.rb
|
84
80
|
- lib/terminal-shop/models/cart_set_card_params.rb
|
@@ -183,10 +179,6 @@ files:
|
|
183
179
|
- rbi/lib/terminal-shop/models/cart_convert_response.rbi
|
184
180
|
- rbi/lib/terminal-shop/models/cart_get_params.rbi
|
185
181
|
- rbi/lib/terminal-shop/models/cart_get_response.rbi
|
186
|
-
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi
|
187
|
-
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi
|
188
|
-
- rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi
|
189
|
-
- rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi
|
190
182
|
- rbi/lib/terminal-shop/models/cart_set_address_params.rbi
|
191
183
|
- rbi/lib/terminal-shop/models/cart_set_address_response.rbi
|
192
184
|
- rbi/lib/terminal-shop/models/cart_set_card_params.rbi
|
@@ -290,10 +282,6 @@ files:
|
|
290
282
|
- sig/terminal-shop/models/cart_convert_response.rbs
|
291
283
|
- sig/terminal-shop/models/cart_get_params.rbs
|
292
284
|
- sig/terminal-shop/models/cart_get_response.rbs
|
293
|
-
- sig/terminal-shop/models/cart_redeem_gift_card_params.rbs
|
294
|
-
- sig/terminal-shop/models/cart_redeem_gift_card_response.rbs
|
295
|
-
- sig/terminal-shop/models/cart_remove_gift_card_params.rbs
|
296
|
-
- sig/terminal-shop/models/cart_remove_gift_card_response.rbs
|
297
285
|
- sig/terminal-shop/models/cart_set_address_params.rbs
|
298
286
|
- sig/terminal-shop/models/cart_set_address_response.rbs
|
299
287
|
- sig/terminal-shop/models/cart_set_card_params.rbs
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRedeemGiftCardParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!attribute gift_card_id
|
11
|
-
#
|
12
|
-
# @return [String]
|
13
|
-
required :gift_card_id, String, api_name: :giftCardID
|
14
|
-
|
15
|
-
# @!parse
|
16
|
-
# # @param gift_card_id [String]
|
17
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
18
|
-
# #
|
19
|
-
# def initialize(gift_card_id:, request_options: {}, **) = super
|
20
|
-
|
21
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
# Gift card redemption result
|
8
|
-
#
|
9
|
-
# @return [TerminalShop::Models::CartRedeemGiftCardResponse::Data]
|
10
|
-
required :data, -> { TerminalShop::Models::CartRedeemGiftCardResponse::Data }
|
11
|
-
|
12
|
-
# @!parse
|
13
|
-
# # @param data [TerminalShop::Models::CartRedeemGiftCardResponse::Data]
|
14
|
-
# #
|
15
|
-
# def initialize(data:, **) = super
|
16
|
-
|
17
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
18
|
-
|
19
|
-
class Data < TerminalShop::BaseModel
|
20
|
-
# @!attribute applied_amount
|
21
|
-
#
|
22
|
-
# @return [Integer]
|
23
|
-
required :applied_amount, Integer, api_name: :appliedAmount
|
24
|
-
|
25
|
-
# @!attribute gift_card_id
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
required :gift_card_id, String, api_name: :giftCardID
|
29
|
-
|
30
|
-
# @!attribute remaining_balance
|
31
|
-
#
|
32
|
-
# @return [Integer]
|
33
|
-
required :remaining_balance, Integer, api_name: :remainingBalance
|
34
|
-
|
35
|
-
# @!parse
|
36
|
-
# # Gift card redemption result
|
37
|
-
# #
|
38
|
-
# # @param applied_amount [Integer]
|
39
|
-
# # @param gift_card_id [String]
|
40
|
-
# # @param remaining_balance [Integer]
|
41
|
-
# #
|
42
|
-
# def initialize(applied_amount:, gift_card_id:, remaining_balance:, **) = super
|
43
|
-
|
44
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
#
|
8
|
-
# @return [Symbol, :ok]
|
9
|
-
required :data, const: :ok
|
10
|
-
|
11
|
-
# @!parse
|
12
|
-
# # @param data [Symbol, :ok]
|
13
|
-
# #
|
14
|
-
# def initialize(data: :ok, **) = super
|
15
|
-
|
16
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRedeemGiftCardParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
7
|
-
include TerminalShop::RequestParameters
|
8
|
-
|
9
|
-
sig { returns(String) }
|
10
|
-
def gift_card_id
|
11
|
-
end
|
12
|
-
|
13
|
-
sig { params(_: String).returns(String) }
|
14
|
-
def gift_card_id=(_)
|
15
|
-
end
|
16
|
-
|
17
|
-
sig do
|
18
|
-
params(
|
19
|
-
gift_card_id: String,
|
20
|
-
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
21
|
-
)
|
22
|
-
.returns(T.attached_class)
|
23
|
-
end
|
24
|
-
def self.new(gift_card_id:, request_options: {})
|
25
|
-
end
|
26
|
-
|
27
|
-
sig { override.returns({gift_card_id: String, request_options: TerminalShop::RequestOptions}) }
|
28
|
-
def to_hash
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
6
|
-
sig { returns(TerminalShop::Models::CartRedeemGiftCardResponse::Data) }
|
7
|
-
def data
|
8
|
-
end
|
9
|
-
|
10
|
-
sig do
|
11
|
-
params(_: TerminalShop::Models::CartRedeemGiftCardResponse::Data)
|
12
|
-
.returns(TerminalShop::Models::CartRedeemGiftCardResponse::Data)
|
13
|
-
end
|
14
|
-
def data=(_)
|
15
|
-
end
|
16
|
-
|
17
|
-
sig { params(data: TerminalShop::Models::CartRedeemGiftCardResponse::Data).returns(T.attached_class) }
|
18
|
-
def self.new(data:)
|
19
|
-
end
|
20
|
-
|
21
|
-
sig { override.returns({data: TerminalShop::Models::CartRedeemGiftCardResponse::Data}) }
|
22
|
-
def to_hash
|
23
|
-
end
|
24
|
-
|
25
|
-
class Data < TerminalShop::BaseModel
|
26
|
-
sig { returns(Integer) }
|
27
|
-
def applied_amount
|
28
|
-
end
|
29
|
-
|
30
|
-
sig { params(_: Integer).returns(Integer) }
|
31
|
-
def applied_amount=(_)
|
32
|
-
end
|
33
|
-
|
34
|
-
sig { returns(String) }
|
35
|
-
def gift_card_id
|
36
|
-
end
|
37
|
-
|
38
|
-
sig { params(_: String).returns(String) }
|
39
|
-
def gift_card_id=(_)
|
40
|
-
end
|
41
|
-
|
42
|
-
sig { returns(Integer) }
|
43
|
-
def remaining_balance
|
44
|
-
end
|
45
|
-
|
46
|
-
sig { params(_: Integer).returns(Integer) }
|
47
|
-
def remaining_balance=(_)
|
48
|
-
end
|
49
|
-
|
50
|
-
sig do
|
51
|
-
params(
|
52
|
-
applied_amount: Integer,
|
53
|
-
gift_card_id: String,
|
54
|
-
remaining_balance: Integer
|
55
|
-
).returns(T.attached_class)
|
56
|
-
end
|
57
|
-
def self.new(applied_amount:, gift_card_id:, remaining_balance:)
|
58
|
-
end
|
59
|
-
|
60
|
-
sig { override.returns({applied_amount: Integer, gift_card_id: String, remaining_balance: Integer}) }
|
61
|
-
def to_hash
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
7
|
-
include TerminalShop::RequestParameters
|
8
|
-
|
9
|
-
sig do
|
10
|
-
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
-
.returns(T.attached_class)
|
12
|
-
end
|
13
|
-
def self.new(request_options: {})
|
14
|
-
end
|
15
|
-
|
16
|
-
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
17
|
-
def to_hash
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
-
sig { returns(Symbol) }
|
7
|
-
def data
|
8
|
-
end
|
9
|
-
|
10
|
-
sig { params(_: Symbol).returns(Symbol) }
|
11
|
-
def data=(_)
|
12
|
-
end
|
13
|
-
|
14
|
-
sig { params(data: Symbol).returns(T.attached_class) }
|
15
|
-
def self.new(data: :ok)
|
16
|
-
end
|
17
|
-
|
18
|
-
sig { override.returns({data: Symbol}) }
|
19
|
-
def to_hash
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module TerminalShop
|
2
|
-
module Models
|
3
|
-
type cart_redeem_gift_card_params =
|
4
|
-
{ gift_card_id: String } & TerminalShop::request_parameters
|
5
|
-
|
6
|
-
class CartRedeemGiftCardParams < TerminalShop::BaseModel
|
7
|
-
extend TerminalShop::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
attr_accessor gift_card_id: String
|
11
|
-
|
12
|
-
def initialize:
|
13
|
-
(
|
14
|
-
gift_card_id: String,
|
15
|
-
request_options: TerminalShop::request_opts
|
16
|
-
) -> void
|
17
|
-
| (
|
18
|
-
?TerminalShop::Models::cart_redeem_gift_card_params
|
19
|
-
| TerminalShop::BaseModel data
|
20
|
-
) -> void
|
21
|
-
|
22
|
-
def to_hash: -> TerminalShop::Models::cart_redeem_gift_card_params
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module TerminalShop
|
2
|
-
module Models
|
3
|
-
type cart_redeem_gift_card_response =
|
4
|
-
{ data: TerminalShop::Models::CartRedeemGiftCardResponse::Data }
|
5
|
-
|
6
|
-
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
7
|
-
attr_accessor data: TerminalShop::Models::CartRedeemGiftCardResponse::Data
|
8
|
-
|
9
|
-
def initialize:
|
10
|
-
(data: TerminalShop::Models::CartRedeemGiftCardResponse::Data) -> void
|
11
|
-
| (
|
12
|
-
?TerminalShop::Models::cart_redeem_gift_card_response
|
13
|
-
| TerminalShop::BaseModel data
|
14
|
-
) -> void
|
15
|
-
|
16
|
-
def to_hash: -> TerminalShop::Models::cart_redeem_gift_card_response
|
17
|
-
|
18
|
-
type data =
|
19
|
-
{
|
20
|
-
applied_amount: Integer,
|
21
|
-
gift_card_id: String,
|
22
|
-
remaining_balance: Integer
|
23
|
-
}
|
24
|
-
|
25
|
-
class Data < TerminalShop::BaseModel
|
26
|
-
attr_accessor applied_amount: Integer
|
27
|
-
|
28
|
-
attr_accessor gift_card_id: String
|
29
|
-
|
30
|
-
attr_accessor remaining_balance: Integer
|
31
|
-
|
32
|
-
def initialize:
|
33
|
-
(
|
34
|
-
applied_amount: Integer,
|
35
|
-
gift_card_id: String,
|
36
|
-
remaining_balance: Integer
|
37
|
-
) -> void
|
38
|
-
| (
|
39
|
-
?TerminalShop::Models::CartRedeemGiftCardResponse::data
|
40
|
-
| TerminalShop::BaseModel data
|
41
|
-
) -> void
|
42
|
-
|
43
|
-
def to_hash: -> TerminalShop::Models::CartRedeemGiftCardResponse::data
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module TerminalShop
|
2
|
-
module Models
|
3
|
-
type cart_remove_gift_card_params = { } & TerminalShop::request_parameters
|
4
|
-
|
5
|
-
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
-
extend TerminalShop::RequestParameters::Converter
|
7
|
-
include TerminalShop::RequestParameters
|
8
|
-
|
9
|
-
def initialize:
|
10
|
-
(request_options: TerminalShop::request_opts) -> void
|
11
|
-
| (
|
12
|
-
?TerminalShop::Models::cart_remove_gift_card_params
|
13
|
-
| TerminalShop::BaseModel data
|
14
|
-
) -> void
|
15
|
-
|
16
|
-
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_params
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module TerminalShop
|
2
|
-
module Models
|
3
|
-
type cart_remove_gift_card_response = { data: :ok }
|
4
|
-
|
5
|
-
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
-
attr_accessor data: :ok
|
7
|
-
|
8
|
-
def initialize:
|
9
|
-
(data: :ok) -> void
|
10
|
-
| (
|
11
|
-
?TerminalShop::Models::cart_remove_gift_card_response
|
12
|
-
| TerminalShop::BaseModel data
|
13
|
-
) -> void
|
14
|
-
|
15
|
-
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_response
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|