stigg 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.3
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/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
- data/lib/stigg/models/v1/customer_import_params.rb +75 -0
- data/lib/stigg/models/v1/customer_import_response.rb +35 -0
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +16 -16
- data/lib/stigg/models/v1/customer_response.rb +1 -1
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
- data/lib/stigg/models/v1/event_report_params.rb +91 -0
- data/lib/stigg/models/v1/event_report_response.rb +25 -0
- data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +30 -29
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
- data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
- data/lib/stigg/models/v1/{subscription_create_params.rb → subscription_provision_params.rb} +118 -118
- data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
- data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
- data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +7 -5
- data/lib/stigg/models/v1/usage_history_params.rb +54 -0
- data/lib/stigg/models/v1/usage_history_response.rb +155 -0
- data/lib/stigg/models/v1/usage_report_params.rb +114 -0
- data/lib/stigg/models/v1/usage_report_response.rb +120 -0
- data/lib/stigg/models.rb +0 -4
- data/lib/stigg/resources/v1/coupons.rb +4 -4
- data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
- data/lib/stigg/resources/v1/customers.rb +59 -37
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
- data/lib/stigg/resources/v1/subscriptions.rb +166 -64
- data/lib/stigg/resources/v1/usage.rb +79 -0
- data/lib/stigg/resources/v1.rb +6 -42
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +25 -16
- data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
- data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
- data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +35 -35
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
- data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
- data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
- data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +66 -117
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
- data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
- data/rbi/stigg/models/v1/{subscription_create_params.rbi → subscription_provision_params.rbi} +794 -773
- data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
- data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
- data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +9 -16
- data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
- data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
- data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
- data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
- data/rbi/stigg/models.rbi +0 -4
- data/rbi/stigg/resources/v1/coupons.rbi +2 -2
- data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
- data/rbi/stigg/resources/v1/customers.rbi +53 -36
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
- data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
- data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
- data/sig/stigg/models/v1/event_report_params.rbs +82 -0
- data/sig/stigg/models/v1/event_report_response.rbs +15 -0
- data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +36 -41
- data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
- data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
- data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{subscription_create_params.rbs → subscription_provision_params.rbs} +200 -200
- data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
- data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
- data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
- data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
- data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
- data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
- data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
- data/sig/stigg/models.rbs +0 -4
- data/sig/stigg/resources/v1/coupons.rbs +2 -2
- data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
- data/sig/stigg/resources/v1/customers.rbs +17 -12
- data/sig/stigg/resources/v1/events.rbs +14 -0
- data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
- data/sig/stigg/resources/v1/subscriptions.rbs +65 -32
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -50
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
- data/lib/stigg/models/v1_create_event_params.rb +0 -89
- data/lib/stigg/models/v1_create_event_response.rb +0 -23
- data/lib/stigg/models/v1_create_usage_params.rb +0 -112
- data/lib/stigg/models/v1_create_usage_response.rb +0 -118
- data/lib/stigg/resources/v1/customers/usage.rb +0 -18
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
- data/sig/stigg/models/v1_create_event_params.rbs +0 -80
- data/sig/stigg/models/v1_create_event_response.rbs +0 -13
- data/sig/stigg/models/v1_create_usage_params.rbs +0 -100
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
class UsageReportResponse < Stigg::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Stigg::Models::V1::UsageReportResponse,
|
|
11
|
+
Stigg::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Array of usage measurements with current values and period info
|
|
16
|
+
sig { returns(T::Array[Stigg::Models::V1::UsageReportResponse::Data]) }
|
|
17
|
+
attr_accessor :data
|
|
18
|
+
|
|
19
|
+
# Response containing reported usage measurements with current usage values,
|
|
20
|
+
# period information, and reset dates for each measurement.
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
data: T::Array[Stigg::Models::V1::UsageReportResponse::Data::OrHash]
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(
|
|
27
|
+
# Array of usage measurements with current values and period info
|
|
28
|
+
data:
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
override.returns(
|
|
34
|
+
{ data: T::Array[Stigg::Models::V1::UsageReportResponse::Data] }
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
def to_hash
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
41
|
+
OrHash =
|
|
42
|
+
T.type_alias do
|
|
43
|
+
T.any(
|
|
44
|
+
Stigg::Models::V1::UsageReportResponse::Data,
|
|
45
|
+
Stigg::Internal::AnyHash
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Unique identifier for the entity
|
|
50
|
+
sig { returns(String) }
|
|
51
|
+
attr_accessor :id
|
|
52
|
+
|
|
53
|
+
# Timestamp of when the record was created
|
|
54
|
+
sig { returns(Time) }
|
|
55
|
+
attr_accessor :created_at
|
|
56
|
+
|
|
57
|
+
# Customer id
|
|
58
|
+
sig { returns(String) }
|
|
59
|
+
attr_accessor :customer_id
|
|
60
|
+
|
|
61
|
+
# Feature id
|
|
62
|
+
sig { returns(String) }
|
|
63
|
+
attr_accessor :feature_id
|
|
64
|
+
|
|
65
|
+
# Timestamp
|
|
66
|
+
sig { returns(Time) }
|
|
67
|
+
attr_accessor :timestamp
|
|
68
|
+
|
|
69
|
+
# The usage measurement record
|
|
70
|
+
sig { returns(Float) }
|
|
71
|
+
attr_accessor :value
|
|
72
|
+
|
|
73
|
+
# The current measured usage value
|
|
74
|
+
sig { returns(T.nilable(Float)) }
|
|
75
|
+
attr_accessor :current_usage
|
|
76
|
+
|
|
77
|
+
# The date when the next usage reset will occur
|
|
78
|
+
sig { returns(T.nilable(Time)) }
|
|
79
|
+
attr_accessor :next_reset_date
|
|
80
|
+
|
|
81
|
+
# Resource id
|
|
82
|
+
sig { returns(T.nilable(String)) }
|
|
83
|
+
attr_accessor :resource_id
|
|
84
|
+
|
|
85
|
+
# The end date of the usage period in which this measurement resides (for
|
|
86
|
+
# entitlements with a reset period)
|
|
87
|
+
sig { returns(T.nilable(Time)) }
|
|
88
|
+
attr_accessor :usage_period_end
|
|
89
|
+
|
|
90
|
+
# The start date of the usage period in which this measurement resides (for
|
|
91
|
+
# entitlements with a reset period)
|
|
92
|
+
sig { returns(T.nilable(Time)) }
|
|
93
|
+
attr_accessor :usage_period_start
|
|
94
|
+
|
|
95
|
+
# Recorded usage with period info
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
id: String,
|
|
99
|
+
created_at: Time,
|
|
100
|
+
customer_id: String,
|
|
101
|
+
feature_id: String,
|
|
102
|
+
timestamp: Time,
|
|
103
|
+
value: Float,
|
|
104
|
+
current_usage: T.nilable(Float),
|
|
105
|
+
next_reset_date: T.nilable(Time),
|
|
106
|
+
resource_id: T.nilable(String),
|
|
107
|
+
usage_period_end: T.nilable(Time),
|
|
108
|
+
usage_period_start: T.nilable(Time)
|
|
109
|
+
).returns(T.attached_class)
|
|
110
|
+
end
|
|
111
|
+
def self.new(
|
|
112
|
+
# Unique identifier for the entity
|
|
113
|
+
id:,
|
|
114
|
+
# Timestamp of when the record was created
|
|
115
|
+
created_at:,
|
|
116
|
+
# Customer id
|
|
117
|
+
customer_id:,
|
|
118
|
+
# Feature id
|
|
119
|
+
feature_id:,
|
|
120
|
+
# Timestamp
|
|
121
|
+
timestamp:,
|
|
122
|
+
# The usage measurement record
|
|
123
|
+
value:,
|
|
124
|
+
# The current measured usage value
|
|
125
|
+
current_usage: nil,
|
|
126
|
+
# The date when the next usage reset will occur
|
|
127
|
+
next_reset_date: nil,
|
|
128
|
+
# Resource id
|
|
129
|
+
resource_id: nil,
|
|
130
|
+
# The end date of the usage period in which this measurement resides (for
|
|
131
|
+
# entitlements with a reset period)
|
|
132
|
+
usage_period_end: nil,
|
|
133
|
+
# The start date of the usage period in which this measurement resides (for
|
|
134
|
+
# entitlements with a reset period)
|
|
135
|
+
usage_period_start: nil
|
|
136
|
+
)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
sig do
|
|
140
|
+
override.returns(
|
|
141
|
+
{
|
|
142
|
+
id: String,
|
|
143
|
+
created_at: Time,
|
|
144
|
+
customer_id: String,
|
|
145
|
+
feature_id: String,
|
|
146
|
+
timestamp: Time,
|
|
147
|
+
value: Float,
|
|
148
|
+
current_usage: T.nilable(Float),
|
|
149
|
+
next_reset_date: T.nilable(Time),
|
|
150
|
+
resource_id: T.nilable(String),
|
|
151
|
+
usage_period_end: T.nilable(Time),
|
|
152
|
+
usage_period_start: T.nilable(Time)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
def to_hash
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
data/rbi/stigg/models.rbi
CHANGED
|
@@ -18,7 +18,7 @@ module Stigg
|
|
|
18
18
|
percent_off: T.nilable(Float),
|
|
19
19
|
additional_meta_data: T.anything,
|
|
20
20
|
request_options: Stigg::RequestOptions::OrHash
|
|
21
|
-
).returns(Stigg::
|
|
21
|
+
).returns(Stigg::V1::Coupon)
|
|
22
22
|
end
|
|
23
23
|
def create(
|
|
24
24
|
# The unique identifier for the entity
|
|
@@ -44,7 +44,7 @@ module Stigg
|
|
|
44
44
|
params(
|
|
45
45
|
id: String,
|
|
46
46
|
request_options: Stigg::RequestOptions::OrHash
|
|
47
|
-
).returns(Stigg::
|
|
47
|
+
).returns(Stigg::V1::Coupon)
|
|
48
48
|
end
|
|
49
49
|
def retrieve(
|
|
50
50
|
# The unique identifier of the entity
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Resources
|
|
5
|
+
class V1
|
|
6
|
+
class Customers
|
|
7
|
+
class PromotionalEntitlements
|
|
8
|
+
# Create a promotional entitlements
|
|
9
|
+
sig do
|
|
10
|
+
params(
|
|
11
|
+
customer_id: String,
|
|
12
|
+
promotional_entitlements:
|
|
13
|
+
T::Array[
|
|
14
|
+
Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::OrHash
|
|
15
|
+
],
|
|
16
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
17
|
+
).returns(
|
|
18
|
+
Stigg::Models::V1::Customers::PromotionalEntitlementGrantResponse
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
def grant(
|
|
22
|
+
# The unique identifier of the customer
|
|
23
|
+
customer_id,
|
|
24
|
+
# Promotional entitlements to grant
|
|
25
|
+
promotional_entitlements:,
|
|
26
|
+
request_options: {}
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Revoke promotional entitlement
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
feature_id: String,
|
|
34
|
+
customer_id: String,
|
|
35
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
36
|
+
).returns(
|
|
37
|
+
Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
def revoke(
|
|
41
|
+
# The unique identifier of the entitlement feature
|
|
42
|
+
feature_id,
|
|
43
|
+
# The unique identifier of the customer
|
|
44
|
+
customer_id:,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @api private
|
|
50
|
+
sig { params(client: Stigg::Client).returns(T.attached_class) }
|
|
51
|
+
def self.new(client:)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -7,44 +7,10 @@ module Stigg
|
|
|
7
7
|
sig { returns(Stigg::Resources::V1::Customers::PaymentMethod) }
|
|
8
8
|
attr_reader :payment_method
|
|
9
9
|
|
|
10
|
-
sig { returns(Stigg::Resources::V1::Customers::Usage) }
|
|
11
|
-
attr_reader :usage
|
|
12
|
-
|
|
13
|
-
# Provision customer
|
|
14
10
|
sig do
|
|
15
|
-
|
|
16
|
-
id: String,
|
|
17
|
-
coupon_id: T.nilable(String),
|
|
18
|
-
default_payment_method:
|
|
19
|
-
T.nilable(
|
|
20
|
-
Stigg::V1::CustomerCreateParams::DefaultPaymentMethod::OrHash
|
|
21
|
-
),
|
|
22
|
-
email: T.nilable(String),
|
|
23
|
-
integrations:
|
|
24
|
-
T::Array[Stigg::V1::CustomerCreateParams::Integration::OrHash],
|
|
25
|
-
metadata: T::Hash[Symbol, String],
|
|
26
|
-
name: T.nilable(String),
|
|
27
|
-
request_options: Stigg::RequestOptions::OrHash
|
|
28
|
-
).returns(Stigg::V1::CustomerResponse)
|
|
29
|
-
end
|
|
30
|
-
def create(
|
|
31
|
-
# Customer slug
|
|
32
|
-
id:,
|
|
33
|
-
# Customer level coupon
|
|
34
|
-
coupon_id: nil,
|
|
35
|
-
# The default payment method details
|
|
36
|
-
default_payment_method: nil,
|
|
37
|
-
# The email of the customer
|
|
38
|
-
email: nil,
|
|
39
|
-
# List of integrations
|
|
40
|
-
integrations: nil,
|
|
41
|
-
# Additional metadata
|
|
42
|
-
metadata: nil,
|
|
43
|
-
# The name of the customer
|
|
44
|
-
name: nil,
|
|
45
|
-
request_options: {}
|
|
46
|
-
)
|
|
11
|
+
returns(Stigg::Resources::V1::Customers::PromotionalEntitlements)
|
|
47
12
|
end
|
|
13
|
+
attr_reader :promotional_entitlements
|
|
48
14
|
|
|
49
15
|
# Get a single customer by ID
|
|
50
16
|
sig do
|
|
@@ -128,6 +94,57 @@ module Stigg
|
|
|
128
94
|
)
|
|
129
95
|
end
|
|
130
96
|
|
|
97
|
+
# Bulk import customers
|
|
98
|
+
sig do
|
|
99
|
+
params(
|
|
100
|
+
customers:
|
|
101
|
+
T::Array[Stigg::V1::CustomerImportParams::Customer::OrHash],
|
|
102
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
103
|
+
).returns(Stigg::Models::V1::CustomerImportResponse)
|
|
104
|
+
end
|
|
105
|
+
def import(
|
|
106
|
+
# List of customer objects to import
|
|
107
|
+
customers:,
|
|
108
|
+
request_options: {}
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provision customer
|
|
113
|
+
sig do
|
|
114
|
+
params(
|
|
115
|
+
id: String,
|
|
116
|
+
coupon_id: T.nilable(String),
|
|
117
|
+
default_payment_method:
|
|
118
|
+
T.nilable(
|
|
119
|
+
Stigg::V1::CustomerProvisionParams::DefaultPaymentMethod::OrHash
|
|
120
|
+
),
|
|
121
|
+
email: T.nilable(String),
|
|
122
|
+
integrations:
|
|
123
|
+
T::Array[Stigg::V1::CustomerProvisionParams::Integration::OrHash],
|
|
124
|
+
metadata: T::Hash[Symbol, String],
|
|
125
|
+
name: T.nilable(String),
|
|
126
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
127
|
+
).returns(Stigg::V1::CustomerResponse)
|
|
128
|
+
end
|
|
129
|
+
def provision(
|
|
130
|
+
# Customer slug
|
|
131
|
+
id:,
|
|
132
|
+
# Customer level coupon
|
|
133
|
+
coupon_id: nil,
|
|
134
|
+
# The default payment method details
|
|
135
|
+
default_payment_method: nil,
|
|
136
|
+
# The email of the customer
|
|
137
|
+
email: nil,
|
|
138
|
+
# List of integrations
|
|
139
|
+
integrations: nil,
|
|
140
|
+
# Additional metadata
|
|
141
|
+
metadata: nil,
|
|
142
|
+
# The name of the customer
|
|
143
|
+
name: nil,
|
|
144
|
+
request_options: {}
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
131
148
|
# Unarchive customer
|
|
132
149
|
sig do
|
|
133
150
|
params(
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Resources
|
|
5
|
+
class V1
|
|
6
|
+
class Events
|
|
7
|
+
# Report usage events
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
events: T::Array[Stigg::V1::EventReportParams::Event::OrHash],
|
|
11
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
12
|
+
).returns(Stigg::Models::V1::EventReportResponse)
|
|
13
|
+
end
|
|
14
|
+
def report(
|
|
15
|
+
# A list of usage events to report
|
|
16
|
+
events:,
|
|
17
|
+
request_options: {}
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @api private
|
|
22
|
+
sig { params(client: Stigg::Client).returns(T.attached_class) }
|
|
23
|
+
def self.new(client:)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -10,9 +10,7 @@ module Stigg
|
|
|
10
10
|
params(
|
|
11
11
|
id: String,
|
|
12
12
|
request_options: Stigg::RequestOptions::OrHash
|
|
13
|
-
).returns(
|
|
14
|
-
Stigg::Models::V1::Subscriptions::FutureUpdateCancelPendingPaymentResponse
|
|
15
|
-
)
|
|
13
|
+
).returns(Stigg::V1::Subscriptions::CancelSubscription)
|
|
16
14
|
end
|
|
17
15
|
def cancel_pending_payment(
|
|
18
16
|
# The unique identifier of the entity
|
|
@@ -26,9 +24,7 @@ module Stigg
|
|
|
26
24
|
params(
|
|
27
25
|
id: String,
|
|
28
26
|
request_options: Stigg::RequestOptions::OrHash
|
|
29
|
-
).returns(
|
|
30
|
-
Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleResponse
|
|
31
|
-
)
|
|
27
|
+
).returns(Stigg::V1::Subscriptions::CancelSubscription)
|
|
32
28
|
end
|
|
33
29
|
def cancel_schedule(
|
|
34
30
|
# The unique identifier of the entity
|