voucherify 8.1.0 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (859) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/ENDPOINTS-COVERAGE.md +192 -56
  4. data/Gemfile.lock +7 -7
  5. data/README.md +422 -0
  6. data/__tests__/LOYALTY_V2_COVERAGE.md +161 -0
  7. data/__tests__/lib/config.rb +20 -0
  8. data/__tests__/lib/loyalty_v2_fixture.rb +199 -0
  9. data/__tests__/lib/loyalty_v2_http.rb +209 -0
  10. data/__tests__/spec/13_management_spec.rb +6 -1
  11. data/__tests__/spec/15_loyalty_v2_spec.rb +403 -0
  12. data/docs/ActivitySource.md +10 -0
  13. data/docs/ActivitySourceApiKey.md +10 -0
  14. data/docs/ActivitySourceUser.md +8 -0
  15. data/docs/BenefitPointsProportionalApplicableTo.md +11 -0
  16. data/docs/BenefitPointsProportionalCustomEvent.md +8 -0
  17. data/docs/BenefitPointsProportionalCustomEventMetadata.md +10 -0
  18. data/docs/BenefitPointsProportionalCustomer.md +8 -0
  19. data/docs/BenefitPointsProportionalCustomerMetadata.md +10 -0
  20. data/docs/BenefitPointsProportionalOrder.md +10 -0
  21. data/docs/BenefitPointsProportionalOrderAmount.md +9 -0
  22. data/docs/BenefitPointsProportionalOrderItems.md +10 -0
  23. data/docs/BenefitPointsProportionalOrderItemsAmount.md +10 -0
  24. data/docs/BenefitPointsProportionalOrderItemsQuantity.md +10 -0
  25. data/docs/BenefitPointsProportionalOrderItemsSubtotalAmount.md +10 -0
  26. data/docs/BenefitPointsProportionalOrderMetadata.md +10 -0
  27. data/docs/BenefitPointsProportionalOrderTotalAmount.md +9 -0
  28. data/docs/BenefitTransaction.md +18 -0
  29. data/docs/BenefitTransactionDetails.md +11 -0
  30. data/docs/BenefitTransactionDetailsMetadata.md +9 -0
  31. data/docs/BenefitTransactionDetailsResult.md +8 -0
  32. data/docs/BenefitTransactionRejection.md +9 -0
  33. data/docs/CampaignsApi.md +7 -7
  34. data/docs/Card.md +19 -0
  35. data/docs/CardActivity.md +14 -0
  36. data/docs/CardActivityData.md +12 -0
  37. data/docs/CardBalance.md +9 -0
  38. data/docs/CardCodeGenerationFailureResult.md +8 -0
  39. data/docs/CardDailyReportEntry.md +24 -0
  40. data/docs/CardDefinitionIdFilterConditions.md +8 -0
  41. data/docs/CardDefinitionIdFilterConditionsConditions.md +11 -0
  42. data/docs/CardLifetimeBucket.md +9 -0
  43. data/docs/CardLifetimeBucketPendingPoints.md +10 -0
  44. data/docs/CardLifetimeBucketPoints.md +19 -0
  45. data/docs/CardNextActivation.md +11 -0
  46. data/docs/CardNextExpiration.md +9 -0
  47. data/docs/CardPendingPointsBucket.md +20 -0
  48. data/docs/CardPendingPointsBucketPoints.md +8 -0
  49. data/docs/CardPointsBucket.md +21 -0
  50. data/docs/CardPointsBucketPoints.md +8 -0
  51. data/docs/CardSimple.md +16 -0
  52. data/docs/CardTransaction.md +19 -0
  53. data/docs/CardTransactionDetails.md +22 -0
  54. data/docs/CardTransactionDetailsCardTransaction.md +8 -0
  55. data/docs/CardTransactionDetailsOrder.md +8 -0
  56. data/docs/CardTransactionDetailsOrderTransaction.md +8 -0
  57. data/docs/CardTransactionDetailsPoints.md +12 -0
  58. data/docs/CardTransactionDetailsPurchase.md +9 -0
  59. data/docs/CardTransactionDetailsPurchaseCardTransaction.md +8 -0
  60. data/docs/CardTransactionDetailsPurchaseRewardTransaction.md +8 -0
  61. data/docs/CardTransactionDetailsPurchaseTransaction.md +8 -0
  62. data/docs/CardTransactionDetailsRejection.md +9 -0
  63. data/docs/CardTransactionDetailsReward.md +8 -0
  64. data/docs/CardTransactionDetailsRewardTransaction.md +8 -0
  65. data/docs/CardTransactionDetailsTargetCard.md +8 -0
  66. data/docs/ClientRedemptionsRedeemRequestBody.md +1 -1
  67. data/docs/ClientSideApi.md +2 -2
  68. data/docs/ClientValidationsValidateRequestBody.md +1 -1
  69. data/docs/ClientValidationsValidateResponseBody.md +1 -1
  70. data/docs/CustomerLoyaltyMembership.md +11 -0
  71. data/docs/CustomerLoyaltyMembershipCard.md +13 -0
  72. data/docs/CustomerLoyaltyMembershipMember.md +11 -0
  73. data/docs/CustomerLoyaltyMembershipTier.md +12 -0
  74. data/docs/CustomerWithSummaryLoyaltyReferrals.md +1 -0
  75. data/docs/CustomersApi.md +8 -6
  76. data/docs/CustomersCreateResponseBody.md +1 -0
  77. data/docs/CustomersGetResponseBody.md +1 -0
  78. data/docs/CustomersRedeemablesListResponseBody.md +1 -1
  79. data/docs/CustomersUpdateResponseBody.md +1 -0
  80. data/docs/DateFilter.md +8 -0
  81. data/docs/DateFilterConditions.md +14 -0
  82. data/docs/EarningRuleDailyReportEntry.md +10 -0
  83. data/docs/EarningRuleEarning.md +12 -0
  84. data/docs/EarningRuleEffect.md +11 -0
  85. data/docs/EarningRuleEffectPoints.md +10 -0
  86. data/docs/EarningRuleEffectPointsExpiration.md +11 -0
  87. data/docs/EarningRuleEffectPointsExpirationCalendarExpiration.md +8 -0
  88. data/docs/EarningRuleEffectPointsExpirationRollingExpiration.md +9 -0
  89. data/docs/EarningRuleEffectPointsExpirationSlidingExpiration.md +9 -0
  90. data/docs/EarningRuleEffectPointsProportional.md +14 -0
  91. data/docs/EarningRuleIdFilterConditions.md +8 -0
  92. data/docs/EarningRuleIdFilterConditionsConditions.md +11 -0
  93. data/docs/EarningRulePointsProportionalApplicableTo.md +11 -0
  94. data/docs/EarningRulePointsProportionalCustomEvent.md +8 -0
  95. data/docs/EarningRulePointsProportionalCustomer.md +8 -0
  96. data/docs/EarningRulePointsProportionalOrder.md +10 -0
  97. data/docs/EarningRulePointsProportionalOrderItems.md +10 -0
  98. data/docs/EarningRulePointsProportionalOrderItemsCalculation.md +10 -0
  99. data/docs/EarningRuleTierRules.md +9 -0
  100. data/docs/EarningRuleTrigger.md +10 -0
  101. data/docs/EarningRuleTriggerLimitsCooldown.md +9 -0
  102. data/docs/EarningRuleTriggerLimitsCooldownFixedCooldown.md +8 -0
  103. data/docs/EarningRuleTriggerLimitsFrequency.md +9 -0
  104. data/docs/EarningRuleValidityHours.md +9 -0
  105. data/docs/EarningRulesReportDailyEntry.md +13 -0
  106. data/docs/EarningRulesReportFailuresBreakdown.md +9 -0
  107. data/docs/EarningRulesReportListFilters.md +9 -0
  108. data/docs/EarningRulesReportSummaryEntry.md +13 -0
  109. data/docs/ErrorError.md +1 -1
  110. data/docs/ExamineCardReference.md +12 -0
  111. data/docs/ExamineCustomerIdentification.md +11 -0
  112. data/docs/ExamineCustomerReference.md +11 -0
  113. data/docs/ExamineMemberReference.md +12 -0
  114. data/docs/ExamineProgramReference.md +11 -0
  115. data/docs/ExportParameters.md +2 -2
  116. data/docs/ExportsApi.md +6 -6
  117. data/docs/ExportsCreateRequestBodyParameters.md +2 -2
  118. data/docs/ExportsCreateResponseBodyParameters.md +2 -2
  119. data/docs/ExportsGetResponseBodyParameters.md +2 -2
  120. data/docs/LV2BenefitsApi.md +66 -0
  121. data/docs/LV2EarningRulesApi.md +66 -0
  122. data/docs/LV2ExamineApi.md +129 -0
  123. data/docs/LV2ProgramsApi.md +2935 -0
  124. data/docs/LV2RewardsApi.md +66 -0
  125. data/docs/ListCursor.md +9 -0
  126. data/docs/LoyaltiesApi.md +52 -52
  127. data/docs/LoyaltiesExamineEarningRulesExamineRequestBody.md +12 -0
  128. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventAll.md +8 -0
  129. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventSpecific.md +9 -0
  130. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomer.md +8 -0
  131. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEvent.md +10 -0
  132. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventAll.md +10 -0
  133. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventSpecific.md +10 -0
  134. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerOrderPaid.md +10 -0
  135. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerSegmentEntered.md +9 -0
  136. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyMember.md +8 -0
  137. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyOrder.md +12 -0
  138. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItem.md +19 -0
  139. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemProduct.md +10 -0
  140. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemSku.md +10 -0
  141. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyTrigger.md +9 -0
  142. data/docs/LoyaltiesExamineEarningRulesExamineRequestBodyTriggerSpecific.md +8 -0
  143. data/docs/LoyaltiesExamineEarningRulesExamineResponseBody.md +12 -0
  144. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEarningRuleEstimation.md +9 -0
  145. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEstimation.md +10 -0
  146. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitReference.md +11 -0
  147. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyCardEarningRuleEstimation.md +10 -0
  148. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyCardEstimation.md +11 -0
  149. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleDetail.md +11 -0
  150. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleReference.md +9 -0
  151. data/docs/LoyaltiesExamineEarningRulesExamineResponseBodyMembership.md +12 -0
  152. data/docs/LoyaltiesExamineRewardsExamineRequestBody.md +10 -0
  153. data/docs/LoyaltiesExamineRewardsExamineRequestBodyCustomer.md +8 -0
  154. data/docs/LoyaltiesExamineRewardsExamineRequestBodyMember.md +8 -0
  155. data/docs/LoyaltiesExamineRewardsExamineResponseBody.md +11 -0
  156. data/docs/LoyaltiesExamineRewardsExamineResponseBodyCardEstimation.md +10 -0
  157. data/docs/LoyaltiesExamineRewardsExamineResponseBodyCardRewardEstimation.md +12 -0
  158. data/docs/LoyaltiesExamineRewardsExamineResponseBodyMembership.md +11 -0
  159. data/docs/LoyaltiesExamineRewardsExamineResponseBodyRewardCost.md +9 -0
  160. data/docs/LoyaltiesExamineRewardsExamineResponseBodyRewardDetail.md +13 -0
  161. data/docs/LoyaltiesExamineRewardsExamineResponseBodyRewardReference.md +9 -0
  162. data/docs/LoyaltiesExamineRewardsExamineResponseBodyRewardUnavailabilityReason.md +10 -0
  163. data/docs/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersId.md +8 -0
  164. data/docs/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersIdConditions.md +11 -0
  165. data/docs/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersType.md +8 -0
  166. data/docs/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersTypeConditions.md +11 -0
  167. data/docs/LoyaltiesProgramsMembersBenefitsTransactionsListRequestQueryBenefitId.md +8 -0
  168. data/docs/LoyaltiesProgramsMembersBenefitsTransactionsListRequestQueryBenefitIdConditions.md +11 -0
  169. data/docs/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersId.md +8 -0
  170. data/docs/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersIdConditions.md +11 -0
  171. data/docs/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersType.md +8 -0
  172. data/docs/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersTypeConditions.md +11 -0
  173. data/docs/LoyaltiesProgramsMembersCardsReportsDailyListResponseBody.md +9 -0
  174. data/docs/LoyaltiesProgramsMembersCardsTransactionsListRequestQueryId.md +8 -0
  175. data/docs/LoyaltiesProgramsMembersCardsTransactionsListRequestQueryIdConditions.md +11 -0
  176. data/docs/LoyaltiesProgramsMembersListRequestQueryCustomerId.md +8 -0
  177. data/docs/LoyaltiesProgramsMembersListRequestQueryCustomerIdConditions.md +11 -0
  178. data/docs/LoyaltiesProgramsMembersListRequestQueryId.md +8 -0
  179. data/docs/LoyaltiesProgramsMembersListRequestQueryIdConditions.md +11 -0
  180. data/docs/LoyaltiesProgramsMembersListRequestQueryStatus.md +8 -0
  181. data/docs/LoyaltiesProgramsMembersListRequestQueryStatusConditions.md +11 -0
  182. data/docs/LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBody.md +10 -0
  183. data/docs/LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBodyTransaction.md +20 -0
  184. data/docs/LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBodyTransactionDetails.md +12 -0
  185. data/docs/LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimit.md +10 -0
  186. data/docs/LoyaltiesProgramsMembersOrdersPaymentsListRequestQueryId.md +8 -0
  187. data/docs/LoyaltiesProgramsMembersOrdersPaymentsListRequestQueryIdConditions.md +11 -0
  188. data/docs/LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBody.md +10 -0
  189. data/docs/LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBodyTransaction.md +20 -0
  190. data/docs/LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBodyTransactionDetails.md +12 -0
  191. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryCardDefinitionId.md +8 -0
  192. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryCardDefinitionIdConditions.md +11 -0
  193. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryId.md +8 -0
  194. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryIdConditions.md +11 -0
  195. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryRewardId.md +8 -0
  196. data/docs/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryRewardIdConditions.md +11 -0
  197. data/docs/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardDefinitionId.md +8 -0
  198. data/docs/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardDefinitionIdConditions.md +11 -0
  199. data/docs/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardId.md +8 -0
  200. data/docs/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardIdConditions.md +11 -0
  201. data/docs/LoyaltiesProgramsReportsMembersDailyListResponseBody.md +9 -0
  202. data/docs/LoyaltiesProgramsReportsMembersSummaryListResponseBody.md +9 -0
  203. data/docs/LoyaltiesProgramsReportsRewardsDailyListResponseBody.md +9 -0
  204. data/docs/LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody.md +9 -0
  205. data/docs/LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody.md +9 -0
  206. data/docs/LoyaltiesProgramsReportsRewardsSummaryListResponseBody.md +9 -0
  207. data/docs/LoyaltiesProgramsReportsSpendingDailyListResponseBody.md +9 -0
  208. data/docs/LoyaltiesProgramsReportsSpendingSummaryListResponseBody.md +9 -0
  209. data/docs/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProduct.md +8 -0
  210. data/docs/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProductsCollection.md +8 -0
  211. data/docs/LoyaltyV2ActivityBenefitPointsProportionalApplicableToSku.md +8 -0
  212. data/docs/LoyaltyV2ActivityBenefitStockLimited.md +8 -0
  213. data/docs/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod.md +9 -0
  214. data/docs/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriodCurrentPeriod.md +8 -0
  215. data/docs/LoyaltyV2ActivityEarningRuleEarningLimits.md +8 -0
  216. data/docs/LoyaltyV2ActivityEarningRuleEarningLimitsGlobal.md +9 -0
  217. data/docs/LoyaltyV2ActivityEarningRuleEffectBenefit.md +8 -0
  218. data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationCalendarExpirationDate.md +9 -0
  219. data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationPeriod.md +9 -0
  220. data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationRounding.md +9 -0
  221. data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationSlidingExpirationPeriod.md +9 -0
  222. data/docs/LoyaltyV2ActivityEarningRuleError.md +8 -0
  223. data/docs/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProduct.md +8 -0
  224. data/docs/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProductsCollection.md +8 -0
  225. data/docs/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToSku.md +8 -0
  226. data/docs/LoyaltyV2ActivityEarningRulePointsProportionalEvery.md +9 -0
  227. data/docs/LoyaltyV2ActivityEarningRulePointsProportionalMetadata.md +10 -0
  228. data/docs/LoyaltyV2ActivityEarningRuleTierRulesAnyOfEntry.md +9 -0
  229. data/docs/LoyaltyV2ActivityEarningRuleTriggerCustomEvent.md +8 -0
  230. data/docs/LoyaltyV2ActivityEarningRuleTriggerLimitsCooldownFixedCooldownPeriod.md +9 -0
  231. data/docs/LoyaltyV2ActivityEarningRuleTriggerSegment.md +8 -0
  232. data/docs/LoyaltyV2ActivityEarningRuleValidityDailyHours.md +10 -0
  233. data/docs/LoyaltyV2ActivityRewardCostSpendingResponse.md +11 -0
  234. data/docs/LoyaltyV2ActivityRewardDigitalDiscountCoupons.md +8 -0
  235. data/docs/LoyaltyV2ActivityRewardDigitalGiftVouchersResponse.md +9 -0
  236. data/docs/LoyaltyV2ActivityRewardDigitalLoyaltyCardPointsResponse.md +9 -0
  237. data/docs/LoyaltyV2ActivityRewardMaterialProduct.md +8 -0
  238. data/docs/LoyaltyV2ActivityRewardMaterialSKU.md +9 -0
  239. data/docs/LoyaltyV2ActivityRewardPurchaseLimitsCooldownFixedCooldownPeriod.md +9 -0
  240. data/docs/LoyaltyV2ActivityRewardPurchaseLimitsFrequencyLimitTriggers.md +8 -0
  241. data/docs/LoyaltyV2ActivityRewardRefunds.md +8 -0
  242. data/docs/LoyaltyV2ActivityRewardValidityDailyHoursResponse.md +10 -0
  243. data/docs/LoyaltyV2CardPointsBucketSimple.md +11 -0
  244. data/docs/LoyaltyV2CardPointsBucketSimplePoints.md +8 -0
  245. data/docs/LpmOrdPayCcrbTxDetailsMetadata.md +9 -0
  246. data/docs/LpmOrdPayCcrbTxDetailsRejection.md +9 -0
  247. data/docs/LpmOrdPayCcrbTxDetailsRejectionDetails.md +10 -0
  248. data/docs/LpmOrdPayCcrbTxDetailsSpendingCap.md +10 -0
  249. data/docs/LpmRewPurchCcrbTxDetailsPoints.md +8 -0
  250. data/docs/LpmRewPurchCcrbTxDetailsRejection.md +9 -0
  251. data/docs/LpmRewPurchCcrbTxDetailsResult.md +11 -0
  252. data/docs/LpmRewPurchCcrbTxDetailsResultDigLcPoints.md +10 -0
  253. data/docs/LpmRewPurchCcrbTxDetailsResultDigital.md +11 -0
  254. data/docs/LpmRewPurchCcrbTxDetailsResultMaterial.md +10 -0
  255. data/docs/LpmRewPurchCcrbTxDetailsResultReward.md +9 -0
  256. data/docs/ManagementApi.md +26 -26
  257. data/docs/ManagementProjectsMetadataSchemaDefinition.md +1 -1
  258. data/docs/Member.md +15 -0
  259. data/docs/MemberCard.md +11 -0
  260. data/docs/MemberCreate.md +10 -0
  261. data/docs/MemberTierProgress.md +13 -0
  262. data/docs/MemberTierProgressCurrent.md +11 -0
  263. data/docs/MemberTierProgressDeferred.md +10 -0
  264. data/docs/MemberTierProgressOpportunity.md +10 -0
  265. data/docs/MemberTierProgressPoints.md +10 -0
  266. data/docs/MemberTierProgressRisk.md +10 -0
  267. data/docs/MemberTierProgressTier.md +9 -0
  268. data/docs/MemberTierProgressTierStructure.md +9 -0
  269. data/docs/MembersReportDailyEntry.md +13 -0
  270. data/docs/MembersReportSummaryEntry.md +13 -0
  271. data/docs/MembershipCard.md +12 -0
  272. data/docs/MetadataSchemasApi.md +2 -2
  273. data/docs/OrderPaymentLimitDefinition.md +8 -0
  274. data/docs/OrderPaymentOrder.md +9 -0
  275. data/docs/OrderPaymentPaymentDetails.md +11 -0
  276. data/docs/OrderPaymentRejection.md +9 -0
  277. data/docs/OrderPaymentTransaction.md +20 -0
  278. data/docs/OrderPaymentTransactionDetails.md +12 -0
  279. data/docs/OrderPaymentTransactionDetailsSpendingCap.md +10 -0
  280. data/docs/OrdersApi.md +2 -2
  281. data/docs/PointsEarningsReportDailyEntry.md +15 -0
  282. data/docs/PointsEarningsReportListFilters.md +10 -0
  283. data/docs/PointsEarningsReportSummaryEntry.md +15 -0
  284. data/docs/ProductCollectionsApi.md +1 -1
  285. data/docs/ProductCollectionsProductsListResponseBody.md +1 -1
  286. data/docs/ProductsApi.md +4 -4
  287. data/docs/Program.md +17 -0
  288. data/docs/ProgramEarningRuleAssignment.md +10 -0
  289. data/docs/ProgramListCursor.md +9 -0
  290. data/docs/ProgramRewardAssignment.md +13 -0
  291. data/docs/ProgramRewardAssignmentStock.md +9 -0
  292. data/docs/ProgramRewardAssignmentStockLimited.md +8 -0
  293. data/docs/ProgramSimple.md +12 -0
  294. data/docs/ProgramTierStructureAssignment.md +10 -0
  295. data/docs/ProgramValidityDailyHours.md +10 -0
  296. data/docs/ProgramValidityHours.md +9 -0
  297. data/docs/PromotionTierCampaign.md +1 -1
  298. data/docs/PromotionsTiersCreateResponseBodyCampaign.md +1 -1
  299. data/docs/PromotionsTiersDisableResponseBodyCampaign.md +1 -1
  300. data/docs/PromotionsTiersEnableResponseBodyCampaign.md +1 -1
  301. data/docs/PromotionsTiersGetResponseBodyCampaign.md +1 -1
  302. data/docs/PromotionsTiersUpdateResponseBodyCampaign.md +1 -1
  303. data/docs/PublicationsApi.md +3 -3
  304. data/docs/PublicationsListResponseBody.md +1 -1
  305. data/docs/QualificationsApi.md +1 -1
  306. data/docs/RedemptionEntryPromotionTierCampaign.md +1 -1
  307. data/docs/RedemptionRewardResultParametersCoin.md +1 -1
  308. data/docs/RedemptionsApi.md +3 -3
  309. data/docs/RedemptionsGetResponseBodyPromotionTierCampaign.md +1 -1
  310. data/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md +1 -1
  311. data/docs/RedemptionsRedeemRequestBody.md +1 -1
  312. data/docs/RedemptionsRedeemRequestBodyOptions.md +1 -0
  313. data/docs/ReferralsApi.md +4 -4
  314. data/docs/ReferralsMembersHoldersListResponseBody.md +1 -1
  315. data/docs/ReportCardDefinitionIdFilterConditions.md +8 -0
  316. data/docs/ReportCardDefinitionIdFilterConditionsConditions.md +11 -0
  317. data/docs/RewardCostResponse.md +12 -0
  318. data/docs/RewardCostTierRulesAnyOfEntryResponse.md +9 -0
  319. data/docs/RewardCostTierRulesResponse.md +9 -0
  320. data/docs/RewardDigitalResponse.md +11 -0
  321. data/docs/RewardMaterialResponse.md +10 -0
  322. data/docs/RewardPurchaseDigitalCoupon.md +10 -0
  323. data/docs/RewardPurchaseDigitalGiftVoucher.md +12 -0
  324. data/docs/RewardPurchaseLimits.md +9 -0
  325. data/docs/RewardPurchaseLimitsCooldown.md +9 -0
  326. data/docs/RewardPurchaseLimitsCooldownFixedCooldown.md +8 -0
  327. data/docs/RewardPurchaseLimitsFrequency.md +9 -0
  328. data/docs/RewardPurchaseLimitsFrequencyLimit.md +10 -0
  329. data/docs/RewardPurchaseRefundPolicies.md +9 -0
  330. data/docs/RewardPurchaseTransaction.md +20 -0
  331. data/docs/RewardValidityHoursResponse.md +9 -0
  332. data/docs/RewardsCreateRequestBodyParametersCoin.md +1 -1
  333. data/docs/RewardsReportDailyEntry.md +13 -0
  334. data/docs/RewardsReportFilterRewardIdConditions.md +8 -0
  335. data/docs/RewardsReportFilterRewardIdConditionsConditions.md +11 -0
  336. data/docs/RewardsReportListFilters.md +9 -0
  337. data/docs/RewardsReportSummaryEntry.md +13 -0
  338. data/docs/RewardsSpendingsReportDailyEntry.md +15 -0
  339. data/docs/RewardsSpendingsReportFilterCostIdConditions.md +8 -0
  340. data/docs/RewardsSpendingsReportFilterCostIdConditionsConditions.md +11 -0
  341. data/docs/RewardsSpendingsReportFilterSpendingIdConditions.md +8 -0
  342. data/docs/RewardsSpendingsReportFilterSpendingIdConditionsConditions.md +11 -0
  343. data/docs/RewardsSpendingsReportListFilters.md +12 -0
  344. data/docs/RewardsSpendingsReportSummaryEntry.md +15 -0
  345. data/docs/RewardsUpdateRequestBodyParametersCoin.md +1 -1
  346. data/docs/SegmentsApi.md +1 -1
  347. data/docs/SpendingReportDailyEntry.md +17 -0
  348. data/docs/SpendingReportListFilters.md +9 -0
  349. data/docs/SpendingReportSummaryEntry.md +17 -0
  350. data/docs/TemplatesApi.md +7 -7
  351. data/docs/TierTransaction.md +20 -0
  352. data/docs/TierTransactionDetails.md +14 -0
  353. data/docs/TierTransactionOrigin.md +10 -0
  354. data/docs/TierTransactionRejection.md +9 -0
  355. data/docs/TiersReportDailyEntry.md +16 -0
  356. data/docs/TiersReportFilterTierIdConditions.md +8 -0
  357. data/docs/TiersReportFilterTierIdConditionsConditions.md +11 -0
  358. data/docs/TiersReportFilterTierStructureIdConditions.md +8 -0
  359. data/docs/TiersReportFilterTierStructureIdConditionsConditions.md +11 -0
  360. data/docs/TiersReportListFilters.md +10 -0
  361. data/docs/TiersReportSummaryEntry.md +16 -0
  362. data/docs/TransactionFilterDateConditions.md +8 -0
  363. data/docs/TransactionFilterDateConditionsConditions.md +14 -0
  364. data/docs/V2LoyaltiesBenefitsGetResponseBody.md +19 -0
  365. data/docs/V2LoyaltiesBenefitsGetResponseBodyPoints.md +9 -0
  366. data/docs/V2LoyaltiesBenefitsGetResponseBodyPointsProportional.md +13 -0
  367. data/docs/V2LoyaltiesBenefitsGetResponseBodyStock.md +9 -0
  368. data/docs/V2LoyaltiesEarningRulesGetResponseBody.md +22 -0
  369. data/docs/V2LoyaltiesEarningRulesGetResponseBodyTriggerLimits.md +9 -0
  370. data/docs/V2LoyaltiesProgramsEarningRulesListResponseBody.md +10 -0
  371. data/docs/V2LoyaltiesProgramsMembersActivateResponseBody.md +15 -0
  372. data/docs/V2LoyaltiesProgramsMembersActivitiesListRequestQueryFilters.md +11 -0
  373. data/docs/V2LoyaltiesProgramsMembersActivitiesListResponseBody.md +10 -0
  374. data/docs/V2LoyaltiesProgramsMembersBenefitsTransactionsListRequestQuery.md +10 -0
  375. data/docs/V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody.md +10 -0
  376. data/docs/V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBodyCursor.md +9 -0
  377. data/docs/V2LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFilters.md +11 -0
  378. data/docs/V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody.md +10 -0
  379. data/docs/V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody.md +10 -0
  380. data/docs/V2LoyaltiesProgramsMembersCardsExpiringPointsListRequestQuery.md +10 -0
  381. data/docs/V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody.md +10 -0
  382. data/docs/V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody.md +10 -0
  383. data/docs/V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody.md +10 -0
  384. data/docs/V2LoyaltiesProgramsMembersCardsPendingPointsListRequestQuery.md +9 -0
  385. data/docs/V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody.md +10 -0
  386. data/docs/V2LoyaltiesProgramsMembersCardsPointsAdjustRequestBody.md +9 -0
  387. data/docs/V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody.md +10 -0
  388. data/docs/V2LoyaltiesProgramsMembersCardsTransactionsListRequestQuery.md +11 -0
  389. data/docs/V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody.md +10 -0
  390. data/docs/V2LoyaltiesProgramsMembersCreateInBulkResponseBody.md +8 -0
  391. data/docs/V2LoyaltiesProgramsMembersCreateRequestBody.md +10 -0
  392. data/docs/V2LoyaltiesProgramsMembersCreateResponseBody.md +16 -0
  393. data/docs/V2LoyaltiesProgramsMembersDeactivateResponseBody.md +15 -0
  394. data/docs/V2LoyaltiesProgramsMembersDeleteResponseBody.md +15 -0
  395. data/docs/V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody.md +9 -0
  396. data/docs/V2LoyaltiesProgramsMembersGetResponseBody.md +16 -0
  397. data/docs/V2LoyaltiesProgramsMembersListRequestQuery.md +12 -0
  398. data/docs/V2LoyaltiesProgramsMembersListResponseBody.md +10 -0
  399. data/docs/V2LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBody.md +11 -0
  400. data/docs/V2LoyaltiesProgramsMembersOrdersPaymentsListRequestQuery.md +11 -0
  401. data/docs/V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody.md +10 -0
  402. data/docs/V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBodyCursor.md +9 -0
  403. data/docs/V2LoyaltiesProgramsMembersRewardsPurchasesCreateRequestBody.md +9 -0
  404. data/docs/V2LoyaltiesProgramsMembersRewardsPurchasesListRequestQuery.md +12 -0
  405. data/docs/V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody.md +10 -0
  406. data/docs/V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBodyCursor.md +9 -0
  407. data/docs/V2LoyaltiesProgramsMembersTiersTransactionsListRequestQuery.md +11 -0
  408. data/docs/V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody.md +10 -0
  409. data/docs/V2LoyaltiesProgramsMembersUpdateRequestBody.md +8 -0
  410. data/docs/V2LoyaltiesProgramsMembersUpdateResponseBody.md +15 -0
  411. data/docs/V2LoyaltiesProgramsMembershipsGetResponseBody.md +11 -0
  412. data/docs/V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody.md +9 -0
  413. data/docs/V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody.md +9 -0
  414. data/docs/V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody.md +9 -0
  415. data/docs/V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody.md +9 -0
  416. data/docs/V2LoyaltiesProgramsReportsTiersDailyListResponseBody.md +9 -0
  417. data/docs/V2LoyaltiesProgramsReportsTiersSummaryListResponseBody.md +9 -0
  418. data/docs/V2LoyaltiesProgramsRewardsListResponseBody.md +10 -0
  419. data/docs/V2LoyaltiesProgramsRewardsPurchasesRefundRequestBody.md +8 -0
  420. data/docs/V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody.md +10 -0
  421. data/docs/V2LoyaltiesProgramsTierStructuresListResponseBody.md +10 -0
  422. data/docs/V2LoyaltiesRewardsGetResponseBody.md +23 -0
  423. data/docs/VLMemberActivity.md +14 -0
  424. data/docs/VLMemberActivityData.md +11 -0
  425. data/docs/ValidationRulesApi.md +2 -2
  426. data/docs/ValidationsValidateRequestBody.md +1 -1
  427. data/docs/ValidationsValidateRequestBodyOptions.md +1 -0
  428. data/docs/ValidationsValidateResponseBody.md +1 -1
  429. data/docs/VouchersApi.md +8 -8
  430. data/lib/VoucherifySdk/api/campaigns_api.rb +14 -14
  431. data/lib/VoucherifySdk/api/client_side_api.rb +4 -4
  432. data/lib/VoucherifySdk/api/customers_api.rb +13 -10
  433. data/lib/VoucherifySdk/api/exports_api.rb +8 -8
  434. data/lib/VoucherifySdk/api/loyalties_api.rb +104 -104
  435. data/lib/VoucherifySdk/api/lv2_benefits_api.rb +81 -0
  436. data/lib/VoucherifySdk/api/lv2_earning_rules_api.rb +81 -0
  437. data/lib/VoucherifySdk/api/lv2_examine_api.rb +150 -0
  438. data/lib/VoucherifySdk/api/lv2_programs_api.rb +3008 -0
  439. data/lib/VoucherifySdk/api/lv2_rewards_api.rb +81 -0
  440. data/lib/VoucherifySdk/api/management_api.rb +52 -52
  441. data/lib/VoucherifySdk/api/metadata_schemas_api.rb +4 -4
  442. data/lib/VoucherifySdk/api/orders_api.rb +4 -4
  443. data/lib/VoucherifySdk/api/product_collections_api.rb +2 -2
  444. data/lib/VoucherifySdk/api/products_api.rb +8 -8
  445. data/lib/VoucherifySdk/api/publications_api.rb +6 -6
  446. data/lib/VoucherifySdk/api/qualifications_api.rb +2 -2
  447. data/lib/VoucherifySdk/api/redemptions_api.rb +6 -6
  448. data/lib/VoucherifySdk/api/referrals_api.rb +8 -8
  449. data/lib/VoucherifySdk/api/segments_api.rb +2 -2
  450. data/lib/VoucherifySdk/api/templates_api.rb +14 -14
  451. data/lib/VoucherifySdk/api/validation_rules_api.rb +4 -4
  452. data/lib/VoucherifySdk/api/vouchers_api.rb +16 -16
  453. data/lib/VoucherifySdk/configuration.rb +8 -0
  454. data/lib/VoucherifySdk/models/activity_source.rb +252 -0
  455. data/lib/VoucherifySdk/models/activity_source_api_key.rb +232 -0
  456. data/lib/VoucherifySdk/models/activity_source_user.rb +210 -0
  457. data/lib/VoucherifySdk/models/benefit_points_proportional_applicable_to.rb +261 -0
  458. data/lib/VoucherifySdk/models/benefit_points_proportional_custom_event.rb +209 -0
  459. data/lib/VoucherifySdk/models/benefit_points_proportional_custom_event_metadata.rb +257 -0
  460. data/lib/VoucherifySdk/models/benefit_points_proportional_customer.rb +209 -0
  461. data/lib/VoucherifySdk/models/benefit_points_proportional_customer_metadata.rb +257 -0
  462. data/lib/VoucherifySdk/models/benefit_points_proportional_order.rb +229 -0
  463. data/lib/VoucherifySdk/models/benefit_points_proportional_order_amount.rb +241 -0
  464. data/lib/VoucherifySdk/models/benefit_points_proportional_order_items.rb +229 -0
  465. data/lib/VoucherifySdk/models/benefit_points_proportional_order_items_amount.rb +259 -0
  466. data/lib/VoucherifySdk/models/benefit_points_proportional_order_items_quantity.rb +259 -0
  467. data/lib/VoucherifySdk/models/benefit_points_proportional_order_items_subtotal_amount.rb +259 -0
  468. data/lib/VoucherifySdk/models/benefit_points_proportional_order_metadata.rb +257 -0
  469. data/lib/VoucherifySdk/models/benefit_points_proportional_order_total_amount.rb +241 -0
  470. data/lib/VoucherifySdk/models/benefit_transaction.rb +350 -0
  471. data/lib/VoucherifySdk/models/benefit_transaction_details.rb +238 -0
  472. data/lib/VoucherifySdk/models/benefit_transaction_details_metadata.rb +227 -0
  473. data/lib/VoucherifySdk/models/benefit_transaction_details_result.rb +210 -0
  474. data/lib/VoucherifySdk/models/benefit_transaction_rejection.rb +220 -0
  475. data/lib/VoucherifySdk/models/card.rb +387 -0
  476. data/lib/VoucherifySdk/models/card_activity.rb +308 -0
  477. data/lib/VoucherifySdk/models/card_activity_data.rb +258 -0
  478. data/lib/VoucherifySdk/models/card_balance.rb +225 -0
  479. data/lib/VoucherifySdk/models/card_code_generation_failure_result.rb +210 -0
  480. data/lib/VoucherifySdk/models/card_daily_report_entry.rb +412 -0
  481. data/lib/VoucherifySdk/models/card_definition_id_filter_conditions.rb +209 -0
  482. data/lib/VoucherifySdk/models/card_definition_id_filter_conditions_conditions.rb +238 -0
  483. data/lib/VoucherifySdk/models/card_lifetime_bucket.rb +231 -0
  484. data/lib/VoucherifySdk/models/card_lifetime_bucket_pending_points.rb +238 -0
  485. data/lib/VoucherifySdk/models/card_lifetime_bucket_points.rb +355 -0
  486. data/lib/VoucherifySdk/models/card_next_activation.rb +269 -0
  487. data/lib/VoucherifySdk/models/card_next_expiration.rb +223 -0
  488. data/lib/VoucherifySdk/models/card_pending_points_bucket.rb +405 -0
  489. data/lib/VoucherifySdk/models/card_pending_points_bucket_points.rb +210 -0
  490. data/lib/VoucherifySdk/models/card_points_bucket.rb +422 -0
  491. data/lib/VoucherifySdk/models/card_points_bucket_points.rb +210 -0
  492. data/lib/VoucherifySdk/models/card_simple.rb +332 -0
  493. data/lib/VoucherifySdk/models/card_transaction.rb +393 -0
  494. data/lib/VoucherifySdk/models/card_transaction_details.rb +354 -0
  495. data/lib/VoucherifySdk/models/card_transaction_details_card_transaction.rb +210 -0
  496. data/lib/VoucherifySdk/models/card_transaction_details_order.rb +210 -0
  497. data/lib/VoucherifySdk/models/card_transaction_details_order_transaction.rb +210 -0
  498. data/lib/VoucherifySdk/models/card_transaction_details_points.rb +280 -0
  499. data/lib/VoucherifySdk/models/card_transaction_details_purchase.rb +219 -0
  500. data/lib/VoucherifySdk/models/card_transaction_details_purchase_card_transaction.rb +209 -0
  501. data/lib/VoucherifySdk/models/card_transaction_details_purchase_reward_transaction.rb +209 -0
  502. data/lib/VoucherifySdk/models/card_transaction_details_purchase_transaction.rb +210 -0
  503. data/lib/VoucherifySdk/models/card_transaction_details_rejection.rb +221 -0
  504. data/lib/VoucherifySdk/models/card_transaction_details_reward.rb +210 -0
  505. data/lib/VoucherifySdk/models/card_transaction_details_reward_transaction.rb +210 -0
  506. data/lib/VoucherifySdk/models/card_transaction_details_target_card.rb +210 -0
  507. data/lib/VoucherifySdk/models/client_redemptions_redeem_request_body.rb +11 -0
  508. data/lib/VoucherifySdk/models/client_validations_validate_request_body.rb +11 -0
  509. data/lib/VoucherifySdk/models/client_validations_validate_response_body.rb +1 -0
  510. data/lib/VoucherifySdk/models/customer_loyalty_membership.rb +251 -0
  511. data/lib/VoucherifySdk/models/customer_loyalty_membership_card.rb +277 -0
  512. data/lib/VoucherifySdk/models/customer_loyalty_membership_member.rb +275 -0
  513. data/lib/VoucherifySdk/models/customer_loyalty_membership_tier.rb +278 -0
  514. data/lib/VoucherifySdk/models/customer_with_summary_loyalty_referrals.rb +14 -1
  515. data/lib/VoucherifySdk/models/customers_create_response_body.rb +14 -1
  516. data/lib/VoucherifySdk/models/customers_get_response_body.rb +14 -1
  517. data/lib/VoucherifySdk/models/customers_redeemables_list_response_body.rb +1 -1
  518. data/lib/VoucherifySdk/models/customers_update_response_body.rb +14 -1
  519. data/lib/VoucherifySdk/models/date_filter.rb +209 -0
  520. data/lib/VoucherifySdk/models/date_filter_conditions.rb +268 -0
  521. data/lib/VoucherifySdk/models/earning_rule_daily_report_entry.rb +258 -0
  522. data/lib/VoucherifySdk/models/earning_rule_earning.rb +281 -0
  523. data/lib/VoucherifySdk/models/earning_rule_effect.rb +261 -0
  524. data/lib/VoucherifySdk/models/earning_rule_effect_points.rb +246 -0
  525. data/lib/VoucherifySdk/models/earning_rule_effect_points_expiration.rb +261 -0
  526. data/lib/VoucherifySdk/models/earning_rule_effect_points_expiration_calendar_expiration.rb +222 -0
  527. data/lib/VoucherifySdk/models/earning_rule_effect_points_expiration_rolling_expiration.rb +224 -0
  528. data/lib/VoucherifySdk/models/earning_rule_effect_points_expiration_sliding_expiration.rb +226 -0
  529. data/lib/VoucherifySdk/models/earning_rule_effect_points_proportional.rb +296 -0
  530. data/lib/VoucherifySdk/models/earning_rule_id_filter_conditions.rb +209 -0
  531. data/lib/VoucherifySdk/models/earning_rule_id_filter_conditions_conditions.rb +238 -0
  532. data/lib/VoucherifySdk/models/earning_rule_points_proportional_applicable_to.rb +261 -0
  533. data/lib/VoucherifySdk/models/earning_rule_points_proportional_custom_event.rb +215 -0
  534. data/lib/VoucherifySdk/models/earning_rule_points_proportional_customer.rb +215 -0
  535. data/lib/VoucherifySdk/models/earning_rule_points_proportional_order.rb +226 -0
  536. data/lib/VoucherifySdk/models/earning_rule_points_proportional_order_items.rb +226 -0
  537. data/lib/VoucherifySdk/models/earning_rule_points_proportional_order_items_calculation.rb +259 -0
  538. data/lib/VoucherifySdk/models/earning_rule_tier_rules.rb +252 -0
  539. data/lib/VoucherifySdk/models/earning_rule_trigger.rb +252 -0
  540. data/lib/VoucherifySdk/models/earning_rule_trigger_limits_cooldown.rb +243 -0
  541. data/lib/VoucherifySdk/models/earning_rule_trigger_limits_cooldown_fixed_cooldown.rb +215 -0
  542. data/lib/VoucherifySdk/models/earning_rule_trigger_limits_frequency.rb +257 -0
  543. data/lib/VoucherifySdk/models/earning_rule_validity_hours.rb +252 -0
  544. data/lib/VoucherifySdk/models/earning_rules_report_daily_entry.rb +297 -0
  545. data/lib/VoucherifySdk/models/earning_rules_report_failures_breakdown.rb +221 -0
  546. data/lib/VoucherifySdk/models/earning_rules_report_list_filters.rb +243 -0
  547. data/lib/VoucherifySdk/models/earning_rules_report_summary_entry.rb +308 -0
  548. data/lib/VoucherifySdk/models/error_error.rb +2 -2
  549. data/lib/VoucherifySdk/models/examine_card_reference.rb +284 -0
  550. data/lib/VoucherifySdk/models/examine_customer_identification.rb +279 -0
  551. data/lib/VoucherifySdk/models/examine_customer_reference.rb +271 -0
  552. data/lib/VoucherifySdk/models/examine_member_reference.rb +282 -0
  553. data/lib/VoucherifySdk/models/examine_program_reference.rb +271 -0
  554. data/lib/VoucherifySdk/models/export.rb +1 -1
  555. data/lib/VoucherifySdk/models/export_parameters.rb +3 -3
  556. data/lib/VoucherifySdk/models/exports_create_request_body.rb +1 -1
  557. data/lib/VoucherifySdk/models/exports_create_request_body_parameters.rb +3 -3
  558. data/lib/VoucherifySdk/models/exports_create_response_body.rb +1 -1
  559. data/lib/VoucherifySdk/models/exports_create_response_body_parameters.rb +3 -3
  560. data/lib/VoucherifySdk/models/exports_get_response_body.rb +1 -1
  561. data/lib/VoucherifySdk/models/exports_get_response_body_parameters.rb +3 -3
  562. data/lib/VoucherifySdk/models/list_cursor.rb +221 -0
  563. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body.rb +258 -0
  564. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_custom_event_all.rb +211 -0
  565. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_custom_event_specific.rb +228 -0
  566. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer.rb +211 -0
  567. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer_custom_event.rb +252 -0
  568. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer_custom_event_all.rb +226 -0
  569. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer_custom_event_specific.rb +226 -0
  570. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer_order_paid.rb +226 -0
  571. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_customer_segment_entered.rb +217 -0
  572. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_member.rb +211 -0
  573. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_order.rb +262 -0
  574. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_order_item.rb +352 -0
  575. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_order_item_product.rb +232 -0
  576. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_order_item_sku.rb +232 -0
  577. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_trigger.rb +243 -0
  578. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_request_body_trigger_specific.rb +234 -0
  579. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body.rb +282 -0
  580. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_benefit_earning_rule_estimation.rb +245 -0
  581. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_benefit_estimation.rb +258 -0
  582. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_benefit_reference.rb +271 -0
  583. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_card_earning_rule_estimation.rb +256 -0
  584. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_card_estimation.rb +269 -0
  585. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_earning_rule_detail.rb +271 -0
  586. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_earning_rule_reference.rb +247 -0
  587. data/lib/VoucherifySdk/models/loyalties_examine_earning_rules_examine_response_body_membership.rb +280 -0
  588. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_request_body.rb +235 -0
  589. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_request_body_customer.rb +211 -0
  590. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_request_body_member.rb +211 -0
  591. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body.rb +278 -0
  592. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_card_estimation.rb +265 -0
  593. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_card_reward_estimation.rb +294 -0
  594. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_membership.rb +281 -0
  595. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_reward_cost.rb +247 -0
  596. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_reward_detail.rb +293 -0
  597. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_reward_reference.rb +247 -0
  598. data/lib/VoucherifySdk/models/loyalties_examine_rewards_examine_response_body_reward_unavailability_reason.rb +261 -0
  599. data/lib/VoucherifySdk/models/loyalties_programs_members_activities_list_request_query_filters_id.rb +209 -0
  600. data/lib/VoucherifySdk/models/loyalties_programs_members_activities_list_request_query_filters_id_conditions.rb +238 -0
  601. data/lib/VoucherifySdk/models/loyalties_programs_members_activities_list_request_query_filters_type.rb +209 -0
  602. data/lib/VoucherifySdk/models/loyalties_programs_members_activities_list_request_query_filters_type_conditions.rb +272 -0
  603. data/lib/VoucherifySdk/models/loyalties_programs_members_benefits_transactions_list_request_query_benefit_id.rb +209 -0
  604. data/lib/VoucherifySdk/models/loyalties_programs_members_benefits_transactions_list_request_query_benefit_id_conditions.rb +238 -0
  605. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_activities_list_request_query_filters_id.rb +209 -0
  606. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_activities_list_request_query_filters_id_conditions.rb +238 -0
  607. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_activities_list_request_query_filters_type.rb +209 -0
  608. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_activities_list_request_query_filters_type_conditions.rb +272 -0
  609. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_reports_daily_list_response_body.rb +249 -0
  610. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_transactions_list_request_query_id.rb +209 -0
  611. data/lib/VoucherifySdk/models/loyalties_programs_members_cards_transactions_list_request_query_id_conditions.rb +238 -0
  612. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_customer_id.rb +209 -0
  613. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_customer_id_conditions.rb +238 -0
  614. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_id.rb +209 -0
  615. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_id_conditions.rb +238 -0
  616. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_status.rb +209 -0
  617. data/lib/VoucherifySdk/models/loyalties_programs_members_list_request_query_status_conditions.rb +272 -0
  618. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_create_combined_response_body.rb +252 -0
  619. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_create_combined_response_body_transaction.rb +371 -0
  620. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_create_combined_response_body_transaction_details.rb +248 -0
  621. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_create_request_body_limit.rb +250 -0
  622. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_list_request_query_id.rb +209 -0
  623. data/lib/VoucherifySdk/models/loyalties_programs_members_orders_payments_list_request_query_id_conditions.rb +238 -0
  624. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_create_combined_response_body.rb +252 -0
  625. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_create_combined_response_body_transaction.rb +369 -0
  626. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_create_combined_response_body_transaction_details.rb +252 -0
  627. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_card_definition_id.rb +209 -0
  628. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_card_definition_id_conditions.rb +238 -0
  629. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_id.rb +209 -0
  630. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_id_conditions.rb +238 -0
  631. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_reward_id.rb +209 -0
  632. data/lib/VoucherifySdk/models/loyalties_programs_members_rewards_purchases_list_request_query_reward_id_conditions.rb +238 -0
  633. data/lib/VoucherifySdk/models/loyalties_programs_members_tiers_transactions_list_request_query_card_definition_id.rb +209 -0
  634. data/lib/VoucherifySdk/models/loyalties_programs_members_tiers_transactions_list_request_query_card_definition_id_conditions.rb +238 -0
  635. data/lib/VoucherifySdk/models/loyalties_programs_members_tiers_transactions_list_request_query_card_id.rb +209 -0
  636. data/lib/VoucherifySdk/models/loyalties_programs_members_tiers_transactions_list_request_query_card_id_conditions.rb +238 -0
  637. data/lib/VoucherifySdk/models/loyalties_programs_reports_members_daily_list_response_body.rb +249 -0
  638. data/lib/VoucherifySdk/models/loyalties_programs_reports_members_summary_list_response_body.rb +249 -0
  639. data/lib/VoucherifySdk/models/loyalties_programs_reports_rewards_daily_list_response_body.rb +249 -0
  640. data/lib/VoucherifySdk/models/loyalties_programs_reports_rewards_spendings_daily_list_response_body.rb +249 -0
  641. data/lib/VoucherifySdk/models/loyalties_programs_reports_rewards_spendings_summary_list_response_body.rb +249 -0
  642. data/lib/VoucherifySdk/models/loyalties_programs_reports_rewards_summary_list_response_body.rb +249 -0
  643. data/lib/VoucherifySdk/models/loyalties_programs_reports_spending_daily_list_response_body.rb +249 -0
  644. data/lib/VoucherifySdk/models/loyalties_programs_reports_spending_summary_list_response_body.rb +249 -0
  645. data/lib/VoucherifySdk/models/loyalty_v2_activity_benefit_points_proportional_applicable_to_product.rb +216 -0
  646. data/lib/VoucherifySdk/models/loyalty_v2_activity_benefit_points_proportional_applicable_to_products_collection.rb +216 -0
  647. data/lib/VoucherifySdk/models/loyalty_v2_activity_benefit_points_proportional_applicable_to_sku.rb +216 -0
  648. data/lib/VoucherifySdk/models/loyalty_v2_activity_benefit_stock_limited.rb +220 -0
  649. data/lib/VoucherifySdk/models/loyalty_v2_activity_card_definition_limit_time_based_period.rb +246 -0
  650. data/lib/VoucherifySdk/models/loyalty_v2_activity_card_definition_limit_time_based_period_current_period.rb +234 -0
  651. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_earning_limits.rb +215 -0
  652. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_earning_limits_global.rb +257 -0
  653. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_benefit.rb +216 -0
  654. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_calendar_expiration_date.rb +241 -0
  655. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_rolling_expiration_period.rb +250 -0
  656. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_rolling_expiration_rounding.rb +255 -0
  657. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_sliding_expiration_period.rb +250 -0
  658. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_error.rb +220 -0
  659. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_applicable_to_product.rb +216 -0
  660. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_applicable_to_products_collection.rb +216 -0
  661. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_applicable_to_sku.rb +216 -0
  662. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_every.rb +241 -0
  663. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_metadata.rb +257 -0
  664. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_tier_rules_any_of_entry.rb +234 -0
  665. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_trigger_custom_event.rb +216 -0
  666. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_trigger_limits_cooldown_fixed_cooldown_period.rb +250 -0
  667. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_trigger_segment.rb +216 -0
  668. data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_validity_daily_hours.rb +244 -0
  669. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_cost_spending_response.rb +260 -0
  670. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_digital_discount_coupons.rb +216 -0
  671. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_digital_gift_vouchers_response.rb +227 -0
  672. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_digital_loyalty_card_points_response.rb +227 -0
  673. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_material_product.rb +216 -0
  674. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_material_sku.rb +233 -0
  675. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_purchase_limits_cooldown_fixed_cooldown_period.rb +250 -0
  676. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_purchase_limits_frequency_limit_triggers.rb +215 -0
  677. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_refunds.rb +234 -0
  678. data/lib/VoucherifySdk/models/loyalty_v2_activity_reward_validity_daily_hours_response.rb +234 -0
  679. data/lib/VoucherifySdk/models/loyalty_v2_card_points_bucket_simple.rb +272 -0
  680. data/lib/VoucherifySdk/models/loyalty_v2_card_points_bucket_simple_points.rb +210 -0
  681. data/lib/VoucherifySdk/models/lpm_ord_pay_ccrb_tx_details_metadata.rb +220 -0
  682. data/lib/VoucherifySdk/models/lpm_ord_pay_ccrb_tx_details_rejection.rb +219 -0
  683. data/lib/VoucherifySdk/models/lpm_ord_pay_ccrb_tx_details_rejection_details.rb +231 -0
  684. data/lib/VoucherifySdk/models/lpm_ord_pay_ccrb_tx_details_spending_cap.rb +257 -0
  685. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_points.rb +209 -0
  686. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_rejection.rb +222 -0
  687. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_result.rb +239 -0
  688. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_result_dig_lc_points.rb +231 -0
  689. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_result_digital.rb +269 -0
  690. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_result_material.rb +259 -0
  691. data/lib/VoucherifySdk/models/lpm_rew_purch_ccrb_tx_details_result_reward.rb +244 -0
  692. data/lib/VoucherifySdk/models/management_projects_metadata_schema_definition.rb +1 -0
  693. data/lib/VoucherifySdk/models/member.rb +333 -0
  694. data/lib/VoucherifySdk/models/member_card.rb +269 -0
  695. data/lib/VoucherifySdk/models/member_create.rb +257 -0
  696. data/lib/VoucherifySdk/models/member_tier_progress.rb +293 -0
  697. data/lib/VoucherifySdk/models/member_tier_progress_current.rb +239 -0
  698. data/lib/VoucherifySdk/models/member_tier_progress_deferred.rb +230 -0
  699. data/lib/VoucherifySdk/models/member_tier_progress_opportunity.rb +230 -0
  700. data/lib/VoucherifySdk/models/member_tier_progress_points.rb +232 -0
  701. data/lib/VoucherifySdk/models/member_tier_progress_risk.rb +254 -0
  702. data/lib/VoucherifySdk/models/member_tier_progress_tier.rb +227 -0
  703. data/lib/VoucherifySdk/models/member_tier_progress_tier_structure.rb +253 -0
  704. data/lib/VoucherifySdk/models/members_report_daily_entry.rb +291 -0
  705. data/lib/VoucherifySdk/models/members_report_summary_entry.rb +297 -0
  706. data/lib/VoucherifySdk/models/membership_card.rb +278 -0
  707. data/lib/VoucherifySdk/models/order_payment_limit_definition.rb +215 -0
  708. data/lib/VoucherifySdk/models/order_payment_order.rb +232 -0
  709. data/lib/VoucherifySdk/models/order_payment_payment_details.rb +243 -0
  710. data/lib/VoucherifySdk/models/order_payment_rejection.rb +221 -0
  711. data/lib/VoucherifySdk/models/order_payment_transaction.rb +372 -0
  712. data/lib/VoucherifySdk/models/order_payment_transaction_details.rb +249 -0
  713. data/lib/VoucherifySdk/models/order_payment_transaction_details_spending_cap.rb +258 -0
  714. data/lib/VoucherifySdk/models/parameter_filters_list_publications_parent_object_id.rb +1 -1
  715. data/lib/VoucherifySdk/models/parameter_filters_list_publications_related_object_id.rb +1 -1
  716. data/lib/VoucherifySdk/models/parameter_filters_list_publications_source_id.rb +1 -1
  717. data/lib/VoucherifySdk/models/points_earnings_report_daily_entry.rb +331 -0
  718. data/lib/VoucherifySdk/models/points_earnings_report_list_filters.rb +252 -0
  719. data/lib/VoucherifySdk/models/points_earnings_report_summary_entry.rb +337 -0
  720. data/lib/VoucherifySdk/models/product_collections_products_list_response_body.rb +1 -0
  721. data/lib/VoucherifySdk/models/program.rb +341 -0
  722. data/lib/VoucherifySdk/models/program_earning_rule_assignment.rb +264 -0
  723. data/lib/VoucherifySdk/models/program_list_cursor.rb +221 -0
  724. data/lib/VoucherifySdk/models/program_reward_assignment.rb +302 -0
  725. data/lib/VoucherifySdk/models/program_reward_assignment_stock.rb +243 -0
  726. data/lib/VoucherifySdk/models/program_reward_assignment_stock_limited.rb +220 -0
  727. data/lib/VoucherifySdk/models/program_simple.rb +288 -0
  728. data/lib/VoucherifySdk/models/program_tier_structure_assignment.rb +264 -0
  729. data/lib/VoucherifySdk/models/program_validity_daily_hours.rb +234 -0
  730. data/lib/VoucherifySdk/models/program_validity_hours.rb +247 -0
  731. data/lib/VoucherifySdk/models/promotion_tier_campaign.rb +1 -1
  732. data/lib/VoucherifySdk/models/promotions_tiers_create_response_body_campaign.rb +1 -1
  733. data/lib/VoucherifySdk/models/promotions_tiers_disable_response_body_campaign.rb +1 -1
  734. data/lib/VoucherifySdk/models/promotions_tiers_enable_response_body_campaign.rb +1 -1
  735. data/lib/VoucherifySdk/models/promotions_tiers_get_response_body_campaign.rb +1 -1
  736. data/lib/VoucherifySdk/models/promotions_tiers_update_response_body_campaign.rb +1 -1
  737. data/lib/VoucherifySdk/models/publications_list_response_body.rb +1 -1
  738. data/lib/VoucherifySdk/models/redemption_entry_promotion_tier_campaign.rb +1 -1
  739. data/lib/VoucherifySdk/models/redemption_reward_result_parameters_coin.rb +1 -1
  740. data/lib/VoucherifySdk/models/redemptions_get_response_body_promotion_tier_campaign.rb +1 -1
  741. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_promotion_tier_campaign.rb +1 -1
  742. data/lib/VoucherifySdk/models/redemptions_redeem_request_body.rb +11 -0
  743. data/lib/VoucherifySdk/models/redemptions_redeem_request_body_options.rb +28 -6
  744. data/lib/VoucherifySdk/models/referrals_members_holders_list_response_body.rb +1 -1
  745. data/lib/VoucherifySdk/models/report_card_definition_id_filter_conditions.rb +209 -0
  746. data/lib/VoucherifySdk/models/report_card_definition_id_filter_conditions_conditions.rb +238 -0
  747. data/lib/VoucherifySdk/models/reward_cost_response.rb +271 -0
  748. data/lib/VoucherifySdk/models/reward_cost_tier_rules_any_of_entry_response.rb +234 -0
  749. data/lib/VoucherifySdk/models/reward_cost_tier_rules_response.rb +252 -0
  750. data/lib/VoucherifySdk/models/reward_digital_response.rb +261 -0
  751. data/lib/VoucherifySdk/models/reward_material_response.rb +252 -0
  752. data/lib/VoucherifySdk/models/reward_purchase_digital_coupon.rb +256 -0
  753. data/lib/VoucherifySdk/models/reward_purchase_digital_gift_voucher.rb +278 -0
  754. data/lib/VoucherifySdk/models/reward_purchase_limits.rb +231 -0
  755. data/lib/VoucherifySdk/models/reward_purchase_limits_cooldown.rb +243 -0
  756. data/lib/VoucherifySdk/models/reward_purchase_limits_cooldown_fixed_cooldown.rb +215 -0
  757. data/lib/VoucherifySdk/models/reward_purchase_limits_frequency.rb +247 -0
  758. data/lib/VoucherifySdk/models/reward_purchase_limits_frequency_limit.rb +268 -0
  759. data/lib/VoucherifySdk/models/reward_purchase_refund_policies.rb +247 -0
  760. data/lib/VoucherifySdk/models/reward_purchase_transaction.rb +371 -0
  761. data/lib/VoucherifySdk/models/reward_validity_hours_response.rb +247 -0
  762. data/lib/VoucherifySdk/models/rewards_create_request_body_parameters_coin.rb +1 -1
  763. data/lib/VoucherifySdk/models/rewards_report_daily_entry.rb +297 -0
  764. data/lib/VoucherifySdk/models/rewards_report_filter_reward_id_conditions.rb +209 -0
  765. data/lib/VoucherifySdk/models/rewards_report_filter_reward_id_conditions_conditions.rb +238 -0
  766. data/lib/VoucherifySdk/models/rewards_report_list_filters.rb +243 -0
  767. data/lib/VoucherifySdk/models/rewards_report_summary_entry.rb +309 -0
  768. data/lib/VoucherifySdk/models/rewards_spendings_report_daily_entry.rb +337 -0
  769. data/lib/VoucherifySdk/models/rewards_spendings_report_filter_cost_id_conditions.rb +209 -0
  770. data/lib/VoucherifySdk/models/rewards_spendings_report_filter_cost_id_conditions_conditions.rb +238 -0
  771. data/lib/VoucherifySdk/models/rewards_spendings_report_filter_spending_id_conditions.rb +209 -0
  772. data/lib/VoucherifySdk/models/rewards_spendings_report_filter_spending_id_conditions_conditions.rb +238 -0
  773. data/lib/VoucherifySdk/models/rewards_spendings_report_list_filters.rb +270 -0
  774. data/lib/VoucherifySdk/models/rewards_spendings_report_summary_entry.rb +343 -0
  775. data/lib/VoucherifySdk/models/rewards_update_request_body_parameters_coin.rb +1 -1
  776. data/lib/VoucherifySdk/models/spending_report_daily_entry.rb +335 -0
  777. data/lib/VoucherifySdk/models/spending_report_list_filters.rb +243 -0
  778. data/lib/VoucherifySdk/models/spending_report_summary_entry.rb +335 -0
  779. data/lib/VoucherifySdk/models/tier_transaction.rb +377 -0
  780. data/lib/VoucherifySdk/models/tier_transaction_details.rb +272 -0
  781. data/lib/VoucherifySdk/models/tier_transaction_origin.rb +260 -0
  782. data/lib/VoucherifySdk/models/tier_transaction_rejection.rb +221 -0
  783. data/lib/VoucherifySdk/models/tiers_report_daily_entry.rb +336 -0
  784. data/lib/VoucherifySdk/models/tiers_report_filter_tier_id_conditions.rb +209 -0
  785. data/lib/VoucherifySdk/models/tiers_report_filter_tier_id_conditions_conditions.rb +238 -0
  786. data/lib/VoucherifySdk/models/tiers_report_filter_tier_structure_id_conditions.rb +209 -0
  787. data/lib/VoucherifySdk/models/tiers_report_filter_tier_structure_id_conditions_conditions.rb +238 -0
  788. data/lib/VoucherifySdk/models/tiers_report_list_filters.rb +252 -0
  789. data/lib/VoucherifySdk/models/tiers_report_summary_entry.rb +342 -0
  790. data/lib/VoucherifySdk/models/transaction_filter_date_conditions.rb +209 -0
  791. data/lib/VoucherifySdk/models/transaction_filter_date_conditions_conditions.rb +268 -0
  792. data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body.rb +362 -0
  793. data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body_points.rb +237 -0
  794. data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body_points_proportional.rb +287 -0
  795. data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body_stock.rb +243 -0
  796. data/lib/VoucherifySdk/models/v2_loyalties_earning_rules_get_response_body.rb +430 -0
  797. data/lib/VoucherifySdk/models/v2_loyalties_earning_rules_get_response_body_trigger_limits.rb +217 -0
  798. data/lib/VoucherifySdk/models/v2_loyalties_programs_earning_rules_list_response_body.rb +258 -0
  799. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_activate_response_body.rb +333 -0
  800. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_activities_list_request_query_filters.rb +261 -0
  801. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_activities_list_response_body.rb +258 -0
  802. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_benefits_transactions_list_request_query.rb +252 -0
  803. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_benefits_transactions_list_response_body.rb +259 -0
  804. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_benefits_transactions_list_response_body_cursor.rb +221 -0
  805. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_activities_list_request_query_filters.rb +261 -0
  806. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_activities_list_response_body.rb +258 -0
  807. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_expiring_points_expire_response_body.rb +267 -0
  808. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_expiring_points_list_request_query.rb +252 -0
  809. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_expiring_points_list_response_body.rb +258 -0
  810. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_pending_points_activate_response_body.rb +267 -0
  811. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_pending_points_cancel_response_body.rb +267 -0
  812. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_pending_points_list_request_query.rb +243 -0
  813. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_pending_points_list_response_body.rb +258 -0
  814. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_points_adjust_request_body.rb +236 -0
  815. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_points_adjust_response_body.rb +256 -0
  816. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_transactions_list_request_query.rb +261 -0
  817. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_cards_transactions_list_response_body.rb +258 -0
  818. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_create_in_bulk_response_body.rb +216 -0
  819. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_create_request_body.rb +257 -0
  820. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_create_response_body.rb +346 -0
  821. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_deactivate_response_body.rb +333 -0
  822. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_delete_response_body.rb +333 -0
  823. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_earning_rules_reports_daily_list_response_body.rb +249 -0
  824. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_get_response_body.rb +346 -0
  825. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_list_request_query.rb +270 -0
  826. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_list_response_body.rb +258 -0
  827. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_orders_payments_create_request_body.rb +270 -0
  828. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_orders_payments_list_request_query.rb +261 -0
  829. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_orders_payments_list_response_body.rb +259 -0
  830. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_orders_payments_list_response_body_cursor.rb +221 -0
  831. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_rewards_purchases_create_request_body.rb +247 -0
  832. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_rewards_purchases_list_request_query.rb +270 -0
  833. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_rewards_purchases_list_response_body.rb +259 -0
  834. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_rewards_purchases_list_response_body_cursor.rb +221 -0
  835. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_tiers_transactions_list_request_query.rb +261 -0
  836. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_tiers_transactions_list_response_body.rb +258 -0
  837. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_update_request_body.rb +210 -0
  838. data/lib/VoucherifySdk/models/v2_loyalties_programs_members_update_response_body.rb +333 -0
  839. data/lib/VoucherifySdk/models/v2_loyalties_programs_memberships_get_response_body.rb +267 -0
  840. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_earning_rules_daily_list_response_body.rb +249 -0
  841. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_earning_rules_summary_list_response_body.rb +249 -0
  842. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_points_earnings_daily_list_response_body.rb +249 -0
  843. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_points_earnings_summary_list_response_body.rb +249 -0
  844. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_tiers_daily_list_response_body.rb +249 -0
  845. data/lib/VoucherifySdk/models/v2_loyalties_programs_reports_tiers_summary_list_response_body.rb +249 -0
  846. data/lib/VoucherifySdk/models/v2_loyalties_programs_rewards_list_response_body.rb +258 -0
  847. data/lib/VoucherifySdk/models/v2_loyalties_programs_rewards_purchases_refund_request_body.rb +208 -0
  848. data/lib/VoucherifySdk/models/v2_loyalties_programs_rewards_purchases_refund_response_body.rb +263 -0
  849. data/lib/VoucherifySdk/models/v2_loyalties_programs_tier_structures_list_response_body.rb +258 -0
  850. data/lib/VoucherifySdk/models/v2_loyalties_rewards_get_response_body.rb +424 -0
  851. data/lib/VoucherifySdk/models/validations_redeemable_skipped_result_details.rb +1 -1
  852. data/lib/VoucherifySdk/models/validations_validate_request_body.rb +11 -0
  853. data/lib/VoucherifySdk/models/validations_validate_request_body_options.rb +28 -6
  854. data/lib/VoucherifySdk/models/validations_validate_response_body.rb +1 -0
  855. data/lib/VoucherifySdk/models/vl_member_activity.rb +308 -0
  856. data/lib/VoucherifySdk/models/vl_member_activity_data.rb +249 -0
  857. data/lib/VoucherifySdk/version.rb +1 -1
  858. data/lib/VoucherifySdk.rb +366 -0
  859. metadata +767 -30
