Class: RockRMS::Client
- Inherits:
-
Object
- Object
- RockRMS::Client
- Includes:
- RecurringFrequencies, Attribute, AttributeValue, Batch, Campus, Fund, Gateway, Group, GroupMember, PaymentDetail, Person, PhoneNumber, RecurringDonation, Refund, RefundReason, SavedPaymentMethod, Transaction, TransactionDetail, Utility, WorkflowActionType, WorkflowActivityType, WorkflowType
- Defined in:
- lib/rock_rms/client.rb,
lib/rock_rms/resources/fund.rb,
lib/rock_rms/resources/batch.rb,
lib/rock_rms/resources/group.rb,
lib/rock_rms/resources/campus.rb,
lib/rock_rms/resources/person.rb,
lib/rock_rms/resources/refund.rb,
lib/rock_rms/resources/gateway.rb,
lib/rock_rms/resources/version.rb,
lib/rock_rms/resources/attribute.rb,
lib/rock_rms/resources/transaction.rb,
lib/rock_rms/resources/group_member.rb,
lib/rock_rms/resources/phone_number.rb,
lib/rock_rms/resources/refund_reason.rb,
lib/rock_rms/resources/workflow_type.rb,
lib/rock_rms/resources/payment_detail.rb,
lib/rock_rms/resources/attribute_value.rb,
lib/rock_rms/resources/recurring_donation.rb,
lib/rock_rms/resources/transaction_detail.rb,
lib/rock_rms/resources/saved_payment_method.rb,
lib/rock_rms/resources/workflow_action_type.rb,
lib/rock_rms/resources/workflow_activity_type.rb
Defined Under Namespace
Modules: Attribute, AttributeValue, Batch, Campus, Fund, Gateway, Group, GroupMember, PaymentDetail, Person, PhoneNumber, RecurringDonation, Refund, RefundReason, SavedPaymentMethod, Transaction, TransactionDetail, Utility, WorkflowActionType, WorkflowActivityType, WorkflowType
Constant Summary
Constants included from WorkflowType
Constants included from WorkflowActivityType
Constants included from WorkflowActionType
Constants included from Transaction
Constants included from Refund
Constants included from Person
Constants included from RecurringFrequencies
RecurringFrequencies::RECURRING_FREQUENCIES
Instance Attribute Summary collapse
-
#cookie ⇒ Object
readonly
Returns the value of attribute cookie.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
-
#initialize(url:, username:, password:, logger: true) ⇒ Client
constructor
A new instance of Client.
- #patch(path, options = {}) ⇒ Object
- #post(path, options = {}) ⇒ Object
- #put(path, options = {}) ⇒ Object
Methods included from WorkflowType
#find_workflow_type, #list_workflow_types
Methods included from WorkflowActivityType
#find_workflow_activity_type, #list_workflow_activity_types
Methods included from WorkflowActionType
#find_workflow_action_type, #list_workflow_action_types
Methods included from Utility
Methods included from TransactionDetail
#find_transaction_detail, #list_transaction_details, #update_transaction_detail
Methods included from Transaction
#create_transaction, #delete_transaction, #find_donations_by_giving_id, #find_transaction, #launch_transaction_workflow, #list_transactions, #update_transaction
Methods included from SavedPaymentMethod
#create_saved_payment_method, #delete_saved_payment_method, #list_saved_payment_methods
Methods included from RefundReason
#create_refund_reason, #list_refund_reasons
Methods included from Refund
Methods included from RecurringDonation
#create_recurring_donation, #find_recurring_donation, #list_recurring_donations, #update_recurring_donation
Methods included from PhoneNumber
Methods included from Person
#create_person, #find_person, #find_person_by_alias_id, #find_person_by_email, #find_person_by_name, #list_people, #update_person
Methods included from PaymentDetail
#create_payment_detail, #delete_payment_detail, #list_payment_details
Methods included from GroupMember
#create_group_member, #delete_group_member
Methods included from Group
#find_group, #list_families_for_person, #list_groups, #list_groups_for_person
Methods included from Gateway
Methods included from Campus
Methods included from Fund
Methods included from Batch
#create_batch, #delete_batch, #find_batch, #list_batches, #update_batch
Methods included from AttributeValue
#create_attribute_value, #list_attribute_values
Methods included from Attribute
#create_attribute, #list_attributes
Constructor Details
#initialize(url:, username:, password:, logger: true) ⇒ Client
Returns a new instance of Client.
37 38 39 40 41 42 43 |
# File 'lib/rock_rms/client.rb', line 37 def initialize(url:, username:, password:, logger: true) @url = "#{url}/api/" @username = username @password = password @logger = logger @cookie = auth['set-cookie'] end |
Instance Attribute Details
#cookie ⇒ Object (readonly)
Returns the value of attribute cookie.
35 36 37 |
# File 'lib/rock_rms/client.rb', line 35 def @cookie end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
35 36 37 |
# File 'lib/rock_rms/client.rb', line 35 def logger @logger end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
35 36 37 |
# File 'lib/rock_rms/client.rb', line 35 def password @password end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
35 36 37 |
# File 'lib/rock_rms/client.rb', line 35 def url @url end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
35 36 37 |
# File 'lib/rock_rms/client.rb', line 35 def username @username end |
Instance Method Details
#delete(path, options = {}) ⇒ Object
45 46 47 |
# File 'lib/rock_rms/client.rb', line 45 def delete(path, = {}) connection.delete(path, ).body end |
#get(path, options = {}) ⇒ Object
49 50 51 |
# File 'lib/rock_rms/client.rb', line 49 def get(path, = {}) connection.get(path, ).body end |
#patch(path, options = {}) ⇒ Object
53 54 55 |
# File 'lib/rock_rms/client.rb', line 53 def patch(path, = {}) connection.patch(path, ).body end |
#post(path, options = {}) ⇒ Object
57 58 59 |
# File 'lib/rock_rms/client.rb', line 57 def post(path, = {}) connection.post(path, ).body end |
#put(path, options = {}) ⇒ Object
61 62 63 |
# File 'lib/rock_rms/client.rb', line 61 def put(path, = {}) connection.put(path, ).body end |