smplkit 2.0.13 → 2.0.14
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/lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb +11 -11
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/api_keys_api.rb +18 -18
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +21 -21
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb +18 -18
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb +11 -11
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/environments_api.rb +18 -18
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/metrics_api.rb +2 -2
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/services_api.rb +18 -18
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/users_api.rb +18 -18
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account.rb +14 -31
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account_wipe_request.rb +3 -3
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/add_payment_method_attributes.rb +3 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/add_payment_method_body.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/add_payment_method_data.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key.rb +15 -16
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/auth_token_response.rb +3 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb +6 -3
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_batch_response.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_bulk_item.rb +4 -2
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_bulk_register.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type.rb +5 -2
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_attributes.rb +4 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_body.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_data.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/email.rb +3 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/email_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/email_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment.rb +6 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation.rb +11 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_accept_request.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_bulk_create_request.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_create_item.rb +3 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice.rb +13 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_single_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/limit_definition.rb +5 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/login_request.rb +3 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_attributes.rb +7 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_bulk_request.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_name_item.rb +3 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_names_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_attributes.rb +6 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/next_tier_meta.rb +4 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/page_meta.rb +5 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method.rb +9 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan.rb +4 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_change_request.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_definition.rb +3 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product.rb +8 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/register_request.rb +4 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service.rb +4 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/setup_intent_attributes.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/setup_intent_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_attributes.rb +8 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_meta.rb +6 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user.rb +11 -21
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_request.rb +165 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_resource.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_response.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/value.rb +1 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/verify_email_request.rb +2 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +8 -0
- data/lib/smplkit/_generated/app/spec/api/account_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/api_keys_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +7 -7
- data/lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/environments_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/metrics_api_spec.rb +1 -1
- data/lib/smplkit/_generated/app/spec/api/services_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/api/users_api_spec.rb +2 -2
- data/lib/smplkit/_generated/app/spec/models/account_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/api_key_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/api_key_spec.rb +0 -6
- data/lib/smplkit/_generated/app/spec/models/context_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/context_type_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/environment_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/payment_method_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/service_request_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/user_request_spec.rb +36 -0
- metadata +17 -1
|
@@ -14,22 +14,30 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
-
#
|
|
17
|
+
# A saved card on file for the account, used to charge subscription invoices. The default payment method is changed via the `set_default` action rather than by updating this field through PUT.
|
|
18
18
|
class PaymentMethod < ApiModelBase
|
|
19
|
+
# Card network brand, e.g. `visa`, `mastercard`, `amex`.
|
|
19
20
|
attr_accessor :brand
|
|
20
21
|
|
|
22
|
+
# Last four digits of the card number.
|
|
21
23
|
attr_accessor :last4
|
|
22
24
|
|
|
25
|
+
# Expiry month (1-12).
|
|
23
26
|
attr_accessor :exp_month
|
|
24
27
|
|
|
28
|
+
# Expiry year (four-digit).
|
|
25
29
|
attr_accessor :exp_year
|
|
26
30
|
|
|
31
|
+
# Whether this payment method is the account's default for subscription charges. Use the `set_default` action to change which payment method is default — this field is not writable via PUT.
|
|
27
32
|
attr_accessor :default
|
|
28
33
|
|
|
34
|
+
# Billing details (name, email, phone, address) associated with the card.
|
|
29
35
|
attr_accessor :billing_details
|
|
30
36
|
|
|
37
|
+
# When the payment method was registered.
|
|
31
38
|
attr_accessor :created_at
|
|
32
39
|
|
|
40
|
+
# When the payment method was last modified.
|
|
33
41
|
attr_accessor :updated_at
|
|
34
42
|
|
|
35
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API request envelope for updating a payment method.
|
|
18
|
+
class PaymentMethodRequest < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'PaymentMethodResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::PaymentMethodRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::PaymentMethodRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API resource envelope for a payment method. `id` must not be specified for create requests (the server assigns it).
|
|
17
18
|
class PaymentMethodResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# A plan tier offered across smplkit products.
|
|
17
18
|
class Plan < ApiModelBase
|
|
19
|
+
# Human-readable plan name.
|
|
18
20
|
attr_accessor :display_name
|
|
19
21
|
|
|
22
|
+
# Long-form plan description.
|
|
20
23
|
attr_accessor :description
|
|
21
24
|
|
|
25
|
+
# Order in which the plan should be shown in customer-facing lists. Lower values sort first.
|
|
22
26
|
attr_accessor :sort_order
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# Body for the subscription upgrade and downgrade actions.
|
|
17
18
|
class PlanChangeRequest < ApiModelBase
|
|
19
|
+
# Plan key to change the subscription to.
|
|
18
20
|
attr_accessor :plan
|
|
19
21
|
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,9 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# Per-plan pricing and limits for a product.
|
|
17
18
|
class PlanDefinition < ApiModelBase
|
|
19
|
+
# Monthly list price in cents. `0` for free plans.
|
|
18
20
|
attr_accessor :price_monthly_cents
|
|
19
21
|
|
|
22
|
+
# Map of limit key to the cap that applies on this plan. `-1` indicates an unlimited cap.
|
|
20
23
|
attr_accessor :limits
|
|
21
24
|
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,19 +14,27 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# A smplkit product, with its plans, metered limits, and marketing copy.
|
|
17
18
|
class Product < ApiModelBase
|
|
19
|
+
# Human-readable product name.
|
|
18
20
|
attr_accessor :display_name
|
|
19
21
|
|
|
22
|
+
# Long-form product description.
|
|
20
23
|
attr_accessor :description
|
|
21
24
|
|
|
25
|
+
# Short marketing tagline shown on plan-selection surfaces.
|
|
22
26
|
attr_accessor :tagline
|
|
23
27
|
|
|
28
|
+
# Bullet-list feature highlights for the product.
|
|
24
29
|
attr_accessor :features
|
|
25
30
|
|
|
31
|
+
# When `true`, the product is listed but not yet available for subscription.
|
|
26
32
|
attr_accessor :coming_soon
|
|
27
33
|
|
|
34
|
+
# Map of limit key to limit definition for this product.
|
|
28
35
|
attr_accessor :limits
|
|
29
36
|
|
|
37
|
+
# Map of plan key to plan definition for this product.
|
|
30
38
|
attr_accessor :plans
|
|
31
39
|
|
|
32
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,12 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# Body for the email + password registration endpoint.
|
|
17
18
|
class RegisterRequest < ApiModelBase
|
|
19
|
+
# Email address that becomes the new user's login identifier.
|
|
18
20
|
attr_accessor :email
|
|
19
21
|
|
|
22
|
+
# Password for the new account. Must be at least 8 characters.
|
|
20
23
|
attr_accessor :password
|
|
21
24
|
|
|
22
|
-
#
|
|
25
|
+
# How the customer arrived at the registration page. Allowed values: `LOGIN`, `GET_STARTED`, `LIVE_DEMO`, `UNKNOWN`. Defaults to `UNKNOWN` when omitted. Case-insensitive on input.
|
|
23
26
|
attr_accessor :entry_point
|
|
24
27
|
|
|
25
28
|
class EnumAttributeValidator
|
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# A service that contexts can be evaluated against — for example, a backend application or microservice in the customer's stack.
|
|
17
18
|
class Service < ApiModelBase
|
|
19
|
+
# Human-readable name for the service.
|
|
18
20
|
attr_accessor :name
|
|
19
21
|
|
|
22
|
+
# When the service was created.
|
|
20
23
|
attr_accessor :created_at
|
|
21
24
|
|
|
25
|
+
# When the service was last modified.
|
|
22
26
|
attr_accessor :updated_at
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API request envelope for creating or updating a service.
|
|
18
|
+
class ServiceRequest < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'ServiceResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::ServiceRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::ServiceRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# Result of executing the setup-intent function.
|
|
17
18
|
class SetupIntentAttributes < ApiModelBase
|
|
19
|
+
# Client secret to pass to Stripe Elements so the customer can complete payment-method setup in the browser.
|
|
18
20
|
attr_accessor :client_secret
|
|
19
21
|
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,19 +14,27 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# A subscription that grants the account access to a product on a plan.
|
|
17
18
|
class SubscriptionAttributes < ApiModelBase
|
|
19
|
+
# Product key the subscription is for, e.g. `flags`.
|
|
18
20
|
attr_accessor :product
|
|
19
21
|
|
|
22
|
+
# Plan key the subscription is on, e.g. `pro`.
|
|
20
23
|
attr_accessor :plan
|
|
21
24
|
|
|
25
|
+
# Lifecycle state of the subscription, e.g. `active`, `trialing`, `past_due`, `canceled`.
|
|
22
26
|
attr_accessor :status
|
|
23
27
|
|
|
28
|
+
# When `true`, the subscription is complimentary and is not billed through the billing provider.
|
|
24
29
|
attr_accessor :comped
|
|
25
30
|
|
|
31
|
+
# When `true`, the subscription is billed through Stripe; otherwise it is a free or complimentary subscription that does not produce invoices.
|
|
26
32
|
attr_accessor :stripe_managed
|
|
27
33
|
|
|
34
|
+
# End of the current billing period (ISO 8601 timestamp).
|
|
28
35
|
attr_accessor :current_period_end
|
|
29
36
|
|
|
37
|
+
# Stripe payment intent client secret returned when a subscription create requires additional authentication (3DS). Returned only on create.
|
|
30
38
|
attr_accessor :client_secret
|
|
31
39
|
|
|
32
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,16 +14,21 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
-
# Discount and totals summary attached to
|
|
17
|
+
# Discount and totals summary attached to a subscription collection response.
|
|
18
18
|
class SubscriptionListMeta < ApiModelBase
|
|
19
|
+
# Sum of list prices across all subscriptions in cents.
|
|
19
20
|
attr_accessor :subtotal_cents
|
|
20
21
|
|
|
22
|
+
# Effective discount percentage applied.
|
|
21
23
|
attr_accessor :discount_pct
|
|
22
24
|
|
|
25
|
+
# Discount amount in cents.
|
|
23
26
|
attr_accessor :discount_amount_cents
|
|
24
27
|
|
|
28
|
+
# Source of the discount. `VOLUME` indicates the standard volume-discount schedule; `OVERRIDE` indicates a custom discount set on the account.
|
|
25
29
|
attr_accessor :discount_source
|
|
26
30
|
|
|
31
|
+
# Final monthly total in cents after the discount.
|
|
27
32
|
attr_accessor :total_cents
|
|
28
33
|
|
|
29
34
|
attr_accessor :next_tier
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API resource envelope for a subscription. `id` must not be specified for create requests (the server assigns it).
|
|
17
18
|
class SubscriptionResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|