Class: Google::Apis::MerchantapiAccountsV1beta::ShortCode

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb

Overview

An object representing a short code, which is a phone number that is typically much shorter than regular phone numbers and can be used to address messages in MMS and SMS systems, as well as for abbreviated dialing (For example "Text 611 to see how many minutes you have remaining on your plan."). Short codes are restricted to a region and are not internationally dialable, which means the same short code can exist in different regions, with different usage and pricing, even if those regions share the same country calling code (For example: US and CA).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShortCode

Returns a new instance of ShortCode.



4078
4079
4080
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4078

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#numberString

Required. The short code digits, without a leading plus ('+') or country calling code. For example "611". Corresponds to the JSON property number

Returns:

  • (String)


4069
4070
4071
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4069

def number
  @number
end

#region_codeString

Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB". Reference(s): - http://www.unicode. org/reports/tr35/#unicode_region_subtag Corresponds to the JSON property regionCode

Returns:

  • (String)


4076
4077
4078
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4076

def region_code
  @region_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4083
4084
4085
4086
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4083

def update!(**args)
  @number = args[:number] if args.key?(:number)
  @region_code = args[:region_code] if args.key?(:region_code)
end