Class: ShipEngine::Domain::Carriers::ListCarriers::Carrier::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/shipengine/domain/carriers/list_carriers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(carrier_id:, carrier_code:, service_code:, name:, domestic:, international:, is_multi_package_supported:) ⇒ Service

Returns a new instance of Service.

Parameters:

  • carrier_id (String)
    • e.g. “se-28529731”

  • carrier_code (String)
    • e.g. “se-28529731”

  • service_code (String)
    • e.g. “usps_media_mail”

  • name (String)
    • e.g. “USPS First Class Mail”

  • domestic (Boolean)
    • e.g. true

  • international (Boolean)
    • e.g. true

  • is_multi_package_supported (Boolean)
    • e.g. true



78
79
80
81
82
83
84
85
86
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 78

def initialize(carrier_id:, carrier_code:, service_code:, name:, domestic:, international:, is_multi_package_supported:) # rubocop:todo Metrics/ParameterLists
  @carrier_id = carrier_id
  @carrier_code = carrier_code
  @service_code = service_code
  @name = name
  @domestic = domestic
  @international = international
  @is_multi_package_supported = is_multi_package_supported
end

Instance Attribute Details

#carrier_codeObject (readonly)

Returns the value of attribute carrier_code.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def carrier_code
  @carrier_code
end

#carrier_idObject (readonly)

Returns the value of attribute carrier_id.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def carrier_id
  @carrier_id
end

#domesticObject (readonly)

Returns the value of attribute domestic.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def domestic
  @domestic
end

#internationalObject (readonly)

Returns the value of attribute international.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def international
  @international
end

#is_multi_package_supportedObject (readonly)

Returns the value of attribute is_multi_package_supported.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def is_multi_package_supported
  @is_multi_package_supported
end

#nameObject (readonly)

Returns the value of attribute name.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def name
  @name
end

#service_codeObject (readonly)

Returns the value of attribute service_code.



68
69
70
# File 'lib/shipengine/domain/carriers/list_carriers.rb', line 68

def service_code
  @service_code
end