stigg 0.1.0.pre.alpha.1 → 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 +22 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +31 -26
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
- data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
- 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_list_params.rb +14 -14
- data/lib/stigg/models/v1/customer_list_response.rb +160 -174
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +18 -16
- data/lib/stigg/models/v1/customer_response.rb +9 -2
- data/lib/stigg/models/v1/customer_update_params.rb +2 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
- data/lib/stigg/models/v1/customers/{promotional_create_params.rb → promotional_entitlement_grant_params.rb} +46 -44
- data/lib/stigg/models/v1/customers/{promotional_create_response.rb → promotional_entitlement_grant_response.rb} +105 -32
- data/lib/stigg/models/v1/customers/{promotional_revoke_params.rb → promotional_entitlement_revoke_params.rb} +2 -2
- data/lib/stigg/models/v1/customers/{promotional_revoke_response.rb → promotional_entitlement_revoke_response.rb} +107 -33
- 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} +67 -26
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- 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_list_params.rb +20 -24
- data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
- data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
- data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
- data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
- data/lib/stigg/models/v1/subscription_provision_params.rb +1693 -0
- data/lib/stigg/models/v1/subscription_provision_response.rb +1038 -0
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- 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} +9 -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 +16 -14
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/{promotional.rb → promotional_entitlements.rb} +17 -17
- data/lib/stigg/resources/v1/customers.rb +78 -56
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +10 -8
- data/lib/stigg/resources/v1/subscriptions.rb +206 -79
- 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 -23
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon.rbi +891 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
- 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_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +36 -35
- data/rbi/stigg/models/v1/customer_response.rbi +8 -1
- data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
- data/rbi/stigg/models/v1/customers/{promotional_create_params.rbi → promotional_entitlement_grant_params.rbi} +78 -77
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/{promotional_revoke_params.rbi → promotional_entitlement_revoke_params.rbi} +2 -2
- 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} +130 -98
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- 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_list_params.rbi +26 -28
- data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
- data/rbi/stigg/models/v1/subscription_provision_params.rbi +5306 -0
- data/rbi/stigg/models/v1/subscription_provision_response.rbi +3175 -0
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- 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} +10 -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 +22 -14
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/{promotional.rbi → promotional_entitlements.rbi} +13 -9
- data/rbi/stigg/resources/v1/customers.rbi +84 -53
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +14 -10
- data/rbi/stigg/resources/v1/subscriptions.rbi +242 -58
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
- data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
- 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_list_params.rbs +11 -11
- data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/{promotional_create_params.rbs → promotional_entitlement_grant_params.rbs} +43 -43
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/{promotional_revoke_params.rbs → promotional_entitlement_revoke_params.rbs} +2 -2
- 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} +61 -35
- 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_list_params.rbs +14 -14
- data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_provision_params.rbs +2223 -0
- data/sig/stigg/models/v1/subscription_provision_response.rbs +1305 -0
- 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 +5 -5
- data/sig/stigg/resources/v1/customers/{promotional.rbs → promotional_entitlements.rbs} +5 -5
- data/sig/stigg/resources/v1/customers.rbs +20 -17
- 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 +68 -20
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -71
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -317
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
- data/lib/stigg/models/v1/subscription_create_params.rb +0 -214
- data/lib/stigg/models/v1/subscription_create_response.rb +0 -338
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -274
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -32
- data/lib/stigg/models/v1_create_event_params.rb +0 -87
- data/lib/stigg/models/v1_create_event_response.rb +0 -16
- data/lib/stigg/models/v1_create_usage_params.rb +0 -96
- data/lib/stigg/models/v1_create_usage_response.rb +0 -112
- data/lib/stigg/resources/v1/customers/usage.rb +0 -59
- data/rbi/stigg/models/v1/coupon_create_response.rbi +0 -986
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -986
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
- data/rbi/stigg/models/v1/subscription_create_params.rbi +0 -394
- data/rbi/stigg/models/v1/subscription_create_response.rbi +0 -668
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -79
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -160
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -23
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -177
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -150
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -45
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
- data/sig/stigg/models/v1/subscription_create_params.rbs +0 -199
- data/sig/stigg/models/v1/subscription_create_response.rbs +0 -283
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -224
- 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 -90
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -21
|
@@ -7,51 +7,15 @@ module Stigg
|
|
|
7
7
|
# @return [Stigg::Resources::V1::Customers::PaymentMethod]
|
|
8
8
|
attr_reader :payment_method
|
|
9
9
|
|
|
10
|
-
# @return [Stigg::Resources::V1::Customers::
|
|
11
|
-
attr_reader :
|
|
10
|
+
# @return [Stigg::Resources::V1::Customers::PromotionalEntitlements]
|
|
11
|
+
attr_reader :promotional_entitlements
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
attr_reader :promotional
|
|
15
|
-
|
|
16
|
-
# Create a new Customer
|
|
17
|
-
#
|
|
18
|
-
# @overload create(id:, coupon_id: nil, default_payment_method: nil, email: nil, integrations: nil, metadata: nil, name: nil, request_options: {})
|
|
19
|
-
#
|
|
20
|
-
# @param id [String] Customer slug
|
|
21
|
-
#
|
|
22
|
-
# @param coupon_id [String, nil] Customer level coupon
|
|
23
|
-
#
|
|
24
|
-
# @param default_payment_method [Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod, nil] The default payment method details
|
|
25
|
-
#
|
|
26
|
-
# @param email [String, nil] The email of the customer
|
|
27
|
-
#
|
|
28
|
-
# @param integrations [Array<Stigg::Models::V1::CustomerCreateParams::Integration>] List of integrations
|
|
29
|
-
#
|
|
30
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
31
|
-
#
|
|
32
|
-
# @param name [String, nil] The name of the customer
|
|
33
|
-
#
|
|
34
|
-
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
|
-
#
|
|
36
|
-
# @return [Stigg::Models::V1::CustomerResponse]
|
|
37
|
-
#
|
|
38
|
-
# @see Stigg::Models::V1::CustomerCreateParams
|
|
39
|
-
def create(params)
|
|
40
|
-
parsed, options = Stigg::V1::CustomerCreateParams.dump_request(params)
|
|
41
|
-
@client.request(
|
|
42
|
-
method: :post,
|
|
43
|
-
path: "api/v1/customers",
|
|
44
|
-
body: parsed,
|
|
45
|
-
model: Stigg::V1::CustomerResponse,
|
|
46
|
-
options: options
|
|
47
|
-
)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Get a single Customer by id
|
|
13
|
+
# Get a single customer by ID
|
|
51
14
|
#
|
|
52
15
|
# @overload retrieve(id, request_options: {})
|
|
53
16
|
#
|
|
54
|
-
# @param id [String]
|
|
17
|
+
# @param id [String] The unique identifier of the entity
|
|
18
|
+
#
|
|
55
19
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
56
20
|
#
|
|
57
21
|
# @return [Stigg::Models::V1::CustomerResponse]
|
|
@@ -66,11 +30,11 @@ module Stigg
|
|
|
66
30
|
)
|
|
67
31
|
end
|
|
68
32
|
|
|
69
|
-
# Update
|
|
33
|
+
# Update a customer
|
|
70
34
|
#
|
|
71
35
|
# @overload update(id, coupon_id: nil, email: nil, integrations: nil, metadata: nil, name: nil, request_options: {})
|
|
72
36
|
#
|
|
73
|
-
# @param id [String]
|
|
37
|
+
# @param id [String] The unique identifier of the entity
|
|
74
38
|
#
|
|
75
39
|
# @param coupon_id [String, nil] Customer level coupon
|
|
76
40
|
#
|
|
@@ -98,19 +62,19 @@ module Stigg
|
|
|
98
62
|
)
|
|
99
63
|
end
|
|
100
64
|
|
|
101
|
-
# Get a list of
|
|
65
|
+
# Get a list of customers
|
|
102
66
|
#
|
|
103
|
-
# @overload list(
|
|
67
|
+
# @overload list(after: nil, before: nil, limit: nil, request_options: {})
|
|
104
68
|
#
|
|
105
|
-
# @param
|
|
69
|
+
# @param after [String] Return items that come after this cursor
|
|
106
70
|
#
|
|
107
|
-
# @param
|
|
71
|
+
# @param before [String] Return items that come before this cursor
|
|
108
72
|
#
|
|
109
|
-
# @param
|
|
73
|
+
# @param limit [Integer] Maximum number of items to return
|
|
110
74
|
#
|
|
111
75
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
112
76
|
#
|
|
113
|
-
# @return [Stigg::Models::V1::CustomerListResponse]
|
|
77
|
+
# @return [Stigg::Internal::MyCursorIDPage<Stigg::Models::V1::CustomerListResponse>]
|
|
114
78
|
#
|
|
115
79
|
# @see Stigg::Models::V1::CustomerListParams
|
|
116
80
|
def list(params = {})
|
|
@@ -118,17 +82,19 @@ module Stigg
|
|
|
118
82
|
@client.request(
|
|
119
83
|
method: :get,
|
|
120
84
|
path: "api/v1/customers",
|
|
121
|
-
query: parsed
|
|
85
|
+
query: parsed,
|
|
86
|
+
page: Stigg::Internal::MyCursorIDPage,
|
|
122
87
|
model: Stigg::Models::V1::CustomerListResponse,
|
|
123
88
|
options: options
|
|
124
89
|
)
|
|
125
90
|
end
|
|
126
91
|
|
|
127
|
-
#
|
|
92
|
+
# Archive customer
|
|
128
93
|
#
|
|
129
94
|
# @overload archive(id, request_options: {})
|
|
130
95
|
#
|
|
131
|
-
# @param id [String]
|
|
96
|
+
# @param id [String] The unique identifier of the entity
|
|
97
|
+
#
|
|
132
98
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
133
99
|
#
|
|
134
100
|
# @return [Stigg::Models::V1::CustomerResponse]
|
|
@@ -143,11 +109,68 @@ module Stigg
|
|
|
143
109
|
)
|
|
144
110
|
end
|
|
145
111
|
|
|
146
|
-
#
|
|
112
|
+
# Bulk import customers
|
|
113
|
+
#
|
|
114
|
+
# @overload import(customers:, request_options: {})
|
|
115
|
+
#
|
|
116
|
+
# @param customers [Array<Stigg::Models::V1::CustomerImportParams::Customer>] List of customer objects to import
|
|
117
|
+
#
|
|
118
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
119
|
+
#
|
|
120
|
+
# @return [Stigg::Models::V1::CustomerImportResponse]
|
|
121
|
+
#
|
|
122
|
+
# @see Stigg::Models::V1::CustomerImportParams
|
|
123
|
+
def import(params)
|
|
124
|
+
parsed, options = Stigg::V1::CustomerImportParams.dump_request(params)
|
|
125
|
+
@client.request(
|
|
126
|
+
method: :post,
|
|
127
|
+
path: "api/v1/customers/import",
|
|
128
|
+
body: parsed,
|
|
129
|
+
model: Stigg::Models::V1::CustomerImportResponse,
|
|
130
|
+
options: options
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Provision customer
|
|
135
|
+
#
|
|
136
|
+
# @overload provision(id:, coupon_id: nil, default_payment_method: nil, email: nil, integrations: nil, metadata: nil, name: nil, request_options: {})
|
|
137
|
+
#
|
|
138
|
+
# @param id [String] Customer slug
|
|
139
|
+
#
|
|
140
|
+
# @param coupon_id [String, nil] Customer level coupon
|
|
141
|
+
#
|
|
142
|
+
# @param default_payment_method [Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod, nil] The default payment method details
|
|
143
|
+
#
|
|
144
|
+
# @param email [String, nil] The email of the customer
|
|
145
|
+
#
|
|
146
|
+
# @param integrations [Array<Stigg::Models::V1::CustomerProvisionParams::Integration>] List of integrations
|
|
147
|
+
#
|
|
148
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
149
|
+
#
|
|
150
|
+
# @param name [String, nil] The name of the customer
|
|
151
|
+
#
|
|
152
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
153
|
+
#
|
|
154
|
+
# @return [Stigg::Models::V1::CustomerResponse]
|
|
155
|
+
#
|
|
156
|
+
# @see Stigg::Models::V1::CustomerProvisionParams
|
|
157
|
+
def provision(params)
|
|
158
|
+
parsed, options = Stigg::V1::CustomerProvisionParams.dump_request(params)
|
|
159
|
+
@client.request(
|
|
160
|
+
method: :post,
|
|
161
|
+
path: "api/v1/customers",
|
|
162
|
+
body: parsed,
|
|
163
|
+
model: Stigg::V1::CustomerResponse,
|
|
164
|
+
options: options
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Unarchive customer
|
|
147
169
|
#
|
|
148
170
|
# @overload unarchive(id, request_options: {})
|
|
149
171
|
#
|
|
150
|
-
# @param id [String]
|
|
172
|
+
# @param id [String] The unique identifier of the entity
|
|
173
|
+
#
|
|
151
174
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
152
175
|
#
|
|
153
176
|
# @return [Stigg::Models::V1::CustomerResponse]
|
|
@@ -168,8 +191,7 @@ module Stigg
|
|
|
168
191
|
def initialize(client:)
|
|
169
192
|
@client = client
|
|
170
193
|
@payment_method = Stigg::Resources::V1::Customers::PaymentMethod.new(client: client)
|
|
171
|
-
@
|
|
172
|
-
@promotional = Stigg::Resources::V1::Customers::Promotional.new(client: client)
|
|
194
|
+
@promotional_entitlements = Stigg::Resources::V1::Customers::PromotionalEntitlements.new(client: client)
|
|
173
195
|
end
|
|
174
196
|
end
|
|
175
197
|
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Resources
|
|
5
|
+
class V1
|
|
6
|
+
class Events
|
|
7
|
+
# Report usage events
|
|
8
|
+
#
|
|
9
|
+
# @overload report(events:, request_options: {})
|
|
10
|
+
#
|
|
11
|
+
# @param events [Array<Stigg::Models::V1::EventReportParams::Event>] A list of usage events to report
|
|
12
|
+
#
|
|
13
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
14
|
+
#
|
|
15
|
+
# @return [Stigg::Models::V1::EventReportResponse]
|
|
16
|
+
#
|
|
17
|
+
# @see Stigg::Models::V1::EventReportParams
|
|
18
|
+
def report(params)
|
|
19
|
+
parsed, options = Stigg::V1::EventReportParams.dump_request(params)
|
|
20
|
+
@client.request(
|
|
21
|
+
method: :post,
|
|
22
|
+
path: "api/v1/events",
|
|
23
|
+
body: parsed,
|
|
24
|
+
model: Stigg::Models::V1::EventReportResponse,
|
|
25
|
+
options: options
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @api private
|
|
30
|
+
#
|
|
31
|
+
# @param client [Stigg::Client]
|
|
32
|
+
def initialize(client:)
|
|
33
|
+
@client = client
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -5,40 +5,42 @@ module Stigg
|
|
|
5
5
|
class V1
|
|
6
6
|
class Subscriptions
|
|
7
7
|
class FutureUpdate
|
|
8
|
-
#
|
|
8
|
+
# Cancel pending payment update
|
|
9
9
|
#
|
|
10
10
|
# @overload cancel_pending_payment(id, request_options: {})
|
|
11
11
|
#
|
|
12
|
-
# @param id [String]
|
|
12
|
+
# @param id [String] The unique identifier of the entity
|
|
13
|
+
#
|
|
13
14
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
14
15
|
#
|
|
15
|
-
# @return [Stigg::Models::V1::Subscriptions::
|
|
16
|
+
# @return [Stigg::Models::V1::Subscriptions::CancelSubscription]
|
|
16
17
|
#
|
|
17
18
|
# @see Stigg::Models::V1::Subscriptions::FutureUpdateCancelPendingPaymentParams
|
|
18
19
|
def cancel_pending_payment(id, params = {})
|
|
19
20
|
@client.request(
|
|
20
21
|
method: :delete,
|
|
21
22
|
path: ["api/v1/subscriptions/%1$s/future-update/pending-payment", id],
|
|
22
|
-
model: Stigg::
|
|
23
|
+
model: Stigg::V1::Subscriptions::CancelSubscription,
|
|
23
24
|
options: params[:request_options]
|
|
24
25
|
)
|
|
25
26
|
end
|
|
26
27
|
|
|
27
|
-
#
|
|
28
|
+
# Cancel scheduled update
|
|
28
29
|
#
|
|
29
30
|
# @overload cancel_schedule(id, request_options: {})
|
|
30
31
|
#
|
|
31
|
-
# @param id [String]
|
|
32
|
+
# @param id [String] The unique identifier of the entity
|
|
33
|
+
#
|
|
32
34
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
33
35
|
#
|
|
34
|
-
# @return [Stigg::Models::V1::Subscriptions::
|
|
36
|
+
# @return [Stigg::Models::V1::Subscriptions::CancelSubscription]
|
|
35
37
|
#
|
|
36
38
|
# @see Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleParams
|
|
37
39
|
def cancel_schedule(id, params = {})
|
|
38
40
|
@client.request(
|
|
39
41
|
method: :delete,
|
|
40
42
|
path: ["api/v1/subscriptions/%1$s/future-update/schedule", id],
|
|
41
|
-
model: Stigg::
|
|
43
|
+
model: Stigg::V1::Subscriptions::CancelSubscription,
|
|
42
44
|
options: params[:request_options]
|
|
43
45
|
)
|
|
44
46
|
end
|