whop_sdk 0.0.13 → 0.0.15

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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
  6. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/company.rb +9 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +15 -1
  10. data/lib/whop_sdk/models/company_list_response.rb +9 -1
  11. data/lib/whop_sdk/models/company_update_params.rb +15 -1
  12. data/lib/whop_sdk/models/experience.rb +9 -1
  13. data/lib/whop_sdk/models/experience_create_params.rb +9 -1
  14. data/lib/whop_sdk/models/experience_list_response.rb +9 -1
  15. data/lib/whop_sdk/models/experience_update_params.rb +9 -1
  16. data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
  17. data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
  18. data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
  19. data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
  20. data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
  21. data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
  22. data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
  23. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +11 -1
  24. data/lib/whop_sdk/models/withdrawal_list_response.rb +11 -1
  25. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +11 -1
  26. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +11 -1
  27. data/lib/whop_sdk/models.rb +8 -0
  28. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  29. data/lib/whop_sdk/resources/companies.rb +12 -2
  30. data/lib/whop_sdk/resources/experiences.rb +6 -2
  31. data/lib/whop_sdk/resources/fee_markups.rb +112 -0
  32. data/lib/whop_sdk/version.rb +1 -1
  33. data/lib/whop_sdk.rb +8 -0
  34. data/rbi/whop_sdk/client.rbi +3 -0
  35. data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
  36. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  37. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
  38. data/rbi/whop_sdk/models/company.rbi +8 -0
  39. data/rbi/whop_sdk/models/company_create_params.rbi +14 -0
  40. data/rbi/whop_sdk/models/company_list_response.rbi +8 -0
  41. data/rbi/whop_sdk/models/company_update_params.rbi +14 -0
  42. data/rbi/whop_sdk/models/experience.rbi +8 -0
  43. data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
  44. data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
  45. data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
  46. data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
  47. data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
  48. data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
  49. data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
  50. data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
  51. data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
  52. data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
  53. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +12 -0
  54. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +12 -0
  55. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +12 -0
  56. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +12 -0
  57. data/rbi/whop_sdk/models.rbi +8 -0
  58. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  59. data/rbi/whop_sdk/resources/companies.rbi +12 -0
  60. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  61. data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
  62. data/sig/whop_sdk/client.rbs +2 -0
  63. data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
  64. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  65. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
  66. data/sig/whop_sdk/models/company.rbs +5 -0
  67. data/sig/whop_sdk/models/company_create_params.rbs +6 -1
  68. data/sig/whop_sdk/models/company_list_response.rbs +5 -0
  69. data/sig/whop_sdk/models/company_update_params.rbs +9 -1
  70. data/sig/whop_sdk/models/experience.rbs +5 -0
  71. data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
  72. data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
  73. data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
  74. data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
  75. data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
  76. data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
  77. data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
  78. data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
  79. data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
  80. data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
  81. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -0
  82. data/sig/whop_sdk/models/withdrawal_list_response.rbs +5 -0
  83. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -0
  84. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -0
  85. data/sig/whop_sdk/models.rbs +8 -0
  86. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  87. data/sig/whop_sdk/resources/companies.rbs +2 -0
  88. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  89. data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
  90. metadata +26 -2
@@ -27,12 +27,20 @@ module WhopSDK
27
27
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
28
28
  attr_accessor :metadata
29
29
 
30
+ # Whether Whop sends transactional emails to customers on behalf of this company.
31
+ # Includes: order confirmations, payment failures, refund notifications, upcoming
32
+ # renewals, and membership cancelations/expirations. When disabled, the platform
33
+ # is responsible for handling these communications. This is defaulted to true.
34
+ sig { returns(T.nilable(T::Boolean)) }
35
+ attr_accessor :send_customer_emails
36
+
30
37
  sig do
31
38
  params(
32
39
  email: String,
33
40
  parent_company_id: String,
34
41
  title: String,
35
42
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
43
+ send_customer_emails: T.nilable(T::Boolean),
36
44
  request_options: WhopSDK::RequestOptions::OrHash
37
45
  ).returns(T.attached_class)
38
46
  end
