terminal-shop 1.3.0 → 1.5.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/models/product.rb +1 -11
- data/lib/terminal-shop/models/view_init_response.rb +16 -1
- 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/models/product.rbi +9 -21
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +24 -1
- 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/models/product.rbs +2 -8
- data/sig/terminal-shop/models/view_init_response.rbs +13 -0
- 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: dd260c7be43496138640e129202003772d0d9c0510c3cdf1a5d654b63f2e6c99
|
4
|
+
data.tar.gz: 467f6996e9ff91cff4b8b0d060d4338a493c84ed86823a1863f3ab09b472d4e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09e4ad8a23dbb323077e2649767ed1aa1092b0f125a518f8882b82ac8ff57c2a043e31a4548dbf02f36b77556a9be75386c7ffcd309571d8d1c96c51d41d2e0e'
|
7
|
+
data.tar.gz: 74cb047f3dcc1fb18f6e4e77619ee50e47caf1b17f2577ea0268129a4d198436a009dfd8580328911da17cd40260859e7125937d8c9921f7d248e285d63e8520
|
@@ -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
|
@@ -128,15 +128,6 @@ module TerminalShop
|
|
128
128
|
# # @return [Boolean]
|
129
129
|
# attr_writer :market_na
|
130
130
|
|
131
|
-
# @!attribute [r] type
|
132
|
-
#
|
133
|
-
# @return [String, nil]
|
134
|
-
optional :type, String
|
135
|
-
|
136
|
-
# @!parse
|
137
|
-
# # @return [String]
|
138
|
-
# attr_writer :type
|
139
|
-
|
140
131
|
# @!parse
|
141
132
|
# # Tags for the product.
|
142
133
|
# #
|
@@ -145,9 +136,8 @@ module TerminalShop
|
|
145
136
|
# # @param featured [Boolean]
|
146
137
|
# # @param market_eu [Boolean]
|
147
138
|
# # @param market_na [Boolean]
|
148
|
-
# # @param type [String]
|
149
139
|
# #
|
150
|
-
# def initialize(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil,
|
140
|
+
# def initialize(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil, **) = super
|
151
141
|
|
152
142
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
153
143
|
end
|
@@ -54,6 +54,11 @@ module TerminalShop
|
|
54
54
|
# @return [TerminalShop::Models::ProfileAPI]
|
55
55
|
required :profile, -> { TerminalShop::Models::ProfileAPI }
|
56
56
|
|
57
|
+
# @!attribute region
|
58
|
+
#
|
59
|
+
# @return [Symbol, TerminalShop::Models::ViewInitResponse::Data::Region]
|
60
|
+
required :region, enum: -> { TerminalShop::Models::ViewInitResponse::Data::Region }
|
61
|
+
|
57
62
|
# @!attribute subscriptions
|
58
63
|
#
|
59
64
|
# @return [Array<TerminalShop::Models::SubscriptionAPI>]
|
@@ -74,12 +79,22 @@ module TerminalShop
|
|
74
79
|
# # @param orders [Array<TerminalShop::Models::OrderAPI>]
|
75
80
|
# # @param products [Array<TerminalShop::Models::ProductAPI>]
|
76
81
|
# # @param profile [TerminalShop::Models::ProfileAPI]
|
82
|
+
# # @param region [Symbol, TerminalShop::Models::ViewInitResponse::Data::Region]
|
77
83
|
# # @param subscriptions [Array<TerminalShop::Models::SubscriptionAPI>]
|
78
84
|
# # @param tokens [Array<TerminalShop::Models::TokenAPI>]
|
79
85
|
# #
|
80
|
-
# def initialize(addresses:, apps:, cards:, cart:, orders:, products:, profile:, subscriptions:, tokens:, **) = super
|
86
|
+
# def initialize(addresses:, apps:, cards:, cart:, orders:, products:, profile:, region:, subscriptions:, tokens:, **) = super
|
81
87
|
|
82
88
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
89
|
+
|
90
|
+
# @abstract
|
91
|
+
#
|
92
|
+
class Region < TerminalShop::Enum
|
93
|
+
NA = :na
|
94
|
+
EU = :eu
|
95
|
+
|
96
|
+
finalize!
|
97
|
+
end
|
83
98
|
end
|
84
99
|
end
|
85
100
|
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
|
@@ -148,40 +148,28 @@ module TerminalShop
|
|
148
148
|
def market_na=(_)
|
149
149
|
end
|
150
150
|
|
151
|
-
sig { returns(T.nilable(String)) }
|
152
|
-
def type
|
153
|
-
end
|
154
|
-
|
155
|
-
sig { params(_: String).returns(String) }
|
156
|
-
def type=(_)
|
157
|
-
end
|
158
|
-
|
159
151
|
sig do
|
160
152
|
params(
|
161
153
|
app: String,
|
162
154
|
color: String,
|
163
155
|
featured: T::Boolean,
|
164
156
|
market_eu: T::Boolean,
|
165
|
-
market_na: T::Boolean
|
166
|
-
type: String
|
157
|
+
market_na: T::Boolean
|
167
158
|
)
|
168
159
|
.returns(T.attached_class)
|
169
160
|
end
|
170
|
-
def self.new(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil
|
161
|
+
def self.new(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil)
|
171
162
|
end
|
172
163
|
|
173
164
|
sig do
|
174
165
|
override
|
175
|
-
.returns(
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
type: String
|
183
|
-
}
|
184
|
-
)
|
166
|
+
.returns({
|
167
|
+
app: String,
|
168
|
+
color: String,
|
169
|
+
featured: T::Boolean,
|
170
|
+
market_eu: T::Boolean,
|
171
|
+
market_na: T::Boolean
|
172
|
+
})
|
185
173
|
end
|
186
174
|
def to_hash
|
187
175
|
end
|
@@ -79,6 +79,14 @@ module TerminalShop
|
|
79
79
|
def profile=(_)
|
80
80
|
end
|
81
81
|
|
82
|
+
sig { returns(Symbol) }
|
83
|
+
def region
|
84
|
+
end
|
85
|
+
|
86
|
+
sig { params(_: Symbol).returns(Symbol) }
|
87
|
+
def region=(_)
|
88
|
+
end
|
89
|
+
|
82
90
|
sig { returns(T::Array[TerminalShop::Models::SubscriptionAPI]) }
|
83
91
|
def subscriptions
|
84
92
|
end
|
@@ -107,12 +115,13 @@ module TerminalShop
|
|
107
115
|
orders: T::Array[TerminalShop::Models::OrderAPI],
|
108
116
|
products: T::Array[TerminalShop::Models::ProductAPI],
|
109
117
|
profile: TerminalShop::Models::ProfileAPI,
|
118
|
+
region: Symbol,
|
110
119
|
subscriptions: T::Array[TerminalShop::Models::SubscriptionAPI],
|
111
120
|
tokens: T::Array[TerminalShop::Models::TokenAPI]
|
112
121
|
)
|
113
122
|
.returns(T.attached_class)
|
114
123
|
end
|
115
|
-
def self.new(addresses:, apps:, cards:, cart:, orders:, products:, profile:, subscriptions:, tokens:)
|
124
|
+
def self.new(addresses:, apps:, cards:, cart:, orders:, products:, profile:, region:, subscriptions:, tokens:)
|
116
125
|
end
|
117
126
|
|
118
127
|
sig do
|
@@ -126,6 +135,7 @@ module TerminalShop
|
|
126
135
|
orders: T::Array[TerminalShop::Models::OrderAPI],
|
127
136
|
products: T::Array[TerminalShop::Models::ProductAPI],
|
128
137
|
profile: TerminalShop::Models::ProfileAPI,
|
138
|
+
region: Symbol,
|
129
139
|
subscriptions: T::Array[TerminalShop::Models::SubscriptionAPI],
|
130
140
|
tokens: T::Array[TerminalShop::Models::TokenAPI]
|
131
141
|
}
|
@@ -133,6 +143,19 @@ module TerminalShop
|
|
133
143
|
end
|
134
144
|
def to_hash
|
135
145
|
end
|
146
|
+
|
147
|
+
class Region < TerminalShop::Enum
|
148
|
+
abstract!
|
149
|
+
|
150
|
+
NA = :na
|
151
|
+
EU = :eu
|
152
|
+
|
153
|
+
class << self
|
154
|
+
sig { override.returns(T::Array[Symbol]) }
|
155
|
+
def values
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
136
159
|
end
|
137
160
|
end
|
138
161
|
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
|
@@ -67,8 +67,7 @@ module TerminalShop
|
|
67
67
|
color: String,
|
68
68
|
featured: bool,
|
69
69
|
market_eu: bool,
|
70
|
-
market_na: bool
|
71
|
-
type: String
|
70
|
+
market_na: bool
|
72
71
|
}
|
73
72
|
|
74
73
|
class Tags < TerminalShop::BaseModel
|
@@ -92,18 +91,13 @@ module TerminalShop
|
|
92
91
|
|
93
92
|
def market_na=: (bool) -> bool
|
94
93
|
|
95
|
-
attr_reader type: String?
|
96
|
-
|
97
|
-
def type=: (String) -> String
|
98
|
-
|
99
94
|
def initialize:
|
100
95
|
(
|
101
96
|
app: String,
|
102
97
|
color: String,
|
103
98
|
featured: bool,
|
104
99
|
market_eu: bool,
|
105
|
-
market_na: bool
|
106
|
-
type: String
|
100
|
+
market_na: bool
|
107
101
|
) -> void
|
108
102
|
| (
|
109
103
|
?TerminalShop::Models::ProductAPI::tags
|
@@ -24,6 +24,7 @@ module TerminalShop
|
|
24
24
|
orders: ::Array[TerminalShop::Models::OrderAPI],
|
25
25
|
products: ::Array[TerminalShop::Models::ProductAPI],
|
26
26
|
profile: TerminalShop::Models::ProfileAPI,
|
27
|
+
region: TerminalShop::Models::ViewInitResponse::Data::region,
|
27
28
|
subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI],
|
28
29
|
tokens: ::Array[TerminalShop::Models::TokenAPI]
|
29
30
|
}
|
@@ -43,6 +44,8 @@ module TerminalShop
|
|
43
44
|
|
44
45
|
attr_accessor profile: TerminalShop::Models::ProfileAPI
|
45
46
|
|
47
|
+
attr_accessor region: TerminalShop::Models::ViewInitResponse::Data::region
|
48
|
+
|
46
49
|
attr_accessor subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI]
|
47
50
|
|
48
51
|
attr_accessor tokens: ::Array[TerminalShop::Models::TokenAPI]
|
@@ -56,6 +59,7 @@ module TerminalShop
|
|
56
59
|
orders: ::Array[TerminalShop::Models::OrderAPI],
|
57
60
|
products: ::Array[TerminalShop::Models::ProductAPI],
|
58
61
|
profile: TerminalShop::Models::ProfileAPI,
|
62
|
+
region: TerminalShop::Models::ViewInitResponse::Data::region,
|
59
63
|
subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI],
|
60
64
|
tokens: ::Array[TerminalShop::Models::TokenAPI]
|
61
65
|
) -> void
|
@@ -65,6 +69,15 @@ module TerminalShop
|
|
65
69
|
) -> void
|
66
70
|
|
67
71
|
def to_hash: -> TerminalShop::Models::ViewInitResponse::data
|
72
|
+
|
73
|
+
type region = :na | :eu
|
74
|
+
|
75
|
+
class Region < TerminalShop::Enum
|
76
|
+
NA: :na
|
77
|
+
EU: :eu
|
78
|
+
|
79
|
+
def self.values: -> ::Array[TerminalShop::Models::ViewInitResponse::Data::region]
|
80
|
+
end
|
68
81
|
end
|
69
82
|
end
|
70
83
|
end
|
@@ -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.5.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
|