Class: Vapi::Subscription
- Inherits:
-
Object
- Object
- Vapi::Subscription
- Defined in:
- lib/vapi_server_sdk/types/subscription.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#auto_reload_plan ⇒ Vapi::AutoReloadPlan
readonly
This is the auto reload plan configured for the subscription.
-
#concurrency_counter ⇒ Float
readonly
This is the total number of active calls (concurrency) across all orgs under this subscription.
-
#concurrency_limit_included ⇒ Float
readonly
This is the default concurrency limit for the subscription.
-
#concurrency_limit_purchased ⇒ Float
readonly
This is the purchased add-on concurrency limit for the subscription.
-
#coupon_ids ⇒ Array<String>
readonly
This is the IDs of the coupons applicable to this subscription.
-
#coupon_usage_left ⇒ String
readonly
This is the number of credits left obtained from a coupon.
-
#created_at ⇒ DateTime
readonly
This is the timestamp when the subscription was created.
-
#credits ⇒ String
readonly
This is the number of credits the subscription currently has.
-
#hipaa_common_paper_agreement_id ⇒ String
readonly
This is the ID for the Common Paper agreement outlining the HIPAA contract.
-
#hipaa_enabled ⇒ Boolean
readonly
This is the HIPAA enabled flag for the subscription.
-
#id ⇒ String
readonly
This is the unique identifier for the subscription.
-
#minutes_included ⇒ Float
readonly
The number of minutes included in the subscription.
-
#minutes_overage_cost ⇒ Float
readonly
The per minute charge on minutes that exceed the included minutes.
-
#minutes_used ⇒ Float
readonly
The number of minutes used in the subscription.
-
#monthly_charge_schedule_id ⇒ Float
readonly
This is the ID of the monthly job that charges for subscription add ons and phone numbers.
-
#monthly_credit_check_schedule_id ⇒ Float
readonly
This is the ID of the monthly job that checks whether the credit balance of the subscription is sufficient for the monthly charge.
-
#outbound_calls_counter ⇒ Float
readonly
The current number of outbound calls the subscription has made in the current day.
-
#outbound_calls_counter_next_reset_at ⇒ DateTime
readonly
This is the timestamp at which the outbound calls counter is scheduled to reset at.
-
#outbound_calls_daily_limit ⇒ Float
readonly
The maximum number of outbound calls this subscription may make in a day.
-
#providers_included ⇒ Array<String>
readonly
The list of providers included in the subscription.
-
#referred_by_email ⇒ String
readonly
This is the email of the referrer for the subscription.
-
#slack_channel_id ⇒ String
readonly
If this subscription has a slack support subscription, the slack channel’s ID will be stored here.
-
#slack_support_enabled ⇒ Boolean
readonly
If this flag is true, then the user has purchased slack support.
-
#status ⇒ Vapi::SubscriptionStatus
readonly
This is the status of the subscription.
-
#stripe_customer_email ⇒ String
readonly
This is the customer’s email on Stripe.
-
#stripe_customer_id ⇒ String
readonly
This is the Stripe customer ID.
-
#stripe_payment_method_fingerprint ⇒ String
readonly
This is the Stripe fingerprint of the payment method (card).
-
#stripe_payment_method_id ⇒ String
readonly
This is the Stripe payment ID.
-
#type ⇒ Vapi::SubscriptionType
readonly
This is the type / tier of the subscription.
-
#updated_at ⇒ DateTime
readonly
This is the timestamp when the subscription was last updated.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::Subscription
Deserialize a JSON object to an instance of Subscription.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_counter:, concurrency_limit_included:, concurrency_limit_purchased:, monthly_charge_schedule_id: OMIT, monthly_credit_check_schedule_id: OMIT, stripe_customer_id: OMIT, stripe_payment_method_id: OMIT, slack_support_enabled: OMIT, slack_channel_id: OMIT, hipaa_enabled: OMIT, hipaa_common_paper_agreement_id: OMIT, stripe_payment_method_fingerprint: OMIT, stripe_customer_email: OMIT, referred_by_email: OMIT, auto_reload_plan: OMIT, minutes_included: OMIT, minutes_used: OMIT, minutes_overage_cost: OMIT, providers_included: OMIT, outbound_calls_daily_limit: OMIT, outbound_calls_counter: OMIT, outbound_calls_counter_next_reset_at: OMIT, coupon_ids: OMIT, coupon_usage_left: OMIT, additional_properties: nil) ⇒ Vapi::Subscription constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of Subscription to a JSON object.
Constructor Details
#initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_counter:, concurrency_limit_included:, concurrency_limit_purchased:, monthly_charge_schedule_id: OMIT, monthly_credit_check_schedule_id: OMIT, stripe_customer_id: OMIT, stripe_payment_method_id: OMIT, slack_support_enabled: OMIT, slack_channel_id: OMIT, hipaa_enabled: OMIT, hipaa_common_paper_agreement_id: OMIT, stripe_payment_method_fingerprint: OMIT, stripe_customer_email: OMIT, referred_by_email: OMIT, auto_reload_plan: OMIT, minutes_included: OMIT, minutes_used: OMIT, minutes_overage_cost: OMIT, providers_included: OMIT, outbound_calls_daily_limit: OMIT, outbound_calls_counter: OMIT, outbound_calls_counter_next_reset_at: OMIT, coupon_ids: OMIT, coupon_usage_left: OMIT, additional_properties: nil) ⇒ Vapi::Subscription
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 140 def initialize(id:, created_at:, updated_at:, type:, status:, credits:, concurrency_counter:, concurrency_limit_included:, concurrency_limit_purchased:, monthly_charge_schedule_id: OMIT, monthly_credit_check_schedule_id: OMIT, stripe_customer_id: OMIT, stripe_payment_method_id: OMIT, slack_support_enabled: OMIT, slack_channel_id: OMIT, hipaa_enabled: OMIT, hipaa_common_paper_agreement_id: OMIT, stripe_payment_method_fingerprint: OMIT, stripe_customer_email: OMIT, referred_by_email: OMIT, auto_reload_plan: OMIT, minutes_included: OMIT, minutes_used: OMIT, minutes_overage_cost: OMIT, providers_included: OMIT, outbound_calls_daily_limit: OMIT, outbound_calls_counter: OMIT, outbound_calls_counter_next_reset_at: OMIT, coupon_ids: OMIT, coupon_usage_left: OMIT, additional_properties: nil) @id = id @created_at = created_at @updated_at = updated_at @type = type @status = status @credits = credits @concurrency_counter = concurrency_counter @concurrency_limit_included = concurrency_limit_included @concurrency_limit_purchased = concurrency_limit_purchased @monthly_charge_schedule_id = monthly_charge_schedule_id if monthly_charge_schedule_id != OMIT @monthly_credit_check_schedule_id = monthly_credit_check_schedule_id if monthly_credit_check_schedule_id != OMIT @stripe_customer_id = stripe_customer_id if stripe_customer_id != OMIT @stripe_payment_method_id = stripe_payment_method_id if stripe_payment_method_id != OMIT @slack_support_enabled = slack_support_enabled if slack_support_enabled != OMIT @slack_channel_id = slack_channel_id if slack_channel_id != OMIT @hipaa_enabled = hipaa_enabled if hipaa_enabled != OMIT @hipaa_common_paper_agreement_id = hipaa_common_paper_agreement_id if hipaa_common_paper_agreement_id != OMIT if stripe_payment_method_fingerprint != OMIT @stripe_payment_method_fingerprint = stripe_payment_method_fingerprint end @stripe_customer_email = stripe_customer_email if stripe_customer_email != OMIT @referred_by_email = referred_by_email if referred_by_email != OMIT @auto_reload_plan = auto_reload_plan if auto_reload_plan != OMIT @minutes_included = minutes_included if minutes_included != OMIT @minutes_used = minutes_used if minutes_used != OMIT @minutes_overage_cost = minutes_overage_cost if minutes_overage_cost != OMIT @providers_included = providers_included if providers_included != OMIT @outbound_calls_daily_limit = outbound_calls_daily_limit if outbound_calls_daily_limit != OMIT @outbound_calls_counter = outbound_calls_counter if outbound_calls_counter != OMIT if outbound_calls_counter_next_reset_at != OMIT @outbound_calls_counter_next_reset_at = outbound_calls_counter_next_reset_at end @coupon_ids = coupon_ids if coupon_ids != OMIT @coupon_usage_left = coupon_usage_left if coupon_usage_left != OMIT @additional_properties = additional_properties @_field_set = { "id": id, "createdAt": created_at, "updatedAt": updated_at, "type": type, "status": status, "credits": credits, "concurrencyCounter": concurrency_counter, "concurrencyLimitIncluded": concurrency_limit_included, "concurrencyLimitPurchased": concurrency_limit_purchased, "monthlyChargeScheduleId": monthly_charge_schedule_id, "monthlyCreditCheckScheduleId": monthly_credit_check_schedule_id, "stripeCustomerId": stripe_customer_id, "stripePaymentMethodId": stripe_payment_method_id, "slackSupportEnabled": slack_support_enabled, "slackChannelId": slack_channel_id, "hipaaEnabled": hipaa_enabled, "hipaaCommonPaperAgreementId": hipaa_common_paper_agreement_id, "stripePaymentMethodFingerprint": stripe_payment_method_fingerprint, "stripeCustomerEmail": stripe_customer_email, "referredByEmail": referred_by_email, "autoReloadPlan": auto_reload_plan, "minutesIncluded": minutes_included, "minutesUsed": minutes_used, "minutesOverageCost": minutes_overage_cost, "providersIncluded": providers_included, "outboundCallsDailyLimit": outbound_calls_daily_limit, "outboundCallsCounter": outbound_calls_counter, "outboundCallsCounterNextResetAt": outbound_calls_counter_next_reset_at, "couponIds": coupon_ids, "couponUsageLeft": coupon_usage_left }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
87 88 89 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 87 def additional_properties @additional_properties end |
#auto_reload_plan ⇒ Vapi::AutoReloadPlan (readonly)
Returns This is the auto reload plan configured for the subscription.
63 64 65 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 63 def auto_reload_plan @auto_reload_plan end |
#concurrency_counter ⇒ Float (readonly)
Returns This is the total number of active calls (concurrency) across all orgs under this subscription.
28 29 30 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 28 def concurrency_counter @concurrency_counter end |
#concurrency_limit_included ⇒ Float (readonly)
Returns This is the default concurrency limit for the subscription.
30 31 32 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 30 def concurrency_limit_included @concurrency_limit_included end |
#concurrency_limit_purchased ⇒ Float (readonly)
Returns This is the purchased add-on concurrency limit for the subscription.
32 33 34 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 32 def concurrency_limit_purchased @concurrency_limit_purchased end |
#coupon_ids ⇒ Array<String> (readonly)
Returns This is the IDs of the coupons applicable to this subscription.
83 84 85 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 83 def coupon_ids @coupon_ids end |
#coupon_usage_left ⇒ String (readonly)
Returns This is the number of credits left obtained from a coupon.
85 86 87 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 85 def coupon_usage_left @coupon_usage_left end |
#created_at ⇒ DateTime (readonly)
Returns This is the timestamp when the subscription was created.
15 16 17 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 15 def created_at @created_at end |
#credits ⇒ String (readonly)
Returns This is the number of credits the subscription currently has. Note: This is a string to avoid floating point precision issues.
25 26 27 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 25 def credits @credits end |
#hipaa_common_paper_agreement_id ⇒ String (readonly)
Returns This is the ID for the Common Paper agreement outlining the HIPAA contract.
54 55 56 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 54 def hipaa_common_paper_agreement_id @hipaa_common_paper_agreement_id end |
#hipaa_enabled ⇒ Boolean (readonly)
Returns This is the HIPAA enabled flag for the subscription. It determines whether orgs under this subscription have the option to enable HIPAA compliance.
52 53 54 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 52 def hipaa_enabled @hipaa_enabled end |
#id ⇒ String (readonly)
Returns This is the unique identifier for the subscription.
13 14 15 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 13 def id @id end |
#minutes_included ⇒ Float (readonly)
Returns The number of minutes included in the subscription. Enterprise only.
65 66 67 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 65 def minutes_included @minutes_included end |
#minutes_overage_cost ⇒ Float (readonly)
Returns The per minute charge on minutes that exceed the included minutes. Enterprise only.
70 71 72 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 70 def minutes_overage_cost @minutes_overage_cost end |
#minutes_used ⇒ Float (readonly)
Returns The number of minutes used in the subscription. Enterprise only.
67 68 69 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 67 def minutes_used @minutes_used end |
#monthly_charge_schedule_id ⇒ Float (readonly)
Returns This is the ID of the monthly job that charges for subscription add ons and phone numbers.
35 36 37 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 35 def monthly_charge_schedule_id @monthly_charge_schedule_id end |
#monthly_credit_check_schedule_id ⇒ Float (readonly)
Returns This is the ID of the monthly job that checks whether the credit balance of the subscription is sufficient for the monthly charge.
39 40 41 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 39 def monthly_credit_check_schedule_id @monthly_credit_check_schedule_id end |
#outbound_calls_counter ⇒ Float (readonly)
Returns The current number of outbound calls the subscription has made in the current day.
78 79 80 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 78 def outbound_calls_counter @outbound_calls_counter end |
#outbound_calls_counter_next_reset_at ⇒ DateTime (readonly)
Returns This is the timestamp at which the outbound calls counter is scheduled to reset at.
81 82 83 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 81 def outbound_calls_counter_next_reset_at @outbound_calls_counter_next_reset_at end |
#outbound_calls_daily_limit ⇒ Float (readonly)
Returns The maximum number of outbound calls this subscription may make in a day. Resets every night.
75 76 77 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 75 def outbound_calls_daily_limit @outbound_calls_daily_limit end |
#providers_included ⇒ Array<String> (readonly)
Returns The list of providers included in the subscription. Enterprise only.
72 73 74 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 72 def providers_included @providers_included end |
#referred_by_email ⇒ String (readonly)
Returns This is the email of the referrer for the subscription.
61 62 63 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 61 def referred_by_email @referred_by_email end |
#slack_channel_id ⇒ String (readonly)
Returns If this subscription has a slack support subscription, the slack channel’s ID will be stored here.
48 49 50 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 48 def slack_channel_id @slack_channel_id end |
#slack_support_enabled ⇒ Boolean (readonly)
Returns If this flag is true, then the user has purchased slack support.
45 46 47 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 45 def slack_support_enabled @slack_support_enabled end |
#status ⇒ Vapi::SubscriptionStatus (readonly)
Returns This is the status of the subscription. Past due subscriptions are subscriptions with past due payments.
22 23 24 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 22 def status @status end |
#stripe_customer_email ⇒ String (readonly)
Returns This is the customer’s email on Stripe.
59 60 61 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 59 def stripe_customer_email @stripe_customer_email end |
#stripe_customer_id ⇒ String (readonly)
Returns This is the Stripe customer ID.
41 42 43 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 41 def stripe_customer_id @stripe_customer_id end |
#stripe_payment_method_fingerprint ⇒ String (readonly)
Returns This is the Stripe fingerprint of the payment method (card). It allows us to detect users who try to abuse our system through multiple sign-ups.
57 58 59 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 57 def stripe_payment_method_fingerprint @stripe_payment_method_fingerprint end |
#stripe_payment_method_id ⇒ String (readonly)
Returns This is the Stripe payment ID.
43 44 45 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 43 def stripe_payment_method_id @stripe_payment_method_id end |
#type ⇒ Vapi::SubscriptionType (readonly)
Returns This is the type / tier of the subscription.
19 20 21 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 19 def type @type end |
#updated_at ⇒ DateTime (readonly)
Returns This is the timestamp when the subscription was last updated.
17 18 19 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 17 def updated_at @updated_at end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::Subscription
Deserialize a JSON object to an instance of Subscription
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 217 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?) updated_at = (DateTime.parse(parsed_json["updatedAt"]) unless parsed_json["updatedAt"].nil?) type = parsed_json["type"] status = parsed_json["status"] credits = parsed_json["credits"] concurrency_counter = parsed_json["concurrencyCounter"] concurrency_limit_included = parsed_json["concurrencyLimitIncluded"] concurrency_limit_purchased = parsed_json["concurrencyLimitPurchased"] monthly_charge_schedule_id = parsed_json["monthlyChargeScheduleId"] monthly_credit_check_schedule_id = parsed_json["monthlyCreditCheckScheduleId"] stripe_customer_id = parsed_json["stripeCustomerId"] stripe_payment_method_id = parsed_json["stripePaymentMethodId"] slack_support_enabled = parsed_json["slackSupportEnabled"] slack_channel_id = parsed_json["slackChannelId"] hipaa_enabled = parsed_json["hipaaEnabled"] hipaa_common_paper_agreement_id = parsed_json["hipaaCommonPaperAgreementId"] stripe_payment_method_fingerprint = parsed_json["stripePaymentMethodFingerprint"] stripe_customer_email = parsed_json["stripeCustomerEmail"] referred_by_email = parsed_json["referredByEmail"] if parsed_json["autoReloadPlan"].nil? auto_reload_plan = nil else auto_reload_plan = parsed_json["autoReloadPlan"].to_json auto_reload_plan = Vapi::AutoReloadPlan.from_json(json_object: auto_reload_plan) end minutes_included = parsed_json["minutesIncluded"] minutes_used = parsed_json["minutesUsed"] minutes_overage_cost = parsed_json["minutesOverageCost"] providers_included = parsed_json["providersIncluded"] outbound_calls_daily_limit = parsed_json["outboundCallsDailyLimit"] outbound_calls_counter = parsed_json["outboundCallsCounter"] outbound_calls_counter_next_reset_at = unless parsed_json["outboundCallsCounterNextResetAt"].nil? DateTime.parse(parsed_json["outboundCallsCounterNextResetAt"]) end coupon_ids = parsed_json["couponIds"] coupon_usage_left = parsed_json["couponUsageLeft"] new( id: id, created_at: created_at, updated_at: updated_at, type: type, status: status, credits: credits, concurrency_counter: concurrency_counter, concurrency_limit_included: concurrency_limit_included, concurrency_limit_purchased: concurrency_limit_purchased, monthly_charge_schedule_id: monthly_charge_schedule_id, monthly_credit_check_schedule_id: monthly_credit_check_schedule_id, stripe_customer_id: stripe_customer_id, stripe_payment_method_id: stripe_payment_method_id, slack_support_enabled: slack_support_enabled, slack_channel_id: slack_channel_id, hipaa_enabled: hipaa_enabled, hipaa_common_paper_agreement_id: hipaa_common_paper_agreement_id, stripe_payment_method_fingerprint: stripe_payment_method_fingerprint, stripe_customer_email: stripe_customer_email, referred_by_email: referred_by_email, auto_reload_plan: auto_reload_plan, minutes_included: minutes_included, minutes_used: minutes_used, minutes_overage_cost: minutes_overage_cost, providers_included: providers_included, outbound_calls_daily_limit: outbound_calls_daily_limit, outbound_calls_counter: outbound_calls_counter, outbound_calls_counter_next_reset_at: outbound_calls_counter_next_reset_at, coupon_ids: coupon_ids, coupon_usage_left: coupon_usage_left, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 305 def self.validate_raw(obj:) obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.") obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.") obj.type.is_a?(Vapi::SubscriptionType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.") obj.status.is_a?(Vapi::SubscriptionStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.credits.is_a?(String) != false || raise("Passed value for field obj.credits is not the expected type, validation failed.") obj.concurrency_counter.is_a?(Float) != false || raise("Passed value for field obj.concurrency_counter is not the expected type, validation failed.") obj.concurrency_limit_included.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_included is not the expected type, validation failed.") obj.concurrency_limit_purchased.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit_purchased is not the expected type, validation failed.") obj.monthly_charge_schedule_id&.is_a?(Float) != false || raise("Passed value for field obj.monthly_charge_schedule_id is not the expected type, validation failed.") obj.monthly_credit_check_schedule_id&.is_a?(Float) != false || raise("Passed value for field obj.monthly_credit_check_schedule_id is not the expected type, validation failed.") obj.stripe_customer_id&.is_a?(String) != false || raise("Passed value for field obj.stripe_customer_id is not the expected type, validation failed.") obj.stripe_payment_method_id&.is_a?(String) != false || raise("Passed value for field obj.stripe_payment_method_id is not the expected type, validation failed.") obj.slack_support_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.slack_support_enabled is not the expected type, validation failed.") obj.slack_channel_id&.is_a?(String) != false || raise("Passed value for field obj.slack_channel_id is not the expected type, validation failed.") obj.hipaa_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.hipaa_enabled is not the expected type, validation failed.") obj.hipaa_common_paper_agreement_id&.is_a?(String) != false || raise("Passed value for field obj.hipaa_common_paper_agreement_id is not the expected type, validation failed.") obj.stripe_payment_method_fingerprint&.is_a?(String) != false || raise("Passed value for field obj.stripe_payment_method_fingerprint is not the expected type, validation failed.") obj.stripe_customer_email&.is_a?(String) != false || raise("Passed value for field obj.stripe_customer_email is not the expected type, validation failed.") obj.referred_by_email&.is_a?(String) != false || raise("Passed value for field obj.referred_by_email is not the expected type, validation failed.") obj.auto_reload_plan.nil? || Vapi::AutoReloadPlan.validate_raw(obj: obj.auto_reload_plan) obj.minutes_included&.is_a?(Float) != false || raise("Passed value for field obj.minutes_included is not the expected type, validation failed.") obj.minutes_used&.is_a?(Float) != false || raise("Passed value for field obj.minutes_used is not the expected type, validation failed.") obj.minutes_overage_cost&.is_a?(Float) != false || raise("Passed value for field obj.minutes_overage_cost is not the expected type, validation failed.") obj.providers_included&.is_a?(Array) != false || raise("Passed value for field obj.providers_included is not the expected type, validation failed.") obj.outbound_calls_daily_limit&.is_a?(Float) != false || raise("Passed value for field obj.outbound_calls_daily_limit is not the expected type, validation failed.") obj.outbound_calls_counter&.is_a?(Float) != false || raise("Passed value for field obj.outbound_calls_counter is not the expected type, validation failed.") obj.outbound_calls_counter_next_reset_at&.is_a?(DateTime) != false || raise("Passed value for field obj.outbound_calls_counter_next_reset_at is not the expected type, validation failed.") obj.coupon_ids&.is_a?(Array) != false || raise("Passed value for field obj.coupon_ids is not the expected type, validation failed.") obj.coupon_usage_left&.is_a?(String) != false || raise("Passed value for field obj.coupon_usage_left is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of Subscription to a JSON object
295 296 297 |
# File 'lib/vapi_server_sdk/types/subscription.rb', line 295 def to_json(*_args) @_field_set&.to_json end |