terminal-shop 3.5.0 → 3.6.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.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +5 -5
  4. data/lib/terminal_shop/errors.rb +9 -9
  5. data/lib/terminal_shop/internal/transport/base_client.rb +3 -3
  6. data/lib/terminal_shop/internal/type/base_model.rb +1 -9
  7. data/lib/terminal_shop/internal/type/boolean.rb +10 -11
  8. data/lib/terminal_shop/internal/type/enum.rb +10 -11
  9. data/lib/terminal_shop/internal/type/request_parameters.rb +2 -8
  10. data/lib/terminal_shop/internal/type/unknown.rb +10 -11
  11. data/lib/terminal_shop/internal/util.rb +20 -4
  12. data/lib/terminal_shop/models.rb +99 -0
  13. data/lib/terminal_shop/request_options.rb +4 -5
  14. data/lib/terminal_shop/version.rb +1 -1
  15. data/rbi/{lib/terminal_shop → terminal_shop}/errors.rbi +1 -1
  16. data/rbi/{lib/terminal_shop → terminal_shop}/internal/transport/base_client.rbi +2 -2
  17. data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/request_parameters.rbi +1 -1
  18. data/rbi/{lib/terminal_shop → terminal_shop}/internal/util.rbi +5 -1
  19. data/rbi/terminal_shop/models.rbi +99 -0
  20. data/rbi/{lib/terminal_shop → terminal_shop}/request_options.rbi +2 -0
  21. data/rbi/{lib/terminal_shop → terminal_shop}/resources/address.rbi +4 -20
  22. data/rbi/{lib/terminal_shop → terminal_shop}/resources/app.rbi +4 -24
  23. data/rbi/{lib/terminal_shop → terminal_shop}/resources/card.rbi +5 -34
  24. data/rbi/{lib/terminal_shop → terminal_shop}/resources/cart.rbi +6 -46
  25. data/rbi/{lib/terminal_shop → terminal_shop}/resources/email.rbi +1 -4
  26. data/rbi/{lib/terminal_shop → terminal_shop}/resources/order.rbi +3 -16
  27. data/rbi/{lib/terminal_shop → terminal_shop}/resources/product.rbi +2 -15
  28. data/rbi/{lib/terminal_shop → terminal_shop}/resources/profile.rbi +2 -16
  29. data/rbi/{lib/terminal_shop → terminal_shop}/resources/subscription.rbi +5 -21
  30. data/rbi/{lib/terminal_shop → terminal_shop}/resources/token.rbi +4 -30
  31. data/rbi/{lib/terminal_shop → terminal_shop}/resources/view.rbi +1 -11
  32. data/sig/terminal_shop/internal/util.rbs +2 -0
  33. data/sig/terminal_shop/models.rbs +97 -0
  34. metadata +123 -120
  35. /data/rbi/{lib/terminal_shop → terminal_shop}/client.rbi +0 -0
  36. /data/rbi/{lib/terminal_shop → terminal_shop}/file_part.rbi +0 -0
  37. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/transport/pooled_net_requester.rbi +0 -0
  38. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/array_of.rbi +0 -0
  39. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/base_model.rbi +0 -0
  40. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/base_page.rbi +0 -0
  41. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/boolean.rbi +0 -0
  42. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/converter.rbi +0 -0
  43. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/enum.rbi +0 -0
  44. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/file_input.rbi +0 -0
  45. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/hash_of.rbi +0 -0
  46. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/union.rbi +0 -0
  47. /data/rbi/{lib/terminal_shop → terminal_shop}/internal/type/unknown.rbi +0 -0
  48. /data/rbi/{lib/terminal_shop → terminal_shop}/internal.rbi +0 -0
  49. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address.rbi +0 -0
  50. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_create_params.rbi +0 -0
  51. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_create_response.rbi +0 -0
  52. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_delete_params.rbi +0 -0
  53. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_delete_response.rbi +0 -0
  54. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_get_params.rbi +0 -0
  55. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_get_response.rbi +0 -0
  56. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_list_params.rbi +0 -0
  57. /data/rbi/{lib/terminal_shop → terminal_shop}/models/address_list_response.rbi +0 -0
  58. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app.rbi +0 -0
  59. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_create_params.rbi +0 -0
  60. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_create_response.rbi +0 -0
  61. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_delete_params.rbi +0 -0
  62. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_delete_response.rbi +0 -0
  63. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_get_params.rbi +0 -0
  64. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_get_response.rbi +0 -0
  65. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_list_params.rbi +0 -0
  66. /data/rbi/{lib/terminal_shop → terminal_shop}/models/app_list_response.rbi +0 -0
  67. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card.rbi +0 -0
  68. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_collect_params.rbi +0 -0
  69. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_collect_response.rbi +0 -0
  70. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_create_params.rbi +0 -0
  71. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_create_response.rbi +0 -0
  72. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_delete_params.rbi +0 -0
  73. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_delete_response.rbi +0 -0
  74. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_get_params.rbi +0 -0
  75. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_get_response.rbi +0 -0
  76. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_list_params.rbi +0 -0
  77. /data/rbi/{lib/terminal_shop → terminal_shop}/models/card_list_response.rbi +0 -0
  78. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart.rbi +0 -0
  79. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_clear_params.rbi +0 -0
  80. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_clear_response.rbi +0 -0
  81. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_convert_params.rbi +0 -0
  82. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_convert_response.rbi +0 -0
  83. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_get_params.rbi +0 -0
  84. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_get_response.rbi +0 -0
  85. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_address_params.rbi +0 -0
  86. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_address_response.rbi +0 -0
  87. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_card_params.rbi +0 -0
  88. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_card_response.rbi +0 -0
  89. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_item_params.rbi +0 -0
  90. /data/rbi/{lib/terminal_shop → terminal_shop}/models/cart_set_item_response.rbi +0 -0
  91. /data/rbi/{lib/terminal_shop → terminal_shop}/models/email_create_params.rbi +0 -0
  92. /data/rbi/{lib/terminal_shop → terminal_shop}/models/email_create_response.rbi +0 -0
  93. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order.rbi +0 -0
  94. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_create_params.rbi +0 -0
  95. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_create_response.rbi +0 -0
  96. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_get_params.rbi +0 -0
  97. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_get_response.rbi +0 -0
  98. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_list_params.rbi +0 -0
  99. /data/rbi/{lib/terminal_shop → terminal_shop}/models/order_list_response.rbi +0 -0
  100. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product.rbi +0 -0
  101. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product_get_params.rbi +0 -0
  102. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product_get_response.rbi +0 -0
  103. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product_list_params.rbi +0 -0
  104. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product_list_response.rbi +0 -0
  105. /data/rbi/{lib/terminal_shop → terminal_shop}/models/product_variant.rbi +0 -0
  106. /data/rbi/{lib/terminal_shop → terminal_shop}/models/profile.rbi +0 -0
  107. /data/rbi/{lib/terminal_shop → terminal_shop}/models/profile_me_params.rbi +0 -0
  108. /data/rbi/{lib/terminal_shop → terminal_shop}/models/profile_me_response.rbi +0 -0
  109. /data/rbi/{lib/terminal_shop → terminal_shop}/models/profile_update_params.rbi +0 -0
  110. /data/rbi/{lib/terminal_shop → terminal_shop}/models/profile_update_response.rbi +0 -0
  111. /data/rbi/{lib/terminal_shop → terminal_shop}/models/region.rbi +0 -0
  112. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription.rbi +0 -0
  113. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_create_params.rbi +0 -0
  114. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_create_response.rbi +0 -0
  115. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_delete_params.rbi +0 -0
  116. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_delete_response.rbi +0 -0
  117. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_get_params.rbi +0 -0
  118. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_get_response.rbi +0 -0
  119. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_list_params.rbi +0 -0
  120. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_list_response.rbi +0 -0
  121. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_update_params.rbi +0 -0
  122. /data/rbi/{lib/terminal_shop → terminal_shop}/models/subscription_update_response.rbi +0 -0
  123. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token.rbi +0 -0
  124. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_create_params.rbi +0 -0
  125. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_create_response.rbi +0 -0
  126. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_delete_params.rbi +0 -0
  127. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_delete_response.rbi +0 -0
  128. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_get_params.rbi +0 -0
  129. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_get_response.rbi +0 -0
  130. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_list_params.rbi +0 -0
  131. /data/rbi/{lib/terminal_shop → terminal_shop}/models/token_list_response.rbi +0 -0
  132. /data/rbi/{lib/terminal_shop → terminal_shop}/models/view_init_params.rbi +0 -0
  133. /data/rbi/{lib/terminal_shop → terminal_shop}/models/view_init_response.rbi +0 -0
  134. /data/rbi/{lib/terminal_shop → terminal_shop}/version.rbi +0 -0