@@ -45,6 +53,11 @@ module WhopSDK
45
53
  title:,
46
54
  # Additional metadata for the account
47
55
  metadata: nil,
56
+ # Whether Whop sends transactional emails to customers on behalf of this company.
57
+ # Includes: order confirmations, payment failures, refund notifications, upcoming
58
+ # renewals, and membership cancelations/expirations. When disabled, the platform
59
+ # is responsible for handling these communications. This is defaulted to true.
60
+ send_customer_emails: nil,
48
61
  request_options: {}
49
62
  )
50
63
  end
@@ -56,6 +69,7 @@ module WhopSDK
56
69
  parent_company_id: String,
57
70
  title: String,
58
71
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
72
+ send_customer_emails: T.nilable(T::Boolean),
59
73
  request_options: WhopSDK::RequestOptions
60
74
  }
61
75
  )
@@ -70,6 +70,10 @@ module WhopSDK
70
70
  sig { returns(String) }
71
71
  attr_accessor :route
72
72
 
73
+ # Whether Whop sends transactional emails to customers on behalf of this company.
74
+ sig { returns(T::Boolean) }
75
+ attr_accessor :send_customer_emails
76
+
73
77
  # The title of the company.
74
78
  sig { returns(String) }
75
79
  attr_accessor :title
@@ -96,6 +100,7 @@ module WhopSDK
96
100
  owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser::OrHash,
97
101
  published_reviews_count: Integer,
98
102
  route: String,
103
+ send_customer_emails: T::Boolean,
99
104
  title: String,
100
105
  updated_at: Time,
101
106
  verified: T::Boolean
@@ -125,6 +130,8 @@ module WhopSDK
125
130
  published_reviews_count:,
126
131
  # The slug/route of the company on the Whop site.
127
132
  route:,
133
+ # Whether Whop sends transactional emails to customers on behalf of this company.
134
+ send_customer_emails:,
128
135
  # The title of the company.
129
136
  title:,
130
137
  # The time the company was last updated.
@@ -148,6 +155,7 @@ module WhopSDK
148
155
  owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser,
149
156
  published_reviews_count: Integer,
150
157
  route: String,
158
+ send_customer_emails: T::Boolean,
151
159
  title: String,
152
160
  updated_at: Time,
153
161
  verified: T::Boolean
@@ -24,6 +24,13 @@ module WhopSDK
24
24
  end
25
25
  attr_accessor :logo
26
26
 
27
+ # Whether Whop sends transactional emails to customers on behalf of this company.
28
+ # Includes: order confirmations, payment failures, refund notifications, upcoming
29
+ # renewals, and membership cancelations/expirations. When disabled, the platform
30
+ # is responsible for handling these communications.
31
+ sig { returns(T.nilable(T::Boolean)) }
32
+ attr_accessor :send_customer_emails
33
+
27
34
  # The title of the company
28
35
  sig { returns(T.nilable(String)) }
29
36
  attr_accessor :title
@@ -37,6 +44,7 @@ module WhopSDK
37
44
  WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID::OrHash
38
45
  )
39
46
  ),
47
+ send_customer_emails: T.nilable(T::Boolean),
40
48
  title: T.nilable(String),
41
49
  request_options: WhopSDK::RequestOptions::OrHash
42
50
  ).returns(T.attached_class)
@@ -44,6 +52,11 @@ module WhopSDK
44
52
  def self.new(
45
53
  # The logo for the company in png, jpeg, or gif format
46
54
  logo: nil,
55
+ # Whether Whop sends transactional emails to customers on behalf of this company.
56
+ # Includes: order confirmations, payment failures, refund notifications, upcoming
57
+ # renewals, and membership cancelations/expirations. When disabled, the platform
58
+ # is responsible for handling these communications.
59
+ send_customer_emails: nil,
47
60
  # The title of the company
48
61
  title: nil,
49
62
  request_options: {}
@@ -60,6 +73,7 @@ module WhopSDK
60
73
  WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID
61
74
  )
62
75
  ),
76
+ send_customer_emails: T.nilable(T::Boolean),
63
77
  title: T.nilable(String),
