Class: Amocrm::Resources::CustomerBonusPoints
- Inherits:
-
Object
- Object
- Amocrm::Resources::CustomerBonusPoints
- Defined in:
- lib/amocrm/resources/customer_bonus_points.rb
Instance Method Summary collapse
-
#change(customer_id, body:, request_options: {}) ⇒ Amocrm::Models::CustomerBonusPointChangeResponse::CustomerBonusPointsResponse, Amocrm::Models::CustomerBonusPointChangeResponse::Problem
Earn or redeem bonus points.
-
#initialize(client:) ⇒ CustomerBonusPoints
constructor
private
A new instance of CustomerBonusPoints.
Constructor Details
#initialize(client:) ⇒ CustomerBonusPoints
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CustomerBonusPoints.
31 32 33 |
# File 'lib/amocrm/resources/customer_bonus_points.rb', line 31 def initialize(client:) @client = client end |
Instance Method Details
#change(customer_id, body:, request_options: {}) ⇒ Amocrm::Models::CustomerBonusPointChangeResponse::CustomerBonusPointsResponse, Amocrm::Models::CustomerBonusPointChangeResponse::Problem
Earn or redeem bonus points.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/amocrm/resources/customer_bonus_points.rb', line 17 def change(customer_id, params) parsed, = Amocrm::CustomerBonusPointChangeParams.dump_request(params) @client.request( method: :post, path: ["api/v4/customers/%1$s/bonus_points", customer_id], body: parsed[:body], model: Amocrm::Models::CustomerBonusPointChangeResponse, options: ) end |