@@ -5,35 +5,18 @@ module TerminalShop
5
5
  class App
6
6
  # Create an app.
7
7
  sig do
8
- params(
9
- name: String,
10
- redirect_uri: String,
11
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
12
- )
8
+ params(name: String, redirect_uri: String, request_options: TerminalShop::RequestOpts)
13
9
  .returns(TerminalShop::Models::AppCreateResponse)
14
10
  end
15
11
  def create(name:, redirect_uri:, request_options: {}); end
16
12
 
17
13
  # List the current user's registered apps.
18
- sig do
19
- params(
20
- request_options: T.nilable(
21
- T.any(
22
- TerminalShop::RequestOptions,
23
- TerminalShop::Internal::AnyHash
24
- )
25
- )
26
- )
27
- .returns(TerminalShop::Models::AppListResponse)
28
- end
14
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::AppListResponse) }
29
15
  def list(request_options: {}); end
30
16
 
31
17
  # Delete the app with the given ID.
32
18
  sig do
33
- params(
34
- id: String,
35
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
36
- )
19
+ params(id: String, request_options: TerminalShop::RequestOpts)
37
20
  .returns(TerminalShop::Models::AppDeleteResponse)
38
21
  end
39
22
  def delete(
@@ -43,10 +26,7 @@ module TerminalShop
43
26
  ); end
