Class: Twilio::REST::Wireless::V1::RatePlanInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::RatePlanInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/rate_plan.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RatePlan resource.
-
#context ⇒ RatePlanContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data_enabled ⇒ Boolean
Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
-
#data_limit ⇒ String
The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA).
-
#data_metering ⇒ String
The model used to meter data usage.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
-
#delete ⇒ Boolean
Delete the RatePlanInstance.
-
#fetch ⇒ RatePlanInstance
Fetch the RatePlanInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
constructor
Initialize the RatePlanInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#international_roaming ⇒ Array<String>
The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States.
-
#international_roaming_data_limit ⇒ String
The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States.
-
#messaging_enabled ⇒ Boolean
Whether SIMs can make, send, and receive SMS using [Commands](www.twilio.com/docs/iot/wireless/api/command-resource).
-
#national_roaming_data_limit ⇒ String
The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States.
-
#national_roaming_enabled ⇒ Boolean
Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States.
-
#sid ⇒ String
The unique string that we created to identify the RatePlan resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#update(unique_name: :unset, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#voice_enabled ⇒ Boolean
Deprecated.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RatePlanInstance
Initialize the RatePlanInstance
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 601 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'data_enabled' => payload['data_enabled'], 'data_metering' => payload['data_metering'], 'data_limit' => payload['data_limit'] == nil ? payload['data_limit'] : payload['data_limit'].to_i, 'messaging_enabled' => payload['messaging_enabled'], 'voice_enabled' => payload['voice_enabled'], 'national_roaming_enabled' => payload['national_roaming_enabled'], 'national_roaming_data_limit' => payload['national_roaming_data_limit'] == nil ? payload['national_roaming_data_limit'] : payload['national_roaming_data_limit'].to_i, 'international_roaming' => payload['international_roaming'], 'international_roaming_data_limit' => payload['international_roaming_data_limit'] == nil ? payload['international_roaming_data_limit'] : payload['international_roaming_data_limit'].to_i, 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RatePlan resource.
655 656 657 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 655 def account_sid @properties['account_sid'] end |
#context ⇒ RatePlanContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
634 635 636 637 638 639 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 634 def context unless @instance_context @instance_context = RatePlanContext.new(@version , @params['sid']) end @instance_context end |
#data_enabled ⇒ Boolean
Returns Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
667 668 669 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 667 def data_enabled @properties['data_enabled'] end |
#data_limit ⇒ String
Returns The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.
679 680 681 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 679 def data_limit @properties['data_limit'] end |
#data_metering ⇒ String
Returns The model used to meter data usage. Can be: ‘payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
673 674 675 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 673 def data_metering @properties['data_metering'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
721 722 723 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 721 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
727 728 729 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 727 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the RatePlanInstance
740 741 742 743 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 740 def delete context.delete end |
#fetch ⇒ RatePlanInstance
Fetch the RatePlanInstance
748 749 750 751 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 748 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
661 662 663 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 661 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
778 779 780 781 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 778 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#international_roaming ⇒ Array<String>
Returns The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: ‘data` and `messaging`.
709 710 711 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 709 def international_roaming @properties['international_roaming'] end |
#international_roaming_data_limit ⇒ String
Returns The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.
715 716 717 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 715 def international_roaming_data_limit @properties['international_roaming_data_limit'] end |
#messaging_enabled ⇒ Boolean
Returns Whether SIMs can make, send, and receive SMS using [Commands](www.twilio.com/docs/iot/wireless/api/command-resource).
685 686 687 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 685 def messaging_enabled @properties['messaging_enabled'] end |
#national_roaming_data_limit ⇒ String
Returns The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.
703 704 705 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 703 def national_roaming_data_limit @properties['national_roaming_data_limit'] end |
#national_roaming_enabled ⇒ Boolean
Returns Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
697 698 699 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 697 def national_roaming_enabled @properties['national_roaming_enabled'] end |
#sid ⇒ String
Returns The unique string that we created to identify the RatePlan resource.
643 644 645 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 643 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
771 772 773 774 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 771 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.RatePlanInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource. It can be used in place of the resource’s ‘sid` in the URL to address the resource.
649 650 651 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 649 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, friendly_name: :unset) ⇒ RatePlanInstance
Update the RatePlanInstance
758 759 760 761 762 763 764 765 766 767 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 758 def update( unique_name: :unset, friendly_name: :unset ) context.update( unique_name: unique_name, friendly_name: friendly_name, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
733 734 735 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 733 def url @properties['url'] end |
#voice_enabled ⇒ Boolean
Returns Deprecated. Whether SIMs can make and receive voice calls.
691 692 693 |
# File 'lib/twilio-ruby/rest/wireless/v1/rate_plan.rb', line 691 def voice_enabled @properties['voice_enabled'] end |