class Io::Flow::V0::Models::OrderPaymentType
Attributes
Public Class Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 23138 def OrderPaymentType.ALL @@all ||= [OrderPaymentType.card, OrderPaymentType.online, OrderPaymentType.credit, OrderPaymentType.subsidized, OrderPaymentType.installment_plan, OrderPaymentType.cash_on_delivery] end
Returns the instance of OrderPaymentType
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 23123 def OrderPaymentType.apply(value) if value.instance_of?(OrderPaymentType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderPaymentType.new(value)) end end
Represents a payment in the form of a credit or debit card
# File lib/flow_commerce/flow_api_v0_client.rb, line 23143 def OrderPaymentType.card @@_card ||= OrderPaymentType.new('card') end
Request to pay the balance with cash on delivery. Offered only when the final mile carriers support cash on delivery.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23177 def OrderPaymentType.cash_on_delivery @@_cash_on_delivery ||= OrderPaymentType.new('cash_on_delivery') end
A payment in the form of a credit of some type (e.g. a store credit, gift card) applied to an order
# File lib/flow_commerce/flow_api_v0_client.rb, line 23154 def OrderPaymentType.credit @@_credit ||= OrderPaymentType.new('credit') end
Returns the instance of OrderPaymentType
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 23133 def OrderPaymentType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderPaymentType.ALL.find { |v| v.value == value } end
An installment plan payment represents that the user has elected an installment plan to pay for this order. For the purposes of the order, the balance will reflect fully paid for the total value of the installment plan, even though individual installments may be created in the future. Note this feature was deprecated in early 2020.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23171 def OrderPaymentType.installment_plan @@_installment_plan ||= OrderPaymentType.new('installment_plan') end
# File lib/flow_commerce/flow_api_v0_client.rb, line 23118 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
Represents an online payment (e.g. paypal, alipay, etc)
# File lib/flow_commerce/flow_api_v0_client.rb, line 23148 def OrderPaymentType.online @@_online ||= OrderPaymentType.new('online') end
Subsidized indicates that this payment is being subsidized by the organization
-
and Flow’s billing system will directly invoice the client for this payment.
This is intended to identify payment for replacement orders and in the future other types of orders (eg. influencer orders).
# File lib/flow_commerce/flow_api_v0_client.rb, line 23162 def OrderPaymentType.subsidized @@_subsidized ||= OrderPaymentType.new('subsidized') end
Public Instance Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 23181 def to_hash value end