Class: YourMembership::Commerce
- Inherits:
-
Object
- Object
- YourMembership::Commerce
- Defined in:
- lib/your_membership/commerce.rb
Overview
The Commerce Namespace does not currently have any methods in the YourMembership.com API. This is used for some helper methods.
Class Method Summary collapse
-
.convert_order_status(status) ⇒ Integer
Converts some convenient Symbols to the Integer that the YourMembership API expects.
Class Method Details
.convert_order_status(status) ⇒ Integer
Converts some convenient Symbols to the Integer that the YourMembership API expects
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/your_membership/commerce.rb', line 8 def self.convert_order_status(status) status_code = 0 case status when :cancelled, :Cancelled status_code = -1 when :open, :Open status_code = 0 when :processed, :Processed status_code = 1 when :shipped, :Shipped, :closed, :Closed status_code = 2 else status_code = status end status_code end |