44
27
  # Get the app with the given ID.
45
28
  sig do
46
- params(
47
- id: String,
48
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
49
- )
29
+ params(id: String, request_options: TerminalShop::RequestOpts)
50
30
  .returns(TerminalShop::Models::AppGetResponse)
51
31
  end
52
32
  def get(
@@ -5,10 +5,7 @@ module TerminalShop
5
5
  class Card
6
6
  # Attach a credit card (tokenized via Stripe) to the current user.
7
7
  sig do
8
- params(
9
- token: String,
10
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
11
- )
8
+ params(token: String, request_options: TerminalShop::RequestOpts)
12
9
  .returns(TerminalShop::Models::CardCreateResponse)
13
10
  end
14
11
  def create(
@@ -18,25 +15,12 @@ module TerminalShop
18
15
  request_options: {}
19
16
  ); end
20
17
  # List the credit cards associated with the current user.
21
- sig do
22
- params(
23
- request_options: T.nilable(
24
- T.any(
25
- TerminalShop::RequestOptions,
26
- TerminalShop::Internal::AnyHash
27
- )
28
- )
29
- )
30
- .returns(TerminalShop::Models::CardListResponse)
31
- end
18
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::CardListResponse) }
32
19
  def list(request_options: {}); end
33
20
 
34
21
  # Delete a credit card associated with the current user.
35
22
  sig do
36
- params(
37
- id: String,
38
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
39
- )
23
+ params(id: String, request_options: TerminalShop::RequestOpts)
40
24
  .returns(TerminalShop::Models::CardDeleteResponse)
41
25
  end
42
26
  def delete(
@@ -46,25 +30,12 @@ module TerminalShop
46
30
  ); end
47
31
  # Create a temporary URL for collecting credit card information for the current
48
32
  # user.
