Class: Io::Flow::V0::Models::OrderRefundSummaryIncludes

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ OrderRefundSummaryIncludes

Returns a new instance of OrderRefundSummaryIncludes.



23668
23669
23670
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23668

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23666
23667
23668
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23666

def value
  @value
end

Class Method Details

.ALLObject



23688
23689
23690
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23688

def OrderRefundSummaryIncludes.ALL
  @@all ||= [OrderRefundSummaryIncludes.duties, OrderRefundSummaryIncludes.vat, OrderRefundSummaryIncludes.shipping]
end

.apply(value) ⇒ Object

Returns the instance of OrderRefundSummaryIncludes for this value, creating a new instance for an unknown value



23673
23674
23675
23676
23677
23678
23679
23680
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23673

def OrderRefundSummaryIncludes.apply(value)
  if value.instance_of?(OrderRefundSummaryIncludes)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || OrderRefundSummaryIncludes.new(value))
  end
end

.dutiesObject



23692
23693
23694
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23692

def OrderRefundSummaryIncludes.duties
  @@_duties ||= OrderRefundSummaryIncludes.new('duties')
end

.from_string(value) ⇒ Object

Returns the instance of OrderRefundSummaryIncludes for this value, or nil if not found



23683
23684
23685
23686
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23683

def OrderRefundSummaryIncludes.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  OrderRefundSummaryIncludes.ALL.find { |v| v.value == value }
end

.shippingObject



23700
23701
23702
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23700

def OrderRefundSummaryIncludes.shipping
  @@_shipping ||= OrderRefundSummaryIncludes.new('shipping')
end

.vatObject



23696
23697
23698
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23696

def OrderRefundSummaryIncludes.vat
  @@_vat ||= OrderRefundSummaryIncludes.new('vat')
end

Instance Method Details

#to_hashObject



23704
23705
23706
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23704

def to_hash
  value
end