Class: VoucherifySdk::ReferralsApi
- Inherits:
-
Object
- Object
- VoucherifySdk::ReferralsApi
- Defined in:
- lib/VoucherifySdk/api/referrals_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ReferralsApi
constructor
A new instance of ReferralsApi.
-
#referrals_add_holders(member_id, opts = {}) ⇒ ReferralsMembersHoldersCreateInBulkResponseBody
Add Referral Code Holders Adds new holders to a referral code as referees.
-
#referrals_add_holders1(campaign_id, member_id, opts = {}) ⇒ ReferralsMembersHoldersCreateInBulkResponseBody
Add Referral Code Holders Adds new holders to a referral code as referees.
-
#referrals_code_holders(campaign_id, member_id, opts = {}) ⇒ ReferralsMembersHoldersListResponseBody
List Referral Code Holders Retrieves all the redeemables that have been assigned to the customer.
-
#referrals_code_holders1(member_id, opts = {}) ⇒ ReferralsMembersHoldersListResponseBody
List Referral Code Holders Retrieves the holders of the referral code from a referral campaign.
-
#referrals_remove_holder(member_id, holder_id, opts = {}) ⇒ nil
Remove Referral Card Holder Removes the holder from a referral card.
-
#referrals_remove_holder1(campaign_id, member_id, holder_id, opts = {}) ⇒ nil
Remove Referral Card Holder Removes the holder from a referral card.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ReferralsApi
Returns a new instance of ReferralsApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#referrals_add_holders(member_id, opts = {}) ⇒ ReferralsMembersHoldersCreateInBulkResponseBody
Add Referral Code Holders Adds new holders to a referral code as referees. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
28 29 30 31 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 28 def referrals_add_holders(member_id, opts = {}) data, _status_code, _headers = referrals_add_holders_with_http_info(member_id, opts) data end |
#referrals_add_holders1(campaign_id, member_id, opts = {}) ⇒ ReferralsMembersHoldersCreateInBulkResponseBody
Add Referral Code Holders Adds new holders to a referral code as referees. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
95 96 97 98 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 95 def referrals_add_holders1(campaign_id, member_id, opts = {}) data, _status_code, _headers = referrals_add_holders1_with_http_info(campaign_id, member_id, opts) data end |
#referrals_code_holders(campaign_id, member_id, opts = {}) ⇒ ReferralsMembersHoldersListResponseBody
List Referral Code Holders Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
166 167 168 169 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 166 def referrals_code_holders(campaign_id, member_id, opts = {}) data, _status_code, _headers = referrals_code_holders_with_http_info(campaign_id, member_id, opts) data end |
#referrals_code_holders1(member_id, opts = {}) ⇒ ReferralsMembersHoldersListResponseBody
List Referral Code Holders Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
238 239 240 241 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 238 def referrals_code_holders1(member_id, opts = {}) data, _status_code, _headers = referrals_code_holders1_with_http_info(member_id, opts) data end |
#referrals_remove_holder(member_id, holder_id, opts = {}) ⇒ nil
Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
306 307 308 309 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 306 def referrals_remove_holder(member_id, holder_id, opts = {}) referrals_remove_holder_with_http_info(member_id, holder_id, opts) nil end |
#referrals_remove_holder1(campaign_id, member_id, holder_id, opts = {}) ⇒ nil
Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
366 367 368 369 |
# File 'lib/VoucherifySdk/api/referrals_api.rb', line 366 def referrals_remove_holder1(campaign_id, member_id, holder_id, opts = {}) referrals_remove_holder1_with_http_info(campaign_id, member_id, holder_id, opts) nil end |