Class: Lmb::Developers::Loyalty
- Inherits:
-
Object
- Object
- Lmb::Developers::Loyalty
- Defined in:
- lib/lmb/developers/loyalty.rb
Constant Summary collapse
- VOUCHER_EXPIRED_PATH =
Define constant paths for different API endpoints.
'/v1/loyalty/voucher/expired'.freeze
- VOUCHER_PROVISIONED_PATH =
'/v1/loyalty/voucher/provisioned'.freeze
- VOUCHER_ACTIVATED_PATH =
'/v1/loyalty/voucher/activated'.freeze
- SCORING_REDEMPTION_PATH =
'/v1/loyalty/redemption'.freeze
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Class Method Summary collapse
-
.redemption(redemptions) ⇒ Boolean
Handles the redemption process.
-
.voucher_activated(activations) ⇒ Boolean
Set activated vouchers for inhabitants.
-
.voucher_expired(expirations) ⇒ Boolean
Set expired vouchers for inhabitants.
-
.voucher_provisioned(provisions) ⇒ Boolean
Set provisioned vouchers for inhabitants.
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
6 7 8 |
# File 'lib/lmb/developers/loyalty.rb', line 6 def configuration @configuration end |
Class Method Details
.redemption(redemptions) ⇒ Boolean
Handles the redemption process.
42 43 44 |
# File 'lib/lmb/developers/loyalty.rb', line 42 def self.redemption(redemptions) post_request(SCORING_REDEMPTION_PATH, redemptions) end |
.voucher_activated(activations) ⇒ Boolean
Set activated vouchers for inhabitants.
34 35 36 |
# File 'lib/lmb/developers/loyalty.rb', line 34 def self.voucher_activated(activations) post_request(VOUCHER_ACTIVATED_PATH, 'activations' => activations) end |
.voucher_expired(expirations) ⇒ Boolean
Set expired vouchers for inhabitants.
18 19 20 |
# File 'lib/lmb/developers/loyalty.rb', line 18 def self.voucher_expired(expirations) post_request(VOUCHER_EXPIRED_PATH, 'expirations' => expirations) end |
.voucher_provisioned(provisions) ⇒ Boolean
Set provisioned vouchers for inhabitants.
26 27 28 |
# File 'lib/lmb/developers/loyalty.rb', line 26 def self.voucher_provisioned(provisions) post_request(VOUCHER_PROVISIONED_PATH, 'provisions' => provisions) end |