49
- sig do
50
- params(
51
- request_options: T.nilable(
52
- T.any(
53
- TerminalShop::RequestOptions,
54
- TerminalShop::Internal::AnyHash
55
- )
56
- )
57
- )
58
- .returns(TerminalShop::Models::CardCollectResponse)
59
- end
33
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::CardCollectResponse) }
60
34
  def collect(request_options: {}); end
61
35
 
62
36
  # Get a credit card by ID associated with the current user.
63
37
  sig do
64
- params(
65
- id: String,
66
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
67
- )
38
+ params(id: String, request_options: TerminalShop::RequestOpts)
68
39
  .returns(TerminalShop::Models::CardGetResponse)
69
40
  end
70
41
  def get(
@@ -4,53 +4,20 @@ module TerminalShop
4
4
  module Resources
5
5
  class Cart
6
6
  # Clear the current user's cart.
7
- sig do
8
- params(
9
- request_options: T.nilable(
10
- T.any(
11
- TerminalShop::RequestOptions,
12
- TerminalShop::Internal::AnyHash
13
- )
14
- )
15
- )
16
- .returns(TerminalShop::Models::CartClearResponse)
17
- end
7
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::CartClearResponse) }
18
8
  def clear(request_options: {}); end
19
9
 
20
10
  # Convert the current user's cart to an order.
21
- sig do
22
- params(
23
- request_options: T.nilable(
24
- T.any(
25
- TerminalShop::RequestOptions,
26
- TerminalShop::Internal::AnyHash
27
- )
28
- )
29
- )
30
- .returns(TerminalShop::Models::CartConvertResponse)
31
- end
11
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::CartConvertResponse) }
32
12
  def convert(request_options: {}); end
33
13
 
34
14
  # Get the current user's cart.
35
- sig do
36
- params(
37
- request_options: T.nilable(
38
- T.any(
39
- TerminalShop::RequestOptions,
40
- TerminalShop::Internal::AnyHash
41
- )
42
- )
43
- )
44
- .returns(TerminalShop::Models::CartGetResponse)
45
- end
15
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::CartGetResponse) }
46
16
  def get(request_options: {}); end
47
17
 
48
18
  # Set the shipping address for the current user's cart.
49
19
  sig do
50
- params(
51
- address_id: String,
52
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
53
- )
20
+ params(address_id: String, request_options: TerminalShop::RequestOpts)
54
21
  .returns(TerminalShop::Models::CartSetAddressResponse)
55
22
  end
56
23
  def set_address(
@@ -60,10 +27,7 @@ module TerminalShop
60
27
  ); end
61
28
  # Set the credit card for the current user's cart.
62
29
  sig do
63
- params(
64
- card_id: String,
65
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
66
- )
30
+ params(card_id: String, request_options: TerminalShop::RequestOpts)
67
31
  .returns(TerminalShop::Models::CartSetCardResponse)
68
32
  end
69
33
  def set_card(
@@ -73,11 +37,7 @@ module TerminalShop
73
37
  ); end
74
38
  # Add an item to the current user's cart.
75
39
  sig do
76
- params(
77
- product_variant_id: String,
78
- quantity: Integer,
79
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
80
- )
40
+ params(product_variant_id: String, quantity: Integer, request_options: TerminalShop::RequestOpts)
81
41
  .returns(TerminalShop::Models::CartSetItemResponse)
82
42
  end
83
43
  def set_item(
@@ -5,10 +5,7 @@ module TerminalShop
5
5
  class Email
6
6
  # Subscribe to email updates from Terminal.
7
7
  sig do
8
- params(
9
- email: String,
10
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
11
- )
8
+ params(email: String, request_options: TerminalShop::RequestOpts)
12
9
  .returns(TerminalShop::Models::EmailCreateResponse)
13
10
  end
14
11
  def create(
@@ -9,7 +9,7 @@ module TerminalShop
9
9
  address_id: String,
10
10
  card_id: String,
11
11
  variants: T::Hash[Symbol, Integer],
12
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
12
+ request_options: TerminalShop::RequestOpts
13
13
  )
14
14
  .returns(TerminalShop::Models::OrderCreateResponse)
15
15
  end
@@ -23,25 +23,12 @@ module TerminalShop
23
23
  request_options: {}
24
24
  ); end