@@ -0,0 +1,3008 @@
1
+ =begin
2
+ #Voucherify API
3
+
4
+ #Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
5
+
6
+ The version of the OpenAPI document: v2018-08-01
7
+ Contact: support@voucherify.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module VoucherifySdk
16
+ class LV2ProgramsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Activate pending point bucket
23
+ # Activates a pending points bucket and creates a PENDING_POINTS_ACTIVATED card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be PENDING, and its date must be after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program or the member doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
24
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
25
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
26
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
27
+ # @param bucket_id [String] Identifies the pending points bucket. Format lcppb_[a-f0-9]+.
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody]
30
+ def activate_card_pending_points_bucket(program_id, member_id, card_id, bucket_id, opts = {})
31
+ data, _status_code, _headers = activate_card_pending_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts)
32
+ data
33
+ end
34
+
35
+ # Activate pending point bucket
36
+ # Activates a pending points bucket and creates a PENDING_POINTS_ACTIVATED card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be PENDING, and its date must be after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program or the member doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
37
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
38
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
39
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
40
+ # @param bucket_id [String] Identifies the pending points bucket. Format lcppb_[a-f0-9]+.
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody data, response status code and response headers
43
+ private def activate_card_pending_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.activate_card_pending_points_bucket ...'
46
+ end
47
+ # resource path
48
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/activate'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s)).sub('{' + 'bucketId' + '}', CGI.escape(bucket_id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:debug_body]
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody'
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
69
+
70
+ new_options = opts.merge(
71
+ :operation => :"LV2ProgramsApi.activate_card_pending_points_bucket",
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#activate_card_pending_points_bucket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Activate program member
88
+ # Moves an INACTIVE member to ACTIVE and sets updated_at. Records a vl.member.activated activity. No request body. Returns the member without a cards array. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_state_transition when the member is already ACTIVE.
89
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
90
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [V2LoyaltiesProgramsMembersActivateResponseBody]
93
+ def activate_program_member(program_id, member_id, opts = {})
94
+ data, _status_code, _headers = activate_program_member_with_http_info(program_id, member_id, opts)
95
+ data
96
+ end
97
+
98
+ # Activate program member
99
+ # Moves an INACTIVE member to ACTIVE and sets updated_at. Records a vl.member.activated activity. No request body. Returns the member without a cards array. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_state_transition when the member is already ACTIVE.
100
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
101
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(V2LoyaltiesProgramsMembersActivateResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersActivateResponseBody data, response status code and response headers
104
+ private def activate_program_member_with_http_info(program_id, member_id, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.activate_program_member ...'
107
+ end
108
+ # resource path
109
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/activate'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersActivateResponseBody'
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"LV2ProgramsApi.activate_program_member",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#activate_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Adjust card points
149
+ # Manually adjusts the points balance of the members card. A positive points value creates an ADMIN_CREDIT card transaction. The expiration date comes from the member tier when that tier defines its own points expiration. Otherwise the date comes from the card definition. expiration_date is null when points dont expire. A negative points value creates an ADMIN_DEBIT card transaction. When points is 0, no transaction is created and status is NO_CHANGE. The transaction is created with status PENDING and processed asynchronously. The program and the member must be ACTIVE. The program must also be inside its validity window. Otherwise the response is 423. The response is 404 when the program or the member doesnt exist, or when the card isnt assigned to that member.
150
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
151
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
152
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
153
+ # @param [Hash] opts the optional parameters
154
+ # @option opts [V2LoyaltiesProgramsMembersCardsPointsAdjustRequestBody] :v2_loyalties_programs_members_cards_points_adjust_request_body
155
+ # @return [V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody]
156
+ def adjust_card_points(program_id, member_id, card_id, opts = {})
157
+ data, _status_code, _headers = adjust_card_points_with_http_info(program_id, member_id, card_id, opts)
158
+ data
159
+ end
160
+
161
+ # Adjust card points
162
+ # Manually adjusts the points balance of the members card. A positive points value creates an ADMIN_CREDIT card transaction. The expiration date comes from the member tier when that tier defines its own points expiration. Otherwise the date comes from the card definition. expiration_date is null when points dont expire. A negative points value creates an ADMIN_DEBIT card transaction. When points is 0, no transaction is created and status is NO_CHANGE. The transaction is created with status PENDING and processed asynchronously. The program and the member must be ACTIVE. The program must also be inside its validity window. Otherwise the response is 423. The response is 404 when the program or the member doesnt exist, or when the card isnt assigned to that member.
163
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
164
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
165
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [V2LoyaltiesProgramsMembersCardsPointsAdjustRequestBody] :v2_loyalties_programs_members_cards_points_adjust_request_body
168
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody data, response status code and response headers
169
+ private def adjust_card_points_with_http_info(program_id, member_id, card_id, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.adjust_card_points ...'
172
+ end
173
+ # resource path
174
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
175
+
176
+ # query parameters
177
+ query_params = opts[:query_params] || {}
178
+
179
+ # header parameters
180
+ header_params = opts[:header_params] || {}
181
+ # HTTP header 'Accept' (if needed)
182
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
183
+ # HTTP header 'Content-Type'
184
+ content_type = @api_client.select_header_content_type(['application/json'])
185
+ if !content_type.nil?
186
+ header_params['Content-Type'] = content_type
187
+ end
188
+
189
+ # form parameters
190
+ form_params = opts[:form_params] || {}
191
+
192
+ # http body (model)
193
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_members_cards_points_adjust_request_body'])
194
+
195
+ # return_type
196
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody'
197
+
198
+ # auth_names
199
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
200
+
201
+ new_options = opts.merge(
202
+ :operation => :"LV2ProgramsApi.adjust_card_points",
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => return_type
209
+ )
210
+
211
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#adjust_card_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
+ end
215
+ return data, status_code, headers
216
+ end
217
+
218
+ # Batch create program members
219
+ # Schedules creation of program members from a JSON array and returns 202 with async_action_id. The program must exist, be ACTIVE, and be inside its validity window. The body isnt checked before that response. Entries are processed in batches of 100. The raw body must be at most 10 MB. Each entry uses the same fields as [Create program member](/api-reference/programs/create-program-member). A failed entry is skipped. Its report row sets created to false and explains the failure in error. Skipped cases include an invalid customer_identification, an unknown customer, an invalid status, a duplicate customer in the batch (Duplicate customer ID), a customer who is already a member (Member already exists), metadata that doesnt match the vl_member schema, and entries past the loyalty members plan limit. Successful entries enroll the customer and create a loyalty card for each card definition on the program. Report columns are identification_type, customer_id, customer_source_id, program_id, member_id, created, and error. An empty array or a null entry fails the async action with invalid_request_payload. A body that isnt a JSON array fails it with top_level_object_should_be_an_array. Use [Get async action](/api-reference/async-actions/get-async-action) to read the status and the report. You can also open the result from Audit log, [Background tasks](/analyze/audit-logs#background-tasks).
220
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
221
+ # @param [Hash] opts the optional parameters
222
+ # @option opts [Array<MemberCreate>] :member_create
223
+ # @return [V2LoyaltiesProgramsMembersCreateInBulkResponseBody]
224
+ def batch_create_program_members(program_id, opts = {})
225
+ data, _status_code, _headers = batch_create_program_members_with_http_info(program_id, opts)
226
+ data
227
+ end
228
+
229
+ # Batch create program members
230
+ # Schedules creation of program members from a JSON array and returns 202 with async_action_id. The program must exist, be ACTIVE, and be inside its validity window. The body isnt checked before that response. Entries are processed in batches of 100. The raw body must be at most 10 MB. Each entry uses the same fields as [Create program member](/api-reference/programs/create-program-member). A failed entry is skipped. Its report row sets created to false and explains the failure in error. Skipped cases include an invalid customer_identification, an unknown customer, an invalid status, a duplicate customer in the batch (Duplicate customer ID), a customer who is already a member (Member already exists), metadata that doesnt match the vl_member schema, and entries past the loyalty members plan limit. Successful entries enroll the customer and create a loyalty card for each card definition on the program. Report columns are identification_type, customer_id, customer_source_id, program_id, member_id, created, and error. An empty array or a null entry fails the async action with invalid_request_payload. A body that isnt a JSON array fails it with top_level_object_should_be_an_array. Use [Get async action](/api-reference/async-actions/get-async-action) to read the status and the report. You can also open the result from Audit log, [Background tasks](/analyze/audit-logs#background-tasks).
231
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [Array<MemberCreate>] :member_create
234
+ # @return [Array<(V2LoyaltiesProgramsMembersCreateInBulkResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCreateInBulkResponseBody data, response status code and response headers
235
+ private def batch_create_program_members_with_http_info(program_id, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.batch_create_program_members ...'
238
+ end
239
+ # resource path
240
+ local_var_path = '/v2/loyalties/programs/{programId}/members/batch'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
241
+
242
+ # query parameters
243
+ query_params = opts[:query_params] || {}
244
+
245
+ # header parameters
246
+ header_params = opts[:header_params] || {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+ # HTTP header 'Content-Type'
250
+ content_type = @api_client.select_header_content_type(['application/json'])
251
+ if !content_type.nil?
252
+ header_params['Content-Type'] = content_type
253
+ end
254
+
255
+ # form parameters
256
+ form_params = opts[:form_params] || {}
257
+
258
+ # http body (model)
259
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'member_create'])
260
+
261
+ # return_type
262
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCreateInBulkResponseBody'
263
+
264
+ # auth_names
265
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
266
+
267
+ new_options = opts.merge(
268
+ :operation => :"LV2ProgramsApi.batch_create_program_members",
269
+ :header_params => header_params,
270
+ :query_params => query_params,
271
+ :form_params => form_params,
272
+ :body => post_body,
273
+ :auth_names => auth_names,
274
+ :return_type => return_type
275
+ )
276
+
277
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#batch_create_program_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+
284
+ # Cancel pending point bucket
285
+ # Cancels a pending points bucket so its points arent activated. Creates a PENDING_POINTS_CANCELED card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be PENDING, and its date must be after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program or the member doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
286
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
287
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
288
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
289
+ # @param bucket_id [String] Identifies the pending points bucket. Format lcppb_[a-f0-9]+.
290
+ # @param [Hash] opts the optional parameters
291
+ # @return [V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody]
292
+ def cancel_card_pending_points_bucket(program_id, member_id, card_id, bucket_id, opts = {})
293
+ data, _status_code, _headers = cancel_card_pending_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts)
294
+ data
295
+ end
296
+
297
+ # Cancel pending point bucket
298
+ # Cancels a pending points bucket so its points arent activated. Creates a PENDING_POINTS_CANCELED card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be PENDING, and its date must be after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program or the member doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
299
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
300
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
301
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
302
+ # @param bucket_id [String] Identifies the pending points bucket. Format lcppb_[a-f0-9]+.
303
+ # @param [Hash] opts the optional parameters
304
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody data, response status code and response headers
305
+ private def cancel_card_pending_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts = {})
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.cancel_card_pending_points_bucket ...'
308
+ end
309
+ # resource path
310
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/cancel'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s)).sub('{' + 'bucketId' + '}', CGI.escape(bucket_id.to_s))
311
+
312
+ # query parameters
313
+ query_params = opts[:query_params] || {}
314
+
315
+ # header parameters
316
+ header_params = opts[:header_params] || {}
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body]
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody'
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
331
+
332
+ new_options = opts.merge(
333
+ :operation => :"LV2ProgramsApi.cancel_card_pending_points_bucket",
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#cancel_card_pending_points_bucket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Pay for order with points
350
+ # Pays for an order with points from the members card. The amount and points come from the card definitions pay-with-points exchange ratio, limited by the order total, the card balance, card spending caps, and the optional payment_limit. The binding cap is returned as details.spending_cap. The program and member must be ACTIVE, and the program must be inside its validity window. The card must belong to the member. The card definition must have pay-with-points enabled and an exchange-ratio formula. The order must already exist, identified by id or source_id. Modes: - TRANSACTION (default): creates a PENDING order transaction and a PENDING card transaction. Returns 202. The same order can be paid again; each call creates a new transaction. - DRY_RUN: simulates the payment and doesnt create a transaction. Returns 200 with status SIMULATED.
351
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
352
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
353
+ # @param [Hash] opts the optional parameters
354
+ # @option opts [V2LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBody] :v2_loyalties_programs_members_orders_payments_create_request_body
355
+ # @return [LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBody]
356
+ def create_member_order_payment(program_id, member_id, opts = {})
357
+ data, _status_code, _headers = create_member_order_payment_with_http_info(program_id, member_id, opts)
358
+ data
359
+ end
360
+
361
+ # Pay for order with points
362
+ # Pays for an order with points from the members card. The amount and points come from the card definitions pay-with-points exchange ratio, limited by the order total, the card balance, card spending caps, and the optional payment_limit. The binding cap is returned as details.spending_cap. The program and member must be ACTIVE, and the program must be inside its validity window. The card must belong to the member. The card definition must have pay-with-points enabled and an exchange-ratio formula. The order must already exist, identified by id or source_id. Modes: - TRANSACTION (default): creates a PENDING order transaction and a PENDING card transaction. Returns 202. The same order can be paid again; each call creates a new transaction. - DRY_RUN: simulates the payment and doesnt create a transaction. Returns 200 with status SIMULATED.
363
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
364
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
365
+ # @param [Hash] opts the optional parameters
366
+ # @option opts [V2LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBody] :v2_loyalties_programs_members_orders_payments_create_request_body
367
+ # @return [Array<(LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBody, Integer, Hash)>] LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBody data, response status code and response headers
368
+ private def create_member_order_payment_with_http_info(program_id, member_id, opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.create_member_order_payment ...'
371
+ end
372
+ # resource path
373
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
374
+
375
+ # query parameters
376
+ query_params = opts[:query_params] || {}
377
+
378
+ # header parameters
379
+ header_params = opts[:header_params] || {}
380
+ # HTTP header 'Accept' (if needed)
381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
382
+ # HTTP header 'Content-Type'
383
+ content_type = @api_client.select_header_content_type(['application/json'])
384
+ if !content_type.nil?
385
+ header_params['Content-Type'] = content_type
386
+ end
387
+
388
+ # form parameters
389
+ form_params = opts[:form_params] || {}
390
+
391
+ # http body (model)
392
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_members_orders_payments_create_request_body'])
393
+
394
+ # return_type
395
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsMembersOrdersPaymentsCreateCombinedResponseBody'
396
+
397
+ # auth_names
398
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
399
+
400
+ new_options = opts.merge(
401
+ :operation => :"LV2ProgramsApi.create_member_order_payment",
402
+ :header_params => header_params,
403
+ :query_params => query_params,
404
+ :form_params => form_params,
405
+ :body => post_body,
406
+ :auth_names => auth_names,
407
+ :return_type => return_type
408
+ )
409
+
410
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
411
+ if @api_client.config.debugging
412
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#create_member_order_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
413
+ end
414
+ return data, status_code, headers
415
+ end
416
+
417
+ # Create program member
418
+ # Enrolls an existing customer as a member of the loyalty program and creates a loyalty card for each card definition assigned to the program. Card code generation is asynchronous, so code can be null right after creation. The program must be ACTIVE and inside its validity window, and the customer must already exist. A customer can be a member of a program only once. Identify the customer with customer_identification. status defaults to ACTIVE.
419
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
420
+ # @param [Hash] opts the optional parameters
421
+ # @option opts [V2LoyaltiesProgramsMembersCreateRequestBody] :v2_loyalties_programs_members_create_request_body
422
+ # @return [V2LoyaltiesProgramsMembersCreateResponseBody]
423
+ def create_program_member(program_id, opts = {})
424
+ data, _status_code, _headers = create_program_member_with_http_info(program_id, opts)
425
+ data
426
+ end
427
+
428
+ # Create program member
429
+ # Enrolls an existing customer as a member of the loyalty program and creates a loyalty card for each card definition assigned to the program. Card code generation is asynchronous, so code can be null right after creation. The program must be ACTIVE and inside its validity window, and the customer must already exist. A customer can be a member of a program only once. Identify the customer with customer_identification. status defaults to ACTIVE.
430
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [V2LoyaltiesProgramsMembersCreateRequestBody] :v2_loyalties_programs_members_create_request_body
433
+ # @return [Array<(V2LoyaltiesProgramsMembersCreateResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCreateResponseBody data, response status code and response headers
434
+ private def create_program_member_with_http_info(program_id, opts = {})
435
+ if @api_client.config.debugging
436
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.create_program_member ...'
437
+ end
438
+ # resource path
439
+ local_var_path = '/v2/loyalties/programs/{programId}/members'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
440
+
441
+ # query parameters
442
+ query_params = opts[:query_params] || {}
443
+
444
+ # header parameters
445
+ header_params = opts[:header_params] || {}
446
+ # HTTP header 'Accept' (if needed)
447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
448
+ # HTTP header 'Content-Type'
449
+ content_type = @api_client.select_header_content_type(['application/json'])
450
+ if !content_type.nil?
451
+ header_params['Content-Type'] = content_type
452
+ end
453
+
454
+ # form parameters
455
+ form_params = opts[:form_params] || {}
456
+
457
+ # http body (model)
458
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_members_create_request_body'])
459
+
460
+ # return_type
461
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCreateResponseBody'
462
+
463
+ # auth_names
464
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
465
+
466
+ new_options = opts.merge(
467
+ :operation => :"LV2ProgramsApi.create_program_member",
468
+ :header_params => header_params,
469
+ :query_params => query_params,
470
+ :form_params => form_params,
471
+ :body => post_body,
472
+ :auth_names => auth_names,
473
+ :return_type => return_type
474
+ )
475
+
476
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
477
+ if @api_client.config.debugging
478
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#create_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
479
+ end
480
+ return data, status_code, headers
481
+ end
482
+
483
+ # Deactivate program member
484
+ # Moves an ACTIVE member to INACTIVE and sets updated_at. Records a vl.member.deactivated activity. An INACTIVE member cant earn or spend points. No request body. Returns the member without a cards array. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_state_transition when the member is already INACTIVE.
485
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
486
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [V2LoyaltiesProgramsMembersDeactivateResponseBody]
489
+ def deactivate_program_member(program_id, member_id, opts = {})
490
+ data, _status_code, _headers = deactivate_program_member_with_http_info(program_id, member_id, opts)
491
+ data
492
+ end
493
+
494
+ # Deactivate program member
495
+ # Moves an ACTIVE member to INACTIVE and sets updated_at. Records a vl.member.deactivated activity. An INACTIVE member cant earn or spend points. No request body. Returns the member without a cards array. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_state_transition when the member is already INACTIVE.
496
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
497
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
498
+ # @param [Hash] opts the optional parameters
499
+ # @return [Array<(V2LoyaltiesProgramsMembersDeactivateResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersDeactivateResponseBody data, response status code and response headers
500
+ private def deactivate_program_member_with_http_info(program_id, member_id, opts = {})
501
+ if @api_client.config.debugging
502
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.deactivate_program_member ...'
503
+ end
504
+ # resource path
505
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/deactivate'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
506
+
507
+ # query parameters
508
+ query_params = opts[:query_params] || {}
509
+
510
+ # header parameters
511
+ header_params = opts[:header_params] || {}
512
+ # HTTP header 'Accept' (if needed)
513
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
514
+
515
+ # form parameters
516
+ form_params = opts[:form_params] || {}
517
+
518
+ # http body (model)
519
+ post_body = opts[:debug_body]
520
+
521
+ # return_type
522
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersDeactivateResponseBody'
523
+
524
+ # auth_names
525
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
526
+
527
+ new_options = opts.merge(
528
+ :operation => :"LV2ProgramsApi.deactivate_program_member",
529
+ :header_params => header_params,
530
+ :query_params => query_params,
531
+ :form_params => form_params,
532
+ :body => post_body,
533
+ :auth_names => auth_names,
534
+ :return_type => return_type
535
+ )
536
+
537
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
538
+ if @api_client.config.debugging
539
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#deactivate_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
540
+ end
541
+ return data, status_code, headers
542
+ end
543
+
544
+ # Delete program member
545
+ # Deletes the member and sets status to DELETED. Removes the members card assignments in this program. Returns the member without a cards array. Delete doesnt change updated_at. Records a vl.member.deleted activity. Each unassigned card also records vl.member.card.unassigned and vl.card.unassigned. When an assignment has a tier, the delete records a LEFT tier transaction with origin member_card_deleted. The same customer can join the program again. The new member gets a new ID. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. Deleting a member that is already DELETED returns 404.
546
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
547
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
548
+ # @param [Hash] opts the optional parameters
549
+ # @return [V2LoyaltiesProgramsMembersDeleteResponseBody]
550
+ def delete_program_member(program_id, member_id, opts = {})
551
+ data, _status_code, _headers = delete_program_member_with_http_info(program_id, member_id, opts)
552
+ data
553
+ end
554
+
555
+ # Delete program member
556
+ # Deletes the member and sets status to DELETED. Removes the members card assignments in this program. Returns the member without a cards array. Delete doesnt change updated_at. Records a vl.member.deleted activity. Each unassigned card also records vl.member.card.unassigned and vl.card.unassigned. When an assignment has a tier, the delete records a LEFT tier transaction with origin member_card_deleted. The same customer can join the program again. The new member gets a new ID. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. Deleting a member that is already DELETED returns 404.
557
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
558
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
559
+ # @param [Hash] opts the optional parameters
560
+ # @return [Array<(V2LoyaltiesProgramsMembersDeleteResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersDeleteResponseBody data, response status code and response headers
561
+ private def delete_program_member_with_http_info(program_id, member_id, opts = {})
562
+ if @api_client.config.debugging
563
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.delete_program_member ...'
564
+ end
565
+ # resource path
566
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
567
+
568
+ # query parameters
569
+ query_params = opts[:query_params] || {}
570
+
571
+ # header parameters
572
+ header_params = opts[:header_params] || {}
573
+ # HTTP header 'Accept' (if needed)
574
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
575
+
576
+ # form parameters
577
+ form_params = opts[:form_params] || {}
578
+
579
+ # http body (model)
580
+ post_body = opts[:debug_body]
581
+
582
+ # return_type
583
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersDeleteResponseBody'
584
+
585
+ # auth_names
586
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
587
+
588
+ new_options = opts.merge(
589
+ :operation => :"LV2ProgramsApi.delete_program_member",
590
+ :header_params => header_params,
591
+ :query_params => query_params,
592
+ :form_params => form_params,
593
+ :body => post_body,
594
+ :auth_names => auth_names,
595
+ :return_type => return_type
596
+ )
597
+
598
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
599
+ if @api_client.config.debugging
600
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#delete_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
601
+ end
602
+ return data, status_code, headers
603
+ end
604
+
605
+ # Expire point bucket
606
+ # Expires an ACTIVE points bucket. Creates an ADMIN_POINTS_EXPIRATION card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be ACTIVE, and its expiration_date must be on or after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program, the member, or the card definition doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
607
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
608
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
609
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
610
+ # @param bucket_id [String] Identifies the points expiration bucket. Format lcpeb_[a-f0-9]+.
611
+ # @param [Hash] opts the optional parameters
612
+ # @return [V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody]
613
+ def expire_card_points_bucket(program_id, member_id, card_id, bucket_id, opts = {})
614
+ data, _status_code, _headers = expire_card_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts)
615
+ data
616
+ end
617
+
618
+ # Expire point bucket
619
+ # Expires an ACTIVE points bucket. Creates an ADMIN_POINTS_EXPIRATION card transaction. The transaction is created with status PENDING and processed asynchronously. No request body. The bucket must be ACTIVE, and its expiration_date must be on or after the current project day. The program and the member must be ACTIVE, and the program must be inside its validity window. Otherwise the response is 423. Returns 404 when the program, the member, or the card definition doesnt exist, when the card isnt assigned to that member, or when the bucket isnt on that card.
620
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
621
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
622
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
623
+ # @param bucket_id [String] Identifies the points expiration bucket. Format lcpeb_[a-f0-9]+.
624
+ # @param [Hash] opts the optional parameters
625
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody data, response status code and response headers
626
+ private def expire_card_points_bucket_with_http_info(program_id, member_id, card_id, bucket_id, opts = {})
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.expire_card_points_bucket ...'
629
+ end
630
+ # resource path
631
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points/{bucketId}/expire'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s)).sub('{' + 'bucketId' + '}', CGI.escape(bucket_id.to_s))
632
+
633
+ # query parameters
634
+ query_params = opts[:query_params] || {}
635
+
636
+ # header parameters
637
+ header_params = opts[:header_params] || {}
638
+ # HTTP header 'Accept' (if needed)
639
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
640
+
641
+ # form parameters
642
+ form_params = opts[:form_params] || {}
643
+
644
+ # http body (model)
645
+ post_body = opts[:debug_body]
646
+
647
+ # return_type
648
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody'
649
+
650
+ # auth_names
651
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
652
+
653
+ new_options = opts.merge(
654
+ :operation => :"LV2ProgramsApi.expire_card_points_bucket",
655
+ :header_params => header_params,
656
+ :query_params => query_params,
657
+ :form_params => form_params,
658
+ :body => post_body,
659
+ :auth_names => auth_names,
660
+ :return_type => return_type
661
+ )
662
+
663
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#expire_card_points_bucket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
666
+ end
667
+ return data, status_code, headers
668
+ end
669
+
670
+ # List member earning-rule daily reports
671
+ # Returns aggregated daily usage statistics for a specific earning rule and member over the given date range and resolution. Each entry sums successful earning-rule triggers recorded in one period. Periods without recorded activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program or member does not exist, or when the earning rule does not exist or is not assigned to the program.
672
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
673
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
674
+ # @param earning_rule_id [String] Identifies the earning rule. Format lern_[a-f0-9]+.
675
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
676
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
677
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
678
+ # @param [Hash] opts the optional parameters
679
+ # @return [V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody]
680
+ def get_member_earning_rule_daily_report(program_id, member_id, earning_rule_id, start_date, end_date, resolution, opts = {})
681
+ data, _status_code, _headers = get_member_earning_rule_daily_report_with_http_info(program_id, member_id, earning_rule_id, start_date, end_date, resolution, opts)
682
+ data
683
+ end
684
+
685
+ # List member earning-rule daily reports
686
+ # Returns aggregated daily usage statistics for a specific earning rule and member over the given date range and resolution. Each entry sums successful earning-rule triggers recorded in one period. Periods without recorded activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program or member does not exist, or when the earning rule does not exist or is not assigned to the program.
687
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
688
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
689
+ # @param earning_rule_id [String] Identifies the earning rule. Format lern_[a-f0-9]+.
690
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
691
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
692
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
693
+ # @param [Hash] opts the optional parameters
694
+ # @return [Array<(V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody data, response status code and response headers
695
+ private def get_member_earning_rule_daily_report_with_http_info(program_id, member_id, earning_rule_id, start_date, end_date, resolution, opts = {})
696
+ if @api_client.config.debugging
697
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.get_member_earning_rule_daily_report ...'
698
+ end
699
+ # resource path
700
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/earning-rules/{earningRuleId}/reports/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'earningRuleId' + '}', CGI.escape(earning_rule_id.to_s))
701
+
702
+ # query parameters
703
+ query_params = opts[:query_params] || {}
704
+ query_params[:'start_date'] = start_date
705
+ query_params[:'end_date'] = end_date
706
+ query_params[:'resolution'] = resolution
707
+
708
+ # header parameters
709
+ header_params = opts[:header_params] || {}
710
+ # HTTP header 'Accept' (if needed)
711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
712
+
713
+ # form parameters
714
+ form_params = opts[:form_params] || {}
715
+
716
+ # http body (model)
717
+ post_body = opts[:debug_body]
718
+
719
+ # return_type
720
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody'
721
+
722
+ # auth_names
723
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
724
+
725
+ new_options = opts.merge(
726
+ :operation => :"LV2ProgramsApi.get_member_earning_rule_daily_report",
727
+ :header_params => header_params,
728
+ :query_params => query_params,
729
+ :form_params => form_params,
730
+ :body => post_body,
731
+ :auth_names => auth_names,
732
+ :return_type => return_type
733
+ )
734
+
735
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
736
+ if @api_client.config.debugging
737
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#get_member_earning_rule_daily_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
738
+ end
739
+ return data, status_code, headers
740
+ end
741
+
742
+ # Get program member
743
+ # Returns one member of the program together with that members loyalty cards. Each card includes balance, lifetime_bucket, next_expiration, and next_activation. tier_progress is not included. Use [Get program membership](/api-reference/programs/get-program-membership) when you need tier progress. card.code can be null shortly after member creation, while code generation is still running. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first.
744
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
745
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
746
+ # @param [Hash] opts the optional parameters
747
+ # @return [V2LoyaltiesProgramsMembersGetResponseBody]
748
+ def get_program_member(program_id, member_id, opts = {})
749
+ data, _status_code, _headers = get_program_member_with_http_info(program_id, member_id, opts)
750
+ data
751
+ end
752
+
753
+ # Get program member
754
+ # Returns one member of the program together with that members loyalty cards. Each card includes balance, lifetime_bucket, next_expiration, and next_activation. tier_progress is not included. Use [Get program membership](/api-reference/programs/get-program-membership) when you need tier progress. card.code can be null shortly after member creation, while code generation is still running. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first.
755
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
756
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
757
+ # @param [Hash] opts the optional parameters
758
+ # @return [Array<(V2LoyaltiesProgramsMembersGetResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersGetResponseBody data, response status code and response headers
759
+ private def get_program_member_with_http_info(program_id, member_id, opts = {})
760
+ if @api_client.config.debugging
761
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.get_program_member ...'
762
+ end
763
+ # resource path
764
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
765
+
766
+ # query parameters
767
+ query_params = opts[:query_params] || {}
768
+
769
+ # header parameters
770
+ header_params = opts[:header_params] || {}
771
+ # HTTP header 'Accept' (if needed)
772
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
773
+
774
+ # form parameters
775
+ form_params = opts[:form_params] || {}
776
+
777
+ # http body (model)
778
+ post_body = opts[:debug_body]
779
+
780
+ # return_type
781
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersGetResponseBody'
782
+
783
+ # auth_names
784
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
785
+
786
+ new_options = opts.merge(
787
+ :operation => :"LV2ProgramsApi.get_program_member",
788
+ :header_params => header_params,
789
+ :query_params => query_params,
790
+ :form_params => form_params,
791
+ :body => post_body,
792
+ :auth_names => auth_names,
793
+ :return_type => return_type
794
+ )
795
+
796
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
797
+ if @api_client.config.debugging
798
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#get_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
799
+ end
800
+ return data, status_code, headers
801
+ end
802
+
803
+ # Get program membership
804
+ # Returns the membership for one customer in the program: the member, the program, and the members loyalty cards. A card includes tier_progress when its card definition has a tier structure and the member has a tier on that card. Otherwise tier_progress is omitted. identification_type chooses how customerId is read. It defaults to customer_id.
805
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
806
+ # @param customer_id [String] Identifies the customer or member. identification_type selects the value: a Voucherify customer ID (cust_...), a customer source_id, or a loyalty member ID (lmbr_...).
807
+ # @param [Hash] opts the optional parameters
808
+ # @option opts [String] :identification_type Selects how customerId is read. customer_id is the Voucherify customer ID and the default. customer_source_id is the customers source_id. member_id is the loyalty member ID. (default to 'customer_id')
809
+ # @return [V2LoyaltiesProgramsMembershipsGetResponseBody]
810
+ def get_program_membership(program_id, customer_id, opts = {})
811
+ data, _status_code, _headers = get_program_membership_with_http_info(program_id, customer_id, opts)
812
+ data
813
+ end
814
+
815
+ # Get program membership
816
+ # Returns the membership for one customer in the program: the member, the program, and the members loyalty cards. A card includes tier_progress when its card definition has a tier structure and the member has a tier on that card. Otherwise tier_progress is omitted. identification_type chooses how customerId is read. It defaults to customer_id.
817
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
818
+ # @param customer_id [String] Identifies the customer or member. identification_type selects the value: a Voucherify customer ID (cust_...), a customer source_id, or a loyalty member ID (lmbr_...).
819
+ # @param [Hash] opts the optional parameters
820
+ # @option opts [String] :identification_type Selects how customerId is read. customer_id is the Voucherify customer ID and the default. customer_source_id is the customers source_id. member_id is the loyalty member ID. (default to 'customer_id')
821
+ # @return [Array<(V2LoyaltiesProgramsMembershipsGetResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembershipsGetResponseBody data, response status code and response headers
822
+ private def get_program_membership_with_http_info(program_id, customer_id, opts = {})
823
+ if @api_client.config.debugging
824
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.get_program_membership ...'
825
+ end
826
+ # resource path
827
+ local_var_path = '/v2/loyalties/programs/{programId}/memberships/{customerId}'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
828
+
829
+ # query parameters
830
+ query_params = opts[:query_params] || {}
831
+ query_params[:'identification_type'] = opts[:'identification_type'] if !opts[:'identification_type'].nil?
832
+
833
+ # header parameters
834
+ header_params = opts[:header_params] || {}
835
+ # HTTP header 'Accept' (if needed)
836
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
837
+
838
+ # form parameters
839
+ form_params = opts[:form_params] || {}
840
+
841
+ # http body (model)
842
+ post_body = opts[:debug_body]
843
+
844
+ # return_type
845
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembershipsGetResponseBody'
846
+
847
+ # auth_names
848
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
849
+
850
+ new_options = opts.merge(
851
+ :operation => :"LV2ProgramsApi.get_program_membership",
852
+ :header_params => header_params,
853
+ :query_params => query_params,
854
+ :form_params => form_params,
855
+ :body => post_body,
856
+ :auth_names => auth_names,
857
+ :return_type => return_type
858
+ )
859
+
860
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
861
+ if @api_client.config.debugging
862
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#get_program_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
863
+ end
864
+ return data, status_code, headers
865
+ end
866
+
867
+ # List program points-earnings daily reports
868
+ # Returns aggregated daily points-earnings statistics for the program over the given date range and resolution, optionally filtered by earning rule and card definition. Each entry sums earning operations recorded for one period, earning rule, earning item, and card definition. Periods without recorded activity are omitted. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
869
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
870
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
871
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
872
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
873
+ # @param [Hash] opts the optional parameters
874
+ # @option opts [PointsEarningsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
875
+ # @return [V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody]
876
+ def get_program_points_earnings_daily_report(program_id, start_date, end_date, resolution, opts = {})
877
+ data, _status_code, _headers = get_program_points_earnings_daily_report_with_http_info(program_id, start_date, end_date, resolution, opts)
878
+ data
879
+ end
880
+
881
+ # List program points-earnings daily reports
882
+ # Returns aggregated daily points-earnings statistics for the program over the given date range and resolution, optionally filtered by earning rule and card definition. Each entry sums earning operations recorded for one period, earning rule, earning item, and card definition. Periods without recorded activity are omitted. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
883
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
884
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
885
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
886
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
887
+ # @param [Hash] opts the optional parameters
888
+ # @option opts [PointsEarningsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
889
+ # @return [Array<(V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody data, response status code and response headers
890
+ private def get_program_points_earnings_daily_report_with_http_info(program_id, start_date, end_date, resolution, opts = {})
891
+ if @api_client.config.debugging
892
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.get_program_points_earnings_daily_report ...'
893
+ end
894
+ # resource path
895
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/points-earnings/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
896
+
897
+ # query parameters
898
+ query_params = opts[:query_params] || {}
899
+ query_params[:'start_date'] = start_date
900
+ query_params[:'end_date'] = end_date
901
+ query_params[:'resolution'] = resolution
902
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
903
+
904
+ # header parameters
905
+ header_params = opts[:header_params] || {}
906
+ # HTTP header 'Accept' (if needed)
907
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
908
+
909
+ # form parameters
910
+ form_params = opts[:form_params] || {}
911
+
912
+ # http body (model)
913
+ post_body = opts[:debug_body]
914
+
915
+ # return_type
916
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody'
917
+
918
+ # auth_names
919
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
920
+
921
+ new_options = opts.merge(
922
+ :operation => :"LV2ProgramsApi.get_program_points_earnings_daily_report",
923
+ :header_params => header_params,
924
+ :query_params => query_params,
925
+ :form_params => form_params,
926
+ :body => post_body,
927
+ :auth_names => auth_names,
928
+ :return_type => return_type
929
+ )
930
+
931
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
932
+ if @api_client.config.debugging
933
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#get_program_points_earnings_daily_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
934
+ end
935
+ return data, status_code, headers
936
+ end
937
+
938
+ # List program points-earnings summary reports
939
+ # Returns total points-earnings statistics for the program (all time), optionally filtered by earning rule or card definition. Each entry sums earning operations for one earning rule, earning item, and card definition. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
940
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
941
+ # @param [Hash] opts the optional parameters
942
+ # @option opts [PointsEarningsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
943
+ # @return [V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody]
944
+ def get_program_points_earnings_summary_report(program_id, opts = {})
945
+ data, _status_code, _headers = get_program_points_earnings_summary_report_with_http_info(program_id, opts)
946
+ data
947
+ end
948
+
949
+ # List program points-earnings summary reports
950
+ # Returns total points-earnings statistics for the program (all time), optionally filtered by earning rule or card definition. Each entry sums earning operations for one earning rule, earning item, and card definition. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
951
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
952
+ # @param [Hash] opts the optional parameters
953
+ # @option opts [PointsEarningsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
954
+ # @return [Array<(V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody data, response status code and response headers
955
+ private def get_program_points_earnings_summary_report_with_http_info(program_id, opts = {})
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.get_program_points_earnings_summary_report ...'
958
+ end
959
+ # resource path
960
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/points-earnings/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
961
+
962
+ # query parameters
963
+ query_params = opts[:query_params] || {}
964
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
965
+
966
+ # header parameters
967
+ header_params = opts[:header_params] || {}
968
+ # HTTP header 'Accept' (if needed)
969
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
970
+
971
+ # form parameters
972
+ form_params = opts[:form_params] || {}
973
+
974
+ # http body (model)
975
+ post_body = opts[:debug_body]
976
+
977
+ # return_type
978
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody'
979
+
980
+ # auth_names
981
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
982
+
983
+ new_options = opts.merge(
984
+ :operation => :"LV2ProgramsApi.get_program_points_earnings_summary_report",
985
+ :header_params => header_params,
986
+ :query_params => query_params,
987
+ :form_params => form_params,
988
+ :body => post_body,
989
+ :auth_names => auth_names,
990
+ :return_type => return_type
991
+ )
992
+
993
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
994
+ if @api_client.config.debugging
995
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#get_program_points_earnings_summary_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
996
+ end
997
+ return data, status_code, headers
998
+ end
999
+
1000
+ # List card activities
1001
+ # Returns a cursor-paginated list of activities recorded for the members card. The card must still be assigned to that member. Filters are id, type, and created_at. Default order is -created_at, then id ascending. Returns 404 when the program doesnt exist, when the member doesnt exist in that program, or when the card isnt currently assigned to that member. The program is checked first, then the member. A DELETED member returns 404 with resource_type member. A missing assignment and a missing or deleted card both return 404 with resource_type card. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program, member, and card lookup. A cursor that doesnt match ^lcrsacrd_[a-f0-9]+$, a limit outside 1 to 100, an order other than created_at or -created_at, or an array that orders by both directions fails here. After the program, member, and card are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1002
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1003
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1004
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1005
+ # @param [Hash] opts the optional parameters
1006
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1007
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1008
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsacrd_[a-f0-9]+. The cursor matches the filters and order of that response.
1009
+ # @option opts [V2LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFilters] :filters Filters the results. Pass a deep object, for example filters[type][conditions][$is] vl.card.created. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1010
+ # @return [V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody]
1011
+ def list_card_activities(program_id, member_id, card_id, opts = {})
1012
+ data, _status_code, _headers = list_card_activities_with_http_info(program_id, member_id, card_id, opts)
1013
+ data
1014
+ end
1015
+
1016
+ # List card activities
1017
+ # Returns a cursor-paginated list of activities recorded for the members card. The card must still be assigned to that member. Filters are id, type, and created_at. Default order is -created_at, then id ascending. Returns 404 when the program doesnt exist, when the member doesnt exist in that program, or when the card isnt currently assigned to that member. The program is checked first, then the member. A DELETED member returns 404 with resource_type member. A missing assignment and a missing or deleted card both return 404 with resource_type card. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program, member, and card lookup. A cursor that doesnt match ^lcrsacrd_[a-f0-9]+$, a limit outside 1 to 100, an order other than created_at or -created_at, or an array that orders by both directions fails here. After the program, member, and card are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1018
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1019
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1020
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1021
+ # @param [Hash] opts the optional parameters
1022
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1023
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1024
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsacrd_[a-f0-9]+. The cursor matches the filters and order of that response.
1025
+ # @option opts [V2LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFilters] :filters Filters the results. Pass a deep object, for example filters[type][conditions][$is] vl.card.created. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1026
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody data, response status code and response headers
1027
+ private def list_card_activities_with_http_info(program_id, member_id, card_id, opts = {})
1028
+ if @api_client.config.debugging
1029
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_card_activities ...'
1030
+ end
1031
+ # resource path
1032
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/activities'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
1033
+
1034
+ # query parameters
1035
+ query_params = opts[:query_params] || {}
1036
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1037
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1038
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1039
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1040
+
1041
+ # header parameters
1042
+ header_params = opts[:header_params] || {}
1043
+ # HTTP header 'Accept' (if needed)
1044
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1045
+
1046
+ # form parameters
1047
+ form_params = opts[:form_params] || {}
1048
+
1049
+ # http body (model)
1050
+ post_body = opts[:debug_body]
1051
+
1052
+ # return_type
1053
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody'
1054
+
1055
+ # auth_names
1056
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1057
+
1058
+ new_options = opts.merge(
1059
+ :operation => :"LV2ProgramsApi.list_card_activities",
1060
+ :header_params => header_params,
1061
+ :query_params => query_params,
1062
+ :form_params => form_params,
1063
+ :body => post_body,
1064
+ :auth_names => auth_names,
1065
+ :return_type => return_type
1066
+ )
1067
+
1068
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1069
+ if @api_client.config.debugging
1070
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_card_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1071
+ end
1072
+ return data, status_code, headers
1073
+ end
1074
+
1075
+ # List card expiring points buckets
1076
+ # Returns a cursor-paginated list of ACTIVE point expiration buckets for the members card. Each bucket groups points that share an expiration date and expiration type, including points from separate transactions. The list starts on the current project day. Earlier buckets are omitted. Results can be filtered by card definition ID and expiration date, and ordered by expiration_date. Returns an empty list when the card has no matching buckets. Returns 400 when the query is invalid or the cursor is invalid, expired, or doesnt match the query. Returns 404 when the program or the member doesnt exist, or when the card isnt assigned to that member.
1077
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1078
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1079
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1080
+ # @param [Hash] opts the optional parameters
1081
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1082
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to expiration_date. Soonest expiration first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1083
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrspeb_[a-f0-9]+. The cursor matches the filters and order of that response.
1084
+ # @option opts [V2LoyaltiesProgramsMembersCardsExpiringPointsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_1297339938ae248cea. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1085
+ # @return [V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody]
1086
+ def list_card_expiring_points(program_id, member_id, card_id, opts = {})
1087
+ data, _status_code, _headers = list_card_expiring_points_with_http_info(program_id, member_id, card_id, opts)
1088
+ data
1089
+ end
1090
+
1091
+ # List card expiring points buckets
1092
+ # Returns a cursor-paginated list of ACTIVE point expiration buckets for the members card. Each bucket groups points that share an expiration date and expiration type, including points from separate transactions. The list starts on the current project day. Earlier buckets are omitted. Results can be filtered by card definition ID and expiration date, and ordered by expiration_date. Returns an empty list when the card has no matching buckets. Returns 400 when the query is invalid or the cursor is invalid, expired, or doesnt match the query. Returns 404 when the program or the member doesnt exist, or when the card isnt assigned to that member.
1093
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1094
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1095
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1096
+ # @param [Hash] opts the optional parameters
1097
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1098
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to expiration_date. Soonest expiration first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1099
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrspeb_[a-f0-9]+. The cursor matches the filters and order of that response.
1100
+ # @option opts [V2LoyaltiesProgramsMembersCardsExpiringPointsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_1297339938ae248cea. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1101
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody data, response status code and response headers
1102
+ private def list_card_expiring_points_with_http_info(program_id, member_id, card_id, opts = {})
1103
+ if @api_client.config.debugging
1104
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_card_expiring_points ...'
1105
+ end
1106
+ # resource path
1107
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
1108
+
1109
+ # query parameters
1110
+ query_params = opts[:query_params] || {}
1111
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1112
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1113
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1114
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1115
+
1116
+ # header parameters
1117
+ header_params = opts[:header_params] || {}
1118
+ # HTTP header 'Accept' (if needed)
1119
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1120
+
1121
+ # form parameters
1122
+ form_params = opts[:form_params] || {}
1123
+
1124
+ # http body (model)
1125
+ post_body = opts[:debug_body]
1126
+
1127
+ # return_type
1128
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody'
1129
+
1130
+ # auth_names
1131
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1132
+
1133
+ new_options = opts.merge(
1134
+ :operation => :"LV2ProgramsApi.list_card_expiring_points",
1135
+ :header_params => header_params,
1136
+ :query_params => query_params,
1137
+ :form_params => form_params,
1138
+ :body => post_body,
1139
+ :auth_names => auth_names,
1140
+ :return_type => return_type
1141
+ )
1142
+
1143
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1144
+ if @api_client.config.debugging
1145
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_card_expiring_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1146
+ end
1147
+ return data, status_code, headers
1148
+ end
1149
+
1150
+ # List card pending point buckets
1151
+ # Returns a cursor-paginated list of pending point buckets for the members card. Every bucket has status PENDING. Pending points wait for activation (PERIOD_BASED, FIXED_DATES, or EVENT_BASED), following the card definition. The list starts on the next project day. The current days bucket is omitted because its still accumulating. Results can be filtered by card definition ID and ordered by date. Returns 404 when the program or the member doesnt exist, or when the card isnt assigned to that member. Bucket IDs from this list are the bucketId for [Activate pending point bucket](/api-reference/programs/activate-pending-point-bucket) and [Cancel pending point bucket](/api-reference/programs/cancel-pending-point-bucket).
1152
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1153
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1154
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1155
+ # @param [Hash] opts the optional parameters
1156
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1157
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to date. Soonest activation first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1158
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrscppb_[a-f0-9]+. The cursor matches the filters and order of that response.
1159
+ # @option opts [V2LoyaltiesProgramsMembersCardsPendingPointsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_128f495f720c4bec8c. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1160
+ # @return [V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody]
1161
+ def list_card_pending_points(program_id, member_id, card_id, opts = {})
1162
+ data, _status_code, _headers = list_card_pending_points_with_http_info(program_id, member_id, card_id, opts)
1163
+ data
1164
+ end
1165
+
1166
+ # List card pending point buckets
1167
+ # Returns a cursor-paginated list of pending point buckets for the members card. Every bucket has status PENDING. Pending points wait for activation (PERIOD_BASED, FIXED_DATES, or EVENT_BASED), following the card definition. The list starts on the next project day. The current days bucket is omitted because its still accumulating. Results can be filtered by card definition ID and ordered by date. Returns 404 when the program or the member doesnt exist, or when the card isnt assigned to that member. Bucket IDs from this list are the bucketId for [Activate pending point bucket](/api-reference/programs/activate-pending-point-bucket) and [Cancel pending point bucket](/api-reference/programs/cancel-pending-point-bucket).
1168
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1169
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1170
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1171
+ # @param [Hash] opts the optional parameters
1172
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1173
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to date. Soonest activation first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1174
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrscppb_[a-f0-9]+. The cursor matches the filters and order of that response.
1175
+ # @option opts [V2LoyaltiesProgramsMembersCardsPendingPointsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_128f495f720c4bec8c. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1176
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody data, response status code and response headers
1177
+ private def list_card_pending_points_with_http_info(program_id, member_id, card_id, opts = {})
1178
+ if @api_client.config.debugging
1179
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_card_pending_points ...'
1180
+ end
1181
+ # resource path
1182
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
1183
+
1184
+ # query parameters
1185
+ query_params = opts[:query_params] || {}
1186
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1187
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1188
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1189
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1190
+
1191
+ # header parameters
1192
+ header_params = opts[:header_params] || {}
1193
+ # HTTP header 'Accept' (if needed)
1194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1195
+
1196
+ # form parameters
1197
+ form_params = opts[:form_params] || {}
1198
+
1199
+ # http body (model)
1200
+ post_body = opts[:debug_body]
1201
+
1202
+ # return_type
1203
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody'
1204
+
1205
+ # auth_names
1206
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1207
+
1208
+ new_options = opts.merge(
1209
+ :operation => :"LV2ProgramsApi.list_card_pending_points",
1210
+ :header_params => header_params,
1211
+ :query_params => query_params,
1212
+ :form_params => form_params,
1213
+ :body => post_body,
1214
+ :auth_names => auth_names,
1215
+ :return_type => return_type
1216
+ )
1217
+
1218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1219
+ if @api_client.config.debugging
1220
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_card_pending_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1221
+ end
1222
+ return data, status_code, headers
1223
+ end
1224
+
1225
+ # List card transactions
1226
+ # Returns a cursor-paginated list of transactions on the members card. Filter by id, card_definition_id, and created_at. Order by id (default -id, newest first). Returns 404 when the program, member, or card doesnt exist. The program is checked first, then the member, then the card. A member of another program, or a card that isnt assigned to this member, is not found.
1227
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1228
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1229
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1230
+ # @param [Hash] opts the optional parameters
1231
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1232
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1233
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsctx_[a-f0-9]+. The cursor matches the filters and order of that response.
1234
+ # @option opts [V2LoyaltiesProgramsMembersCardsTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[id][conditions][$is] lctx_0f5d0a8878caa3ee5c. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1235
+ # @return [V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody]
1236
+ def list_card_transactions(program_id, member_id, card_id, opts = {})
1237
+ data, _status_code, _headers = list_card_transactions_with_http_info(program_id, member_id, card_id, opts)
1238
+ data
1239
+ end
1240
+
1241
+ # List card transactions
1242
+ # Returns a cursor-paginated list of transactions on the members card. Filter by id, card_definition_id, and created_at. Order by id (default -id, newest first). Returns 404 when the program, member, or card doesnt exist. The program is checked first, then the member, then the card. A member of another program, or a card that isnt assigned to this member, is not found.
1243
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1244
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1245
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1246
+ # @param [Hash] opts the optional parameters
1247
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1248
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1249
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsctx_[a-f0-9]+. The cursor matches the filters and order of that response.
1250
+ # @option opts [V2LoyaltiesProgramsMembersCardsTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[id][conditions][$is] lctx_0f5d0a8878caa3ee5c. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1251
+ # @return [Array<(V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody data, response status code and response headers
1252
+ private def list_card_transactions_with_http_info(program_id, member_id, card_id, opts = {})
1253
+ if @api_client.config.debugging
1254
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_card_transactions ...'
1255
+ end
1256
+ # resource path
1257
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/transactions'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
1258
+
1259
+ # query parameters
1260
+ query_params = opts[:query_params] || {}
1261
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1262
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1263
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1264
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1265
+
1266
+ # header parameters
1267
+ header_params = opts[:header_params] || {}
1268
+ # HTTP header 'Accept' (if needed)
1269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1270
+
1271
+ # form parameters
1272
+ form_params = opts[:form_params] || {}
1273
+
1274
+ # http body (model)
1275
+ post_body = opts[:debug_body]
1276
+
1277
+ # return_type
1278
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody'
1279
+
1280
+ # auth_names
1281
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1282
+
1283
+ new_options = opts.merge(
1284
+ :operation => :"LV2ProgramsApi.list_card_transactions",
1285
+ :header_params => header_params,
1286
+ :query_params => query_params,
1287
+ :form_params => form_params,
1288
+ :body => post_body,
1289
+ :auth_names => auth_names,
1290
+ :return_type => return_type
1291
+ )
1292
+
1293
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1294
+ if @api_client.config.debugging
1295
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_card_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1296
+ end
1297
+ return data, status_code, headers
1298
+ end
1299
+
1300
+ # List member benefit transactions
1301
+ # Lists benefit transactions (benefit fulfillments) for a given program member, with cursor-based pagination. Supports filtering by benefit ID and creation date.
1302
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1303
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1304
+ # @param [Hash] opts the optional parameters
1305
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1306
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1307
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsbtx_[a-f0-9]+. The cursor matches the filters and order of that response.
1308
+ # @option opts [V2LoyaltiesProgramsMembersBenefitsTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[benefit_id][conditions][$is] lben_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1309
+ # @return [V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody]
1310
+ def list_member_benefit_transactions(program_id, member_id, opts = {})
1311
+ data, _status_code, _headers = list_member_benefit_transactions_with_http_info(program_id, member_id, opts)
1312
+ data
1313
+ end
1314
+
1315
+ # List member benefit transactions
1316
+ # Lists benefit transactions (benefit fulfillments) for a given program member, with cursor-based pagination. Supports filtering by benefit ID and creation date.
1317
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1318
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1319
+ # @param [Hash] opts the optional parameters
1320
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1321
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1322
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsbtx_[a-f0-9]+. The cursor matches the filters and order of that response.
1323
+ # @option opts [V2LoyaltiesProgramsMembersBenefitsTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[benefit_id][conditions][$is] lben_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1324
+ # @return [Array<(V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody data, response status code and response headers
1325
+ private def list_member_benefit_transactions_with_http_info(program_id, member_id, opts = {})
1326
+ if @api_client.config.debugging
1327
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_member_benefit_transactions ...'
1328
+ end
1329
+ # resource path
1330
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/benefits/transactions'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
1331
+
1332
+ # query parameters
1333
+ query_params = opts[:query_params] || {}
1334
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1335
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1336
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1337
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1338
+
1339
+ # header parameters
1340
+ header_params = opts[:header_params] || {}
1341
+ # HTTP header 'Accept' (if needed)
1342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1343
+
1344
+ # form parameters
1345
+ form_params = opts[:form_params] || {}
1346
+
1347
+ # http body (model)
1348
+ post_body = opts[:debug_body]
1349
+
1350
+ # return_type
1351
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody'
1352
+
1353
+ # auth_names
1354
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1355
+
1356
+ new_options = opts.merge(
1357
+ :operation => :"LV2ProgramsApi.list_member_benefit_transactions",
1358
+ :header_params => header_params,
1359
+ :query_params => query_params,
1360
+ :form_params => form_params,
1361
+ :body => post_body,
1362
+ :auth_names => auth_names,
1363
+ :return_type => return_type
1364
+ )
1365
+
1366
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1367
+ if @api_client.config.debugging
1368
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_member_benefit_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1369
+ end
1370
+ return data, status_code, headers
1371
+ end
1372
+
1373
+ # List card daily points reports
1374
+ # Returns aggregated points statistics for a members loyalty card over the given date range and resolution. Each entry sums the point operations recorded in one period. Periods without recorded activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program or member does not exist, or when the card does not exist or is not assigned to the member in the program.
1375
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1376
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1377
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1378
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
1379
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
1380
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
1381
+ # @param [Hash] opts the optional parameters
1382
+ # @return [LoyaltiesProgramsMembersCardsReportsDailyListResponseBody]
1383
+ def list_member_card_daily_reports(program_id, member_id, card_id, start_date, end_date, resolution, opts = {})
1384
+ data, _status_code, _headers = list_member_card_daily_reports_with_http_info(program_id, member_id, card_id, start_date, end_date, resolution, opts)
1385
+ data
1386
+ end
1387
+
1388
+ # List card daily points reports
1389
+ # Returns aggregated points statistics for a members loyalty card over the given date range and resolution. Each entry sums the point operations recorded in one period. Periods without recorded activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program or member does not exist, or when the card does not exist or is not assigned to the member in the program.
1390
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1391
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1392
+ # @param card_id [String] Identifies the loyalty card. Format lcrd_[a-f0-9]+.
1393
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
1394
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
1395
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
1396
+ # @param [Hash] opts the optional parameters
1397
+ # @return [Array<(LoyaltiesProgramsMembersCardsReportsDailyListResponseBody, Integer, Hash)>] LoyaltiesProgramsMembersCardsReportsDailyListResponseBody data, response status code and response headers
1398
+ private def list_member_card_daily_reports_with_http_info(program_id, member_id, card_id, start_date, end_date, resolution, opts = {})
1399
+ if @api_client.config.debugging
1400
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_member_card_daily_reports ...'
1401
+ end
1402
+ # resource path
1403
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/reports/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
1404
+
1405
+ # query parameters
1406
+ query_params = opts[:query_params] || {}
1407
+ query_params[:'start_date'] = start_date
1408
+ query_params[:'end_date'] = end_date
1409
+ query_params[:'resolution'] = resolution
1410
+
1411
+ # header parameters
1412
+ header_params = opts[:header_params] || {}
1413
+ # HTTP header 'Accept' (if needed)
1414
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1415
+
1416
+ # form parameters
1417
+ form_params = opts[:form_params] || {}
1418
+
1419
+ # http body (model)
1420
+ post_body = opts[:debug_body]
1421
+
1422
+ # return_type
1423
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsMembersCardsReportsDailyListResponseBody'
1424
+
1425
+ # auth_names
1426
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1427
+
1428
+ new_options = opts.merge(
1429
+ :operation => :"LV2ProgramsApi.list_member_card_daily_reports",
1430
+ :header_params => header_params,
1431
+ :query_params => query_params,
1432
+ :form_params => form_params,
1433
+ :body => post_body,
1434
+ :auth_names => auth_names,
1435
+ :return_type => return_type
1436
+ )
1437
+
1438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1439
+ if @api_client.config.debugging
1440
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_member_card_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1441
+ end
1442
+ return data, status_code, headers
1443
+ end
1444
+
1445
+ # List member order payments
1446
+ # Lists stored PAY_WITH_POINTS order transactions for the program member, with cursor pagination. Filter by id, card_definition_id, and created_at. Order by id (default -id, newest first). Dry-run (SIMULATED) results arent stored and dont appear. Returns 404 when the program or the member doesnt exist. The program is checked first.
1447
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1448
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1449
+ # @param [Hash] opts the optional parameters
1450
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1451
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1452
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsotx_[a-f0-9]+. The cursor matches the filters and order of that response.
1453
+ # @option opts [V2LoyaltiesProgramsMembersOrdersPaymentsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[id][conditions][$is] lotx_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1454
+ # @return [V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody]
1455
+ def list_member_order_payments(program_id, member_id, opts = {})
1456
+ data, _status_code, _headers = list_member_order_payments_with_http_info(program_id, member_id, opts)
1457
+ data
1458
+ end
1459
+
1460
+ # List member order payments
1461
+ # Lists stored PAY_WITH_POINTS order transactions for the program member, with cursor pagination. Filter by id, card_definition_id, and created_at. Order by id (default -id, newest first). Dry-run (SIMULATED) results arent stored and dont appear. Returns 404 when the program or the member doesnt exist. The program is checked first.
1462
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1463
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1464
+ # @param [Hash] opts the optional parameters
1465
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1466
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1467
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsotx_[a-f0-9]+. The cursor matches the filters and order of that response.
1468
+ # @option opts [V2LoyaltiesProgramsMembersOrdersPaymentsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[id][conditions][$is] lotx_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1469
+ # @return [Array<(V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody data, response status code and response headers
1470
+ private def list_member_order_payments_with_http_info(program_id, member_id, opts = {})
1471
+ if @api_client.config.debugging
1472
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_member_order_payments ...'
1473
+ end
1474
+ # resource path
1475
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
1476
+
1477
+ # query parameters
1478
+ query_params = opts[:query_params] || {}
1479
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1480
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1481
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1482
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1483
+
1484
+ # header parameters
1485
+ header_params = opts[:header_params] || {}
1486
+ # HTTP header 'Accept' (if needed)
1487
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1488
+
1489
+ # form parameters
1490
+ form_params = opts[:form_params] || {}
1491
+
1492
+ # http body (model)
1493
+ post_body = opts[:debug_body]
1494
+
1495
+ # return_type
1496
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody'
1497
+
1498
+ # auth_names
1499
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1500
+
1501
+ new_options = opts.merge(
1502
+ :operation => :"LV2ProgramsApi.list_member_order_payments",
1503
+ :header_params => header_params,
1504
+ :query_params => query_params,
1505
+ :form_params => form_params,
1506
+ :body => post_body,
1507
+ :auth_names => auth_names,
1508
+ :return_type => return_type
1509
+ )
1510
+
1511
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1512
+ if @api_client.config.debugging
1513
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_member_order_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1514
+ end
1515
+ return data, status_code, headers
1516
+ end
1517
+
1518
+ # List member reward purchases
1519
+ # Lists stored PURCHASE reward transactions for the program member, with cursor pagination. Filter by id, reward_id, card_definition_id, and created_at. Order by id (default -id, newest first). Purchases rejected before a transaction is stored dont appear. A purchase accepted with 202 that later fails is stored as REJECTED with details.rejection. Returns 404 when the program or the member doesnt exist. The program is checked first.
1520
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1521
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1522
+ # @param [Hash] opts the optional parameters
1523
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1524
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1525
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrstrx_[a-f0-9]+. The cursor matches the filters and order of that response.
1526
+ # @option opts [V2LoyaltiesProgramsMembersRewardsPurchasesListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1527
+ # @return [V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody]
1528
+ def list_member_reward_purchases(program_id, member_id, opts = {})
1529
+ data, _status_code, _headers = list_member_reward_purchases_with_http_info(program_id, member_id, opts)
1530
+ data
1531
+ end
1532
+
1533
+ # List member reward purchases
1534
+ # Lists stored PURCHASE reward transactions for the program member, with cursor pagination. Filter by id, reward_id, card_definition_id, and created_at. Order by id (default -id, newest first). Purchases rejected before a transaction is stored dont appear. A purchase accepted with 202 that later fails is stored as REJECTED with details.rejection. Returns 404 when the program or the member doesnt exist. The program is checked first.
1535
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1536
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1537
+ # @param [Hash] opts the optional parameters
1538
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1539
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1540
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrstrx_[a-f0-9]+. The cursor matches the filters and order of that response.
1541
+ # @option opts [V2LoyaltiesProgramsMembersRewardsPurchasesListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1542
+ # @return [Array<(V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody data, response status code and response headers
1543
+ private def list_member_reward_purchases_with_http_info(program_id, member_id, opts = {})
1544
+ if @api_client.config.debugging
1545
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_member_reward_purchases ...'
1546
+ end
1547
+ # resource path
1548
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
1549
+
1550
+ # query parameters
1551
+ query_params = opts[:query_params] || {}
1552
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1553
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1554
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1555
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1556
+
1557
+ # header parameters
1558
+ header_params = opts[:header_params] || {}
1559
+ # HTTP header 'Accept' (if needed)
1560
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1561
+
1562
+ # form parameters
1563
+ form_params = opts[:form_params] || {}
1564
+
1565
+ # http body (model)
1566
+ post_body = opts[:debug_body]
1567
+
1568
+ # return_type
1569
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody'
1570
+
1571
+ # auth_names
1572
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1573
+
1574
+ new_options = opts.merge(
1575
+ :operation => :"LV2ProgramsApi.list_member_reward_purchases",
1576
+ :header_params => header_params,
1577
+ :query_params => query_params,
1578
+ :form_params => form_params,
1579
+ :body => post_body,
1580
+ :auth_names => auth_names,
1581
+ :return_type => return_type
1582
+ )
1583
+
1584
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1585
+ if @api_client.config.debugging
1586
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_member_reward_purchases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1587
+ end
1588
+ return data, status_code, headers
1589
+ end
1590
+
1591
+ # List member tier transactions
1592
+ # Lists tier transactions for the member: joins, leaves, upgrades, downgrades, expiration changes, and evaluation refreshes. Results use cursor pagination. Default order is -id, newest first. Filters are card_id, card_definition_id, and created_at. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program and member lookup. order must be id or -id. An array that orders by both directions is rejected. A cursor that doesnt match ^lcrsttx_[a-f0-9]+$ fails here. After the program and member are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1593
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1594
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1595
+ # @param [Hash] opts the optional parameters
1596
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1597
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1598
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsttx_[a-f0-9]+. The cursor matches the filters and order of that response.
1599
+ # @option opts [V2LoyaltiesProgramsMembersTiersTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_id][conditions][$is] lcrd_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1600
+ # @return [V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody]
1601
+ def list_member_tier_transactions(program_id, member_id, opts = {})
1602
+ data, _status_code, _headers = list_member_tier_transactions_with_http_info(program_id, member_id, opts)
1603
+ data
1604
+ end
1605
+
1606
+ # List member tier transactions
1607
+ # Lists tier transactions for the member: joins, leaves, upgrades, downgrades, expiration changes, and evaluation refreshes. Results use cursor pagination. Default order is -id, newest first. Filters are card_id, card_definition_id, and created_at. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program and member lookup. order must be id or -id. An array that orders by both directions is rejected. A cursor that doesnt match ^lcrsttx_[a-f0-9]+$ fails here. After the program and member are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1608
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1609
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1610
+ # @param [Hash] opts the optional parameters
1611
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1612
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -id. Newest first. The same field cannot be used in both directions.
1613
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsttx_[a-f0-9]+. The cursor matches the filters and order of that response.
1614
+ # @option opts [V2LoyaltiesProgramsMembersTiersTransactionsListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[card_id][conditions][$is] lcrd_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1615
+ # @return [Array<(V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody data, response status code and response headers
1616
+ private def list_member_tier_transactions_with_http_info(program_id, member_id, opts = {})
1617
+ if @api_client.config.debugging
1618
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_member_tier_transactions ...'
1619
+ end
1620
+ # resource path
1621
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/tiers/transactions'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
1622
+
1623
+ # query parameters
1624
+ query_params = opts[:query_params] || {}
1625
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1626
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1627
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1628
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1629
+
1630
+ # header parameters
1631
+ header_params = opts[:header_params] || {}
1632
+ # HTTP header 'Accept' (if needed)
1633
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1634
+
1635
+ # form parameters
1636
+ form_params = opts[:form_params] || {}
1637
+
1638
+ # http body (model)
1639
+ post_body = opts[:debug_body]
1640
+
1641
+ # return_type
1642
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody'
1643
+
1644
+ # auth_names
1645
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1646
+
1647
+ new_options = opts.merge(
1648
+ :operation => :"LV2ProgramsApi.list_member_tier_transactions",
1649
+ :header_params => header_params,
1650
+ :query_params => query_params,
1651
+ :form_params => form_params,
1652
+ :body => post_body,
1653
+ :auth_names => auth_names,
1654
+ :return_type => return_type
1655
+ )
1656
+
1657
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1658
+ if @api_client.config.debugging
1659
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_member_tier_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1660
+ end
1661
+ return data, status_code, headers
1662
+ end
1663
+
1664
+ # List program earning rule assignments
1665
+ # Returns a cursor-paginated list of earning rules assigned to the program.
1666
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1667
+ # @param [Hash] opts the optional parameters
1668
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
1669
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1670
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrserna_[a-f0-9]+. The cursor matches the filters and order of that response.
1671
+ # @return [V2LoyaltiesProgramsEarningRulesListResponseBody]
1672
+ def list_program_earning_rule_assignments(program_id, opts = {})
1673
+ data, _status_code, _headers = list_program_earning_rule_assignments_with_http_info(program_id, opts)
1674
+ data
1675
+ end
1676
+
1677
+ # List program earning rule assignments
1678
+ # Returns a cursor-paginated list of earning rules assigned to the program.
1679
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1680
+ # @param [Hash] opts the optional parameters
1681
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
1682
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1683
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrserna_[a-f0-9]+. The cursor matches the filters and order of that response.
1684
+ # @return [Array<(V2LoyaltiesProgramsEarningRulesListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsEarningRulesListResponseBody data, response status code and response headers
1685
+ private def list_program_earning_rule_assignments_with_http_info(program_id, opts = {})
1686
+ if @api_client.config.debugging
1687
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_earning_rule_assignments ...'
1688
+ end
1689
+ # resource path
1690
+ local_var_path = '/v2/loyalties/programs/{programId}/earning-rules'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
1691
+
1692
+ # query parameters
1693
+ query_params = opts[:query_params] || {}
1694
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1695
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1696
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1697
+
1698
+ # header parameters
1699
+ header_params = opts[:header_params] || {}
1700
+ # HTTP header 'Accept' (if needed)
1701
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1702
+
1703
+ # form parameters
1704
+ form_params = opts[:form_params] || {}
1705
+
1706
+ # http body (model)
1707
+ post_body = opts[:debug_body]
1708
+
1709
+ # return_type
1710
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsEarningRulesListResponseBody'
1711
+
1712
+ # auth_names
1713
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1714
+
1715
+ new_options = opts.merge(
1716
+ :operation => :"LV2ProgramsApi.list_program_earning_rule_assignments",
1717
+ :header_params => header_params,
1718
+ :query_params => query_params,
1719
+ :form_params => form_params,
1720
+ :body => post_body,
1721
+ :auth_names => auth_names,
1722
+ :return_type => return_type
1723
+ )
1724
+
1725
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1726
+ if @api_client.config.debugging
1727
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_earning_rule_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1728
+ end
1729
+ return data, status_code, headers
1730
+ end
1731
+
1732
+ # List program earning-rules daily reports
1733
+ # Returns aggregated daily earning-rule evaluation statistics for the program over the given date range and resolution, optionally filtered by earning rule. Each entry counts eligibility checks for one period and earning rule. Periods without recorded activity are omitted. failures_breakdown is always an empty object. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
1734
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1735
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
1736
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
1737
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
1738
+ # @param [Hash] opts the optional parameters
1739
+ # @option opts [EarningRulesReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1740
+ # @return [V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody]
1741
+ def list_program_earning_rules_daily_reports(program_id, start_date, end_date, resolution, opts = {})
1742
+ data, _status_code, _headers = list_program_earning_rules_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
1743
+ data
1744
+ end
1745
+
1746
+ # List program earning-rules daily reports
1747
+ # Returns aggregated daily earning-rule evaluation statistics for the program over the given date range and resolution, optionally filtered by earning rule. Each entry counts eligibility checks for one period and earning rule. Periods without recorded activity are omitted. failures_breakdown is always an empty object. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
1748
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1749
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
1750
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
1751
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
1752
+ # @param [Hash] opts the optional parameters
1753
+ # @option opts [EarningRulesReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1754
+ # @return [Array<(V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody data, response status code and response headers
1755
+ private def list_program_earning_rules_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
1756
+ if @api_client.config.debugging
1757
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_earning_rules_daily_reports ...'
1758
+ end
1759
+ # resource path
1760
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/earning-rules/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
1761
+
1762
+ # query parameters
1763
+ query_params = opts[:query_params] || {}
1764
+ query_params[:'start_date'] = start_date
1765
+ query_params[:'end_date'] = end_date
1766
+ query_params[:'resolution'] = resolution
1767
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1768
+
1769
+ # header parameters
1770
+ header_params = opts[:header_params] || {}
1771
+ # HTTP header 'Accept' (if needed)
1772
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1773
+
1774
+ # form parameters
1775
+ form_params = opts[:form_params] || {}
1776
+
1777
+ # http body (model)
1778
+ post_body = opts[:debug_body]
1779
+
1780
+ # return_type
1781
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody'
1782
+
1783
+ # auth_names
1784
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1785
+
1786
+ new_options = opts.merge(
1787
+ :operation => :"LV2ProgramsApi.list_program_earning_rules_daily_reports",
1788
+ :header_params => header_params,
1789
+ :query_params => query_params,
1790
+ :form_params => form_params,
1791
+ :body => post_body,
1792
+ :auth_names => auth_names,
1793
+ :return_type => return_type
1794
+ )
1795
+
1796
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1797
+ if @api_client.config.debugging
1798
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_earning_rules_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1799
+ end
1800
+ return data, status_code, headers
1801
+ end
1802
+
1803
+ # List program earning-rules summary reports
1804
+ # Returns total earning-rule evaluation statistics for the program (all time), optionally filtered by earning rule. Includes success and failure counts with a failures breakdown. Each entry counts eligibility checks for one earning rule. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
1805
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1806
+ # @param [Hash] opts the optional parameters
1807
+ # @option opts [EarningRulesReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1808
+ # @return [V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody]
1809
+ def list_program_earning_rules_summary_reports(program_id, opts = {})
1810
+ data, _status_code, _headers = list_program_earning_rules_summary_reports_with_http_info(program_id, opts)
1811
+ data
1812
+ end
1813
+
1814
+ # List program earning-rules summary reports
1815
+ # Returns total earning-rule evaluation statistics for the program (all time), optionally filtered by earning rule. Includes success and failure counts with a failures breakdown. Each entry counts eligibility checks for one earning rule. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
1816
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1817
+ # @param [Hash] opts the optional parameters
1818
+ # @option opts [EarningRulesReportListFilters] :filters Filters the results. Pass a deep object, for example filters[earning_rule_id][conditions][$is] lern_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1819
+ # @return [Array<(V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody data, response status code and response headers
1820
+ private def list_program_earning_rules_summary_reports_with_http_info(program_id, opts = {})
1821
+ if @api_client.config.debugging
1822
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_earning_rules_summary_reports ...'
1823
+ end
1824
+ # resource path
1825
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/earning-rules/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
1826
+
1827
+ # query parameters
1828
+ query_params = opts[:query_params] || {}
1829
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1830
+
1831
+ # header parameters
1832
+ header_params = opts[:header_params] || {}
1833
+ # HTTP header 'Accept' (if needed)
1834
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1835
+
1836
+ # form parameters
1837
+ form_params = opts[:form_params] || {}
1838
+
1839
+ # http body (model)
1840
+ post_body = opts[:debug_body]
1841
+
1842
+ # return_type
1843
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody'
1844
+
1845
+ # auth_names
1846
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1847
+
1848
+ new_options = opts.merge(
1849
+ :operation => :"LV2ProgramsApi.list_program_earning_rules_summary_reports",
1850
+ :header_params => header_params,
1851
+ :query_params => query_params,
1852
+ :form_params => form_params,
1853
+ :body => post_body,
1854
+ :auth_names => auth_names,
1855
+ :return_type => return_type
1856
+ )
1857
+
1858
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1859
+ if @api_client.config.debugging
1860
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_earning_rules_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1861
+ end
1862
+ return data, status_code, headers
1863
+ end
1864
+
1865
+ # List program member activities
1866
+ # Returns a cursor-paginated list of lifecycle and card-assignment activities recorded for the member. Filters are id, type, and created_at. Default order is -created_at, then id ascending. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program and member lookup. A cursor that doesnt match ^lcrsambr_[a-f0-9]+$, a limit outside 1 to 100, an order other than created_at or -created_at, or an array that orders by both directions fails here. After the program and member are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1867
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1868
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1869
+ # @param [Hash] opts the optional parameters
1870
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1871
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1872
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsambr_[a-f0-9]+. The cursor matches the filters and order of that response.
1873
+ # @option opts [V2LoyaltiesProgramsMembersActivitiesListRequestQueryFilters] :filters Filters the results. Pass a deep object, for example filters[type][conditions][$is] vl.member.created. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1874
+ # @return [V2LoyaltiesProgramsMembersActivitiesListResponseBody]
1875
+ def list_program_member_activities(program_id, member_id, opts = {})
1876
+ data, _status_code, _headers = list_program_member_activities_with_http_info(program_id, member_id, opts)
1877
+ data
1878
+ end
1879
+
1880
+ # List program member activities
1881
+ # Returns a cursor-paginated list of lifecycle and card-assignment activities recorded for the member. Filters are id, type, and created_at. Default order is -created_at, then id ascending. Returns 404 when the program doesnt exist, or when the member doesnt exist in that program. The program is checked first. A DELETED member returns 404. Returns 400 with key invalid_query_params when the query fails validation. That check runs before the program and member lookup. A cursor that doesnt match ^lcrsambr_[a-f0-9]+$, a limit outside 1 to 100, an order other than created_at or -created_at, or an array that orders by both directions fails here. After the program and member are found, an unknown or expired cursor returns invalid_or_expired_cursor. A cursor recorded for different filters or order returns cursor_and_query_mismatch. The cursor stays valid when only limit changes.
1882
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1883
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
1884
+ # @param [Hash] opts the optional parameters
1885
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1886
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1887
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsambr_[a-f0-9]+. The cursor matches the filters and order of that response.
1888
+ # @option opts [V2LoyaltiesProgramsMembersActivitiesListRequestQueryFilters] :filters Filters the results. Pass a deep object, for example filters[type][conditions][$is] vl.member.created. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1889
+ # @return [Array<(V2LoyaltiesProgramsMembersActivitiesListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersActivitiesListResponseBody data, response status code and response headers
1890
+ private def list_program_member_activities_with_http_info(program_id, member_id, opts = {})
1891
+ if @api_client.config.debugging
1892
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_member_activities ...'
1893
+ end
1894
+ # resource path
1895
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/activities'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
1896
+
1897
+ # query parameters
1898
+ query_params = opts[:query_params] || {}
1899
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1900
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1901
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1902
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1903
+
1904
+ # header parameters
1905
+ header_params = opts[:header_params] || {}
1906
+ # HTTP header 'Accept' (if needed)
1907
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1908
+
1909
+ # form parameters
1910
+ form_params = opts[:form_params] || {}
1911
+
1912
+ # http body (model)
1913
+ post_body = opts[:debug_body]
1914
+
1915
+ # return_type
1916
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersActivitiesListResponseBody'
1917
+
1918
+ # auth_names
1919
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1920
+
1921
+ new_options = opts.merge(
1922
+ :operation => :"LV2ProgramsApi.list_program_member_activities",
1923
+ :header_params => header_params,
1924
+ :query_params => query_params,
1925
+ :form_params => form_params,
1926
+ :body => post_body,
1927
+ :auth_names => auth_names,
1928
+ :return_type => return_type
1929
+ )
1930
+
1931
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1932
+ if @api_client.config.debugging
1933
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_member_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1934
+ end
1935
+ return data, status_code, headers
1936
+ end
1937
+
1938
+ # List program members
1939
+ # Returns a cursor-paginated list of members of the program. Deleted members are omitted. Results can be filtered by ID, status, customer ID and creation date. Results can be ordered by creation date, status, or customer ID (ascending or descending). The same field cannot be ordered both ascending and descending at the same time. Returns 404 when the program does not exist. List items do not include the cards array. Use the following endpoints to retrieve cards for a given member: - [Get customer memberships](/api-reference/programs/get-customer-memberships), - [Get program member](/api-reference/programs/get-program-member), - [Get program membership](/api-reference/programs/get-program-membership).
1940
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1941
+ # @param [Hash] opts the optional parameters
1942
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1943
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1944
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsmbr_[a-f0-9]+. The cursor matches the filters and order of that response.
1945
+ # @option opts [V2LoyaltiesProgramsMembersListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[status][conditions][$is] ACTIVE. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1946
+ # @return [V2LoyaltiesProgramsMembersListResponseBody]
1947
+ def list_program_members(program_id, opts = {})
1948
+ data, _status_code, _headers = list_program_members_with_http_info(program_id, opts)
1949
+ data
1950
+ end
1951
+
1952
+ # List program members
1953
+ # Returns a cursor-paginated list of members of the program. Deleted members are omitted. Results can be filtered by ID, status, customer ID and creation date. Results can be ordered by creation date, status, or customer ID (ascending or descending). The same field cannot be ordered both ascending and descending at the same time. Returns 404 when the program does not exist. List items do not include the cards array. Use the following endpoints to retrieve cards for a given member: - [Get customer memberships](/api-reference/programs/get-customer-memberships), - [Get program member](/api-reference/programs/get-program-member), - [Get program membership](/api-reference/programs/get-program-membership).
1954
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
1955
+ # @param [Hash] opts the optional parameters
1956
+ # @option opts [Integer] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to 10)
1957
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
1958
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsmbr_[a-f0-9]+. The cursor matches the filters and order of that response.
1959
+ # @option opts [V2LoyaltiesProgramsMembersListRequestQuery] :filters Filters the results. Pass a deep object, for example filters[status][conditions][$is] ACTIVE. Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
1960
+ # @return [Array<(V2LoyaltiesProgramsMembersListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersListResponseBody data, response status code and response headers
1961
+ private def list_program_members_with_http_info(program_id, opts = {})
1962
+ if @api_client.config.debugging
1963
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_members ...'
1964
+ end
1965
+ # resource path
1966
+ local_var_path = '/v2/loyalties/programs/{programId}/members'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
1967
+
1968
+ # query parameters
1969
+ query_params = opts[:query_params] || {}
1970
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1971
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1972
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1973
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
1974
+
1975
+ # header parameters
1976
+ header_params = opts[:header_params] || {}
1977
+ # HTTP header 'Accept' (if needed)
1978
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1979
+
1980
+ # form parameters
1981
+ form_params = opts[:form_params] || {}
1982
+
1983
+ # http body (model)
1984
+ post_body = opts[:debug_body]
1985
+
1986
+ # return_type
1987
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersListResponseBody'
1988
+
1989
+ # auth_names
1990
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
1991
+
1992
+ new_options = opts.merge(
1993
+ :operation => :"LV2ProgramsApi.list_program_members",
1994
+ :header_params => header_params,
1995
+ :query_params => query_params,
1996
+ :form_params => form_params,
1997
+ :body => post_body,
1998
+ :auth_names => auth_names,
1999
+ :return_type => return_type
2000
+ )
2001
+
2002
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2003
+ if @api_client.config.debugging
2004
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2005
+ end
2006
+ return data, status_code, headers
2007
+ end
2008
+
2009
+ # List program members daily reports
2010
+ # Returns member and card changes for the program over the given date range and resolution. Each row covers one period with recorded activity. Periods without activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2011
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2012
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2013
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2014
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2015
+ # @param [Hash] opts the optional parameters
2016
+ # @return [LoyaltiesProgramsReportsMembersDailyListResponseBody]
2017
+ def list_program_members_daily_reports(program_id, start_date, end_date, resolution, opts = {})
2018
+ data, _status_code, _headers = list_program_members_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
2019
+ data
2020
+ end
2021
+
2022
+ # List program members daily reports
2023
+ # Returns member and card changes for the program over the given date range and resolution. Each row covers one period with recorded activity. Periods without activity are omitted. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2024
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2025
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2026
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2027
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2028
+ # @param [Hash] opts the optional parameters
2029
+ # @return [Array<(LoyaltiesProgramsReportsMembersDailyListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsMembersDailyListResponseBody data, response status code and response headers
2030
+ private def list_program_members_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
2031
+ if @api_client.config.debugging
2032
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_members_daily_reports ...'
2033
+ end
2034
+ # resource path
2035
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/members/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2036
+
2037
+ # query parameters
2038
+ query_params = opts[:query_params] || {}
2039
+ query_params[:'start_date'] = start_date
2040
+ query_params[:'end_date'] = end_date
2041
+ query_params[:'resolution'] = resolution
2042
+
2043
+ # header parameters
2044
+ header_params = opts[:header_params] || {}
2045
+ # HTTP header 'Accept' (if needed)
2046
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2047
+
2048
+ # form parameters
2049
+ form_params = opts[:form_params] || {}
2050
+
2051
+ # http body (model)
2052
+ post_body = opts[:debug_body]
2053
+
2054
+ # return_type
2055
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsMembersDailyListResponseBody'
2056
+
2057
+ # auth_names
2058
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2059
+
2060
+ new_options = opts.merge(
2061
+ :operation => :"LV2ProgramsApi.list_program_members_daily_reports",
2062
+ :header_params => header_params,
2063
+ :query_params => query_params,
2064
+ :form_params => form_params,
2065
+ :body => post_body,
2066
+ :auth_names => auth_names,
2067
+ :return_type => return_type
2068
+ )
2069
+
2070
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2071
+ if @api_client.config.debugging
2072
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_members_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2073
+ end
2074
+ return data, status_code, headers
2075
+ end
2076
+
2077
+ # List program members summary reports
2078
+ # Returns all-time member and card totals for the program. The response contains one row when activity was recorded, and an empty data array otherwise. limit and order are not query parameters. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2079
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2080
+ # @param [Hash] opts the optional parameters
2081
+ # @return [LoyaltiesProgramsReportsMembersSummaryListResponseBody]
2082
+ def list_program_members_summary_reports(program_id, opts = {})
2083
+ data, _status_code, _headers = list_program_members_summary_reports_with_http_info(program_id, opts)
2084
+ data
2085
+ end
2086
+
2087
+ # List program members summary reports
2088
+ # Returns all-time member and card totals for the program. The response contains one row when activity was recorded, and an empty data array otherwise. limit and order are not query parameters. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2089
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2090
+ # @param [Hash] opts the optional parameters
2091
+ # @return [Array<(LoyaltiesProgramsReportsMembersSummaryListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsMembersSummaryListResponseBody data, response status code and response headers
2092
+ private def list_program_members_summary_reports_with_http_info(program_id, opts = {})
2093
+ if @api_client.config.debugging
2094
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_members_summary_reports ...'
2095
+ end
2096
+ # resource path
2097
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/members/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2098
+
2099
+ # query parameters
2100
+ query_params = opts[:query_params] || {}
2101
+
2102
+ # header parameters
2103
+ header_params = opts[:header_params] || {}
2104
+ # HTTP header 'Accept' (if needed)
2105
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2106
+
2107
+ # form parameters
2108
+ form_params = opts[:form_params] || {}
2109
+
2110
+ # http body (model)
2111
+ post_body = opts[:debug_body]
2112
+
2113
+ # return_type
2114
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsMembersSummaryListResponseBody'
2115
+
2116
+ # auth_names
2117
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2118
+
2119
+ new_options = opts.merge(
2120
+ :operation => :"LV2ProgramsApi.list_program_members_summary_reports",
2121
+ :header_params => header_params,
2122
+ :query_params => query_params,
2123
+ :form_params => form_params,
2124
+ :body => post_body,
2125
+ :auth_names => auth_names,
2126
+ :return_type => return_type
2127
+ )
2128
+
2129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2130
+ if @api_client.config.debugging
2131
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_members_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2132
+ end
2133
+ return data, status_code, headers
2134
+ end
2135
+
2136
+ # List program reward assignments
2137
+ # Returns a cursor-paginated list of rewards assigned to the program, including their stock configuration and redemption counters.
2138
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2139
+ # @param [Hash] opts the optional parameters
2140
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
2141
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
2142
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsrewa_[a-f0-9]+. The cursor matches the filters and order of that response.
2143
+ # @return [V2LoyaltiesProgramsRewardsListResponseBody]
2144
+ def list_program_reward_assignments(program_id, opts = {})
2145
+ data, _status_code, _headers = list_program_reward_assignments_with_http_info(program_id, opts)
2146
+ data
2147
+ end
2148
+
2149
+ # List program reward assignments
2150
+ # Returns a cursor-paginated list of rewards assigned to the program, including their stock configuration and redemption counters.
2151
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2152
+ # @param [Hash] opts the optional parameters
2153
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
2154
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
2155
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrsrewa_[a-f0-9]+. The cursor matches the filters and order of that response.
2156
+ # @return [Array<(V2LoyaltiesProgramsRewardsListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsRewardsListResponseBody data, response status code and response headers
2157
+ private def list_program_reward_assignments_with_http_info(program_id, opts = {})
2158
+ if @api_client.config.debugging
2159
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_reward_assignments ...'
2160
+ end
2161
+ # resource path
2162
+ local_var_path = '/v2/loyalties/programs/{programId}/rewards'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2163
+
2164
+ # query parameters
2165
+ query_params = opts[:query_params] || {}
2166
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2167
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2168
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
2169
+
2170
+ # header parameters
2171
+ header_params = opts[:header_params] || {}
2172
+ # HTTP header 'Accept' (if needed)
2173
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2174
+
2175
+ # form parameters
2176
+ form_params = opts[:form_params] || {}
2177
+
2178
+ # http body (model)
2179
+ post_body = opts[:debug_body]
2180
+
2181
+ # return_type
2182
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsRewardsListResponseBody'
2183
+
2184
+ # auth_names
2185
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2186
+
2187
+ new_options = opts.merge(
2188
+ :operation => :"LV2ProgramsApi.list_program_reward_assignments",
2189
+ :header_params => header_params,
2190
+ :query_params => query_params,
2191
+ :form_params => form_params,
2192
+ :body => post_body,
2193
+ :auth_names => auth_names,
2194
+ :return_type => return_type
2195
+ )
2196
+
2197
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2198
+ if @api_client.config.debugging
2199
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_reward_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2200
+ end
2201
+ return data, status_code, headers
2202
+ end
2203
+
2204
+ # List program rewards daily reports
2205
+ # Returns aggregated reward-purchase statistics for the program over the given date range and resolution, optionally filtered by reward. Each row covers one reward and one period with recorded purchases. Periods without recorded purchases are omitted. failures_breakdown is always an empty object. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2206
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2207
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2208
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2209
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2210
+ # @param [Hash] opts the optional parameters
2211
+ # @option opts [RewardsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2212
+ # @return [LoyaltiesProgramsReportsRewardsDailyListResponseBody]
2213
+ def list_program_rewards_daily_reports(program_id, start_date, end_date, resolution, opts = {})
2214
+ data, _status_code, _headers = list_program_rewards_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
2215
+ data
2216
+ end
2217
+
2218
+ # List program rewards daily reports
2219
+ # Returns aggregated reward-purchase statistics for the program over the given date range and resolution, optionally filtered by reward. Each row covers one reward and one period with recorded purchases. Periods without recorded purchases are omitted. failures_breakdown is always an empty object. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2220
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2221
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2222
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2223
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2224
+ # @param [Hash] opts the optional parameters
2225
+ # @option opts [RewardsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2226
+ # @return [Array<(LoyaltiesProgramsReportsRewardsDailyListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsRewardsDailyListResponseBody data, response status code and response headers
2227
+ private def list_program_rewards_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
2228
+ if @api_client.config.debugging
2229
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_rewards_daily_reports ...'
2230
+ end
2231
+ # resource path
2232
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/rewards/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2233
+
2234
+ # query parameters
2235
+ query_params = opts[:query_params] || {}
2236
+ query_params[:'start_date'] = start_date
2237
+ query_params[:'end_date'] = end_date
2238
+ query_params[:'resolution'] = resolution
2239
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2240
+
2241
+ # header parameters
2242
+ header_params = opts[:header_params] || {}
2243
+ # HTTP header 'Accept' (if needed)
2244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2245
+
2246
+ # form parameters
2247
+ form_params = opts[:form_params] || {}
2248
+
2249
+ # http body (model)
2250
+ post_body = opts[:debug_body]
2251
+
2252
+ # return_type
2253
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsRewardsDailyListResponseBody'
2254
+
2255
+ # auth_names
2256
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2257
+
2258
+ new_options = opts.merge(
2259
+ :operation => :"LV2ProgramsApi.list_program_rewards_daily_reports",
2260
+ :header_params => header_params,
2261
+ :query_params => query_params,
2262
+ :form_params => form_params,
2263
+ :body => post_body,
2264
+ :auth_names => auth_names,
2265
+ :return_type => return_type
2266
+ )
2267
+
2268
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2269
+ if @api_client.config.debugging
2270
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_rewards_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2271
+ end
2272
+ return data, status_code, headers
2273
+ end
2274
+
2275
+ # List program rewards spendings daily reports
2276
+ # Returns aggregated points spent on reward purchases for the program over the given date range and resolution. Each row covers one reward, reward cost, reward spending, card definition, and period with an approved point spend. Periods without an approved point spend are omitted. Optionally filters by reward, cost, spending, and card definition. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2277
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2278
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2279
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2280
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2281
+ # @param [Hash] opts the optional parameters
2282
+ # @option opts [RewardsSpendingsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2283
+ # @return [LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody]
2284
+ def list_program_rewards_spendings_daily_reports(program_id, start_date, end_date, resolution, opts = {})
2285
+ data, _status_code, _headers = list_program_rewards_spendings_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
2286
+ data
2287
+ end
2288
+
2289
+ # List program rewards spendings daily reports
2290
+ # Returns aggregated points spent on reward purchases for the program over the given date range and resolution. Each row covers one reward, reward cost, reward spending, card definition, and period with an approved point spend. Periods without an approved point spend are omitted. Optionally filters by reward, cost, spending, and card definition. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2291
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2292
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2293
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2294
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2295
+ # @param [Hash] opts the optional parameters
2296
+ # @option opts [RewardsSpendingsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2297
+ # @return [Array<(LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody data, response status code and response headers
2298
+ private def list_program_rewards_spendings_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
2299
+ if @api_client.config.debugging
2300
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_rewards_spendings_daily_reports ...'
2301
+ end
2302
+ # resource path
2303
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/rewards/spendings/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2304
+
2305
+ # query parameters
2306
+ query_params = opts[:query_params] || {}
2307
+ query_params[:'start_date'] = start_date
2308
+ query_params[:'end_date'] = end_date
2309
+ query_params[:'resolution'] = resolution
2310
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2311
+
2312
+ # header parameters
2313
+ header_params = opts[:header_params] || {}
2314
+ # HTTP header 'Accept' (if needed)
2315
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2316
+
2317
+ # form parameters
2318
+ form_params = opts[:form_params] || {}
2319
+
2320
+ # http body (model)
2321
+ post_body = opts[:debug_body]
2322
+
2323
+ # return_type
2324
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody'
2325
+
2326
+ # auth_names
2327
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2328
+
2329
+ new_options = opts.merge(
2330
+ :operation => :"LV2ProgramsApi.list_program_rewards_spendings_daily_reports",
2331
+ :header_params => header_params,
2332
+ :query_params => query_params,
2333
+ :form_params => form_params,
2334
+ :body => post_body,
2335
+ :auth_names => auth_names,
2336
+ :return_type => return_type
2337
+ )
2338
+
2339
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2340
+ if @api_client.config.debugging
2341
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_rewards_spendings_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2342
+ end
2343
+ return data, status_code, headers
2344
+ end
2345
+
2346
+ # List program rewards spendings summary reports
2347
+ # Returns all-time points spent on reward purchases for the program. Each row covers one reward, reward cost, reward spending, and card definition with an approved point spend. Filters rows by reward, cost, spending, and card definition. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2348
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2349
+ # @param [Hash] opts the optional parameters
2350
+ # @option opts [RewardsSpendingsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2351
+ # @return [LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody]
2352
+ def list_program_rewards_spendings_summary_reports(program_id, opts = {})
2353
+ data, _status_code, _headers = list_program_rewards_spendings_summary_reports_with_http_info(program_id, opts)
2354
+ data
2355
+ end
2356
+
2357
+ # List program rewards spendings summary reports
2358
+ # Returns all-time points spent on reward purchases for the program. Each row covers one reward, reward cost, reward spending, and card definition with an approved point spend. Filters rows by reward, cost, spending, and card definition. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2359
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2360
+ # @param [Hash] opts the optional parameters
2361
+ # @option opts [RewardsSpendingsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2362
+ # @return [Array<(LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody data, response status code and response headers
2363
+ private def list_program_rewards_spendings_summary_reports_with_http_info(program_id, opts = {})
2364
+ if @api_client.config.debugging
2365
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_rewards_spendings_summary_reports ...'
2366
+ end
2367
+ # resource path
2368
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/rewards/spendings/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2369
+
2370
+ # query parameters
2371
+ query_params = opts[:query_params] || {}
2372
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2373
+
2374
+ # header parameters
2375
+ header_params = opts[:header_params] || {}
2376
+ # HTTP header 'Accept' (if needed)
2377
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2378
+
2379
+ # form parameters
2380
+ form_params = opts[:form_params] || {}
2381
+
2382
+ # http body (model)
2383
+ post_body = opts[:debug_body]
2384
+
2385
+ # return_type
2386
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody'
2387
+
2388
+ # auth_names
2389
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2390
+
2391
+ new_options = opts.merge(
2392
+ :operation => :"LV2ProgramsApi.list_program_rewards_spendings_summary_reports",
2393
+ :header_params => header_params,
2394
+ :query_params => query_params,
2395
+ :form_params => form_params,
2396
+ :body => post_body,
2397
+ :auth_names => auth_names,
2398
+ :return_type => return_type
2399
+ )
2400
+
2401
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2402
+ if @api_client.config.debugging
2403
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_rewards_spendings_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2404
+ end
2405
+ return data, status_code, headers
2406
+ end
2407
+
2408
+ # List program rewards summary reports
2409
+ # Returns all-time reward-purchase totals for the program, one row per reward with a recorded purchase attempt. Filters rows with filters[reward_id]. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2410
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2411
+ # @param [Hash] opts the optional parameters
2412
+ # @option opts [RewardsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2413
+ # @return [LoyaltiesProgramsReportsRewardsSummaryListResponseBody]
2414
+ def list_program_rewards_summary_reports(program_id, opts = {})
2415
+ data, _status_code, _headers = list_program_rewards_summary_reports_with_http_info(program_id, opts)
2416
+ data
2417
+ end
2418
+
2419
+ # List program rewards summary reports
2420
+ # Returns all-time reward-purchase totals for the program, one row per reward with a recorded purchase attempt. Filters rows with filters[reward_id]. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2421
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2422
+ # @param [Hash] opts the optional parameters
2423
+ # @option opts [RewardsReportListFilters] :filters Filters the results. Pass a deep object, for example filters[reward_id][conditions][$is] lrew_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2424
+ # @return [Array<(LoyaltiesProgramsReportsRewardsSummaryListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsRewardsSummaryListResponseBody data, response status code and response headers
2425
+ private def list_program_rewards_summary_reports_with_http_info(program_id, opts = {})
2426
+ if @api_client.config.debugging
2427
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_rewards_summary_reports ...'
2428
+ end
2429
+ # resource path
2430
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/rewards/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2431
+
2432
+ # query parameters
2433
+ query_params = opts[:query_params] || {}
2434
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2435
+
2436
+ # header parameters
2437
+ header_params = opts[:header_params] || {}
2438
+ # HTTP header 'Accept' (if needed)
2439
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2440
+
2441
+ # form parameters
2442
+ form_params = opts[:form_params] || {}
2443
+
2444
+ # http body (model)
2445
+ post_body = opts[:debug_body]
2446
+
2447
+ # return_type
2448
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsRewardsSummaryListResponseBody'
2449
+
2450
+ # auth_names
2451
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2452
+
2453
+ new_options = opts.merge(
2454
+ :operation => :"LV2ProgramsApi.list_program_rewards_summary_reports",
2455
+ :header_params => header_params,
2456
+ :query_params => query_params,
2457
+ :form_params => form_params,
2458
+ :body => post_body,
2459
+ :auth_names => auth_names,
2460
+ :return_type => return_type
2461
+ )
2462
+
2463
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2464
+ if @api_client.config.debugging
2465
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_rewards_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2466
+ end
2467
+ return data, status_code, headers
2468
+ end
2469
+
2470
+ # List program spending daily reports
2471
+ # Returns aggregated points-spending statistics for the program over the given date range and resolution. Each row covers one card definition and one period with recorded spending. Periods without recorded spending are omitted. Optionally filters by card definition. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2472
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2473
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2474
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2475
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2476
+ # @param [Hash] opts the optional parameters
2477
+ # @option opts [SpendingReportListFilters] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2478
+ # @return [LoyaltiesProgramsReportsSpendingDailyListResponseBody]
2479
+ def list_program_spending_daily_reports(program_id, start_date, end_date, resolution, opts = {})
2480
+ data, _status_code, _headers = list_program_spending_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
2481
+ data
2482
+ end
2483
+
2484
+ # List program spending daily reports
2485
+ # Returns aggregated points-spending statistics for the program over the given date range and resolution. Each row covers one card definition and one period with recorded spending. Periods without recorded spending are omitted. Optionally filters by card definition. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2486
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2487
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2488
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2489
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2490
+ # @param [Hash] opts the optional parameters
2491
+ # @option opts [SpendingReportListFilters] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2492
+ # @return [Array<(LoyaltiesProgramsReportsSpendingDailyListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsSpendingDailyListResponseBody data, response status code and response headers
2493
+ private def list_program_spending_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
2494
+ if @api_client.config.debugging
2495
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_spending_daily_reports ...'
2496
+ end
2497
+ # resource path
2498
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/spending/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2499
+
2500
+ # query parameters
2501
+ query_params = opts[:query_params] || {}
2502
+ query_params[:'start_date'] = start_date
2503
+ query_params[:'end_date'] = end_date
2504
+ query_params[:'resolution'] = resolution
2505
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2506
+
2507
+ # header parameters
2508
+ header_params = opts[:header_params] || {}
2509
+ # HTTP header 'Accept' (if needed)
2510
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2511
+
2512
+ # form parameters
2513
+ form_params = opts[:form_params] || {}
2514
+
2515
+ # http body (model)
2516
+ post_body = opts[:debug_body]
2517
+
2518
+ # return_type
2519
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsSpendingDailyListResponseBody'
2520
+
2521
+ # auth_names
2522
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2523
+
2524
+ new_options = opts.merge(
2525
+ :operation => :"LV2ProgramsApi.list_program_spending_daily_reports",
2526
+ :header_params => header_params,
2527
+ :query_params => query_params,
2528
+ :form_params => form_params,
2529
+ :body => post_body,
2530
+ :auth_names => auth_names,
2531
+ :return_type => return_type
2532
+ )
2533
+
2534
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2535
+ if @api_client.config.debugging
2536
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_spending_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2537
+ end
2538
+ return data, status_code, headers
2539
+ end
2540
+
2541
+ # List program spending summary reports
2542
+ # Returns all-time point-spending totals for the program, one row per card definition that has recorded spending. Filters rows with filters[card_definition_id]. Returns at most 10 rows (max number of card definitions per program), ordered by id descending. limit and order are not query parameters. Returns 200 with an empty data array when no spending is recorded. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2543
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2544
+ # @param [Hash] opts the optional parameters
2545
+ # @option opts [SpendingReportListFilters] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2546
+ # @return [LoyaltiesProgramsReportsSpendingSummaryListResponseBody]
2547
+ def list_program_spending_summary_reports(program_id, opts = {})
2548
+ data, _status_code, _headers = list_program_spending_summary_reports_with_http_info(program_id, opts)
2549
+ data
2550
+ end
2551
+
2552
+ # List program spending summary reports
2553
+ # Returns all-time point-spending totals for the program, one row per card definition that has recorded spending. Filters rows with filters[card_definition_id]. Returns at most 10 rows (max number of card definitions per program), ordered by id descending. limit and order are not query parameters. Returns 200 with an empty data array when no spending is recorded. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2554
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2555
+ # @param [Hash] opts the optional parameters
2556
+ # @option opts [SpendingReportListFilters] :filters Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is] lcdef_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2557
+ # @return [Array<(LoyaltiesProgramsReportsSpendingSummaryListResponseBody, Integer, Hash)>] LoyaltiesProgramsReportsSpendingSummaryListResponseBody data, response status code and response headers
2558
+ private def list_program_spending_summary_reports_with_http_info(program_id, opts = {})
2559
+ if @api_client.config.debugging
2560
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_spending_summary_reports ...'
2561
+ end
2562
+ # resource path
2563
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/spending/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2564
+
2565
+ # query parameters
2566
+ query_params = opts[:query_params] || {}
2567
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2568
+
2569
+ # header parameters
2570
+ header_params = opts[:header_params] || {}
2571
+ # HTTP header 'Accept' (if needed)
2572
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2573
+
2574
+ # form parameters
2575
+ form_params = opts[:form_params] || {}
2576
+
2577
+ # http body (model)
2578
+ post_body = opts[:debug_body]
2579
+
2580
+ # return_type
2581
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsReportsSpendingSummaryListResponseBody'
2582
+
2583
+ # auth_names
2584
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2585
+
2586
+ new_options = opts.merge(
2587
+ :operation => :"LV2ProgramsApi.list_program_spending_summary_reports",
2588
+ :header_params => header_params,
2589
+ :query_params => query_params,
2590
+ :form_params => form_params,
2591
+ :body => post_body,
2592
+ :auth_names => auth_names,
2593
+ :return_type => return_type
2594
+ )
2595
+
2596
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2597
+ if @api_client.config.debugging
2598
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_spending_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2599
+ end
2600
+ return data, status_code, headers
2601
+ end
2602
+
2603
+ # List program tier structure assignments
2604
+ # Returns a cursor-paginated list of tier structures assigned to the program. Currently, a program can have only one tier structure assigned.
2605
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2606
+ # @param [Hash] opts the optional parameters
2607
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
2608
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
2609
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrstsa_[a-f0-9]+. The cursor matches the filters and order of that response.
2610
+ # @return [V2LoyaltiesProgramsTierStructuresListResponseBody]
2611
+ def list_program_tier_structure_assignments(program_id, opts = {})
2612
+ data, _status_code, _headers = list_program_tier_structure_assignments_with_http_info(program_id, opts)
2613
+ data
2614
+ end
2615
+
2616
+ # List program tier structure assignments
2617
+ # Returns a cursor-paginated list of tier structures assigned to the program. Currently, a program can have only one tier structure assigned.
2618
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2619
+ # @param [Hash] opts the optional parameters
2620
+ # @option opts [String] :limit Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer. (default to '10')
2621
+ # @option opts [String] :order Orders the results. Accepts one value or an array. Prefix a field with - for descending order. Defaults to -created_at. The same field cannot be used in both directions. Rows with the same sort value are then ordered by id ascending.
2622
+ # @option opts [String] :cursor Continues pagination. Pass the cursor.next value from a previous response. Format lcrstsa_[a-f0-9]+. The cursor matches the filters and order of that response.
2623
+ # @return [Array<(V2LoyaltiesProgramsTierStructuresListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsTierStructuresListResponseBody data, response status code and response headers
2624
+ private def list_program_tier_structure_assignments_with_http_info(program_id, opts = {})
2625
+ if @api_client.config.debugging
2626
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_tier_structure_assignments ...'
2627
+ end
2628
+ # resource path
2629
+ local_var_path = '/v2/loyalties/programs/{programId}/tier-structures'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2630
+
2631
+ # query parameters
2632
+ query_params = opts[:query_params] || {}
2633
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2634
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2635
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
2636
+
2637
+ # header parameters
2638
+ header_params = opts[:header_params] || {}
2639
+ # HTTP header 'Accept' (if needed)
2640
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2641
+
2642
+ # form parameters
2643
+ form_params = opts[:form_params] || {}
2644
+
2645
+ # http body (model)
2646
+ post_body = opts[:debug_body]
2647
+
2648
+ # return_type
2649
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsTierStructuresListResponseBody'
2650
+
2651
+ # auth_names
2652
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2653
+
2654
+ new_options = opts.merge(
2655
+ :operation => :"LV2ProgramsApi.list_program_tier_structure_assignments",
2656
+ :header_params => header_params,
2657
+ :query_params => query_params,
2658
+ :form_params => form_params,
2659
+ :body => post_body,
2660
+ :auth_names => auth_names,
2661
+ :return_type => return_type
2662
+ )
2663
+
2664
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2665
+ if @api_client.config.debugging
2666
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_tier_structure_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2667
+ end
2668
+ return data, status_code, headers
2669
+ end
2670
+
2671
+ # List program tiers daily reports
2672
+ # Returns aggregated tier-movement statistics for the program over the given date range and resolution, optionally filtered by tier structure and tier. Each row covers one tier structure, one tier, and one period with recorded movement. Periods without recorded movement are omitted. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2673
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2674
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2675
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2676
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2677
+ # @param [Hash] opts the optional parameters
2678
+ # @option opts [TiersReportListFilters] :filters Filters the results. Pass a deep object, for example filters[tier_structure_id][conditions][$is] lts_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2679
+ # @return [V2LoyaltiesProgramsReportsTiersDailyListResponseBody]
2680
+ def list_program_tiers_daily_reports(program_id, start_date, end_date, resolution, opts = {})
2681
+ data, _status_code, _headers = list_program_tiers_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts)
2682
+ data
2683
+ end
2684
+
2685
+ # List program tiers daily reports
2686
+ # Returns aggregated tier-movement statistics for the program over the given date range and resolution, optionally filtered by tier structure and tier. Each row covers one tier structure, one tier, and one period with recorded movement. Periods without recorded movement are omitted. A filter that matches no rows returns an empty data array. The date range is limited per resolution: - 90 days for day, - 12 weeks for week, - 12 months for month, - 4 quarters for quarter, - start_date must be before end_date, - start_date and end_date are inclusive. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2687
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2688
+ # @param start_date [Date] Sets the inclusive start of the report date range. Format YYYY-MM-DD.
2689
+ # @param end_date [Date] Sets the inclusive end of the report date range. Format YYYY-MM-DD. Must be after start_date.
2690
+ # @param resolution [String] Sets the aggregation resolution. day allows at most 90 days, week at most 12 weeks, month at most 12 months, and quarter at most 4 quarters.
2691
+ # @param [Hash] opts the optional parameters
2692
+ # @option opts [TiersReportListFilters] :filters Filters the results. Pass a deep object, for example filters[tier_structure_id][conditions][$is] lts_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2693
+ # @return [Array<(V2LoyaltiesProgramsReportsTiersDailyListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsTiersDailyListResponseBody data, response status code and response headers
2694
+ private def list_program_tiers_daily_reports_with_http_info(program_id, start_date, end_date, resolution, opts = {})
2695
+ if @api_client.config.debugging
2696
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_tiers_daily_reports ...'
2697
+ end
2698
+ # resource path
2699
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/tiers/daily'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2700
+
2701
+ # query parameters
2702
+ query_params = opts[:query_params] || {}
2703
+ query_params[:'start_date'] = start_date
2704
+ query_params[:'end_date'] = end_date
2705
+ query_params[:'resolution'] = resolution
2706
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2707
+
2708
+ # header parameters
2709
+ header_params = opts[:header_params] || {}
2710
+ # HTTP header 'Accept' (if needed)
2711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2712
+
2713
+ # form parameters
2714
+ form_params = opts[:form_params] || {}
2715
+
2716
+ # http body (model)
2717
+ post_body = opts[:debug_body]
2718
+
2719
+ # return_type
2720
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsTiersDailyListResponseBody'
2721
+
2722
+ # auth_names
2723
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2724
+
2725
+ new_options = opts.merge(
2726
+ :operation => :"LV2ProgramsApi.list_program_tiers_daily_reports",
2727
+ :header_params => header_params,
2728
+ :query_params => query_params,
2729
+ :form_params => form_params,
2730
+ :body => post_body,
2731
+ :auth_names => auth_names,
2732
+ :return_type => return_type
2733
+ )
2734
+
2735
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2736
+ if @api_client.config.debugging
2737
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_tiers_daily_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2738
+ end
2739
+ return data, status_code, headers
2740
+ end
2741
+
2742
+ # List program tiers summary reports
2743
+ # Returns all-time tier-movement totals for the program, one row per tier structure and tier that has recorded movement. Filters rows with filters[tier_structure_id] and filters[tier_id]. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2744
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2745
+ # @param [Hash] opts the optional parameters
2746
+ # @option opts [TiersReportListFilters] :filters Filters the results. Pass a deep object, for example filters[tier_id][conditions][$is] lt_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2747
+ # @return [V2LoyaltiesProgramsReportsTiersSummaryListResponseBody]
2748
+ def list_program_tiers_summary_reports(program_id, opts = {})
2749
+ data, _status_code, _headers = list_program_tiers_summary_reports_with_http_info(program_id, opts)
2750
+ data
2751
+ end
2752
+
2753
+ # List program tiers summary reports
2754
+ # Returns all-time tier-movement totals for the program, one row per tier structure and tier that has recorded movement. Filters rows with filters[tier_structure_id] and filters[tier_id]. Returns at most 100 rows, ordered by id descending. limit and order are not query parameters. A filter that matches no rows returns an empty data array. Returns 400 when query validation fails. Returns 404 when the program does not exist.
2755
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2756
+ # @param [Hash] opts the optional parameters
2757
+ # @option opts [TiersReportListFilters] :filters Filters the results. Pass a deep object, for example filters[tier_id][conditions][$is] lt_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.
2758
+ # @return [Array<(V2LoyaltiesProgramsReportsTiersSummaryListResponseBody, Integer, Hash)>] V2LoyaltiesProgramsReportsTiersSummaryListResponseBody data, response status code and response headers
2759
+ private def list_program_tiers_summary_reports_with_http_info(program_id, opts = {})
2760
+ if @api_client.config.debugging
2761
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.list_program_tiers_summary_reports ...'
2762
+ end
2763
+ # resource path
2764
+ local_var_path = '/v2/loyalties/programs/{programId}/reports/tiers/summary'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s))
2765
+
2766
+ # query parameters
2767
+ query_params = opts[:query_params] || {}
2768
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
2769
+
2770
+ # header parameters
2771
+ header_params = opts[:header_params] || {}
2772
+ # HTTP header 'Accept' (if needed)
2773
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2774
+
2775
+ # form parameters
2776
+ form_params = opts[:form_params] || {}
2777
+
2778
+ # http body (model)
2779
+ post_body = opts[:debug_body]
2780
+
2781
+ # return_type
2782
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsReportsTiersSummaryListResponseBody'
2783
+
2784
+ # auth_names
2785
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2786
+
2787
+ new_options = opts.merge(
2788
+ :operation => :"LV2ProgramsApi.list_program_tiers_summary_reports",
2789
+ :header_params => header_params,
2790
+ :query_params => query_params,
2791
+ :form_params => form_params,
2792
+ :body => post_body,
2793
+ :auth_names => auth_names,
2794
+ :return_type => return_type
2795
+ )
2796
+
2797
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2798
+ if @api_client.config.debugging
2799
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#list_program_tiers_summary_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2800
+ end
2801
+ return data, status_code, headers
2802
+ end
2803
+
2804
+ # Purchase reward with points
2805
+ # Purchases a reward for the program member by spending points from the members card. The card comes from the matching reward costs card definition. The program, reward, and member must be ACTIVE. The program and reward must be inside their validity windows. The reward must be assigned to the program with stock available, a cost must match the customer, and the purchase must stay inside frequency, cooldown, balance, and spending limits. Modes: - TRANSACTION (default): creates a PENDING reward transaction and a PENDING card transaction. Returns 202. - DRY_RUN: simulates the purchase and doesnt create a transaction. Returns 200 with status SIMULATED.
2806
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2807
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
2808
+ # @param [Hash] opts the optional parameters
2809
+ # @option opts [V2LoyaltiesProgramsMembersRewardsPurchasesCreateRequestBody] :v2_loyalties_programs_members_rewards_purchases_create_request_body
2810
+ # @return [LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBody]
2811
+ def purchase_member_reward(program_id, member_id, opts = {})
2812
+ data, _status_code, _headers = purchase_member_reward_with_http_info(program_id, member_id, opts)
2813
+ data
2814
+ end
2815
+
2816
+ # Purchase reward with points
2817
+ # Purchases a reward for the program member by spending points from the members card. The card comes from the matching reward costs card definition. The program, reward, and member must be ACTIVE. The program and reward must be inside their validity windows. The reward must be assigned to the program with stock available, a cost must match the customer, and the purchase must stay inside frequency, cooldown, balance, and spending limits. Modes: - TRANSACTION (default): creates a PENDING reward transaction and a PENDING card transaction. Returns 202. - DRY_RUN: simulates the purchase and doesnt create a transaction. Returns 200 with status SIMULATED.
2818
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2819
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
2820
+ # @param [Hash] opts the optional parameters
2821
+ # @option opts [V2LoyaltiesProgramsMembersRewardsPurchasesCreateRequestBody] :v2_loyalties_programs_members_rewards_purchases_create_request_body
2822
+ # @return [Array<(LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBody, Integer, Hash)>] LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBody data, response status code and response headers
2823
+ private def purchase_member_reward_with_http_info(program_id, member_id, opts = {})
2824
+ if @api_client.config.debugging
2825
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.purchase_member_reward ...'
2826
+ end
2827
+ # resource path
2828
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
2829
+
2830
+ # query parameters
2831
+ query_params = opts[:query_params] || {}
2832
+
2833
+ # header parameters
2834
+ header_params = opts[:header_params] || {}
2835
+ # HTTP header 'Accept' (if needed)
2836
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2837
+ # HTTP header 'Content-Type'
2838
+ content_type = @api_client.select_header_content_type(['application/json'])
2839
+ if !content_type.nil?
2840
+ header_params['Content-Type'] = content_type
2841
+ end
2842
+
2843
+ # form parameters
2844
+ form_params = opts[:form_params] || {}
2845
+
2846
+ # http body (model)
2847
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_members_rewards_purchases_create_request_body'])
2848
+
2849
+ # return_type
2850
+ return_type = opts[:debug_return_type] || 'LoyaltiesProgramsMembersRewardsPurchasesCreateCombinedResponseBody'
2851
+
2852
+ # auth_names
2853
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2854
+
2855
+ new_options = opts.merge(
2856
+ :operation => :"LV2ProgramsApi.purchase_member_reward",
2857
+ :header_params => header_params,
2858
+ :query_params => query_params,
2859
+ :form_params => form_params,
2860
+ :body => post_body,
2861
+ :auth_names => auth_names,
2862
+ :return_type => return_type
2863
+ )
2864
+
2865
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2866
+ if @api_client.config.debugging
2867
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#purchase_member_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2868
+ end
2869
+ return data, status_code, headers
2870
+ end
2871
+
2872
+ # Refund reward purchase
2873
+ # Refunds an APPROVED reward purchase made by a program member. The purchase transaction is marked REFUNDED, a new REFUND reward transaction is created with status APPROVED, and the points spent on the purchase are returned to the members card. The request body is optional and an empty payload is allowed. Policies default to refund: DEFAULT and stock: DEFAULT. The endpoint responds with 202 before the card balance changes. A POINTS_RETURNED card transaction is created for the members card and processed shortly after the response. When the members tier or the card definition expires points, returned points receive a new expiration date from that setting. They dont inherit the expiration of the originally spent points. A NO_EXPIRATION setting leaves the returned points without an expiration date. Card earning limits dont block the refund. For a LOYALTY_CARD_POINTS reward, the points credited to the target card are also reversed, with a POINTS_PURCHASE_REVERSED card transaction on that card. That transaction is processed shortly after the response. Its expiration is copied from the original points-purchased transaction. A DISCOUNT_COUPONS refund deletes the issued vouchers. details.result.digital.discount_coupons[].result is DELETED, or SKIPPED when the voucher isnt deleted. A GIFT_VOUCHERS refund subtracts the credited amount. details.result.digital.gift_vouchers[].result is CREDITS_SUBTRACTED, or SKIPPED when the balance update is rejected. The refund reverses that purchase in the rewards purchase limits for the project-local day of the original purchase. A day whose purchases are all refunded no longer counts as the members last purchase. Only rewards whose refunds.type is REFUNDABLE can be refunded. Any other reward is rejected with 423 and key reward_refund_policy_does_not_allow_refunds. policies.refund set to ALLOW refunds it anyway. The program must exist, and the reward transaction must belong to that program. Otherwise the request fails with 404. The program is checked first. The request is rejected with 423 when: - The program isnt ACTIVE (non_active_program) or is outside its validity window (program_outside_validity_window), - The transaction isnt a purchase (non_purchase_reward_transaction) or isnt APPROVED (non_approved_reward_transaction); refunding the same purchase twice fails here, - The reward no longer exists (reward_not_found), isnt assigned to the program (refund_reward_not_assigned_to_program), the members card is gone (refund_card_not_found), or the card definition is gone (refund_card_definition_not_found), - The reward type isnt supported (reward_type_not_supported_for_refunds), - For a LOYALTY_CARD_POINTS reward, the purchase result is missing (loyalty_card_points_purchase_result_not_found), the target card is gone (loyalty_card_points_target_card_not_found), the points-purchased card transaction is missing (loyalty_card_points_purchase_not_found), the target cards available balance is lower than the purchased points (loyalty_card_points_insufficient_balance), or the target card definition is gone (loyalty_card_points_target_card_definition_not_found).
2874
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2875
+ # @param reward_transaction_id [String] Identifies the reward transaction of the purchase to refund. Format lrtx_[a-f0-9]+.
2876
+ # @param [Hash] opts the optional parameters
2877
+ # @option opts [V2LoyaltiesProgramsRewardsPurchasesRefundRequestBody] :v2_loyalties_programs_rewards_purchases_refund_request_body Optional refund policies. An empty payload is allowed.
2878
+ # @return [V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody]
2879
+ def refund_reward_purchase(program_id, reward_transaction_id, opts = {})
2880
+ data, _status_code, _headers = refund_reward_purchase_with_http_info(program_id, reward_transaction_id, opts)
2881
+ data
2882
+ end
2883
+
2884
+ # Refund reward purchase
2885
+ # Refunds an APPROVED reward purchase made by a program member. The purchase transaction is marked REFUNDED, a new REFUND reward transaction is created with status APPROVED, and the points spent on the purchase are returned to the members card. The request body is optional and an empty payload is allowed. Policies default to refund: DEFAULT and stock: DEFAULT. The endpoint responds with 202 before the card balance changes. A POINTS_RETURNED card transaction is created for the members card and processed shortly after the response. When the members tier or the card definition expires points, returned points receive a new expiration date from that setting. They dont inherit the expiration of the originally spent points. A NO_EXPIRATION setting leaves the returned points without an expiration date. Card earning limits dont block the refund. For a LOYALTY_CARD_POINTS reward, the points credited to the target card are also reversed, with a POINTS_PURCHASE_REVERSED card transaction on that card. That transaction is processed shortly after the response. Its expiration is copied from the original points-purchased transaction. A DISCOUNT_COUPONS refund deletes the issued vouchers. details.result.digital.discount_coupons[].result is DELETED, or SKIPPED when the voucher isnt deleted. A GIFT_VOUCHERS refund subtracts the credited amount. details.result.digital.gift_vouchers[].result is CREDITS_SUBTRACTED, or SKIPPED when the balance update is rejected. The refund reverses that purchase in the rewards purchase limits for the project-local day of the original purchase. A day whose purchases are all refunded no longer counts as the members last purchase. Only rewards whose refunds.type is REFUNDABLE can be refunded. Any other reward is rejected with 423 and key reward_refund_policy_does_not_allow_refunds. policies.refund set to ALLOW refunds it anyway. The program must exist, and the reward transaction must belong to that program. Otherwise the request fails with 404. The program is checked first. The request is rejected with 423 when: - The program isnt ACTIVE (non_active_program) or is outside its validity window (program_outside_validity_window), - The transaction isnt a purchase (non_purchase_reward_transaction) or isnt APPROVED (non_approved_reward_transaction); refunding the same purchase twice fails here, - The reward no longer exists (reward_not_found), isnt assigned to the program (refund_reward_not_assigned_to_program), the members card is gone (refund_card_not_found), or the card definition is gone (refund_card_definition_not_found), - The reward type isnt supported (reward_type_not_supported_for_refunds), - For a LOYALTY_CARD_POINTS reward, the purchase result is missing (loyalty_card_points_purchase_result_not_found), the target card is gone (loyalty_card_points_target_card_not_found), the points-purchased card transaction is missing (loyalty_card_points_purchase_not_found), the target cards available balance is lower than the purchased points (loyalty_card_points_insufficient_balance), or the target card definition is gone (loyalty_card_points_target_card_definition_not_found).
2886
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2887
+ # @param reward_transaction_id [String] Identifies the reward transaction of the purchase to refund. Format lrtx_[a-f0-9]+.
2888
+ # @param [Hash] opts the optional parameters
2889
+ # @option opts [V2LoyaltiesProgramsRewardsPurchasesRefundRequestBody] :v2_loyalties_programs_rewards_purchases_refund_request_body Optional refund policies. An empty payload is allowed.
2890
+ # @return [Array<(V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody, Integer, Hash)>] V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody data, response status code and response headers
2891
+ private def refund_reward_purchase_with_http_info(program_id, reward_transaction_id, opts = {})
2892
+ if @api_client.config.debugging
2893
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.refund_reward_purchase ...'
2894
+ end
2895
+ # resource path
2896
+ local_var_path = '/v2/loyalties/programs/{programId}/rewards/purchases/{rewardTransactionId}/refund'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'rewardTransactionId' + '}', CGI.escape(reward_transaction_id.to_s))
2897
+
2898
+ # query parameters
2899
+ query_params = opts[:query_params] || {}
2900
+
2901
+ # header parameters
2902
+ header_params = opts[:header_params] || {}
2903
+ # HTTP header 'Accept' (if needed)
2904
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2905
+ # HTTP header 'Content-Type'
2906
+ content_type = @api_client.select_header_content_type(['application/json'])
2907
+ if !content_type.nil?
2908
+ header_params['Content-Type'] = content_type
2909
+ end
2910
+
2911
+ # form parameters
2912
+ form_params = opts[:form_params] || {}
2913
+
2914
+ # http body (model)
2915
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_rewards_purchases_refund_request_body'])
2916
+
2917
+ # return_type
2918
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody'
2919
+
2920
+ # auth_names
2921
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2922
+
2923
+ new_options = opts.merge(
2924
+ :operation => :"LV2ProgramsApi.refund_reward_purchase",
2925
+ :header_params => header_params,
2926
+ :query_params => query_params,
2927
+ :form_params => form_params,
2928
+ :body => post_body,
2929
+ :auth_names => auth_names,
2930
+ :return_type => return_type
2931
+ )
2932
+
2933
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2934
+ if @api_client.config.debugging
2935
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#refund_reward_purchase\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2936
+ end
2937
+ return data, status_code, headers
2938
+ end
2939
+
2940
+ # Update program member
2941
+ # Updates a program members metadata. Provided object keys are merged into the existing metadata; omitted keys are preserved. Pass metadata: null to clear all metadata (sets it to an empty object). This endpoint cannot change status. Use [Activate program member](/api-reference/programs/activate-program-member) or [Deactivate program member](/api-reference/programs/deactivate-program-member) for status transitions. Records a vl.member.updated activity. Returns the updated member without the cards array. Returns 404 when the program or member does not exist. Returns 400 when the request body fails validation or the project vl_member metadata schema rejects the payload.
2942
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2943
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
2944
+ # @param [Hash] opts the optional parameters
2945
+ # @option opts [V2LoyaltiesProgramsMembersUpdateRequestBody] :v2_loyalties_programs_members_update_request_body
2946
+ # @return [V2LoyaltiesProgramsMembersUpdateResponseBody]
2947
+ def update_program_member(program_id, member_id, opts = {})
2948
+ data, _status_code, _headers = update_program_member_with_http_info(program_id, member_id, opts)
2949
+ data
2950
+ end
2951
+
2952
+ # Update program member
2953
+ # Updates a program members metadata. Provided object keys are merged into the existing metadata; omitted keys are preserved. Pass metadata: null to clear all metadata (sets it to an empty object). This endpoint cannot change status. Use [Activate program member](/api-reference/programs/activate-program-member) or [Deactivate program member](/api-reference/programs/deactivate-program-member) for status transitions. Records a vl.member.updated activity. Returns the updated member without the cards array. Returns 404 when the program or member does not exist. Returns 400 when the request body fails validation or the project vl_member metadata schema rejects the payload.
2954
+ # @param program_id [String] Identifies the loyalty program. Format lprg_[a-f0-9]+.
2955
+ # @param member_id [String] Identifies the member. Format lmbr_[a-f0-9]+.
2956
+ # @param [Hash] opts the optional parameters
2957
+ # @option opts [V2LoyaltiesProgramsMembersUpdateRequestBody] :v2_loyalties_programs_members_update_request_body
2958
+ # @return [Array<(V2LoyaltiesProgramsMembersUpdateResponseBody, Integer, Hash)>] V2LoyaltiesProgramsMembersUpdateResponseBody data, response status code and response headers
2959
+ private def update_program_member_with_http_info(program_id, member_id, opts = {})
2960
+ if @api_client.config.debugging
2961
+ @api_client.config.logger.debug 'Calling API: LV2ProgramsApi.update_program_member ...'
2962
+ end
2963
+ # resource path
2964
+ local_var_path = '/v2/loyalties/programs/{programId}/members/{memberId}'.sub('{' + 'programId' + '}', CGI.escape(program_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
2965
+
2966
+ # query parameters
2967
+ query_params = opts[:query_params] || {}
2968
+
2969
+ # header parameters
2970
+ header_params = opts[:header_params] || {}
2971
+ # HTTP header 'Accept' (if needed)
2972
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2973
+ # HTTP header 'Content-Type'
2974
+ content_type = @api_client.select_header_content_type(['application/json'])
2975
+ if !content_type.nil?
2976
+ header_params['Content-Type'] = content_type
2977
+ end
2978
+
2979
+ # form parameters
2980
+ form_params = opts[:form_params] || {}
2981
+
2982
+ # http body (model)
2983
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v2_loyalties_programs_members_update_request_body'])
2984
+
2985
+ # return_type
2986
+ return_type = opts[:debug_return_type] || 'V2LoyaltiesProgramsMembersUpdateResponseBody'
2987
+
2988
+ # auth_names
2989
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
2990
+
2991
+ new_options = opts.merge(
2992
+ :operation => :"LV2ProgramsApi.update_program_member",
2993
+ :header_params => header_params,
2994
+ :query_params => query_params,
2995
+ :form_params => form_params,
2996
+ :body => post_body,
2997
+ :auth_names => auth_names,
2998
+ :return_type => return_type
2999
+ )
3000
+
3001
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3002
+ if @api_client.config.debugging
3003
+ @api_client.config.logger.debug "API called: LV2ProgramsApi#update_program_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3004
+ end
3005
+ return data, status_code, headers
3006
+ end
3007
+ end
3008
+ end