Class: Dodopayments::Resources::Blocklist::Customers::Notes
- Inherits:
-
Object
- Object
- Dodopayments::Resources::Blocklist::Customers::Notes
- Defined in:
- lib/dodopayments/resources/blocklist/customers/notes.rb,
sig/dodopayments/resources/blocklist/customers/notes.rbs
Instance Method Summary collapse
- #create(entry_id, note:, request_options: {}) ⇒ Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote
-
#initialize(client:) ⇒ Notes
constructor
private
A new instance of Notes.
- #update(note_id, entry_id:, note:, request_options: {}) ⇒ Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote
Constructor Details
#initialize(client:) ⇒ Notes
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 Notes.
61 62 63 |
# File 'lib/dodopayments/resources/blocklist/customers/notes.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#create(entry_id, note:, request_options: {}) ⇒ Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dodopayments/resources/blocklist/customers/notes.rb', line 19 def create(entry_id, params) parsed, = Dodopayments::Blocklist::Customers::NoteCreateParams.dump_request(params) @client.request( method: :post, path: ["blocklist/customers/%1$s/notes", entry_id], body: parsed, model: Dodopayments::Blocklist::Customers::BlockedCustomerNote, options: ) end |
#update(note_id, entry_id:, note:, request_options: {}) ⇒ Dodopayments::Models::Blocklist::Customers::BlockedCustomerNote
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/dodopayments/resources/blocklist/customers/notes.rb', line 43 def update(note_id, params) parsed, = Dodopayments::Blocklist::Customers::NoteUpdateParams.dump_request(params) entry_id = parsed.delete(:entry_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["blocklist/customers/%1$s/notes/%2$s", entry_id, note_id], body: parsed, model: Dodopayments::Blocklist::Customers::BlockedCustomerNote, options: ) end |