64
78
  request_options: WhopSDK::RequestOptions
65
79
  }
@@ -35,6 +35,10 @@ module WhopSDK
35
35
  sig { params(image: T.nilable(WhopSDK::Experience::Image::OrHash)).void }
36
36
  attr_writer :image
37
37
 
38
+ # Whether the experience is visible to the public
39
+ sig { returns(T::Boolean) }
40
+ attr_accessor :is_public
41
+
38
42
  # The written name of the description.
39
43
  sig { returns(String) }
40
44
  attr_accessor :name
@@ -57,6 +61,7 @@ module WhopSDK
57
61
  company: WhopSDK::Experience::Company::OrHash,
58
62
  created_at: Time,
59
63
  image: T.nilable(WhopSDK::Experience::Image::OrHash),
64
+ is_public: T::Boolean,
60
65
  name: String,
61
66
  order: T.nilable(String),
62
67
  products: T::Array[WhopSDK::Experience::Product::OrHash]
@@ -73,6 +78,8 @@ module WhopSDK
73
78
  created_at:,
74
79
  # The logo for the experience.
75
80
  image:,
81
+ # Whether the experience is visible to the public
82
+ is_public:,
76
83
  # The written name of the description.
77
84
  name:,
78
85
  # The order of the experience in the section
@@ -92,6 +99,7 @@ module WhopSDK
92
99
  company: WhopSDK::Experience::Company,
93
100
  created_at: Time,
94
101
  image: T.nilable(WhopSDK::Experience::Image),
102
+ is_public: T::Boolean,
95
103
  name: String,
96
104
  order: T.nilable(String),
97
105
  products: T::Array[WhopSDK::Experience::Product]
@@ -19,6 +19,10 @@ module WhopSDK
19
19
  sig { returns(String) }
20
20
  attr_accessor :company_id
21
21
 
22
+ # Whether the experience is publicly accessible
23
+ sig { returns(T.nilable(T::Boolean)) }
24
+ attr_accessor :is_public
25
+
22
26
  # The name of the experience
23
27
  sig { returns(T.nilable(String)) }
24
28
  attr_accessor :name
@@ -31,6 +35,7 @@ module WhopSDK
31
35
  params(
32
36
  app_id: String,
33
37
  company_id: String,
38
+ is_public: T.nilable(T::Boolean),
34
39
  name: T.nilable(String),
35
40
  section_id: T.nilable(String),
36
41
  request_options: WhopSDK::RequestOptions::OrHash
@@ -41,6 +46,8 @@ module WhopSDK
41
46
  app_id:,
42
47
  # The ID of the company to create the experience for
43
48
  company_id:,
49
+ # Whether the experience is publicly accessible
50
+ is_public: nil,
44
51
  # The name of the experience
45
52
  name: nil,
46
53
  # The ID of the section to create the experience in
@@ -54,6 +61,7 @@ module WhopSDK
54
61
  {
55
62
  app_id: String,
56
63
  company_id: String,
64
+ is_public: T.nilable(T::Boolean),
57
65
  name: T.nilable(String),
58
66
  section_id: T.nilable(String),
59
67
  request_options: WhopSDK::RequestOptions
@@ -51,6 +51,10 @@ module WhopSDK
51
51
  end
52
52
  attr_writer :image
53
53
 
54
+ # Whether the experience is visible to the public
55
+ sig { returns(T::Boolean) }
56
+ attr_accessor :is_public
57
+
54
58
  # The written name of the description.
55
59
  sig { returns(String) }
56
60
  attr_accessor :name
@@ -68,6 +72,7 @@ module WhopSDK
68
72
  created_at: Time,
69
73
  image:
70
74
  T.nilable(WhopSDK::Models::ExperienceListResponse::Image::OrHash),
75
+ is_public: T::Boolean,
71
76
  name: String,
72
77
  order: T.nilable(String)
73
78
  ).returns(T.attached_class)
@@ -83,6 +88,8 @@ module WhopSDK
83
88
  created_at:,
84
89
  # The logo for the experience.
85
90
  image:,
91
+ # Whether the experience is visible to the public
92
+ is_public:,
86
93
  # The written name of the description.
87
94
  name:,
88
95
  # The order of the experience in the section
@@ -98,6 +105,7 @@ module WhopSDK
98
105
  company: WhopSDK::Models::ExperienceListResponse::Company,
99
106
  created_at: Time,
100
107
  image: T.nilable(WhopSDK::Models::ExperienceListResponse::Image),
108
+ is_public: T::Boolean,
101
109
  name: String,
102
110
  order: T.nilable(String)
103
111
  }
