terminal-shop 0.1.0.pre.alpha.10 → 0.1.0.pre.alpha.12
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 +1 -1
- data/lib/terminal-shop/base_client.rb +165 -137
- data/lib/terminal-shop/base_model.rb +2 -4
- data/lib/terminal-shop/base_page.rb +2 -6
- data/lib/terminal-shop/client.rb +0 -1
- data/lib/terminal-shop/models/address.rb +0 -11
- data/lib/terminal-shop/models/address_create_response.rb +0 -6
- data/lib/terminal-shop/models/address_delete_response.rb +0 -6
- data/lib/terminal-shop/models/address_list_response.rb +0 -6
- data/lib/terminal-shop/models/app.rb +8 -9
- data/lib/terminal-shop/models/app_create_response.rb +0 -13
- data/lib/terminal-shop/models/app_delete_response.rb +0 -6
- data/lib/terminal-shop/models/app_get_response.rb +0 -6
- data/lib/terminal-shop/models/app_list_response.rb +0 -6
- data/lib/terminal-shop/models/card.rb +0 -16
- data/lib/terminal-shop/models/card_collect_response.rb +0 -12
- data/lib/terminal-shop/models/card_create_response.rb +0 -6
- data/lib/terminal-shop/models/card_delete_response.rb +0 -6
- data/lib/terminal-shop/models/card_list_response.rb +0 -6
- data/lib/terminal-shop/models/cart.rb +0 -33
- data/lib/terminal-shop/models/cart_convert_response.rb +0 -6
- data/lib/terminal-shop/models/cart_get_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_address_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_card_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_item_response.rb +0 -6
- data/lib/terminal-shop/models/email_create_response.rb +0 -6
- data/lib/terminal-shop/models/order.rb +0 -46
- data/lib/terminal-shop/models/order_get_response.rb +0 -6
- data/lib/terminal-shop/models/order_list_response.rb +0 -6
- data/lib/terminal-shop/models/product.rb +0 -11
- data/lib/terminal-shop/models/product_list_response.rb +0 -6
- data/lib/terminal-shop/models/product_variant.rb +0 -8
- data/lib/terminal-shop/models/profile.rb +0 -16
- data/lib/terminal-shop/models/profile_me_response.rb +0 -6
- data/lib/terminal-shop/models/profile_update_response.rb +0 -6
- data/lib/terminal-shop/models/subscription.rb +1 -66
- data/lib/terminal-shop/models/subscription_create_response.rb +0 -6
- data/lib/terminal-shop/models/subscription_delete_response.rb +0 -6
- data/lib/terminal-shop/models/subscription_list_response.rb +0 -6
- data/lib/terminal-shop/models/token.rb +6 -37
- data/lib/terminal-shop/models/token_create_response.rb +0 -13
- data/lib/terminal-shop/models/token_delete_response.rb +0 -6
- data/lib/terminal-shop/models/token_get_response.rb +0 -6
- data/lib/terminal-shop/models/token_list_response.rb +0 -6
- data/lib/terminal-shop/models/view_init_response.rb +0 -17
- data/lib/terminal-shop/pooled_net_requester.rb +127 -82
- data/lib/terminal-shop/resources/app.rb +2 -0
- data/lib/terminal-shop/resources/subscription.rb +0 -2
- data/lib/terminal-shop/util.rb +64 -7
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +56 -55
- data/manifest.yaml +1 -0
- data/rbi/lib/terminal-shop/base_client.rbi +41 -27
- data/rbi/lib/terminal-shop/base_model.rbi +63 -99
- data/rbi/lib/terminal-shop/base_page.rbi +4 -3
- data/rbi/lib/terminal-shop/client.rbi +2 -1
- data/rbi/lib/terminal-shop/errors.rbi +10 -5
- data/rbi/lib/terminal-shop/models/address.rbi +16 -14
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +16 -14
- data/rbi/lib/terminal-shop/models/address_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/app.rbi +11 -3
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/app_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/card.rbi +5 -17
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/card_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/cart.rbi +16 -15
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +2 -1
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +8 -8
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/order.rbi +43 -44
- data/rbi/lib/terminal-shop/models/order_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/product.rbi +17 -14
- data/rbi/lib/terminal-shop/models/product_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/profile.rbi +13 -13
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +6 -8
- data/rbi/lib/terminal-shop/models/subscription.rbi +29 -59
- data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/token.rbi +7 -25
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +26 -34
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +38 -0
- data/rbi/lib/terminal-shop/request_options.rbi +6 -24
- data/rbi/lib/terminal-shop/resources/address.rbi +6 -11
- data/rbi/lib/terminal-shop/resources/app.rbi +10 -13
- data/rbi/lib/terminal-shop/resources/card.rbi +8 -20
- data/rbi/lib/terminal-shop/resources/cart.rbi +10 -21
- data/rbi/lib/terminal-shop/resources/email.rbi +2 -1
- data/rbi/lib/terminal-shop/resources/order.rbi +4 -10
- data/rbi/lib/terminal-shop/resources/product.rbi +2 -9
- data/rbi/lib/terminal-shop/resources/profile.rbi +4 -10
- data/rbi/lib/terminal-shop/resources/subscription.rbi +6 -13
- data/rbi/lib/terminal-shop/resources/token.rbi +8 -20
- data/rbi/lib/terminal-shop/resources/view.rbi +2 -9
- data/rbi/lib/terminal-shop/util.rbi +33 -23
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/base_client.rbs +28 -27
- data/sig/terminal-shop/base_model.rbs +0 -2
- data/sig/terminal-shop/base_page.rbs +1 -1
- data/sig/terminal-shop/models/app.rbs +5 -2
- data/sig/terminal-shop/models/subscription.rbs +0 -16
- data/sig/terminal-shop/models/token.rbs +3 -22
- data/sig/terminal-shop/pooled_net_requester.rbs +32 -0
- data/sig/terminal-shop/resources/app.rbs +1 -0
- data/sig/terminal-shop/resources/subscription.rbs +0 -1
- data/sig/terminal-shop/util.rbs +11 -1
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +5 -3
@@ -2,15 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# card_api => {
|
8
|
-
# id: String,
|
9
|
-
# brand: String,
|
10
|
-
# expiration: TerminalShop::Models::CardAPI::Expiration,
|
11
|
-
# last4: String
|
12
|
-
# }
|
13
|
-
# ```
|
14
5
|
class CardAPI < TerminalShop::BaseModel
|
15
6
|
# @!attribute id
|
16
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -48,13 +39,6 @@ module TerminalShop
|
|
48
39
|
|
49
40
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
50
41
|
|
51
|
-
# @example
|
52
|
-
# ```ruby
|
53
|
-
# expiration => {
|
54
|
-
# month: Integer,
|
55
|
-
# year: Integer
|
56
|
-
# }
|
57
|
-
# ```
|
58
42
|
class Expiration < TerminalShop::BaseModel
|
59
43
|
# @!attribute month
|
60
44
|
# Expiration month of the card.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# card_collect_response => {
|
8
|
-
# data: TerminalShop::Models::CardCollectResponse::Data
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class CardCollectResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# URL for collecting card information.
|
@@ -22,12 +16,6 @@ module TerminalShop
|
|
22
16
|
|
23
17
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
24
18
|
|
25
|
-
# @example
|
26
|
-
# ```ruby
|
27
|
-
# data => {
|
28
|
-
# url: String
|
29
|
-
# }
|
30
|
-
# ```
|
31
19
|
class Data < TerminalShop::BaseModel
|
32
20
|
# @!attribute url
|
33
21
|
# Temporary URL that allows a user to enter credit card details over https at
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# card_list_response => {
|
8
|
-
# data: -> { TerminalShop::ArrayOf[TerminalShop::Models::CardAPI] === _1 }
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class CardListResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# List of cards associated with the user.
|
@@ -2,16 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# cart_api => {
|
8
|
-
# amount: TerminalShop::Models::CartAPI::Amount,
|
9
|
-
# items: -> { TerminalShop::ArrayOf[TerminalShop::Models::CartAPI::Item] === _1 },
|
10
|
-
# subtotal: Integer,
|
11
|
-
# address_id: String,
|
12
|
-
# card_id: String
|
13
|
-
# }
|
14
|
-
# ```
|
15
5
|
class CartAPI < TerminalShop::BaseModel
|
16
6
|
# @!attribute amount
|
17
7
|
# The subtotal and shipping amounts for the current user's cart.
|
@@ -75,13 +65,6 @@ module TerminalShop
|
|
75
65
|
|
76
66
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
77
67
|
|
78
|
-
# @example
|
79
|
-
# ```ruby
|
80
|
-
# amount => {
|
81
|
-
# subtotal: Integer,
|
82
|
-
# shipping: Integer
|
83
|
-
# }
|
84
|
-
# ```
|
85
68
|
class Amount < TerminalShop::BaseModel
|
86
69
|
# @!attribute subtotal
|
87
70
|
# Subtotal of the current user's cart, in cents (USD).
|
@@ -110,15 +93,6 @@ module TerminalShop
|
|
110
93
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
111
94
|
end
|
112
95
|
|
113
|
-
# @example
|
114
|
-
# ```ruby
|
115
|
-
# item => {
|
116
|
-
# id: String,
|
117
|
-
# product_variant_id: String,
|
118
|
-
# quantity: Integer,
|
119
|
-
# subtotal: Integer
|
120
|
-
# }
|
121
|
-
# ```
|
122
96
|
class Item < TerminalShop::BaseModel
|
123
97
|
# @!attribute id
|
124
98
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -157,13 +131,6 @@ module TerminalShop
|
|
157
131
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
158
132
|
end
|
159
133
|
|
160
|
-
# @example
|
161
|
-
# ```ruby
|
162
|
-
# shipping => {
|
163
|
-
# service: String,
|
164
|
-
# timeframe: String
|
165
|
-
# }
|
166
|
-
# ```
|
167
134
|
class Shipping < TerminalShop::BaseModel
|
168
135
|
# @!attribute [r] service
|
169
136
|
# Shipping service name.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# cart_convert_response => {
|
8
|
-
# data: TerminalShop::Models::OrderAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class CartConvertResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# An order from the Terminal shop.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# cart_get_response => {
|
8
|
-
# data: TerminalShop::Models::CartAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class CartGetResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# The current Terminal shop user's cart.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# cart_set_item_response => {
|
8
|
-
# data: TerminalShop::Models::CartAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class CartSetItemResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# The current Terminal shop user's cart.
|
@@ -2,16 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# order_api => {
|
8
|
-
# id: String,
|
9
|
-
# amount: TerminalShop::Models::OrderAPI::Amount,
|
10
|
-
# items: -> { TerminalShop::ArrayOf[TerminalShop::Models::OrderAPI::Item] === _1 },
|
11
|
-
# shipping: TerminalShop::Models::OrderAPI::Shipping,
|
12
|
-
# tracking: TerminalShop::Models::OrderAPI::Tracking
|
13
|
-
# }
|
14
|
-
# ```
|
15
5
|
class OrderAPI < TerminalShop::BaseModel
|
16
6
|
# @!attribute id
|
17
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -67,13 +57,6 @@ module TerminalShop
|
|
67
57
|
|
68
58
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
69
59
|
|
70
|
-
# @example
|
71
|
-
# ```ruby
|
72
|
-
# amount => {
|
73
|
-
# shipping: Integer,
|
74
|
-
# subtotal: Integer
|
75
|
-
# }
|
76
|
-
# ```
|
77
60
|
class Amount < TerminalShop::BaseModel
|
78
61
|
# @!attribute shipping
|
79
62
|
# Shipping amount of the order, in cents (USD).
|
@@ -98,16 +81,6 @@ module TerminalShop
|
|
98
81
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
99
82
|
end
|
100
83
|
|
101
|
-
# @example
|
102
|
-
# ```ruby
|
103
|
-
# item => {
|
104
|
-
# id: String,
|
105
|
-
# amount: Integer,
|
106
|
-
# quantity: Integer,
|
107
|
-
# description: String,
|
108
|
-
# product_variant_id: String
|
109
|
-
# }
|
110
|
-
# ```
|
111
84
|
class Item < TerminalShop::BaseModel
|
112
85
|
# @!attribute id
|
113
86
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -159,17 +132,6 @@ module TerminalShop
|
|
159
132
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
160
133
|
end
|
161
134
|
|
162
|
-
# @example
|
163
|
-
# ```ruby
|
164
|
-
# shipping => {
|
165
|
-
# city: String,
|
166
|
-
# country: String,
|
167
|
-
# name: String,
|
168
|
-
# street1: String,
|
169
|
-
# zip: String,
|
170
|
-
# **_
|
171
|
-
# }
|
172
|
-
# ```
|
173
135
|
class Shipping < TerminalShop::BaseModel
|
174
136
|
# @!attribute city
|
175
137
|
# City of the address.
|
@@ -248,14 +210,6 @@ module TerminalShop
|
|
248
210
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
249
211
|
end
|
250
212
|
|
251
|
-
# @example
|
252
|
-
# ```ruby
|
253
|
-
# tracking => {
|
254
|
-
# number: String,
|
255
|
-
# service: String,
|
256
|
-
# url: String
|
257
|
-
# }
|
258
|
-
# ```
|
259
213
|
class Tracking < TerminalShop::BaseModel
|
260
214
|
# @!attribute [r] number
|
261
215
|
# Tracking number of the order.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# order_get_response => {
|
8
|
-
# data: TerminalShop::Models::OrderAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class OrderGetResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# An order from the Terminal shop.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# order_list_response => {
|
8
|
-
# data: -> { TerminalShop::ArrayOf[TerminalShop::Models::OrderAPI] === _1 }
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class OrderListResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# List of orders.
|
@@ -2,17 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# product_api => {
|
8
|
-
# id: String,
|
9
|
-
# description: String,
|
10
|
-
# filters: -> { TerminalShop::ArrayOf[enum: TerminalShop::Models::ProductAPI::Filter] === _1 },
|
11
|
-
# name: String,
|
12
|
-
# variants: -> { TerminalShop::ArrayOf[TerminalShop::Models::ProductVariant] === _1 },
|
13
|
-
# **_
|
14
|
-
# }
|
15
|
-
# ```
|
16
5
|
class ProductAPI < TerminalShop::BaseModel
|
17
6
|
# @!attribute id
|
18
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# product_list_response => {
|
8
|
-
# data: -> { TerminalShop::ArrayOf[TerminalShop::Models::ProductAPI] === _1 }
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class ProductListResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# A list of products.
|
@@ -2,14 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# product_variant => {
|
8
|
-
# id: String,
|
9
|
-
# name: String,
|
10
|
-
# price: Integer
|
11
|
-
# }
|
12
|
-
# ```
|
13
5
|
class ProductVariant < TerminalShop::BaseModel
|
14
6
|
# @!attribute id
|
15
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# profile_api => {
|
8
|
-
# user: TerminalShop::Models::ProfileAPI::User
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class ProfileAPI < TerminalShop::BaseModel
|
12
6
|
# @!attribute user
|
13
7
|
# A Terminal shop user. (We have users, btw.)
|
@@ -24,16 +18,6 @@ module TerminalShop
|
|
24
18
|
|
25
19
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
26
20
|
|
27
|
-
# @example
|
28
|
-
# ```ruby
|
29
|
-
# user => {
|
30
|
-
# id: String,
|
31
|
-
# email: String,
|
32
|
-
# fingerprint: String,
|
33
|
-
# name: String,
|
34
|
-
# stripe_customer_id: String
|
35
|
-
# }
|
36
|
-
# ```
|
37
21
|
class User < TerminalShop::BaseModel
|
38
22
|
# @!attribute id
|
39
23
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# profile_me_response => {
|
8
|
-
# data: TerminalShop::Models::ProfileAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class ProfileMeResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# A Terminal shop user's profile. (We have users, btw.)
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# profile_update_response => {
|
8
|
-
# data: TerminalShop::Models::ProfileAPI
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class ProfileUpdateResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# A Terminal shop user's profile. (We have users, btw.)
|
@@ -2,17 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# subscription_api => {
|
8
|
-
# id: String,
|
9
|
-
# address_id: String,
|
10
|
-
# card_id: String,
|
11
|
-
# frequency: TerminalShop::Models::SubscriptionAPI::Frequency,
|
12
|
-
# product_variant_id: String,
|
13
|
-
# **_
|
14
|
-
# }
|
15
|
-
# ```
|
16
5
|
class SubscriptionAPI < TerminalShop::BaseModel
|
17
6
|
# @!attribute id
|
18
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -32,12 +21,6 @@ module TerminalShop
|
|
32
21
|
# @return [String]
|
33
22
|
required :card_id, String, api_name: :cardID
|
34
23
|
|
35
|
-
# @!attribute frequency
|
36
|
-
# Frequency of the subscription.
|
37
|
-
#
|
38
|
-
# @return [Symbol, TerminalShop::Models::SubscriptionAPI::Frequency]
|
39
|
-
required :frequency, enum: -> { TerminalShop::Models::SubscriptionAPI::Frequency }
|
40
|
-
|
41
24
|
# @!attribute product_variant_id
|
42
25
|
# ID of the product variant being subscribed to.
|
43
26
|
#
|
@@ -76,50 +59,15 @@ module TerminalShop
|
|
76
59
|
# # @param id [String]
|
77
60
|
# # @param address_id [String]
|
78
61
|
# # @param card_id [String]
|
79
|
-
# # @param frequency [Symbol, TerminalShop::Models::SubscriptionAPI::Frequency]
|
80
62
|
# # @param product_variant_id [String]
|
81
63
|
# # @param quantity [Integer]
|
82
64
|
# # @param next_ [String]
|
83
65
|
# # @param schedule [TerminalShop::Models::SubscriptionAPI::Schedule::Fixed, TerminalShop::Models::SubscriptionAPI::Schedule::Weekly]
|
84
66
|
# #
|
85
|
-
# def initialize(id:, address_id:, card_id:,
|
67
|
+
# def initialize(id:, address_id:, card_id:, product_variant_id:, quantity:, next_: nil, schedule: nil, **) = super
|
86
68
|
|
87
69
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
88
70
|
|
89
|
-
# @abstract
|
90
|
-
#
|
91
|
-
# Frequency of the subscription.
|
92
|
-
#
|
93
|
-
# @example
|
94
|
-
# ```ruby
|
95
|
-
# case frequency
|
96
|
-
# in :fixed
|
97
|
-
# # ...
|
98
|
-
# in :daily
|
99
|
-
# # ...
|
100
|
-
# in :weekly
|
101
|
-
# # ...
|
102
|
-
# in :monthly
|
103
|
-
# # ...
|
104
|
-
# in :yearly
|
105
|
-
# # ...
|
106
|
-
# end
|
107
|
-
# ```
|
108
|
-
class Frequency < TerminalShop::Enum
|
109
|
-
FIXED = :fixed
|
110
|
-
DAILY = :daily
|
111
|
-
WEEKLY = :weekly
|
112
|
-
MONTHLY = :monthly
|
113
|
-
YEARLY = :yearly
|
114
|
-
|
115
|
-
finalize!
|
116
|
-
|
117
|
-
# @!parse
|
118
|
-
# # @return [Array<Symbol>]
|
119
|
-
# #
|
120
|
-
# def self.values; end
|
121
|
-
end
|
122
|
-
|
123
71
|
# @abstract
|
124
72
|
#
|
125
73
|
# Schedule of the subscription.
|
@@ -138,12 +86,6 @@ module TerminalShop
|
|
138
86
|
|
139
87
|
variant -> { TerminalShop::Models::SubscriptionAPI::Schedule::Weekly }
|
140
88
|
|
141
|
-
# @example
|
142
|
-
# ```ruby
|
143
|
-
# fixed => {
|
144
|
-
# type: :fixed
|
145
|
-
# }
|
146
|
-
# ```
|
147
89
|
class Fixed < TerminalShop::BaseModel
|
148
90
|
# @!attribute type
|
149
91
|
#
|
@@ -158,13 +100,6 @@ module TerminalShop
|
|
158
100
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
159
101
|
end
|
160
102
|
|
161
|
-
# @example
|
162
|
-
# ```ruby
|
163
|
-
# weekly => {
|
164
|
-
# interval: Integer,
|
165
|
-
# type: :weekly
|
166
|
-
# }
|
167
|
-
# ```
|
168
103
|
class Weekly < TerminalShop::BaseModel
|
169
104
|
# @!attribute interval
|
170
105
|
#
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# subscription_list_response => {
|
8
|
-
# data: -> { TerminalShop::ArrayOf[TerminalShop::Models::SubscriptionAPI] === _1 }
|
9
|
-
# }
|
10
|
-
# ```
|
11
5
|
class SubscriptionListResponse < TerminalShop::BaseModel
|
12
6
|
# @!attribute data
|
13
7
|
# List of subscriptions.
|
@@ -2,14 +2,6 @@
|
|
2
2
|
|
3
3
|
module TerminalShop
|
4
4
|
module Models
|
5
|
-
# @example
|
6
|
-
# ```ruby
|
7
|
-
# token_api => {
|
8
|
-
# id: String,
|
9
|
-
# token: String,
|
10
|
-
# time: TerminalShop::Models::TokenAPI::Time
|
11
|
-
# }
|
12
|
-
# ```
|
13
5
|
class TokenAPI < TerminalShop::BaseModel
|
14
6
|
# @!attribute id
|
15
7
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -23,11 +15,11 @@ module TerminalShop
|
|
23
15
|
# @return [String]
|
24
16
|
required :token, String
|
25
17
|
|
26
|
-
# @!attribute
|
27
|
-
#
|
18
|
+
# @!attribute created
|
19
|
+
# The created time for the token.
|
28
20
|
#
|
29
|
-
# @return [
|
30
|
-
required :
|
21
|
+
# @return [String]
|
22
|
+
required :created, String
|
31
23
|
|
32
24
|
# @!parse
|
33
25
|
# # A personal access token used to access the Terminal API. If you leak this,
|
@@ -35,34 +27,11 @@ module TerminalShop
|
|
35
27
|
# #
|
36
28
|
# # @param id [String]
|
37
29
|
# # @param token [String]
|
38
|
-
# # @param
|
30
|
+
# # @param created [String]
|
39
31
|
# #
|
40
|
-
# def initialize(id:, token:,
|
32
|
+
# def initialize(id:, token:, created:, **) = super
|
41
33
|
|
42
34
|
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
43
|
-
|
44
|
-
# @example
|
45
|
-
# ```ruby
|
46
|
-
# time => {
|
47
|
-
# created: String
|
48
|
-
# }
|
49
|
-
# ```
|
50
|
-
class Time < TerminalShop::BaseModel
|
51
|
-
# @!attribute created
|
52
|
-
# The created time for the token.
|
53
|
-
#
|
54
|
-
# @return [String]
|
55
|
-
required :created, String
|
56
|
-
|
57
|
-
# @!parse
|
58
|
-
# # Relevant timestamps for the token.
|
59
|
-
# #
|
60
|
-
# # @param created [String]
|
61
|
-
# #
|
62
|
-
# def initialize(created:, **) = super
|
63
|
-
|
64
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
65
|
-
end
|
66
35
|
end
|
67
36
|
end
|
68
37
|
end
|