25
25
  # List the orders associated with the current user.
26
- sig do
27
- params(
28
- request_options: T.nilable(
29
- T.any(
30
- TerminalShop::RequestOptions,
31
- TerminalShop::Internal::AnyHash
32
- )
33
- )
34
- )
35
- .returns(TerminalShop::Models::OrderListResponse)
36
- end
26
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::OrderListResponse) }
37
27
  def list(request_options: {}); end
38
28
 
39
29
  # Get the order with the given ID.
40
30
  sig do
41
- params(
42
- id: String,
43
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
44
- )
31
+ params(id: String, request_options: TerminalShop::RequestOpts)
45
32
  .returns(TerminalShop::Models::OrderGetResponse)
46
33
  end
47
34
  def get(
@@ -4,25 +4,12 @@ module TerminalShop
4
4
  module Resources
5
5
  class Product
6
6
  # List all products for sale in the Terminal shop.
7
- sig do
8
- params(
9
- request_options: T.nilable(
10
- T.any(
11
- TerminalShop::RequestOptions,
12
- TerminalShop::Internal::AnyHash
13
- )
14
- )
15
- )
16
- .returns(TerminalShop::Models::ProductListResponse)
17
- end
7
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::ProductListResponse) }
18
8
  def list(request_options: {}); end
19
9
 
20
10
  # Get a product by ID from the Terminal shop.
21
11
  sig do
22
- params(
23
- id: String,
24
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
25
- )
12
+ params(id: String, request_options: TerminalShop::RequestOpts)
26
13
  .returns(TerminalShop::Models::ProductGetResponse)
27
14
  end
28
15
  def get(
@@ -5,27 +5,13 @@ module TerminalShop
5
5
  class Profile
6
6
  # Update the current user's profile.
7
7
  sig do
8
- params(
9
- email: String,
10
- name: String,
11
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
12
- )
8
+ params(email: String, name: String, request_options: TerminalShop::RequestOpts)
13
9
  .returns(TerminalShop::Models::ProfileUpdateResponse)
14
10
  end
15
11
  def update(email:, name:, request_options: {}); end
16
12
 
17
13
  # Get the current user's profile.
18
- sig do
19
- params(
20
- request_options: T.nilable(
21
- T.any(
22
- TerminalShop::RequestOptions,
23
- TerminalShop::Internal::AnyHash
24
- )
25
- )
26
- )
27
- .returns(TerminalShop::Models::ProfileMeResponse)
28
- end
14
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::ProfileMeResponse) }
29
15
  def me(request_options: {}); end
30
16
 
31
17
  # @api private
@@ -19,7 +19,7 @@ module TerminalShop
19
19
  TerminalShop::Internal::AnyHash,
20
20
  TerminalShop::Models::SubscriptionAPI::Schedule::Weekly
21
21
  ),
22
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
22
+ request_options: TerminalShop::RequestOpts
23
23
  )
24
24
  .returns(TerminalShop::Models::SubscriptionCreateResponse)
25
25
  end
@@ -55,7 +55,7 @@ module TerminalShop
55
55
  TerminalShop::Internal::AnyHash,
56
56
  TerminalShop::Models::SubscriptionUpdateParams::Schedule::Weekly
57
57
  ),
58
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
58
+ request_options: TerminalShop::RequestOpts
59
59
  )
60
60
  .returns(TerminalShop::Models::SubscriptionUpdateResponse)
61
61
  end
@@ -71,25 +71,12 @@ module TerminalShop
71
71
  request_options: {}
72
72
  ); end
73
73
  # List the subscriptions associated with the current user.
74
- sig do
75
- params(
76
- request_options: T.nilable(
77
- T.any(
78
- TerminalShop::RequestOptions,
79
- TerminalShop::Internal::AnyHash
80
- )
81
- )
82
- )
83
- .returns(TerminalShop::Models::SubscriptionListResponse)
84
- end
74
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::SubscriptionListResponse) }
85
75
  def list(request_options: {}); end