@@ -19,6 +19,10 @@ module WhopSDK
19
19
  end
20
20
  attr_accessor :access_level
21
21
 
22
+ # Whether the experience is publicly accessible.
23
+ sig { returns(T.nilable(T::Boolean)) }
24
+ attr_accessor :is_public
25
+
22
26
  # The logo for the experience
23
27
  sig do
24
28
  returns(
@@ -48,6 +52,7 @@ module WhopSDK
48
52
  params(
49
53
  access_level:
50
54
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
55
+ is_public: T.nilable(T::Boolean),
51
56
  logo:
52
57
  T.nilable(
53
58
  T.any(
@@ -64,6 +69,8 @@ module WhopSDK
64
69
  def self.new(
65
70
  # The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
66
71
  access_level: nil,
72
+ # Whether the experience is publicly accessible.
73
+ is_public: nil,
67
74
  # The logo for the experience
68
75
  logo: nil,
69
76
  # The name of the experience.
@@ -81,6 +88,7 @@ module WhopSDK
81
88
  {
82
89
  access_level:
83
90
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
91
+ is_public: T.nilable(T::Boolean),
84
92
  logo:
85
93
  T.nilable(
86
94
  T.any(
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class FeeMarkupCreateParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::FeeMarkupCreateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The ID (tag) of the company you want to update the fee markup for.
15
+ sig { returns(String) }
16
+ attr_accessor :company_id
17
+
18
+ # The type of fee this markup applies to.
19
+ sig { returns(WhopSDK::FeeMarkupType::OrSymbol) }
20
+ attr_accessor :fee_type
21
+
22
+ # The fixed fee in USD to charge (0-50).
23
+ sig { returns(T.nilable(Float)) }
24
+ attr_accessor :fixed_fee_usd
25
+
26
+ # Custom metadata to attach to this fee markup.
27
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
28
+ attr_accessor :metadata
29
+
30
+ # Internal notes about this fee markup.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :notes
33
+
34
+ # The percentage fee to charge (0-25).
35
+ sig { returns(T.nilable(Float)) }
36
+ attr_accessor :percentage_fee
37
+
38
+ sig do
39
+ params(
40
+ company_id: String,
41
+ fee_type: WhopSDK::FeeMarkupType::OrSymbol,
42
+ fixed_fee_usd: T.nilable(Float),
43
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
44
+ notes: T.nilable(String),
45
+ percentage_fee: T.nilable(Float),
46
+ request_options: WhopSDK::RequestOptions::OrHash
47
+ ).returns(T.attached_class)
48
+ end
49
+ def self.new(
50
+ # The ID (tag) of the company you want to update the fee markup for.
51
+ company_id:,
52
+ # The type of fee this markup applies to.
53
+ fee_type:,
54
+ # The fixed fee in USD to charge (0-50).
55
+ fixed_fee_usd: nil,
56
+ # Custom metadata to attach to this fee markup.
57
+ metadata: nil,
58
+ # Internal notes about this fee markup.
59
+ notes: nil,
60
+ # The percentage fee to charge (0-25).
61
+ percentage_fee: nil,
62
+ request_options: {}
63
+ )
64
+ end
65
+
66
+ sig do
67
+ override.returns(
68
+ {
69
+ company_id: String,
70
+ fee_type: WhopSDK::FeeMarkupType::OrSymbol,
71
+ fixed_fee_usd: T.nilable(Float),
72
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
73
+ notes: T.nilable(String),
74
+ percentage_fee: T.nilable(Float),
75
+ request_options: WhopSDK::RequestOptions
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,89 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class FeeMarkupCreateResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::FeeMarkupCreateResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier of the fee markup.
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # When this fee markup was created.
19
+ sig { returns(Time) }
20
+ attr_accessor :created_at
21
+
22
+ # The type of fee this markup applies to.
23
+ sig { returns(WhopSDK::FeeMarkupType::TaggedSymbol) }
24
+ attr_accessor :fee_type
25
+
26
+ # The fixed fee in USD to charge (0-50).
27
+ sig { returns(T.nilable(Float)) }
28
+ attr_accessor :fixed_fee_usd
29
+
30
+ # Internal notes about this fee markup.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :notes
33
+
34
+ # The percentage fee to charge (0-25).
35
+ sig { returns(T.nilable(Float)) }
36
+ attr_accessor :percentage_fee
37
+
38
+ # When this fee markup was last updated.
39
+ sig { returns(Time) }
40
+ attr_accessor :updated_at
41
+
42
+ # Represents a fee markup configuration for a company
43
+ sig do
44
+ params(
45
+ id: String,
46
+ created_at: Time,
47
+ fee_type: WhopSDK::FeeMarkupType::OrSymbol,
48
+ fixed_fee_usd: T.nilable(Float),
49
+ notes: T.nilable(String),
50
+ percentage_fee: T.nilable(Float),
51
+ updated_at: Time
52
+ ).returns(T.attached_class)
53
+ end
54
+ def self.new(
55
+ # The unique identifier of the fee markup.
56
+ id:,
57
+ # When this fee markup was created.
58
+ created_at:,
59
+ # The type of fee this markup applies to.
60
+ fee_type:,
61
+ # The fixed fee in USD to charge (0-50).
62
+ fixed_fee_usd:,
63
+ # Internal notes about this fee markup.
64
+ notes:,
65
+ # The percentage fee to charge (0-25).
66
+ percentage_fee:,
67
+ # When this fee markup was last updated.
68
+ updated_at:
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ id: String,
76
+ created_at: Time,
77
+ fee_type: WhopSDK::FeeMarkupType::TaggedSymbol,
78
+ fixed_fee_usd: T.nilable(Float),
79
+ notes: T.nilable(String),
80
+ percentage_fee: T.nilable(Float),
81
+ updated_at: Time
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class FeeMarkupDeleteParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::FeeMarkupDeleteParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: WhopSDK::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,8 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ FeeMarkupDeleteResponse =
6
+ T.let(T::Boolean, WhopSDK::Internal::Type::Converter)
7
+ end
8
+ end
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class FeeMarkupListParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::FeeMarkupListParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The ID (tag) of the company you want to list the fee markups for. If you pass
15
+ # your platform account, you will get the platform default markups.
16
+ sig { returns(String) }
17
+ attr_accessor :company_id
18
+
19
+ # Returns the elements in the list that come after the specified cursor.
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :after
22
+
23
+ # Returns the elements in the list that come before the specified cursor.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :before
26
+
27
+ # Returns the first _n_ elements from the list.
28
+ sig { returns(T.nilable(Integer)) }
29
+ attr_accessor :first
30
+
31
+ # Returns the last _n_ elements from the list.
32
+ sig { returns(T.nilable(Integer)) }
33
+ attr_accessor :last
34
+
35
+ sig do
36
+ params(
37
+ company_id: String,
38
+ after: T.nilable(String),
39
+ before: T.nilable(String),
40
+ first: T.nilable(Integer),
41
+ last: T.nilable(Integer),
42
+ request_options: WhopSDK::RequestOptions::OrHash
43
+ ).returns(T.attached_class)
44
+ end
45
+ def self.new(
46
+ # The ID (tag) of the company you want to list the fee markups for. If you pass
47
+ # your platform account, you will get the platform default markups.
48
+ company_id:,
49
+ # Returns the elements in the list that come after the specified cursor.
50
+ after: nil,
51
+ # Returns the elements in the list that come before the specified cursor.
52
+ before: nil,
53
+ # Returns the first _n_ elements from the list.
54
+ first: nil,
55
+ # Returns the last _n_ elements from the list.
56
+ last: nil,
57
+ request_options: {}
58
+ )
59
+ end
60
+
61
+ sig do
62
+ override.returns(
63
+ {
64
+ company_id: String,
65
+ after: T.nilable(String),
66
+ before: T.nilable(String),
67
+ first: T.nilable(Integer),
68
+ last: T.nilable(Integer),
69
+ request_options: WhopSDK::RequestOptions
70
+ }
71
+ )
72
+ end
73
+ def to_hash
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,89 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class FeeMarkupListResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::FeeMarkupListResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier of the fee markup.
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # When this fee markup was created.
19
+ sig { returns(Time) }
20
+ attr_accessor :created_at
21
+
22
+ # The type of fee this markup applies to.
23
+ sig { returns(WhopSDK::FeeMarkupType::TaggedSymbol) }
24
+ attr_accessor :fee_type
25
+
26
+ # The fixed fee in USD to charge (0-50).
27
+ sig { returns(T.nilable(Float)) }
28
+ attr_accessor :fixed_fee_usd
29
+
30
+ # Internal notes about this fee markup.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :notes
33
+
34
+ # The percentage fee to charge (0-25).
35
+ sig { returns(T.nilable(Float)) }
36
+ attr_accessor :percentage_fee
37
+
38
+ # When this fee markup was last updated.
39
+ sig { returns(Time) }
40
+ attr_accessor :updated_at
41
+
42
+ # Represents a fee markup configuration for a company
43
+ sig do
44
+ params(
45
+ id: String,
46
+ created_at: Time,
47
+ fee_type: WhopSDK::FeeMarkupType::OrSymbol,
48
+ fixed_fee_usd: T.nilable(Float),
49
+ notes: T.nilable(String),
50
+ percentage_fee: T.nilable(Float),
51
+ updated_at: Time
52
+ ).returns(T.attached_class)
53
+ end
54
+ def self.new(
55
+ # The unique identifier of the fee markup.
56
+ id:,
57
+ # When this fee markup was created.
58
+ created_at:,
59
+ # The type of fee this markup applies to.
60
+ fee_type:,
61
+ # The fixed fee in USD to charge (0-50).
62
+ fixed_fee_usd:,
63
+ # Internal notes about this fee markup.
64
+ notes:,
65
+ # The percentage fee to charge (0-25).
66
+ percentage_fee:,
67
+ # When this fee markup was last updated.
68
+ updated_at:
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ id: String,
76
+ created_at: Time,
77
+ fee_type: WhopSDK::FeeMarkupType::TaggedSymbol,
78
+ fixed_fee_usd: T.nilable(Float),
79
+ notes: T.nilable(String),
80
+ percentage_fee: T.nilable(Float),
81
+ updated_at: Time
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,37 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The types of fee markups that can be configured
6
+ module FeeMarkupType
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::FeeMarkupType) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ CRYPTO_WITHDRAWAL_MARKUP =
13
+ T.let(:crypto_withdrawal_markup, WhopSDK::FeeMarkupType::TaggedSymbol)
14
+ RTP_WITHDRAWAL_MARKUP =
15
+ T.let(:rtp_withdrawal_markup, WhopSDK::FeeMarkupType::TaggedSymbol)
16
+ NEXT_DAY_BANK_WITHDRAWAL_MARKUP =
17
+ T.let(
18
+ :next_day_bank_withdrawal_markup,
19
+ WhopSDK::FeeMarkupType::TaggedSymbol
20
+ )
21
+ BANK_WIRE_WITHDRAWAL_MARKUP =
22
+ T.let(
23
+ :bank_wire_withdrawal_markup,
24
+ WhopSDK::FeeMarkupType::TaggedSymbol
25
+ )
26
+ DIGITAL_WALLET_WITHDRAWAL_MARKUP =
27
+ T.let(
28
+ :digital_wallet_withdrawal_markup,
29
+ WhopSDK::FeeMarkupType::TaggedSymbol
30
+ )
31
+
32
+ sig { override.returns(T::Array[WhopSDK::FeeMarkupType::TaggedSymbol]) }
33
+ def self.values
34
+ end
35
+ end
36
+ end
37
+ end