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 (e.g. "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 (e.g. US and CA).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShortCode

Returns a new instance of ShortCode.



2451
2452
2453
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2451

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

Instance Attribute Details

#numberString

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

Returns:

  • (String)


2442
2443
2444
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2442

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)


2449
2450
2451
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2449

def region_code
  @region_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2456
2457
2458
2459
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2456

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