86
76
 
87
77
  # Cancel a subscription for the current user.
88
78
  sig do
89
- params(
90
- id: String,
91
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
92
- )
79
+ params(id: String, request_options: TerminalShop::RequestOpts)
93
80
  .returns(TerminalShop::Models::SubscriptionDeleteResponse)
94
81
  end
95
82
  def delete(
@@ -99,10 +86,7 @@ module TerminalShop
99
86
  ); end
100
87
  # Get the subscription with the given ID.
101
88
  sig do
102
- params(
103
- id: String,
104
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
105
- )
89
+ params(id: String, request_options: TerminalShop::RequestOpts)
106
90
  .returns(TerminalShop::Models::SubscriptionGetResponse)
107
91
  end
108
92
  def get(
@@ -4,39 +4,16 @@ module TerminalShop
4
4
  module Resources
5
5
  class Token
6
6
  # Create a personal access token.
7
- sig do
8
- params(
9
- request_options: T.nilable(
10
- T.any(
11
- TerminalShop::RequestOptions,
12
- TerminalShop::Internal::AnyHash
13
- )
14
- )
15
- )
16
- .returns(TerminalShop::Models::TokenCreateResponse)
17
- end
7
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::TokenCreateResponse) }
18
8
  def create(request_options: {}); end
19
9
 
20
10
  # List the current user's personal access tokens.
21
- sig do
22
- params(
23
- request_options: T.nilable(
24
- T.any(
25
- TerminalShop::RequestOptions,
26
- TerminalShop::Internal::AnyHash
27
- )
28
- )
29
- )
30
- .returns(TerminalShop::Models::TokenListResponse)
31
- end
11
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::TokenListResponse) }
32
12
  def list(request_options: {}); end
33
13
 
34
14
  # Delete the personal access token with the given ID.
35
15
  sig do
36
- params(
37
- id: String,
38
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
39
- )
16
+ params(id: String, request_options: TerminalShop::RequestOpts)
40
17
  .returns(TerminalShop::Models::TokenDeleteResponse)
41
18
  end
42
19
  def delete(
@@ -46,10 +23,7 @@ module TerminalShop
46
23
  ); end
47
24
  # Get the personal access token with the given ID.
48
25
  sig do
49
- params(
50
- id: String,
51
- request_options: T.nilable(T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash))
52
- )
26
+ params(id: String, request_options: TerminalShop::RequestOpts)
53
27
  .returns(TerminalShop::Models::TokenGetResponse)
54
28
  end
