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.



21867
21868
21869
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21867

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21865
21866
21867
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21865

def value
  @value
end

Class Method Details

.ALLObject



21887
21888
21889
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21887

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



21872
21873
21874
21875
21876
21877
21878
21879
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21872

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



21891
21892
21893
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21891

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



21882
21883
21884
21885
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21882

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

.shippingObject



21899
21900
21901
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21899

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

.vatObject



21895
21896
21897
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21895

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

Instance Method Details

#to_hashObject



21903
21904
21905
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21903

def to_hash
  value
end