Class: Google::Apis::MerchantapiAccountsV1beta::Distance

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

Maximum delivery radius. This is only required for the local delivery shipment type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Distance

Returns a new instance of Distance.



1541
1542
1543
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1541

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

Instance Attribute Details

#unitString

Unit can differ based on country, it is parameterized to include miles and kilometers. Corresponds to the JSON property unit

Returns:

  • (String)


1534
1535
1536
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1534

def unit
  @unit
end

#valueFixnum

Integer value of distance. Corresponds to the JSON property value

Returns:

  • (Fixnum)


1539
1540
1541
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1539

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1546
1547
1548
1549
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1546

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