Class: Io::Flow::V0::Models::PaymentRequestReviewStatus

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) ⇒ PaymentRequestReviewStatus

Returns a new instance of PaymentRequestReviewStatus.



24602
24603
24604
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24602

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



24600
24601
24602
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24600

def value
  @value
end

Class Method Details

.ALLObject



24622
24623
24624
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24622

def PaymentRequestReviewStatus.ALL
  @@all ||= [PaymentRequestReviewStatus.pending, PaymentRequestReviewStatus.approved, PaymentRequestReviewStatus.rejected]
end

.apply(value) ⇒ Object

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



24607
24608
24609
24610
24611
24612
24613
24614
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24607

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

.approvedObject

The payment request has been approved.



24632
24633
24634
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24632

def PaymentRequestReviewStatus.approved
  @@_approved ||= PaymentRequestReviewStatus.new('approved')
end

.from_string(value) ⇒ Object

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



24617
24618
24619
24620
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24617

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

.pendingObject

The payment request is pending review.



24627
24628
24629
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24627

def PaymentRequestReviewStatus.pending
  @@_pending ||= PaymentRequestReviewStatus.new('pending')
end

.rejectedObject

The payment request has been rejected.



24637
24638
24639
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24637

def PaymentRequestReviewStatus.rejected
  @@_rejected ||= PaymentRequestReviewStatus.new('rejected')
end

Instance Method Details

#to_hashObject



24641
24642
24643
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24641

def to_hash
  value
end