Module: YourMembership

Defined in:
lib/your_membership.rb,
lib/your_membership/sa.rb,
lib/your_membership/base.rb,
lib/your_membership/error.rb,
lib/your_membership/feeds.rb,
lib/your_membership/config.rb,
lib/your_membership/events.rb,
lib/your_membership/member.rb,
lib/your_membership/people.rb,
lib/your_membership/convert.rb,
lib/your_membership/members.rb,
lib/your_membership/profile.rb,
lib/your_membership/sa_auth.rb,
lib/your_membership/session.rb,
lib/your_membership/version.rb,
lib/your_membership/commerce.rb,
lib/your_membership/sa_events.rb,
lib/your_membership/sa_export.rb,
lib/your_membership/sa_groups.rb,
lib/your_membership/sa_member.rb,
lib/your_membership/sa_people.rb,
lib/your_membership/sa_members.rb,
lib/your_membership/sa_commerce.rb,
lib/your_membership/sa_nonmembers.rb,
lib/your_membership/sa_certifications.rb

Overview

Ruby SDK for YourMembership.Com XML API

Defined Under Namespace

Modules: Sa Classes: Base, Commerce, Convert, Error, Events, Feeds, Member, Members, People, Profile, Session

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.configObject

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



38
39
40
# File 'lib/your_membership/config.rb', line 38

def self.config # rubocop:disable Style/TrivialAccessors
  @config
end

.configure(opts = {}) ⇒ Object

Note:

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

Configure through hash

Examples:

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


19
20
21
# 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) ⇒ Object

Note:

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

Configure through yaml file

Examples:

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


32
33
34
35
# 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