module YourMembership

Ruby SDK for YourMembership.Com XML API @author Nate Flood <nflood@echonet.org> @version 2.00 @see www.yourmembership.com/company/api-reference.aspx

Constants

VERSION

Public Class Methods

config() click to toggle source

Access configuration variables by calling YourMembership.config[ :attribute ]

# File lib/your_membership/config.rb, line 38
def self.config # rubocop:disable Style/TrivialAccessors
  @config
end
configure(opts = {}) click to toggle source

Configure through hash @example

YourMembership.configure(:publicKey => 45G2E6DC-98NA-45W7-8493-D97C4E2C156A,
:privateKey => D74H44B2-2348-4ACT-B531-45W385TGB966, :saPasscode => WPIkriJtqS4m)

@note The baseUri and version are both defaulted to the current API for the release version.

# File lib/your_membership/config.rb, line 19
def self.configure(opts = {})
  opts.each { |k, v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym }
end
configure_with(path_to_yaml_file) click to toggle source

Configure through yaml file @example

---
publicKey: 45G2E6DC-98NA-45W7-8493-D97C4E2C156A
privateKey: D74H44B2-2348-4ACT-B531-45W385TGB966
saPasscode: WPIkriJtqS4m
baseUri: 'https://api.yourmembership.com'
version: '2.00'

@note The baseUri and version are both defaulted to the current API for the release version.

# File lib/your_membership/config.rb, line 32
def self.configure_with(path_to_yaml_file)
  config = YAML.load(IO.read(path_to_yaml_file))
  configure(config)
end