LUPaymentPreferenceRequestFactory Class Reference
| Inherits from | NSObject |
| Declared in | LUPaymentPreferenceRequestFactory.h LUPaymentPreferenceRequestFactory.m |
Overview
For some LevelUp-powered apps, users can choose how they wish to be billed: either to preload money into their account (and to automatically load more money when their balance is low), or to be billed monthly (or in certain cases, immediately after an order is made).
LUPaymentPreferenceRequestFactory provides two requests. The first,
requestForPaymentOptionsSummary, shows the options available to a user along with relevant data
such as the day of the month they will be billed. See LUPaymentOptionsSummary for more
information.
The requestToSetPaymentPreference: request allows a user to choose whether or not they wish to
preload, and the amount of money that should be loaded.
Class Methods
requestForPaymentOptionsSummary
Builds a request to retrieve a summary of payment options available to the user. If there is not an authenticated user, then the result will contain the options available to a newly registered user.
+ (LUAPIRequest *)requestForPaymentOptionsSummaryDiscussion
Builds a request to retrieve a summary of payment options available to the user. If there is not an authenticated user, then the result will contain the options available to a newly registered user.
On success, this request will return an LUPaymentOptionsSummary containing possible payment
options.
Warning: If an access token is present, it must have the LUPermissionManageUserPaymentMethods
permission.
Declared In
LUPaymentPreferenceRequestFactory.hrequestToSetPaymentPreference:
Builds a request to set a user’s payment preference for app to which they are authenticated.
+ (LUAPIRequest *)requestToSetPaymentPreference:(LUPaymentPreference *)paymentPreferenceParameters
- paymentPreference
The user’s chosen payment preference.
Discussion
Builds a request to set a user’s payment preference for app to which they are authenticated.
Warning: This request requires an access token with the LUPermissionCreateOrders permission.
Declared In
LUPaymentPreferenceRequestFactory.h