Class: Rev::Payment Deprecated

Inherits:
ApiSerializable show all
Defined in:
lib/rev-api/models/order_request.rb

Overview

Deprecated.

setting the payment is no longer necessary. All orders now default to :account_balance

Payment Info. Payment can only be done by debiting the user’s account balance.

Constant Summary collapse

TYPES =

use to correctly set payment type

{
  :account_balance => 'AccountBalance'
}
CC_ON_FILE_ID =
1

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiSerializable

#to_hash, #to_json

Constructor Details

#initialize(type) ⇒ Payment

Returns a new instance of Payment.

Parameters:

  • type (String)

    payment method



67
68
69
# File 'lib/rev-api/models/order_request.rb', line 67

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



57
58
59
# File 'lib/rev-api/models/order_request.rb', line 57

def type
  @type
end

Class Method Details

.with_account_balanceObject



72
73
74
# File 'lib/rev-api/models/order_request.rb', line 72

def ()
  Payment::new(TYPES[:account_balance])
end