55
29
  def get(
@@ -5,17 +5,7 @@ module TerminalShop
5
5
  class View
6
6
  # Get initial app data, including user, products, cart, addresses, cards,
7
7
  # subscriptions, and orders.
8
- sig do
9
- params(
10
- request_options: T.nilable(
11
- T.any(
12
- TerminalShop::RequestOptions,
13
- TerminalShop::Internal::AnyHash
14
- )
15
- )
16
- )
17
- .returns(TerminalShop::Models::ViewInitResponse)
18
- end
8
+ sig { params(request_options: TerminalShop::RequestOpts).returns(TerminalShop::Models::ViewInitResponse) }
19
9
  def init(request_options: {}); end
20
10
 
21
11
  # @api private
@@ -19,6 +19,8 @@ module TerminalShop
19
19
 
20
20
  def self?.coerce_hash: (top input) -> (::Hash[top, top] | top)
21
21
 
22
+ def self?.coerce_hash!: (top input) -> ::Hash[top, top]?
23
+
22
24
  def self?.deep_merge_lr: (top lhs, top rhs, ?concat: bool) -> top
23
25
 
24
26
  def self?.deep_merge: (
@@ -0,0 +1,97 @@
1
+ module TerminalShop
2
+ class AddressAPI = TerminalShop::Models::AddressAPI
3
+
4
+ class AddressCreateParams = TerminalShop::Models::AddressCreateParams
5
+
6
+ class AddressDeleteParams = TerminalShop::Models::AddressDeleteParams
7
+
8
+ class AddressGetParams = TerminalShop::Models::AddressGetParams
9
+
10
+ class AddressListParams = TerminalShop::Models::AddressListParams
11
+
12
+ class AppAPI = TerminalShop::Models::AppAPI
13
+
14
+ class AppCreateParams = TerminalShop::Models::AppCreateParams
15
+
16
+ class AppDeleteParams = TerminalShop::Models::AppDeleteParams
17
+
18
+ class AppGetParams = TerminalShop::Models::AppGetParams
19
+
20
+ class AppListParams = TerminalShop::Models::AppListParams
21
+
22
+ class CardAPI = TerminalShop::Models::CardAPI
23
+
24
+ class CardCollectParams = TerminalShop::Models::CardCollectParams
25
+
26
+ class CardCreateParams = TerminalShop::Models::CardCreateParams
27
+
28
+ class CardDeleteParams = TerminalShop::Models::CardDeleteParams
29
+
30
+ class CardGetParams = TerminalShop::Models::CardGetParams
31
+
32
+ class CardListParams = TerminalShop::Models::CardListParams
33
+
34
+ class CartAPI = TerminalShop::Models::CartAPI
35
+
36
+ class CartClearParams = TerminalShop::Models::CartClearParams
37
+
38
+ class CartConvertParams = TerminalShop::Models::CartConvertParams
39
+
40
+ class CartGetParams = TerminalShop::Models::CartGetParams
41
+
42
+ class CartSetAddressParams = TerminalShop::Models::CartSetAddressParams
43
+
44
+ class CartSetCardParams = TerminalShop::Models::CartSetCardParams
45
+
46
+ class CartSetItemParams = TerminalShop::Models::CartSetItemParams
47
+
48
+ class EmailCreateParams = TerminalShop::Models::EmailCreateParams
49
+
50
+ class OrderAPI = TerminalShop::Models::OrderAPI
51
+
52
+ class OrderCreateParams = TerminalShop::Models::OrderCreateParams
53
+
54
+ class OrderGetParams = TerminalShop::Models::OrderGetParams
55
+
56
+ class OrderListParams = TerminalShop::Models::OrderListParams
57
+
58
+ class ProductAPI = TerminalShop::Models::ProductAPI
59
+
60
+ class ProductGetParams = TerminalShop::Models::ProductGetParams
61
+
62
+ class ProductListParams = TerminalShop::Models::ProductListParams
63
+
64
+ class ProductVariant = TerminalShop::Models::ProductVariant
65
+
66
+ class ProfileAPI = TerminalShop::Models::ProfileAPI
67
+
68
+ class ProfileMeParams = TerminalShop::Models::ProfileMeParams
69
+
70
+ class ProfileUpdateParams = TerminalShop::Models::ProfileUpdateParams
71
+
72
+ module Region = TerminalShop::Models::Region
73
+
74
+ class SubscriptionAPI = TerminalShop::Models::SubscriptionAPI
75
+
76
+ class SubscriptionCreateParams = TerminalShop::Models::SubscriptionCreateParams
77
+
78
+ class SubscriptionDeleteParams = TerminalShop::Models::SubscriptionDeleteParams
79
+
80
+ class SubscriptionGetParams = TerminalShop::Models::SubscriptionGetParams
81
+
82
+ class SubscriptionListParams = TerminalShop::Models::SubscriptionListParams
83
+
84
+ class SubscriptionUpdateParams = TerminalShop::Models::SubscriptionUpdateParams
85
+
86
+ class TokenAPI = TerminalShop::Models::TokenAPI
87
+
88
+ class TokenCreateParams = TerminalShop::Models::TokenCreateParams
89
+
90
+ class TokenDeleteParams = TerminalShop::Models::TokenDeleteParams
91
+
92
+ class TokenGetParams = TerminalShop::Models::TokenGetParams
93
+
94
+ class TokenListParams = TerminalShop::Models::TokenListParams
95
+
96
+ class ViewInitParams = TerminalShop::Models::ViewInitParams
97
+ end