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
|
@@ -5,318 +5,302 @@ module Stigg
|
|
|
5
5
|
module V1
|
|
6
6
|
# @see Stigg::Resources::V1::Coupons#list
|
|
7
7
|
class CouponListResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# The unique identifier for the entity
|
|
9
10
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
12
13
|
|
|
13
|
-
# @!
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
# @!attribute amounts_off
|
|
15
|
+
# Fixed amount discounts in different currencies
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil]
|
|
18
|
+
required :amounts_off,
|
|
19
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::AmountsOff] },
|
|
20
|
+
api_name: :amountsOff,
|
|
21
|
+
nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute billing_id
|
|
24
|
+
# The unique identifier for the entity in the billing provider
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::Data::AmountsOff] },
|
|
29
|
-
api_name: :amountsOff,
|
|
30
|
-
nil?: true
|
|
29
|
+
# @!attribute billing_link_url
|
|
30
|
+
# The URL to the entity in the billing provider
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :billing_link_url, String, api_name: :billingLinkUrl, nil?: true
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
# @!attribute created_at
|
|
36
|
+
# Timestamp of when the record was created
|
|
37
|
+
#
|
|
38
|
+
# @return [Time]
|
|
39
|
+
required :created_at, Time, api_name: :createdAt
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
# @!attribute description
|
|
42
|
+
# Description of the coupon
|
|
43
|
+
#
|
|
44
|
+
# @return [String, nil]
|
|
45
|
+
required :description, String, nil?: true
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
# @!attribute duration_in_months
|
|
48
|
+
# Duration of the coupon validity in months
|
|
49
|
+
#
|
|
50
|
+
# @return [Float, nil]
|
|
51
|
+
required :duration_in_months, Float, api_name: :durationInMonths, nil?: true
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
# @!attribute name
|
|
54
|
+
# Name of the coupon
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
required :name, String
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
# @!attribute percent_off
|
|
60
|
+
# Percentage discount off the original price
|
|
61
|
+
#
|
|
62
|
+
# @return [Float, nil]
|
|
63
|
+
required :percent_off, Float, api_name: :percentOff, nil?: true
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
# @!attribute source
|
|
66
|
+
# The source of the coupon
|
|
67
|
+
#
|
|
68
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil]
|
|
69
|
+
required :source, enum: -> { Stigg::Models::V1::CouponListResponse::Source }, nil?: true
|
|
67
70
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
# @!attribute status
|
|
72
|
+
# Current status of the coupon
|
|
73
|
+
#
|
|
74
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Status]
|
|
75
|
+
required :status, enum: -> { Stigg::Models::V1::CouponListResponse::Status }
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
# @!attribute type
|
|
78
|
+
# Type of the coupon (percentage or fixed amount)
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Type]
|
|
81
|
+
required :type, enum: -> { Stigg::Models::V1::CouponListResponse::Type }
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
# @!attribute updated_at
|
|
84
|
+
# Timestamp of when the record was last updated
|
|
85
|
+
#
|
|
86
|
+
# @return [Time]
|
|
87
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
# @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
|
|
90
|
+
# Discount instrument with percentage or fixed amount
|
|
91
|
+
#
|
|
92
|
+
# @param id [String] The unique identifier for the entity
|
|
93
|
+
#
|
|
94
|
+
# @param amounts_off [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil] Fixed amount discounts in different currencies
|
|
95
|
+
#
|
|
96
|
+
# @param billing_id [String, nil] The unique identifier for the entity in the billing provider
|
|
97
|
+
#
|
|
98
|
+
# @param billing_link_url [String, nil] The URL to the entity in the billing provider
|
|
99
|
+
#
|
|
100
|
+
# @param created_at [Time] Timestamp of when the record was created
|
|
101
|
+
#
|
|
102
|
+
# @param description [String, nil] Description of the coupon
|
|
103
|
+
#
|
|
104
|
+
# @param duration_in_months [Float, nil] Duration of the coupon validity in months
|
|
105
|
+
#
|
|
106
|
+
# @param name [String] Name of the coupon
|
|
107
|
+
#
|
|
108
|
+
# @param percent_off [Float, nil] Percentage discount off the original price
|
|
109
|
+
#
|
|
110
|
+
# @param source [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil] The source of the coupon
|
|
111
|
+
#
|
|
112
|
+
# @param status [Symbol, Stigg::Models::V1::CouponListResponse::Status] Current status of the coupon
|
|
113
|
+
#
|
|
114
|
+
# @param type [Symbol, Stigg::Models::V1::CouponListResponse::Type] Type of the coupon (percentage or fixed amount)
|
|
115
|
+
#
|
|
116
|
+
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
91
117
|
|
|
92
|
-
|
|
93
|
-
#
|
|
118
|
+
class AmountsOff < Stigg::Internal::Type::BaseModel
|
|
119
|
+
# @!attribute amount
|
|
120
|
+
# The price amount
|
|
94
121
|
#
|
|
95
|
-
# @return [
|
|
96
|
-
required :
|
|
122
|
+
# @return [Float]
|
|
123
|
+
required :amount, Float
|
|
97
124
|
|
|
98
|
-
# @!attribute
|
|
99
|
-
#
|
|
125
|
+
# @!attribute currency
|
|
126
|
+
# The price currency
|
|
100
127
|
#
|
|
101
|
-
# @return [
|
|
102
|
-
required :
|
|
128
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency]
|
|
129
|
+
required :currency, enum: -> { Stigg::Models::V1::CouponListResponse::AmountsOff::Currency }
|
|
103
130
|
|
|
104
|
-
# @!method initialize(
|
|
105
|
-
#
|
|
131
|
+
# @!method initialize(amount:, currency:)
|
|
132
|
+
# Monetary amount with currency
|
|
106
133
|
#
|
|
107
|
-
# @param
|
|
134
|
+
# @param amount [Float] The price amount
|
|
108
135
|
#
|
|
109
|
-
# @param
|
|
110
|
-
#
|
|
111
|
-
# @param billing_link_url [String, nil] The URL to the entity in the billing provider
|
|
112
|
-
#
|
|
113
|
-
# @param created_at [Time] Timestamp of when the record was created
|
|
114
|
-
#
|
|
115
|
-
# @param cursor_id [String] Cursor ID for query pagination
|
|
116
|
-
#
|
|
117
|
-
# @param description [String, nil] Description of the coupon
|
|
118
|
-
#
|
|
119
|
-
# @param duration_in_months [Float, nil] Duration of the coupon validity in months
|
|
120
|
-
#
|
|
121
|
-
# @param name [String] Name of the coupon
|
|
122
|
-
#
|
|
123
|
-
# @param percent_off [Float, nil] Percentage discount off the original price
|
|
124
|
-
#
|
|
125
|
-
# @param source [Symbol, Stigg::Models::V1::CouponListResponse::Data::Source, nil] The source of the coupon
|
|
126
|
-
#
|
|
127
|
-
# @param status [Symbol, Stigg::Models::V1::CouponListResponse::Data::Status] Current status of the coupon
|
|
128
|
-
#
|
|
129
|
-
# @param type [Symbol, Stigg::Models::V1::CouponListResponse::Data::Type] Type of the coupon (percentage or fixed amount)
|
|
130
|
-
#
|
|
131
|
-
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
132
|
-
|
|
133
|
-
class AmountsOff < Stigg::Internal::Type::BaseModel
|
|
134
|
-
# @!attribute amount
|
|
135
|
-
# The price amount
|
|
136
|
-
#
|
|
137
|
-
# @return [Float]
|
|
138
|
-
required :amount, Float
|
|
139
|
-
|
|
140
|
-
# @!attribute currency
|
|
141
|
-
# The price currency
|
|
142
|
-
#
|
|
143
|
-
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil]
|
|
144
|
-
required :currency,
|
|
145
|
-
enum: -> { Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency },
|
|
146
|
-
nil?: true
|
|
147
|
-
|
|
148
|
-
# @!method initialize(amount:, currency:)
|
|
149
|
-
# @param amount [Float] The price amount
|
|
150
|
-
#
|
|
151
|
-
# @param currency [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil] The price currency
|
|
152
|
-
|
|
153
|
-
# The price currency
|
|
154
|
-
#
|
|
155
|
-
# @see Stigg::Models::V1::CouponListResponse::Data::AmountsOff#currency
|
|
156
|
-
module Currency
|
|
157
|
-
extend Stigg::Internal::Type::Enum
|
|
136
|
+
# @param currency [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency] The price currency
|
|
158
137
|
|
|
159
|
-
|
|
160
|
-
AED = :aed
|
|
161
|
-
ALL = :all
|
|
162
|
-
AMD = :amd
|
|
163
|
-
ANG = :ang
|
|
164
|
-
AUD = :aud
|
|
165
|
-
AWG = :awg
|
|
166
|
-
AZN = :azn
|
|
167
|
-
BAM = :bam
|
|
168
|
-
BBD = :bbd
|
|
169
|
-
BDT = :bdt
|
|
170
|
-
BGN = :bgn
|
|
171
|
-
BIF = :bif
|
|
172
|
-
BMD = :bmd
|
|
173
|
-
BND = :bnd
|
|
174
|
-
BSD = :bsd
|
|
175
|
-
BWP = :bwp
|
|
176
|
-
BYN = :byn
|
|
177
|
-
BZD = :bzd
|
|
178
|
-
BRL = :brl
|
|
179
|
-
CAD = :cad
|
|
180
|
-
CDF = :cdf
|
|
181
|
-
CHF = :chf
|
|
182
|
-
CNY = :cny
|
|
183
|
-
CZK = :czk
|
|
184
|
-
DKK = :dkk
|
|
185
|
-
DOP = :dop
|
|
186
|
-
DZD = :dzd
|
|
187
|
-
EGP = :egp
|
|
188
|
-
ETB = :etb
|
|
189
|
-
EUR = :eur
|
|
190
|
-
FJD = :fjd
|
|
191
|
-
GBP = :gbp
|
|
192
|
-
GEL = :gel
|
|
193
|
-
GIP = :gip
|
|
194
|
-
GMD = :gmd
|
|
195
|
-
GYD = :gyd
|
|
196
|
-
HKD = :hkd
|
|
197
|
-
HRK = :hrk
|
|
198
|
-
HTG = :htg
|
|
199
|
-
IDR = :idr
|
|
200
|
-
ILS = :ils
|
|
201
|
-
INR = :inr
|
|
202
|
-
ISK = :isk
|
|
203
|
-
JMD = :jmd
|
|
204
|
-
JPY = :jpy
|
|
205
|
-
KES = :kes
|
|
206
|
-
KGS = :kgs
|
|
207
|
-
KHR = :khr
|
|
208
|
-
KMF = :kmf
|
|
209
|
-
KRW = :krw
|
|
210
|
-
KYD = :kyd
|
|
211
|
-
KZT = :kzt
|
|
212
|
-
LBP = :lbp
|
|
213
|
-
LKR = :lkr
|
|
214
|
-
LRD = :lrd
|
|
215
|
-
LSL = :lsl
|
|
216
|
-
MAD = :mad
|
|
217
|
-
MDL = :mdl
|
|
218
|
-
MGA = :mga
|
|
219
|
-
MKD = :mkd
|
|
220
|
-
MMK = :mmk
|
|
221
|
-
MNT = :mnt
|
|
222
|
-
MOP = :mop
|
|
223
|
-
MRO = :mro
|
|
224
|
-
MVR = :mvr
|
|
225
|
-
MWK = :mwk
|
|
226
|
-
MXN = :mxn
|
|
227
|
-
MYR = :myr
|
|
228
|
-
MZN = :mzn
|
|
229
|
-
NAD = :nad
|
|
230
|
-
NGN = :ngn
|
|
231
|
-
NOK = :nok
|
|
232
|
-
NPR = :npr
|
|
233
|
-
NZD = :nzd
|
|
234
|
-
PGK = :pgk
|
|
235
|
-
PHP = :php
|
|
236
|
-
PKR = :pkr
|
|
237
|
-
PLN = :pln
|
|
238
|
-
QAR = :qar
|
|
239
|
-
RON = :ron
|
|
240
|
-
RSD = :rsd
|
|
241
|
-
RUB = :rub
|
|
242
|
-
RWF = :rwf
|
|
243
|
-
SAR = :sar
|
|
244
|
-
SBD = :sbd
|
|
245
|
-
SCR = :scr
|
|
246
|
-
SEK = :sek
|
|
247
|
-
SGD = :sgd
|
|
248
|
-
SLE = :sle
|
|
249
|
-
SLL = :sll
|
|
250
|
-
SOS = :sos
|
|
251
|
-
SZL = :szl
|
|
252
|
-
THB = :thb
|
|
253
|
-
TJS = :tjs
|
|
254
|
-
TOP = :top
|
|
255
|
-
TRY = :try
|
|
256
|
-
TTD = :ttd
|
|
257
|
-
TZS = :tzs
|
|
258
|
-
UAH = :uah
|
|
259
|
-
UZS = :uzs
|
|
260
|
-
VND = :vnd
|
|
261
|
-
VUV = :vuv
|
|
262
|
-
WST = :wst
|
|
263
|
-
XAF = :xaf
|
|
264
|
-
XCD = :xcd
|
|
265
|
-
YER = :yer
|
|
266
|
-
ZAR = :zar
|
|
267
|
-
ZMW = :zmw
|
|
268
|
-
CLP = :clp
|
|
269
|
-
DJF = :djf
|
|
270
|
-
GNF = :gnf
|
|
271
|
-
UGX = :ugx
|
|
272
|
-
PYG = :pyg
|
|
273
|
-
XOF = :xof
|
|
274
|
-
XPF = :xpf
|
|
275
|
-
|
|
276
|
-
# @!method self.values
|
|
277
|
-
# @return [Array<Symbol>]
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
# The source of the coupon
|
|
138
|
+
# The price currency
|
|
282
139
|
#
|
|
283
|
-
# @see Stigg::Models::V1::CouponListResponse::
|
|
284
|
-
module
|
|
140
|
+
# @see Stigg::Models::V1::CouponListResponse::AmountsOff#currency
|
|
141
|
+
module Currency
|
|
285
142
|
extend Stigg::Internal::Type::Enum
|
|
286
143
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
144
|
+
USD = :usd
|
|
145
|
+
AED = :aed
|
|
146
|
+
ALL = :all
|
|
147
|
+
AMD = :amd
|
|
148
|
+
ANG = :ang
|
|
149
|
+
AUD = :aud
|
|
150
|
+
AWG = :awg
|
|
151
|
+
AZN = :azn
|
|
152
|
+
BAM = :bam
|
|
153
|
+
BBD = :bbd
|
|
154
|
+
BDT = :bdt
|
|
155
|
+
BGN = :bgn
|
|
156
|
+
BIF = :bif
|
|
157
|
+
BMD = :bmd
|
|
158
|
+
BND = :bnd
|
|
159
|
+
BSD = :bsd
|
|
160
|
+
BWP = :bwp
|
|
161
|
+
BYN = :byn
|
|
162
|
+
BZD = :bzd
|
|
163
|
+
BRL = :brl
|
|
164
|
+
CAD = :cad
|
|
165
|
+
CDF = :cdf
|
|
166
|
+
CHF = :chf
|
|
167
|
+
CNY = :cny
|
|
168
|
+
CZK = :czk
|
|
169
|
+
DKK = :dkk
|
|
170
|
+
DOP = :dop
|
|
171
|
+
DZD = :dzd
|
|
172
|
+
EGP = :egp
|
|
173
|
+
ETB = :etb
|
|
174
|
+
EUR = :eur
|
|
175
|
+
FJD = :fjd
|
|
176
|
+
GBP = :gbp
|
|
177
|
+
GEL = :gel
|
|
178
|
+
GIP = :gip
|
|
179
|
+
GMD = :gmd
|
|
180
|
+
GYD = :gyd
|
|
181
|
+
HKD = :hkd
|
|
182
|
+
HRK = :hrk
|
|
183
|
+
HTG = :htg
|
|
184
|
+
IDR = :idr
|
|
185
|
+
ILS = :ils
|
|
186
|
+
INR = :inr
|
|
187
|
+
ISK = :isk
|
|
188
|
+
JMD = :jmd
|
|
189
|
+
JPY = :jpy
|
|
190
|
+
KES = :kes
|
|
191
|
+
KGS = :kgs
|
|
192
|
+
KHR = :khr
|
|
193
|
+
KMF = :kmf
|
|
194
|
+
KRW = :krw
|
|
195
|
+
KYD = :kyd
|
|
196
|
+
KZT = :kzt
|
|
197
|
+
LBP = :lbp
|
|
198
|
+
LKR = :lkr
|
|
199
|
+
LRD = :lrd
|
|
200
|
+
LSL = :lsl
|
|
201
|
+
MAD = :mad
|
|
202
|
+
MDL = :mdl
|
|
203
|
+
MGA = :mga
|
|
204
|
+
MKD = :mkd
|
|
205
|
+
MMK = :mmk
|
|
206
|
+
MNT = :mnt
|
|
207
|
+
MOP = :mop
|
|
208
|
+
MRO = :mro
|
|
209
|
+
MVR = :mvr
|
|
210
|
+
MWK = :mwk
|
|
211
|
+
MXN = :mxn
|
|
212
|
+
MYR = :myr
|
|
213
|
+
MZN = :mzn
|
|
214
|
+
NAD = :nad
|
|
215
|
+
NGN = :ngn
|
|
216
|
+
NOK = :nok
|
|
217
|
+
NPR = :npr
|
|
218
|
+
NZD = :nzd
|
|
219
|
+
PGK = :pgk
|
|
220
|
+
PHP = :php
|
|
221
|
+
PKR = :pkr
|
|
222
|
+
PLN = :pln
|
|
223
|
+
QAR = :qar
|
|
224
|
+
RON = :ron
|
|
225
|
+
RSD = :rsd
|
|
226
|
+
RUB = :rub
|
|
227
|
+
RWF = :rwf
|
|
228
|
+
SAR = :sar
|
|
229
|
+
SBD = :sbd
|
|
230
|
+
SCR = :scr
|
|
231
|
+
SEK = :sek
|
|
232
|
+
SGD = :sgd
|
|
233
|
+
SLE = :sle
|
|
234
|
+
SLL = :sll
|
|
235
|
+
SOS = :sos
|
|
236
|
+
SZL = :szl
|
|
237
|
+
THB = :thb
|
|
238
|
+
TJS = :tjs
|
|
239
|
+
TOP = :top
|
|
240
|
+
TRY = :try
|
|
241
|
+
TTD = :ttd
|
|
242
|
+
TZS = :tzs
|
|
243
|
+
UAH = :uah
|
|
244
|
+
UZS = :uzs
|
|
245
|
+
VND = :vnd
|
|
246
|
+
VUV = :vuv
|
|
247
|
+
WST = :wst
|
|
248
|
+
XAF = :xaf
|
|
249
|
+
XCD = :xcd
|
|
250
|
+
YER = :yer
|
|
251
|
+
ZAR = :zar
|
|
252
|
+
ZMW = :zmw
|
|
253
|
+
CLP = :clp
|
|
254
|
+
DJF = :djf
|
|
255
|
+
GNF = :gnf
|
|
256
|
+
UGX = :ugx
|
|
257
|
+
PYG = :pyg
|
|
258
|
+
XOF = :xof
|
|
259
|
+
XPF = :xpf
|
|
290
260
|
|
|
291
261
|
# @!method self.values
|
|
292
262
|
# @return [Array<Symbol>]
|
|
293
263
|
end
|
|
264
|
+
end
|
|
294
265
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
266
|
+
# The source of the coupon
|
|
267
|
+
#
|
|
268
|
+
# @see Stigg::Models::V1::CouponListResponse#source
|
|
269
|
+
module Source
|
|
270
|
+
extend Stigg::Internal::Type::Enum
|
|
300
271
|
|
|
301
|
-
|
|
302
|
-
|
|
272
|
+
STIGG = :STIGG
|
|
273
|
+
STIGG_ADHOC = :STIGG_ADHOC
|
|
274
|
+
STRIPE = :STRIPE
|
|
303
275
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
276
|
+
# @!method self.values
|
|
277
|
+
# @return [Array<Symbol>]
|
|
278
|
+
end
|
|
307
279
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
280
|
+
# Current status of the coupon
|
|
281
|
+
#
|
|
282
|
+
# @see Stigg::Models::V1::CouponListResponse#status
|
|
283
|
+
module Status
|
|
284
|
+
extend Stigg::Internal::Type::Enum
|
|
313
285
|
|
|
314
|
-
|
|
315
|
-
|
|
286
|
+
ACTIVE = :ACTIVE
|
|
287
|
+
ARCHIVED = :ARCHIVED
|
|
316
288
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
289
|
+
# @!method self.values
|
|
290
|
+
# @return [Array<Symbol>]
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Type of the coupon (percentage or fixed amount)
|
|
294
|
+
#
|
|
295
|
+
# @see Stigg::Models::V1::CouponListResponse#type
|
|
296
|
+
module Type
|
|
297
|
+
extend Stigg::Internal::Type::Enum
|
|
298
|
+
|
|
299
|
+
FIXED = :FIXED
|
|
300
|
+
PERCENTAGE = :PERCENTAGE
|
|
301
|
+
|
|
302
|
+
# @!method self.values
|
|
303
|
+
# @return [Array<Symbol>]
|
|
320
304
|
end
|
|
321
305
|
end
|
|
322
306
|
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Customers#import
|
|
7
|
+
class CustomerImportParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customers
|
|
12
|
+
# List of customer objects to import
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Stigg::Models::V1::CustomerImportParams::Customer>]
|
|
15
|
+
required :customers, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerImportParams::Customer] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(customers:, request_options: {})
|
|
18
|
+
# @param customers [Array<Stigg::Models::V1::CustomerImportParams::Customer>] List of customer objects to import
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
|
|
22
|
+
class Customer < Stigg::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute id
|
|
24
|
+
# Customer slug
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :id, String
|
|
28
|
+
|
|
29
|
+
# @!attribute email
|
|
30
|
+
# The email of the customer
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :email, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute name
|
|
36
|
+
# The name of the customer
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
required :name, String, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!attribute metadata
|
|
42
|
+
# Additional metadata
|
|
43
|
+
#
|
|
44
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
45
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
46
|
+
|
|
47
|
+
# @!attribute payment_method_id
|
|
48
|
+
# Billing provider payment method id
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :payment_method_id, String, api_name: :paymentMethodId
|
|
52
|
+
|
|
53
|
+
# @!attribute updated_at
|
|
54
|
+
# Timestamp of when the record was last updated
|
|
55
|
+
#
|
|
56
|
+
# @return [Time, nil]
|
|
57
|
+
optional :updated_at, Time, api_name: :updatedAt
|
|
58
|
+
|
|
59
|
+
# @!method initialize(id:, email:, name:, metadata: nil, payment_method_id: nil, updated_at: nil)
|
|
60
|
+
# @param id [String] Customer slug
|
|
61
|
+
#
|
|
62
|
+
# @param email [String, nil] The email of the customer
|
|
63
|
+
#
|
|
64
|
+
# @param name [String, nil] The name of the customer
|
|
65
|
+
#
|
|
66
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
67
|
+
#
|
|
68
|
+
# @param payment_method_id [String] Billing provider payment method id
|
|
69
|
+
#
|
|
70
|
+
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|