repo
stringlengths
5
58
path
stringlengths
9
168
func_name
stringlengths
9
130
original_string
stringlengths
66
10.5k
language
stringclasses
1 value
code
stringlengths
66
10.5k
code_tokens
list
docstring
stringlengths
8
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
94
266
partition
stringclasses
1 value
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.retrieve_cash_drawer_shift
def retrieve_cash_drawer_shift(location_id, shift_id, opts = {}) data, _status_code, _headers = retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts) return data end
ruby
def retrieve_cash_drawer_shift(location_id, shift_id, opts = {}) data, _status_code, _headers = retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts) return data end
[ "def", "retrieve_cash_drawer_shift", "(", "location_id", ",", "shift_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_cash_drawer_shift_with_http_info", "(", "location_id", ",", "shift_id", ",", "opts", ")", "retur...
RetrieveCashDrawerShift Provides the details for a single cash drawer shift, including all events that occurred during the shift. @param location_id The ID of the location to list cash drawer shifts for. @param shift_id The shift's ID. @param [Hash] opts the optional parameters @return [V1CashDrawerShift]
[ "RetrieveCashDrawerShift", "Provides", "the", "details", "for", "a", "single", "cash", "drawer", "shift", "including", "all", "events", "that", "occurred", "during", "the", "shift", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L602-L605
train
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.retrieve_employee
def retrieve_employee(employee_id, opts = {}) data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts) return data end
ruby
def retrieve_employee(employee_id, opts = {}) data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts) return data end
[ "def", "retrieve_employee", "(", "employee_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_employee_with_http_info", "(", "employee_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveEmployee Provides the details for a single employee. @param employee_id The employee's ID. @param [Hash] opts the optional parameters @return [V1Employee]
[ "RetrieveEmployee", "Provides", "the", "details", "for", "a", "single", "employee", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L660-L663
train
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.retrieve_employee_role
def retrieve_employee_role(role_id, opts = {}) data, _status_code, _headers = retrieve_employee_role_with_http_info(role_id, opts) return data end
ruby
def retrieve_employee_role(role_id, opts = {}) data, _status_code, _headers = retrieve_employee_role_with_http_info(role_id, opts) return data end
[ "def", "retrieve_employee_role", "(", "role_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_employee_role_with_http_info", "(", "role_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveEmployeeRole Provides the details for a single employee role. @param role_id The role's ID. @param [Hash] opts the optional parameters @return [V1EmployeeRole]
[ "RetrieveEmployeeRole", "Provides", "the", "details", "for", "a", "single", "employee", "role", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L715-L718
train
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.update_employee_role
def update_employee_role(role_id, body, opts = {}) data, _status_code, _headers = update_employee_role_with_http_info(role_id, body, opts) return data end
ruby
def update_employee_role(role_id, body, opts = {}) data, _status_code, _headers = update_employee_role_with_http_info(role_id, body, opts) return data end
[ "def", "update_employee_role", "(", "role_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_employee_role_with_http_info", "(", "role_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateEmployeeRole Modifies the details of an employee role. @param role_id The ID of the role to modify. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1EmployeeRole]
[ "UpdateEmployeeRole", "Modifies", "the", "details", "of", "an", "employee", "role", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L885-L888
train
square/connect-ruby-sdk
lib/square_connect/api/v1_employees_api.rb
SquareConnect.V1EmployeesApi.update_timecard
def update_timecard(timecard_id, body, opts = {}) data, _status_code, _headers = update_timecard_with_http_info(timecard_id, body, opts) return data end
ruby
def update_timecard(timecard_id, body, opts = {}) data, _status_code, _headers = update_timecard_with_http_info(timecard_id, body, opts) return data end
[ "def", "update_timecard", "(", "timecard_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_timecard_with_http_info", "(", "timecard_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateTimecard Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out. @param timecard_id TThe ID of the timecard to modify. @param body An object containing the fields to POST for the request. See the corresponding obj...
[ "UpdateTimecard", "Modifies", "the", "details", "of", "a", "timecard", "with", "an", "API_EDIT", "event", "for", "the", "timecard", ".", "Updating", "an", "active", "timecard", "with", "a", "clockout_time", "clocks", "the", "employee", "out", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L944-L947
train
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.create_customer_card
def create_customer_card(customer_id, body, opts = {}) data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts) return data end
ruby
def create_customer_card(customer_id, body, opts = {}) data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts) return data end
[ "def", "create_customer_card", "(", "customer_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_customer_card_with_http_info", "(", "customer_id", ",", "body", ",", "opts", ")", "return", "data", "end...
CreateCustomerCard Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly bas...
[ "CreateCustomerCard", "Adds", "a", "card", "on", "file", "to", "an", "existing", "customer", ".", "As", "with", "charges", "calls", "to", "CreateCustomerCard", "are", "idempotent", ".", "Multiple", "calls", "with", "the", "same", "card", "nonce", "return", "th...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L81-L84
train
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.delete_customer
def delete_customer(customer_id, opts = {}) data, _status_code, _headers = delete_customer_with_http_info(customer_id, opts) return data end
ruby
def delete_customer(customer_id, opts = {}) data, _status_code, _headers = delete_customer_with_http_info(customer_id, opts) return data end
[ "def", "delete_customer", "(", "customer_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "delete_customer_with_http_info", "(", "customer_id", ",", "opts", ")", "return", "data", "end" ]
DeleteCustomer Deletes a customer from a business, along with any linked cards on file. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to delete merged profiles. @param customer_id The ID of the customer to delete. @param [Hash] op...
[ "DeleteCustomer", "Deletes", "a", "customer", "from", "a", "business", "along", "with", "any", "linked", "cards", "on", "file", ".", "When", "two", "profiles", "are", "merged", "into", "a", "single", "profile", "that", "profile", "is", "assigned", "a", "new"...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L139-L142
train
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.delete_customer_card
def delete_customer_card(customer_id, card_id, opts = {}) data, _status_code, _headers = delete_customer_card_with_http_info(customer_id, card_id, opts) return data end
ruby
def delete_customer_card(customer_id, card_id, opts = {}) data, _status_code, _headers = delete_customer_card_with_http_info(customer_id, card_id, opts) return data end
[ "def", "delete_customer_card", "(", "customer_id", ",", "card_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "delete_customer_card_with_http_info", "(", "customer_id", ",", "card_id", ",", "opts", ")", "return", "data", ...
DeleteCustomerCard Removes a card on file from a customer. @param customer_id The ID of the customer that the card on file belongs to. @param card_id The ID of the card on file to delete. @param [Hash] opts the optional parameters @return [DeleteCustomerCardResponse]
[ "DeleteCustomerCard", "Removes", "a", "card", "on", "file", "from", "a", "customer", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L195-L198
train
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.retrieve_customer
def retrieve_customer(customer_id, opts = {}) data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts) return data end
ruby
def retrieve_customer(customer_id, opts = {}) data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts) return data end
[ "def", "retrieve_customer", "(", "customer_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_customer_with_http_info", "(", "customer_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveCustomer Returns details for a single customer. @param customer_id The ID of the customer to retrieve. @param [Hash] opts the optional parameters @return [RetrieveCustomerResponse]
[ "RetrieveCustomer", "Returns", "details", "for", "a", "single", "customer", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L319-L322
train
square/connect-ruby-sdk
lib/square_connect/api/customers_api.rb
SquareConnect.CustomersApi.search_customers
def search_customers(body, opts = {}) data, _status_code, _headers = search_customers_with_http_info(body, opts) return data end
ruby
def search_customers(body, opts = {}) data, _status_code, _headers = search_customers_with_http_info(body, opts) return data end
[ "def", "search_customers", "(", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "search_customers_with_http_info", "(", "body", ",", "opts", ")", "return", "data", "end" ]
SearchCustomers Searches the customer profiles associated with a Square account. Calling SearchCustomers without an explicit query parameter returns all customer profiles ordered alphabetically based on `given_name` and `family_name`. @param body An object containing the fields to POST for the request. See the corre...
[ "SearchCustomers", "Searches", "the", "customer", "profiles", "associated", "with", "a", "Square", "account", ".", "Calling", "SearchCustomers", "without", "an", "explicit", "query", "parameter", "returns", "all", "customer", "profiles", "ordered", "alphabetically", "...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L374-L377
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.adjust_inventory
def adjust_inventory(location_id, variation_id, body, opts = {}) data, _status_code, _headers = adjust_inventory_with_http_info(location_id, variation_id, body, opts) return data end
ruby
def adjust_inventory(location_id, variation_id, body, opts = {}) data, _status_code, _headers = adjust_inventory_with_http_info(location_id, variation_id, body, opts) return data end
[ "def", "adjust_inventory", "(", "location_id", ",", "variation_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "adjust_inventory_with_http_info", "(", "location_id", ",", "variation_id", ",", "body", ",", "...
AdjustInventory Adjusts an item variation's current available inventory. @param location_id The ID of the item's associated location. @param variation_id The ID of the variation to adjust inventory information for. @param body An object containing the fields to POST for the request. See the corresponding objec...
[ "AdjustInventory", "Adjusts", "an", "item", "variation", "s", "current", "available", "inventory", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L27-L30
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.apply_fee
def apply_fee(location_id, item_id, fee_id, opts = {}) data, _status_code, _headers = apply_fee_with_http_info(location_id, item_id, fee_id, opts) return data end
ruby
def apply_fee(location_id, item_id, fee_id, opts = {}) data, _status_code, _headers = apply_fee_with_http_info(location_id, item_id, fee_id, opts) return data end
[ "def", "apply_fee", "(", "location_id", ",", "item_id", ",", "fee_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "apply_fee_with_http_info", "(", "location_id", ",", "item_id", ",", "fee_id", ",", "opts", ")", "ret...
ApplyFee Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register. @param location_id The ID of the fee's associated location. @param item_id The ID of the item to add the fee to. @param fee_id The ID of the fee to apply. @param [Hash] opts the optional parameters ...
[ "ApplyFee", "Associates", "a", "fee", "with", "an", "item", "meaning", "the", "fee", "is", "automatically", "applied", "to", "the", "item", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L90-L93
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.apply_modifier_list
def apply_modifier_list(location_id, modifier_list_id, item_id, opts = {}) data, _status_code, _headers = apply_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts) return data end
ruby
def apply_modifier_list(location_id, modifier_list_id, item_id, opts = {}) data, _status_code, _headers = apply_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts) return data end
[ "def", "apply_modifier_list", "(", "location_id", ",", "modifier_list_id", ",", "item_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "apply_modifier_list_with_http_info", "(", "location_id", ",", "modifier_list_id", ",", "...
ApplyModifierList Associates a modifier list with an item, meaning modifier options from the list can be applied to the item. @param location_id The ID of the item's associated location. @param modifier_list_id The ID of the modifier list to apply. @param item_id The ID of the item to add the modifier list to. ...
[ "ApplyModifierList", "Associates", "a", "modifier", "list", "with", "an", "item", "meaning", "modifier", "options", "from", "the", "list", "can", "be", "applied", "to", "the", "item", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L153-L156
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_category
def create_category(location_id, body, opts = {}) data, _status_code, _headers = create_category_with_http_info(location_id, body, opts) return data end
ruby
def create_category(location_id, body, opts = {}) data, _status_code, _headers = create_category_with_http_info(location_id, body, opts) return data end
[ "def", "create_category", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_category_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
CreateCategory Creates an item category. @param location_id The ID of the location to create an item for. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1Category]
[ "CreateCategory", "Creates", "an", "item", "category", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L215-L218
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_discount
def create_discount(location_id, body, opts = {}) data, _status_code, _headers = create_discount_with_http_info(location_id, body, opts) return data end
ruby
def create_discount(location_id, body, opts = {}) data, _status_code, _headers = create_discount_with_http_info(location_id, body, opts) return data end
[ "def", "create_discount", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_discount_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
CreateDiscount Creates a discount. @param location_id The ID of the location to create an item for. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1Discount]
[ "CreateDiscount", "Creates", "a", "discount", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L274-L277
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_item
def create_item(location_id, body, opts = {}) data, _status_code, _headers = create_item_with_http_info(location_id, body, opts) return data end
ruby
def create_item(location_id, body, opts = {}) data, _status_code, _headers = create_item_with_http_info(location_id, body, opts) return data end
[ "def", "create_item", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_item_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
CreateItem Creates an item and at least one variation for it. Item-related entities include fields you can use to associate them with entities in a non-Square system. When you create an item-related entity, you can optionally specify its `id`. This value must be unique among all IDs ever specified for the account, in...
[ "CreateItem", "Creates", "an", "item", "and", "at", "least", "one", "variation", "for", "it", ".", "Item", "-", "related", "entities", "include", "fields", "you", "can", "use", "to", "associate", "them", "with", "entities", "in", "a", "non", "-", "Square",...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L392-L395
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_modifier_list
def create_modifier_list(location_id, body, opts = {}) data, _status_code, _headers = create_modifier_list_with_http_info(location_id, body, opts) return data end
ruby
def create_modifier_list(location_id, body, opts = {}) data, _status_code, _headers = create_modifier_list_with_http_info(location_id, body, opts) return data end
[ "def", "create_modifier_list", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_modifier_list_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end...
CreateModifierList Creates an item modifier list and at least one modifier option for it. @param location_id The ID of the location to create a modifier list for. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the o...
[ "CreateModifierList", "Creates", "an", "item", "modifier", "list", "and", "at", "least", "one", "modifier", "option", "for", "it", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L451-L454
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_modifier_option
def create_modifier_option(location_id, modifier_list_id, body, opts = {}) data, _status_code, _headers = create_modifier_option_with_http_info(location_id, modifier_list_id, body, opts) return data end
ruby
def create_modifier_option(location_id, modifier_list_id, body, opts = {}) data, _status_code, _headers = create_modifier_option_with_http_info(location_id, modifier_list_id, body, opts) return data end
[ "def", "create_modifier_option", "(", "location_id", ",", "modifier_list_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_modifier_option_with_http_info", "(", "location_id", ",", "modifier_list_id", ",", ...
CreateModifierOption Creates an item modifier option and adds it to a modifier list. @param location_id The ID of the item's associated location. @param modifier_list_id The ID of the modifier list to edit. @param body An object containing the fields to POST for the request. See the corresponding object defini...
[ "CreateModifierOption", "Creates", "an", "item", "modifier", "option", "and", "adds", "it", "to", "a", "modifier", "list", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L511-L514
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_page
def create_page(location_id, body, opts = {}) data, _status_code, _headers = create_page_with_http_info(location_id, body, opts) return data end
ruby
def create_page(location_id, body, opts = {}) data, _status_code, _headers = create_page_with_http_info(location_id, body, opts) return data end
[ "def", "create_page", "(", "location_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_page_with_http_info", "(", "location_id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
CreatePage Creates a Favorites page in Square Register. @param location_id The ID of the location to create an item for. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [V1Page]
[ "CreatePage", "Creates", "a", "Favorites", "page", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L573-L576
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.create_variation
def create_variation(location_id, item_id, body, opts = {}) data, _status_code, _headers = create_variation_with_http_info(location_id, item_id, body, opts) return data end
ruby
def create_variation(location_id, item_id, body, opts = {}) data, _status_code, _headers = create_variation_with_http_info(location_id, item_id, body, opts) return data end
[ "def", "create_variation", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "create_variation_with_http_info", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", "...
CreateVariation Creates an item variation for an existing item. @param location_id The ID of the item's associated location. @param item_id The item's ID. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the ...
[ "CreateVariation", "Creates", "an", "item", "variation", "for", "an", "existing", "item", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L633-L636
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_categories
def list_categories(location_id, opts = {}) data, _status_code, _headers = list_categories_with_http_info(location_id, opts) return data end
ruby
def list_categories(location_id, opts = {}) data, _status_code, _headers = list_categories_with_http_info(location_id, opts) return data end
[ "def", "list_categories", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_categories_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListCategories Lists all of a location's item categories. @param location_id The ID of the location to list categories for. @param [Hash] opts the optional parameters @return [Array<V1Category>]
[ "ListCategories", "Lists", "all", "of", "a", "location", "s", "item", "categories", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1239-L1242
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_discounts
def list_discounts(location_id, opts = {}) data, _status_code, _headers = list_discounts_with_http_info(location_id, opts) return data end
ruby
def list_discounts(location_id, opts = {}) data, _status_code, _headers = list_discounts_with_http_info(location_id, opts) return data end
[ "def", "list_discounts", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_discounts_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListDiscounts Lists all of a location's discounts. @param location_id The ID of the location to list categories for. @param [Hash] opts the optional parameters @return [Array<V1Discount>]
[ "ListDiscounts", "Lists", "all", "of", "a", "location", "s", "discounts", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1294-L1297
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_inventory
def list_inventory(location_id, opts = {}) data, _status_code, _headers = list_inventory_with_http_info(location_id, opts) return data end
ruby
def list_inventory(location_id, opts = {}) data, _status_code, _headers = list_inventory_with_http_info(location_id, opts) return data end
[ "def", "list_inventory", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_inventory_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListInventory Provides inventory information for all of a merchant's inventory-enabled item variations. @param location_id The ID of the item&#39;s associated location. @param [Hash] opts the optional parameters @option opts [Integer] :limit The maximum number of inventory entries to return in a single response. Th...
[ "ListInventory", "Provides", "inventory", "information", "for", "all", "of", "a", "merchant", "s", "inventory", "-", "enabled", "item", "variations", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1406-L1409
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_items
def list_items(location_id, opts = {}) data, _status_code, _headers = list_items_with_http_info(location_id, opts) return data end
ruby
def list_items(location_id, opts = {}) data, _status_code, _headers = list_items_with_http_info(location_id, opts) return data end
[ "def", "list_items", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_items_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListItems Provides summary information for all of a location's items. @param location_id The ID of the location to list items for. @param [Hash] opts the optional parameters @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint. @return [...
[ "ListItems", "Provides", "summary", "information", "for", "all", "of", "a", "location", "s", "items", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1466-L1469
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_modifier_lists
def list_modifier_lists(location_id, opts = {}) data, _status_code, _headers = list_modifier_lists_with_http_info(location_id, opts) return data end
ruby
def list_modifier_lists(location_id, opts = {}) data, _status_code, _headers = list_modifier_lists_with_http_info(location_id, opts) return data end
[ "def", "list_modifier_lists", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_modifier_lists_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListModifierLists Lists all of a location's modifier lists. @param location_id The ID of the location to list modifier lists for. @param [Hash] opts the optional parameters @return [Array<V1ModifierList>]
[ "ListModifierLists", "Lists", "all", "of", "a", "location", "s", "modifier", "lists", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1523-L1526
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.list_pages
def list_pages(location_id, opts = {}) data, _status_code, _headers = list_pages_with_http_info(location_id, opts) return data end
ruby
def list_pages(location_id, opts = {}) data, _status_code, _headers = list_pages_with_http_info(location_id, opts) return data end
[ "def", "list_pages", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_pages_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListPages Lists all of a location's Favorites pages in Square Register. @param location_id The ID of the location to list Favorites pages for. @param [Hash] opts the optional parameters @return [Array<V1Page>]
[ "ListPages", "Lists", "all", "of", "a", "location", "s", "Favorites", "pages", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1578-L1581
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.remove_fee
def remove_fee(location_id, item_id, fee_id, opts = {}) data, _status_code, _headers = remove_fee_with_http_info(location_id, item_id, fee_id, opts) return data end
ruby
def remove_fee(location_id, item_id, fee_id, opts = {}) data, _status_code, _headers = remove_fee_with_http_info(location_id, item_id, fee_id, opts) return data end
[ "def", "remove_fee", "(", "location_id", ",", "item_id", ",", "fee_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "remove_fee_with_http_info", "(", "location_id", ",", "item_id", ",", "fee_id", ",", "opts", ")", "r...
RemoveFee Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register. @param location_id The ID of the fee&#39;s associated location. @param item_id The ID of the item to add the fee to. @param fee_id The ID of the fee to apply. @param [Hash] opts the o...
[ "RemoveFee", "Removes", "a", "fee", "assocation", "from", "an", "item", "meaning", "the", "fee", "is", "no", "longer", "automatically", "applied", "to", "the", "item", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1635-L1638
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.remove_modifier_list
def remove_modifier_list(location_id, modifier_list_id, item_id, opts = {}) data, _status_code, _headers = remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts) return data end
ruby
def remove_modifier_list(location_id, modifier_list_id, item_id, opts = {}) data, _status_code, _headers = remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts) return data end
[ "def", "remove_modifier_list", "(", "location_id", ",", "modifier_list_id", ",", "item_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "remove_modifier_list_with_http_info", "(", "location_id", ",", "modifier_list_id", ",", ...
RemoveModifierList Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item. @param location_id The ID of the item&#39;s associated location. @param modifier_list_id The ID of the modifier list to remove. @param item_id The ID of the item to remov...
[ "RemoveModifierList", "Removes", "a", "modifier", "list", "association", "from", "an", "item", "meaning", "modifier", "options", "from", "the", "list", "can", "no", "longer", "be", "applied", "to", "the", "item", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1698-L1701
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.retrieve_item
def retrieve_item(location_id, item_id, opts = {}) data, _status_code, _headers = retrieve_item_with_http_info(location_id, item_id, opts) return data end
ruby
def retrieve_item(location_id, item_id, opts = {}) data, _status_code, _headers = retrieve_item_with_http_info(location_id, item_id, opts) return data end
[ "def", "retrieve_item", "(", "location_id", ",", "item_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_item_with_http_info", "(", "location_id", ",", "item_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveItem Provides the details for a single item, including associated modifier lists and fees. @param location_id The ID of the item&#39;s associated location. @param item_id The item&#39;s ID. @param [Hash] opts the optional parameters @return [V1Item]
[ "RetrieveItem", "Provides", "the", "details", "for", "a", "single", "item", "including", "associated", "modifier", "lists", "and", "fees", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1760-L1763
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.retrieve_modifier_list
def retrieve_modifier_list(location_id, modifier_list_id, opts = {}) data, _status_code, _headers = retrieve_modifier_list_with_http_info(location_id, modifier_list_id, opts) return data end
ruby
def retrieve_modifier_list(location_id, modifier_list_id, opts = {}) data, _status_code, _headers = retrieve_modifier_list_with_http_info(location_id, modifier_list_id, opts) return data end
[ "def", "retrieve_modifier_list", "(", "location_id", ",", "modifier_list_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_modifier_list_with_http_info", "(", "location_id", ",", "modifier_list_id", ",", "opts", ")", ...
RetrieveModifierList Provides the details for a single modifier list. @param location_id The ID of the item&#39;s associated location. @param modifier_list_id The modifier list&#39;s ID. @param [Hash] opts the optional parameters @return [V1ModifierList]
[ "RetrieveModifierList", "Provides", "the", "details", "for", "a", "single", "modifier", "list", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1819-L1822
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_category
def update_category(location_id, category_id, body, opts = {}) data, _status_code, _headers = update_category_with_http_info(location_id, category_id, body, opts) return data end
ruby
def update_category(location_id, category_id, body, opts = {}) data, _status_code, _headers = update_category_with_http_info(location_id, category_id, body, opts) return data end
[ "def", "update_category", "(", "location_id", ",", "category_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_category_with_http_info", "(", "location_id", ",", "category_id", ",", "body", ",", "opts...
UpdateCategory Modifies the details of an existing item category. @param location_id The ID of the category&#39;s associated location. @param category_id The ID of the category to edit. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. ...
[ "UpdateCategory", "Modifies", "the", "details", "of", "an", "existing", "item", "category", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1879-L1882
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_discount
def update_discount(location_id, discount_id, body, opts = {}) data, _status_code, _headers = update_discount_with_http_info(location_id, discount_id, body, opts) return data end
ruby
def update_discount(location_id, discount_id, body, opts = {}) data, _status_code, _headers = update_discount_with_http_info(location_id, discount_id, body, opts) return data end
[ "def", "update_discount", "(", "location_id", ",", "discount_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_discount_with_http_info", "(", "location_id", ",", "discount_id", ",", "body", ",", "opts...
UpdateDiscount Modifies the details of an existing discount. @param location_id The ID of the category&#39;s associated location. @param discount_id The ID of the discount to edit. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @para...
[ "UpdateDiscount", "Modifies", "the", "details", "of", "an", "existing", "discount", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1942-L1945
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_item
def update_item(location_id, item_id, body, opts = {}) data, _status_code, _headers = update_item_with_http_info(location_id, item_id, body, opts) return data end
ruby
def update_item(location_id, item_id, body, opts = {}) data, _status_code, _headers = update_item_with_http_info(location_id, item_id, body, opts) return data end
[ "def", "update_item", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_item_with_http_info", "(", "location_id", ",", "item_id", ",", "body", ",", "opts", ")", "ret...
UpdateItem Modifies the core details of an existing item. @param location_id The ID of the item&#39;s associated location. @param item_id The ID of the item to modify. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts...
[ "UpdateItem", "Modifies", "the", "core", "details", "of", "an", "existing", "item", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2068-L2071
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_modifier_list
def update_modifier_list(location_id, modifier_list_id, body, opts = {}) data, _status_code, _headers = update_modifier_list_with_http_info(location_id, modifier_list_id, body, opts) return data end
ruby
def update_modifier_list(location_id, modifier_list_id, body, opts = {}) data, _status_code, _headers = update_modifier_list_with_http_info(location_id, modifier_list_id, body, opts) return data end
[ "def", "update_modifier_list", "(", "location_id", ",", "modifier_list_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_modifier_list_with_http_info", "(", "location_id", ",", "modifier_list_id", ",", "b...
UpdateModifierList Modifies the details of an existing item modifier list. @param location_id The ID of the item&#39;s associated location. @param modifier_list_id The ID of the modifier list to edit. @param body An object containing the fields to POST for the request. See the corresponding object definition for f...
[ "UpdateModifierList", "Modifies", "the", "details", "of", "an", "existing", "item", "modifier", "list", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2131-L2134
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_modifier_option
def update_modifier_option(location_id, modifier_list_id, modifier_option_id, body, opts = {}) data, _status_code, _headers = update_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, body, opts) return data end
ruby
def update_modifier_option(location_id, modifier_list_id, modifier_option_id, body, opts = {}) data, _status_code, _headers = update_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, body, opts) return data end
[ "def", "update_modifier_option", "(", "location_id", ",", "modifier_list_id", ",", "modifier_option_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_modifier_option_with_http_info", "(", "location_id", ","...
UpdateModifierOption Modifies the details of an existing item modifier option. @param location_id The ID of the item&#39;s associated location. @param modifier_list_id The ID of the modifier list to edit. @param modifier_option_id The ID of the modifier list to edit. @param body An object containing the fields to ...
[ "UpdateModifierOption", "Modifies", "the", "details", "of", "an", "existing", "item", "modifier", "option", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2195-L2198
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_page
def update_page(location_id, page_id, body, opts = {}) data, _status_code, _headers = update_page_with_http_info(location_id, page_id, body, opts) return data end
ruby
def update_page(location_id, page_id, body, opts = {}) data, _status_code, _headers = update_page_with_http_info(location_id, page_id, body, opts) return data end
[ "def", "update_page", "(", "location_id", ",", "page_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_page_with_http_info", "(", "location_id", ",", "page_id", ",", "body", ",", "opts", ")", "ret...
UpdatePage Modifies the details of a Favorites page in Square Register. @param location_id The ID of the Favorites page&#39;s associated location @param page_id The ID of the page to modify. @param body An object containing the fields to POST for the request. See the corresponding object definition for field detai...
[ "UpdatePage", "Modifies", "the", "details", "of", "a", "Favorites", "page", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2261-L2264
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_page_cell
def update_page_cell(location_id, page_id, body, opts = {}) data, _status_code, _headers = update_page_cell_with_http_info(location_id, page_id, body, opts) return data end
ruby
def update_page_cell(location_id, page_id, body, opts = {}) data, _status_code, _headers = update_page_cell_with_http_info(location_id, page_id, body, opts) return data end
[ "def", "update_page_cell", "(", "location_id", ",", "page_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_page_cell_with_http_info", "(", "location_id", ",", "page_id", ",", "body", ",", "opts", "...
UpdatePageCell Modifies a cell of a Favorites page in Square Register. @param location_id The ID of the Favorites page&#39;s associated location. @param page_id The ID of the page the cell belongs to. @param body An object containing the fields to POST for the request. See the corresponding object definition for f...
[ "UpdatePageCell", "Modifies", "a", "cell", "of", "a", "Favorites", "page", "in", "Square", "Register", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2324-L2327
train
square/connect-ruby-sdk
lib/square_connect/api/v1_items_api.rb
SquareConnect.V1ItemsApi.update_variation
def update_variation(location_id, item_id, variation_id, body, opts = {}) data, _status_code, _headers = update_variation_with_http_info(location_id, item_id, variation_id, body, opts) return data end
ruby
def update_variation(location_id, item_id, variation_id, body, opts = {}) data, _status_code, _headers = update_variation_with_http_info(location_id, item_id, variation_id, body, opts) return data end
[ "def", "update_variation", "(", "location_id", ",", "item_id", ",", "variation_id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_variation_with_http_info", "(", "location_id", ",", "item_id", ",", "va...
UpdateVariation Modifies the details of an existing item variation. @param location_id The ID of the item&#39;s associated location. @param item_id The ID of the item to modify. @param variation_id The ID of the variation to modify. @param body An object containing the fields to POST for the request. See the corr...
[ "UpdateVariation", "Modifies", "the", "details", "of", "an", "existing", "item", "variation", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2388-L2391
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.delete_break_type
def delete_break_type(id, opts = {}) data, _status_code, _headers = delete_break_type_with_http_info(id, opts) return data end
ruby
def delete_break_type(id, opts = {}) data, _status_code, _headers = delete_break_type_with_http_info(id, opts) return data end
[ "def", "delete_break_type", "(", "id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "delete_break_type_with_http_info", "(", "id", ",", "opts", ")", "return", "data", "end" ]
DeleteBreakType Deletes an existing `BreakType`. A `BreakType` can be deleted even if it is referenced from a `Shift`. @param id UUID for the &#x60;BreakType&#x60; being deleted. @param [Hash] opts the optional parameters @return [DeleteBreakTypeResponse]
[ "DeleteBreakType", "Deletes", "an", "existing", "BreakType", ".", "A", "BreakType", "can", "be", "deleted", "even", "if", "it", "is", "referenced", "from", "a", "Shift", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L135-L138
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.delete_shift
def delete_shift(id, opts = {}) data, _status_code, _headers = delete_shift_with_http_info(id, opts) return data end
ruby
def delete_shift(id, opts = {}) data, _status_code, _headers = delete_shift_with_http_info(id, opts) return data end
[ "def", "delete_shift", "(", "id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "delete_shift_with_http_info", "(", "id", ",", "opts", ")", "return", "data", "end" ]
DeleteShift Deletes a `Shift`. @param id UUID for the &#x60;Shift&#x60; being deleted. @param [Hash] opts the optional parameters @return [DeleteShiftResponse]
[ "DeleteShift", "Deletes", "a", "Shift", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L190-L193
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.get_break_type
def get_break_type(id, opts = {}) data, _status_code, _headers = get_break_type_with_http_info(id, opts) return data end
ruby
def get_break_type(id, opts = {}) data, _status_code, _headers = get_break_type_with_http_info(id, opts) return data end
[ "def", "get_break_type", "(", "id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "get_break_type_with_http_info", "(", "id", ",", "opts", ")", "return", "data", "end" ]
GetBreakType Returns a single `BreakType` specified by id. @param id UUID for the &#x60;BreakType&#x60; being retrieved. @param [Hash] opts the optional parameters @return [GetBreakTypeResponse]
[ "GetBreakType", "Returns", "a", "single", "BreakType", "specified", "by", "id", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L245-L248
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.get_employee_wage
def get_employee_wage(id, opts = {}) data, _status_code, _headers = get_employee_wage_with_http_info(id, opts) return data end
ruby
def get_employee_wage(id, opts = {}) data, _status_code, _headers = get_employee_wage_with_http_info(id, opts) return data end
[ "def", "get_employee_wage", "(", "id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "get_employee_wage_with_http_info", "(", "id", ",", "opts", ")", "return", "data", "end" ]
GetEmployeeWage Returns a single `EmployeeWage` specified by id. @param id UUID for the &#x60;EmployeeWage&#x60; being retrieved. @param [Hash] opts the optional parameters @return [GetEmployeeWageResponse]
[ "GetEmployeeWage", "Returns", "a", "single", "EmployeeWage", "specified", "by", "id", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L300-L303
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.get_shift
def get_shift(id, opts = {}) data, _status_code, _headers = get_shift_with_http_info(id, opts) return data end
ruby
def get_shift(id, opts = {}) data, _status_code, _headers = get_shift_with_http_info(id, opts) return data end
[ "def", "get_shift", "(", "id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "get_shift_with_http_info", "(", "id", ",", "opts", ")", "return", "data", "end" ]
GetShift Returns a single `Shift` specified by id. @param id UUID for the &#x60;Shift&#x60; being retrieved. @param [Hash] opts the optional parameters @return [GetShiftResponse]
[ "GetShift", "Returns", "a", "single", "Shift", "specified", "by", "id", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L355-L358
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.update_break_type
def update_break_type(id, body, opts = {}) data, _status_code, _headers = update_break_type_with_http_info(id, body, opts) return data end
ruby
def update_break_type(id, body, opts = {}) data, _status_code, _headers = update_break_type_with_http_info(id, body, opts) return data end
[ "def", "update_break_type", "(", "id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_break_type_with_http_info", "(", "id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateBreakType Updates an existing `BreakType`. @param id UUID for the &#x60;BreakType&#x60; being updated. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [UpdateBreakTypeResponse]
[ "UpdateBreakType", "Updates", "an", "existing", "BreakType", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L643-L646
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.update_shift
def update_shift(id, body, opts = {}) data, _status_code, _headers = update_shift_with_http_info(id, body, opts) return data end
ruby
def update_shift(id, body, opts = {}) data, _status_code, _headers = update_shift_with_http_info(id, body, opts) return data end
[ "def", "update_shift", "(", "id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_shift_with_http_info", "(", "id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateShift Updates an existing `Shift`. When adding a `Break` to a `Shift`, any earlier `Breaks` in the `Shift` have the `end_at` property set to a valid RFC-3339 datetime string. When closing a `Shift`, all `Break` instances in the shift must be complete with `end_at` set on each `Break`. @param id ID of the o...
[ "UpdateShift", "Updates", "an", "existing", "Shift", ".", "When", "adding", "a", "Break", "to", "a", "Shift", "any", "earlier", "Breaks", "in", "the", "Shift", "have", "the", "end_at", "property", "set", "to", "a", "valid", "RFC", "-", "3339", "datetime", ...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L702-L705
train
square/connect-ruby-sdk
lib/square_connect/api/labor_api.rb
SquareConnect.LaborApi.update_workweek_config
def update_workweek_config(id, body, opts = {}) data, _status_code, _headers = update_workweek_config_with_http_info(id, body, opts) return data end
ruby
def update_workweek_config(id, body, opts = {}) data, _status_code, _headers = update_workweek_config_with_http_info(id, body, opts) return data end
[ "def", "update_workweek_config", "(", "id", ",", "body", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "update_workweek_config_with_http_info", "(", "id", ",", "body", ",", "opts", ")", "return", "data", "end" ]
UpdateWorkweekConfig Updates a `WorkweekConfig`. @param id UUID for the &#x60;WorkweekConfig&#x60; object being updated. @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. @param [Hash] opts the optional parameters @return [UpdateWorkwee...
[ "UpdateWorkweekConfig", "Updates", "a", "WorkweekConfig", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L761-L764
train
square/connect-ruby-sdk
lib/square_connect/api/transactions_api.rb
SquareConnect.TransactionsApi.retrieve_transaction
def retrieve_transaction(location_id, transaction_id, opts = {}) data, _status_code, _headers = retrieve_transaction_with_http_info(location_id, transaction_id, opts) return data end
ruby
def retrieve_transaction(location_id, transaction_id, opts = {}) data, _status_code, _headers = retrieve_transaction_with_http_info(location_id, transaction_id, opts) return data end
[ "def", "retrieve_transaction", "(", "location_id", ",", "transaction_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_transaction_with_http_info", "(", "location_id", ",", "transaction_id", ",", "opts", ")", "retur...
RetrieveTransaction Retrieves details for a single transaction. @param location_id The ID of the transaction&#39;s associated location. @param transaction_id The ID of the transaction to retrieve. @param [Hash] opts the optional parameters @return [RetrieveTransactionResponse]
[ "RetrieveTransaction", "Retrieves", "details", "for", "a", "single", "transaction", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/transactions_api.rb#L347-L350
train
square/connect-ruby-sdk
lib/square_connect/api/v1_transactions_api.rb
SquareConnect.V1TransactionsApi.list_bank_accounts
def list_bank_accounts(location_id, opts = {}) data, _status_code, _headers = list_bank_accounts_with_http_info(location_id, opts) return data end
ruby
def list_bank_accounts(location_id, opts = {}) data, _status_code, _headers = list_bank_accounts_with_http_info(location_id, opts) return data end
[ "def", "list_bank_accounts", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_bank_accounts_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListBankAccounts Provides non-confidential details for all of a location's associated bank accounts. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. @param location_id The ID of the location to list bank accounts for. @param [Ha...
[ "ListBankAccounts", "Provides", "non", "-", "confidential", "details", "for", "all", "of", "a", "location", "s", "associated", "bank", "accounts", ".", "This", "endpoint", "does", "not", "provide", "full", "bank", "account", "numbers", "and", "there", "is", "n...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L84-L87
train
square/connect-ruby-sdk
lib/square_connect/api/v1_transactions_api.rb
SquareConnect.V1TransactionsApi.list_orders
def list_orders(location_id, opts = {}) data, _status_code, _headers = list_orders_with_http_info(location_id, opts) return data end
ruby
def list_orders(location_id, opts = {}) data, _status_code, _headers = list_orders_with_http_info(location_id, opts) return data end
[ "def", "list_orders", "(", "location_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "list_orders_with_http_info", "(", "location_id", ",", "opts", ")", "return", "data", "end" ]
ListOrders Provides summary information for a merchant's online store orders. @param location_id The ID of the location to list online store orders for. @param [Hash] opts the optional parameters @option opts [String] :order TThe order in which payments are listed in the response. @option opts [Integer] :limit The...
[ "ListOrders", "Provides", "summary", "information", "for", "a", "merchant", "s", "online", "store", "orders", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L142-L145
train
square/connect-ruby-sdk
lib/square_connect/api/v1_transactions_api.rb
SquareConnect.V1TransactionsApi.retrieve_bank_account
def retrieve_bank_account(location_id, bank_account_id, opts = {}) data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts) return data end
ruby
def retrieve_bank_account(location_id, bank_account_id, opts = {}) data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts) return data end
[ "def", "retrieve_bank_account", "(", "location_id", ",", "bank_account_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_bank_account_with_http_info", "(", "location_id", ",", "bank_account_id", ",", "opts", ")", "r...
RetrieveBankAccount Provides non-confidential details for a merchant's associated bank account. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. @param location_id The ID of the bank account&#39;s associated location. @param bank...
[ "RetrieveBankAccount", "Provides", "non", "-", "confidential", "details", "for", "a", "merchant", "s", "associated", "bank", "account", ".", "This", "endpoint", "does", "not", "provide", "full", "bank", "account", "numbers", "and", "there", "is", "no", "way", ...
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L435-L438
train
square/connect-ruby-sdk
lib/square_connect/api/v1_transactions_api.rb
SquareConnect.V1TransactionsApi.retrieve_order
def retrieve_order(location_id, order_id, opts = {}) data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts) return data end
ruby
def retrieve_order(location_id, order_id, opts = {}) data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts) return data end
[ "def", "retrieve_order", "(", "location_id", ",", "order_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_order_with_http_info", "(", "location_id", ",", "order_id", ",", "opts", ")", "return", "data", "end" ]
RetrieveOrder Provides comprehensive information for a single online store order, including the order's history. @param location_id The ID of the order&#39;s associated location. @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint @param [H...
[ "RetrieveOrder", "Provides", "comprehensive", "information", "for", "a", "single", "online", "store", "order", "including", "the", "order", "s", "history", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L494-L497
train
square/connect-ruby-sdk
lib/square_connect/api/v1_transactions_api.rb
SquareConnect.V1TransactionsApi.retrieve_payment
def retrieve_payment(location_id, payment_id, opts = {}) data, _status_code, _headers = retrieve_payment_with_http_info(location_id, payment_id, opts) return data end
ruby
def retrieve_payment(location_id, payment_id, opts = {}) data, _status_code, _headers = retrieve_payment_with_http_info(location_id, payment_id, opts) return data end
[ "def", "retrieve_payment", "(", "location_id", ",", "payment_id", ",", "opts", "=", "{", "}", ")", "data", ",", "_status_code", ",", "_headers", "=", "retrieve_payment_with_http_info", "(", "location_id", ",", "payment_id", ",", "opts", ")", "return", "data", ...
RetrievePayment Provides comprehensive information for a single payment. @param location_id The ID of the payment&#39;s associated location. @param payment_id The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlement...
[ "RetrievePayment", "Provides", "comprehensive", "information", "for", "a", "single", "payment", "." ]
798eb9ded716f23b9f1518386f1c311a34bca8bf
https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L553-L556
train
GetStream/stream-rails
lib/stream_rails/utils/view_helpers.rb
StreamRails.ViewHelpers.render_activities
def render_activities(activities, options = {}) activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe end
ruby
def render_activities(activities, options = {}) activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe end
[ "def", "render_activities", "(", "activities", ",", "options", "=", "{", "}", ")", "activities", ".", "map", "{", "|", "activity", "|", "Renderable", ".", "render", "(", "activity", ",", "self", ",", "options", ".", "dup", ")", "}", ".", "join", ".", ...
View helper for rendering many activities
[ "View", "helper", "for", "rendering", "many", "activities" ]
8ffa4f144169f1f31465c83f0401bad473630994
https://github.com/GetStream/stream-rails/blob/8ffa4f144169f1f31465c83f0401bad473630994/lib/stream_rails/utils/view_helpers.rb#L11-L13
train
dry-rb/dry-initializer
lib/dry/initializer/config.rb
Dry::Initializer.Config.param
def param(name, type = nil, **opts, &block) add_definition(false, name, type, block, opts) end
ruby
def param(name, type = nil, **opts, &block) add_definition(false, name, type, block, opts) end
[ "def", "param", "(", "name", ",", "type", "=", "nil", ",", "**", "opts", ",", "&", "block", ")", "add_definition", "(", "false", ",", "name", ",", "type", ",", "block", ",", "opts", ")", "end" ]
Adds or redefines a parameter @param [Symbol] name @param [#call, nil] type (nil) @option opts [Proc] :default @option opts [Boolean] :optional @option opts [Symbol] :as @option opts [true, false, :protected, :public, :private] :reader @return [self] itself
[ "Adds", "or", "redefines", "a", "parameter" ]
422d331468602ff0d3543fbb336b784343e5cc31
https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L60-L62
train
dry-rb/dry-initializer
lib/dry/initializer/config.rb
Dry::Initializer.Config.inch
def inch line = Builders::Signature[self] line = line.gsub("__dry_initializer_options__", "options") lines = ["@!method initialize(#{line})"] lines += ["Initializes an instance of #{extended_class}"] lines += definitions.values.map(&:inch) lines += ["@return [#{extended_class}]"...
ruby
def inch line = Builders::Signature[self] line = line.gsub("__dry_initializer_options__", "options") lines = ["@!method initialize(#{line})"] lines += ["Initializes an instance of #{extended_class}"] lines += definitions.values.map(&:inch) lines += ["@return [#{extended_class}]"...
[ "def", "inch", "line", "=", "Builders", "::", "Signature", "[", "self", "]", "line", "=", "line", ".", "gsub", "(", "\"__dry_initializer_options__\"", ",", "\"options\"", ")", "lines", "=", "[", "\"@!method initialize(#{line})\"", "]", "lines", "+=", "[", "\"I...
Human-readable representation of configured params and options @return [String]
[ "Human", "-", "readable", "representation", "of", "configured", "params", "and", "options" ]
422d331468602ff0d3543fbb336b784343e5cc31
https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L115-L123
train
dry-rb/dry-initializer
lib/dry/initializer/dsl.rb
Dry::Initializer.DSL.[]
def [](undefined: true, **) null = (undefined == false) ? nil : UNDEFINED Module.new.tap do |mod| mod.extend DSL mod.include self mod.send(:instance_variable_set, :@null, null) end end
ruby
def [](undefined: true, **) null = (undefined == false) ? nil : UNDEFINED Module.new.tap do |mod| mod.extend DSL mod.include self mod.send(:instance_variable_set, :@null, null) end end
[ "def", "[]", "(", "undefined", ":", "true", ",", "**", ")", "null", "=", "(", "undefined", "==", "false", ")", "?", "nil", ":", "UNDEFINED", "Module", ".", "new", ".", "tap", "do", "|", "mod", "|", "mod", ".", "extend", "DSL", "mod", ".", "includ...
Returns a version of the module with custom settings @option settings [Boolean] :undefined If unassigned params and options should be treated different from nil @return [Dry::Initializer]
[ "Returns", "a", "version", "of", "the", "module", "with", "custom", "settings" ]
422d331468602ff0d3543fbb336b784343e5cc31
https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/dsl.rb#L12-L19
train
dry-rb/dry-initializer
lib/dry/initializer/dsl.rb
Dry::Initializer.DSL.define
def define(procedure = nil, &block) config = Config.new(null: null) config.instance_exec(&(procedure || block)) config.mixin.include Mixin::Root config.mixin end
ruby
def define(procedure = nil, &block) config = Config.new(null: null) config.instance_exec(&(procedure || block)) config.mixin.include Mixin::Root config.mixin end
[ "def", "define", "(", "procedure", "=", "nil", ",", "&", "block", ")", "config", "=", "Config", ".", "new", "(", "null", ":", "null", ")", "config", ".", "instance_exec", "(", "(", "procedure", "||", "block", ")", ")", "config", ".", "mixin", ".", ...
Returns mixin module to be included to target class by hand @return [Module] @yield proc defining params and options
[ "Returns", "mixin", "module", "to", "be", "included", "to", "target", "class", "by", "hand" ]
422d331468602ff0d3543fbb336b784343e5cc31
https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/dsl.rb#L24-L29
train
appium/ruby_lib
lib/appium_lib/android/common/helper.rb
Appium.Android.get_android_inspect
def get_android_inspect(class_name = false) source = get_source doctype_string = '<!doctyp' source_header = source[0..doctype_string.length].downcase source_is_html = source_header.start_with?(doctype_string, '<html') parser = if source_is_html # parse html from webview ...
ruby
def get_android_inspect(class_name = false) source = get_source doctype_string = '<!doctyp' source_header = source[0..doctype_string.length].downcase source_is_html = source_header.start_with?(doctype_string, '<html') parser = if source_is_html # parse html from webview ...
[ "def", "get_android_inspect", "(", "class_name", "=", "false", ")", "source", "=", "get_source", "doctype_string", "=", "'<!doctyp'", "source_header", "=", "source", "[", "0", "..", "doctype_string", ".", "length", "]", ".", "downcase", "source_is_html", "=", "s...
class AndroidElements Android only. Returns a string containing interesting elements. The text, content description, and id are returned. @param class_name [String] the class name to filter on. if false (default) then all classes will be inspected @return [String]
[ "class", "AndroidElements", "Android", "only", ".", "Returns", "a", "string", "containing", "interesting", "elements", ".", "The", "text", "content", "description", "and", "id", "are", "returned", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L95-L113
train
appium/ruby_lib
lib/appium_lib/android/common/helper.rb
Appium.Android.page
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts puts get_android_inspect class_name nil end
ruby
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts puts get_android_inspect class_name nil end
[ "def", "page", "(", "opts", "=", "{", "}", ")", "class_name", "=", "opts", ".", "is_a?", "(", "Hash", ")", "?", "opts", ".", "fetch", "(", ":class", ",", "nil", ")", ":", "opts", "puts", "get_android_inspect", "class_name", "nil", "end" ]
Intended for use with console. Inspects and prints the current page. Will return XHTML for Web contexts because of a quirk with Nokogiri. @option class [Symbol] the class name to filter on. case insensitive include match. if nil (default) then all classes will be inspected @return [void]
[ "Intended", "for", "use", "with", "console", ".", "Inspects", "and", "prints", "the", "current", "page", ".", "Will", "return", "XHTML", "for", "Web", "contexts", "because", "of", "a", "quirk", "with", "Nokogiri", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L121-L125
train
appium/ruby_lib
lib/appium_lib/android/common/helper.rb
Appium.Android.ele_index
def ele_index(class_name, index) results = tags(class_name) if index == 'last()' index = results.length index -= 1 if index >= 0 else raise 'Index must be >= 1' unless index >= 1 index -= 1 if index >= 1 end # uiautomator has issues with index/instance so ...
ruby
def ele_index(class_name, index) results = tags(class_name) if index == 'last()' index = results.length index -= 1 if index >= 0 else raise 'Index must be >= 1' unless index >= 1 index -= 1 if index >= 1 end # uiautomator has issues with index/instance so ...
[ "def", "ele_index", "(", "class_name", ",", "index", ")", "results", "=", "tags", "(", "class_name", ")", "if", "index", "==", "'last()'", "index", "=", "results", ".", "length", "index", "-=", "1", "if", "index", ">=", "0", "else", "raise", "'Index must...
Find the element of type class_name at matching index. @param class_name [String] the class name to find @param index [Integer] the index @return [Element] the found element of type class_name
[ "Find", "the", "element", "of", "type", "class_name", "at", "matching", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L147-L161
train
appium/ruby_lib
lib/appium_lib/driver.rb
Appium.Driver.driver_attributes
def driver_attributes # rubocop:disable Layout/AlignHash { caps: @core.caps, automation_name: @core.automation_name, custom_url: @core.custom_url, export_session: @core.export_session, export_session_path: @core.export_session_path, ...
ruby
def driver_attributes # rubocop:disable Layout/AlignHash { caps: @core.caps, automation_name: @core.automation_name, custom_url: @core.custom_url, export_session: @core.export_session, export_session_path: @core.export_session_path, ...
[ "def", "driver_attributes", "# rubocop:disable Layout/AlignHash", "{", "caps", ":", "@core", ".", "caps", ",", "automation_name", ":", "@core", ".", "automation_name", ",", "custom_url", ":", "@core", ".", "custom_url", ",", "export_session", ":", "@core", ".", "e...
Returns a hash of the driver attributes
[ "Returns", "a", "hash", "of", "the", "driver", "attributes" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L273-L293
train
appium/ruby_lib
lib/appium_lib/driver.rb
Appium.Driver.appium_server_version
def appium_server_version @core.appium_server_version rescue Selenium::WebDriver::Error::WebDriverError => ex raise ::Appium::Core::Error::ServerError unless ex.message.include?('content-type=""') # server (TestObject for instance) does not respond to status call {} end
ruby
def appium_server_version @core.appium_server_version rescue Selenium::WebDriver::Error::WebDriverError => ex raise ::Appium::Core::Error::ServerError unless ex.message.include?('content-type=""') # server (TestObject for instance) does not respond to status call {} end
[ "def", "appium_server_version", "@core", ".", "appium_server_version", "rescue", "Selenium", "::", "WebDriver", "::", "Error", "::", "WebDriverError", "=>", "ex", "raise", "::", "Appium", "::", "Core", "::", "Error", "::", "ServerError", "unless", "ex", ".", "me...
Returns the server's version info @example { "build" => { "version" => "0.18.1", "revision" => "d242ebcfd92046a974347ccc3a28f0e898595198" } } @return [Hash]
[ "Returns", "the", "server", "s", "version", "info" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L375-L382
train
appium/ruby_lib
lib/appium_lib/driver.rb
Appium.Driver.start_driver
def start_driver(http_client_ops = { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 }) @core.quit_driver # If automationName is set only in server side, then the following automation_name should be nil before # starting driver. au...
ruby
def start_driver(http_client_ops = { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 }) @core.quit_driver # If automationName is set only in server side, then the following automation_name should be nil before # starting driver. au...
[ "def", "start_driver", "(", "http_client_ops", "=", "{", "http_client", ":", "::", "Appium", "::", "Http", "::", "Default", ".", "new", ",", "open_timeout", ":", "999_999", ",", "read_timeout", ":", "999_999", "}", ")", "@core", ".", "quit_driver", "# If aut...
Creates a new global driver and quits the old one if it exists. You can customise http_client as the following Read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device to understand more what the driver can call instance methods. @example require 'rubygems' require 'appium_lib' # pla...
[ "Creates", "a", "new", "global", "driver", "and", "quits", "the", "old", "one", "if", "it", "exists", ".", "You", "can", "customise", "http_client", "as", "the", "following" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L540-L558
train
appium/ruby_lib
lib/appium_lib/driver.rb
Appium.Driver.set_implicit_wait
def set_implicit_wait(wait) @driver.manage.timeouts.implicit_wait = wait rescue Selenium::WebDriver::Error::UnknownError => e unless e.message.include?('The operation requested is not yet implemented by Espresso driver') raise ::Appium::Core::Error::ServerError end {} end
ruby
def set_implicit_wait(wait) @driver.manage.timeouts.implicit_wait = wait rescue Selenium::WebDriver::Error::UnknownError => e unless e.message.include?('The operation requested is not yet implemented by Espresso driver') raise ::Appium::Core::Error::ServerError end {} end
[ "def", "set_implicit_wait", "(", "wait", ")", "@driver", ".", "manage", ".", "timeouts", ".", "implicit_wait", "=", "wait", "rescue", "Selenium", "::", "WebDriver", "::", "Error", "::", "UnknownError", "=>", "e", "unless", "e", ".", "message", ".", "include?...
To ignore error for Espresso Driver
[ "To", "ignore", "error", "for", "Espresso", "Driver" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L561-L569
train
appium/ruby_lib
lib/appium_lib/driver.rb
Appium.Driver.exists
def exists(pre_check = 0, post_check = @core.default_wait) # do not uset set_wait here. # it will cause problems with other methods reading the default_wait of 0 # which then gets converted to a 1 second wait. @driver.manage.timeouts.implicit_wait = pre_check # the element exists unless an...
ruby
def exists(pre_check = 0, post_check = @core.default_wait) # do not uset set_wait here. # it will cause problems with other methods reading the default_wait of 0 # which then gets converted to a 1 second wait. @driver.manage.timeouts.implicit_wait = pre_check # the element exists unless an...
[ "def", "exists", "(", "pre_check", "=", "0", ",", "post_check", "=", "@core", ".", "default_wait", ")", "# do not uset set_wait here.", "# it will cause problems with other methods reading the default_wait of 0", "# which then gets converted to a 1 second wait.", "@driver", ".", ...
Returns existence of element. Example: exists { button('sign in') } ? puts('true') : puts('false') @param [Integer] pre_check The amount in seconds to set the wait to before checking existence @param [Integer] post_check The amount in seconds to set the w...
[ "Returns", "existence", "of", "element", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L603-L621
train
appium/ruby_lib
lib/appium_lib/ios/element/textfield.rb
Appium.Ios.last_textfield
def last_textfield result = eles_by_json(_textfield_visible).last raise _no_such_element if result.nil? result end
ruby
def last_textfield result = eles_by_json(_textfield_visible).last raise _no_such_element if result.nil? result end
[ "def", "last_textfield", "result", "=", "eles_by_json", "(", "_textfield_visible", ")", ".", "last", "raise", "_no_such_element", "if", "result", ".", "nil?", "result", "end" ]
Find the last TextField. @return [TextField]
[ "Find", "the", "last", "TextField", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/textfield.rb#L75-L80
train
appium/ruby_lib
lib/appium_lib/common/helper.rb
Appium.Common.px_to_window_rel
def px_to_window_rel(opts = {}, driver = $driver) w = driver.window_size x = opts.fetch :x, 0 y = opts.fetch :y, 0 OpenStruct.new(x: "#{x.to_f} / #{w.width.to_f}", y: "#{y.to_f} / #{w.height.to_f}") end
ruby
def px_to_window_rel(opts = {}, driver = $driver) w = driver.window_size x = opts.fetch :x, 0 y = opts.fetch :y, 0 OpenStruct.new(x: "#{x.to_f} / #{w.width.to_f}", y: "#{y.to_f} / #{w.height.to_f}") end
[ "def", "px_to_window_rel", "(", "opts", "=", "{", "}", ",", "driver", "=", "$driver", ")", "w", "=", "driver", ".", "window_size", "x", "=", "opts", ".", "fetch", ":x", ",", "0", "y", "=", "opts", ".", "fetch", ":y", ",", "0", "OpenStruct", ".", ...
Converts pixel values to window relative values @example px_to_window_rel x: 50, y: 150 #=> #<OpenStruct x="50.0 / 375.0", y="150.0 / 667.0">
[ "Converts", "pixel", "values", "to", "window", "relative", "values" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L164-L171
train
appium/ruby_lib
lib/appium_lib/common/helper.rb
Appium.Common.xml_keys
def xml_keys(target) lazy_load_strings @lazy_load_strings.select { |key, _value| key.downcase.include? target.downcase } end
ruby
def xml_keys(target) lazy_load_strings @lazy_load_strings.select { |key, _value| key.downcase.include? target.downcase } end
[ "def", "xml_keys", "(", "target", ")", "lazy_load_strings", "@lazy_load_strings", ".", "select", "{", "|", "key", ",", "_value", "|", "key", ".", "downcase", ".", "include?", "target", ".", "downcase", "}", "end" ]
Search strings.xml's values for target. @param target [String] the target to search for in strings.xml values @return [Array]
[ "Search", "strings", ".", "xml", "s", "values", "for", "target", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L183-L186
train
appium/ruby_lib
lib/appium_lib/common/helper.rb
Appium.Common.xml_values
def xml_values(target) lazy_load_strings @lazy_load_strings.select { |_key, value| value.downcase.include? target.downcase } end
ruby
def xml_values(target) lazy_load_strings @lazy_load_strings.select { |_key, value| value.downcase.include? target.downcase } end
[ "def", "xml_values", "(", "target", ")", "lazy_load_strings", "@lazy_load_strings", ".", "select", "{", "|", "_key", ",", "value", "|", "value", ".", "downcase", ".", "include?", "target", ".", "downcase", "}", "end" ]
Search strings.xml's keys for target. @param target [String] the target to search for in strings.xml keys @return [Array]
[ "Search", "strings", ".", "xml", "s", "keys", "for", "target", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/helper.rb#L191-L194
train
appium/ruby_lib
lib/appium_lib/android/element/button.rb
Appium.Android.button
def button(value) # Don't use ele_index because that only works on one element type. # Android needs to combine button and image button to match iOS. if value.is_a? Numeric index = value raise "#{index} is not a valid index. Must be >= 1" if index <= 0 # 1 indexed retu...
ruby
def button(value) # Don't use ele_index because that only works on one element type. # Android needs to combine button and image button to match iOS. if value.is_a? Numeric index = value raise "#{index} is not a valid index. Must be >= 1" if index <= 0 # 1 indexed retu...
[ "def", "button", "(", "value", ")", "# Don't use ele_index because that only works on one element type.", "# Android needs to combine button and image button to match iOS.", "if", "value", ".", "is_a?", "Numeric", "index", "=", "value", "raise", "\"#{index} is not a valid index. Must...
backward compatibility Find the first button that contains value or by index. @param value [String, Integer] the value to exactly match. If int then the button at that index is returned. @return [BUTTON]
[ "backward", "compatibility", "Find", "the", "first", "button", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/button.rb#L27-L39
train
appium/ruby_lib
lib/appium_lib/android/element/button.rb
Appium.Android.last_button
def last_button # uiautomator index doesn't support last # and it's 0 indexed button_index = tags(BUTTON).length button_index -= 1 if button_index > 0 image_button_index = tags(IMAGE_BUTTON).length image_button_index -= 1 if image_button_index > 0 find_element :uiautomator, ...
ruby
def last_button # uiautomator index doesn't support last # and it's 0 indexed button_index = tags(BUTTON).length button_index -= 1 if button_index > 0 image_button_index = tags(IMAGE_BUTTON).length image_button_index -= 1 if image_button_index > 0 find_element :uiautomator, ...
[ "def", "last_button", "# uiautomator index doesn't support last", "# and it's 0 indexed", "button_index", "=", "tags", "(", "BUTTON", ")", ".", "length", "button_index", "-=", "1", "if", "button_index", ">", "0", "image_button_index", "=", "tags", "(", "IMAGE_BUTTON", ...
Find the last button. @return [BUTTON]
[ "Find", "the", "last", "button", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/button.rb#L59-L70
train
appium/ruby_lib
lib/appium_lib/ios/element/text.rb
Appium.Ios.text
def text(value) return ele_index static_text_class, value if value.is_a? Numeric ele_by_json_visible_contains static_text_class, value end
ruby
def text(value) return ele_index static_text_class, value if value.is_a? Numeric ele_by_json_visible_contains static_text_class, value end
[ "def", "text", "(", "value", ")", "return", "ele_index", "static_text_class", ",", "value", "if", "value", ".", "is_a?", "Numeric", "ele_by_json_visible_contains", "static_text_class", ",", "value", "end" ]
Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index. @param value [String, Integer] the value to find. If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned. @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
[ "Find", "the", "first", "UIAStaticText|XCUIElementTypeStaticText", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/text.rb#L33-L37
train
appium/ruby_lib
lib/appium_lib/android/element/generic.rb
Appium.Android.scroll_to
def scroll_to(text, scrollable_index = 0) text = %("#{text}") rid = resource_id(text, "new UiSelector().resourceId(#{text})") args = rid.empty? ? ["new UiSelector().textContains(#{text})", "new UiSelector().descriptionContains(#{text})"] : [rid] args.each_with_index do |arg, index| begi...
ruby
def scroll_to(text, scrollable_index = 0) text = %("#{text}") rid = resource_id(text, "new UiSelector().resourceId(#{text})") args = rid.empty? ? ["new UiSelector().textContains(#{text})", "new UiSelector().descriptionContains(#{text})"] : [rid] args.each_with_index do |arg, index| begi...
[ "def", "scroll_to", "(", "text", ",", "scrollable_index", "=", "0", ")", "text", "=", "%(\"#{text}\")", "rid", "=", "resource_id", "(", "text", ",", "\"new UiSelector().resourceId(#{text})\"", ")", "args", "=", "rid", ".", "empty?", "?", "[", "\"new UiSelector()...
Scroll to the first element containing target text or description. @param text [String] the text or resourceId to search for in the text value and content description @param scrollable_index [Integer] the index for scrollable views. @return [Element] the element scrolled to
[ "Scroll", "to", "the", "first", "element", "containing", "target", "text", "or", "description", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/generic.rb#L54-L66
train
appium/ruby_lib
lib/appium_lib/ios/common/helper.rb
Appium.Ios.page
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts source = get_source # current_context may be nil which breaks start_with if current_context && current_context.start_with?('WEBVIEW') parser = @android_html_parser ||= Nokogiri::HTML::SAX::Parser.new(App...
ruby
def page(opts = {}) class_name = opts.is_a?(Hash) ? opts.fetch(:class, nil) : opts source = get_source # current_context may be nil which breaks start_with if current_context && current_context.start_with?('WEBVIEW') parser = @android_html_parser ||= Nokogiri::HTML::SAX::Parser.new(App...
[ "def", "page", "(", "opts", "=", "{", "}", ")", "class_name", "=", "opts", ".", "is_a?", "(", "Hash", ")", "?", "opts", ".", "fetch", "(", ":class", ",", "nil", ")", ":", "opts", "source", "=", "get_source", "# current_context may be nil which breaks start...
Prints a string of interesting elements to the console. @example ```ruby page class: :UIAButton # filter on buttons page class: :UIAButton, window: 1 ``` @option visible [Symbol] visible value to filter on @option class [Symbol] class name to filter on @return [void]
[ "Prints", "a", "string", "of", "interesting", "elements", "to", "the", "console", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L73-L95
train
appium/ruby_lib
lib/appium_lib/ios/common/helper.rb
Appium.Ios.ele_index
def ele_index(class_name, index) raise 'Index must be >= 1' unless index == 'last()' || (index.is_a?(Integer) && index >= 1) elements = tags(class_name) if index == 'last()' result = elements.last else # elements array is 0 indexed index -= 1 result = elements[i...
ruby
def ele_index(class_name, index) raise 'Index must be >= 1' unless index == 'last()' || (index.is_a?(Integer) && index >= 1) elements = tags(class_name) if index == 'last()' result = elements.last else # elements array is 0 indexed index -= 1 result = elements[i...
[ "def", "ele_index", "(", "class_name", ",", "index", ")", "raise", "'Index must be >= 1'", "unless", "index", "==", "'last()'", "||", "(", "index", ".", "is_a?", "(", "Integer", ")", "&&", "index", ">=", "1", ")", "elements", "=", "tags", "(", "class_name"...
Get the element of type class_name at matching index. @param class_name [String] the class name to find @param index [Integer] the index @return [Element]
[ "Get", "the", "element", "of", "type", "class_name", "at", "matching", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L108-L124
train
appium/ruby_lib
lib/appium_lib/ios/common/helper.rb
Appium.Ios._all_pred
def _all_pred(opts) predicate = opts[:predicate] raise 'predicate must be provided' unless predicate visible = opts.fetch :visible, true %($.mainApp().getAllWithPredicate("#{predicate}", #{visible});) end
ruby
def _all_pred(opts) predicate = opts[:predicate] raise 'predicate must be provided' unless predicate visible = opts.fetch :visible, true %($.mainApp().getAllWithPredicate("#{predicate}", #{visible});) end
[ "def", "_all_pred", "(", "opts", ")", "predicate", "=", "opts", "[", ":predicate", "]", "raise", "'predicate must be provided'", "unless", "predicate", "visible", "=", "opts", ".", "fetch", ":visible", ",", "true", "%($.mainApp().getAllWithPredicate(\"#{predicate}\", #{...
predicate - the predicate to evaluate on the main app visible - if true, only visible elements are returned. default true
[ "predicate", "-", "the", "predicate", "to", "evaluate", "on", "the", "main", "app" ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L376-L382
train
appium/ruby_lib
lib/appium_lib/common/wait.rb
Appium.Common.wait_true
def wait_true(opts = {}) opts = opts.is_a?(Numeric) ? { timeout: opts } : opts if opts.is_a? Hash opts.empty? ? @core.wait_true { yield } : @core.wait_true(opts) { yield } else ::Appium::Logger.warn('Arguments should be Hash like {timeout: 100}') end end
ruby
def wait_true(opts = {}) opts = opts.is_a?(Numeric) ? { timeout: opts } : opts if opts.is_a? Hash opts.empty? ? @core.wait_true { yield } : @core.wait_true(opts) { yield } else ::Appium::Logger.warn('Arguments should be Hash like {timeout: 100}') end end
[ "def", "wait_true", "(", "opts", "=", "{", "}", ")", "opts", "=", "opts", ".", "is_a?", "(", "Numeric", ")", "?", "{", "timeout", ":", "opts", "}", ":", "opts", "if", "opts", ".", "is_a?", "Hash", "opts", ".", "empty?", "?", "@core", ".", "wait_t...
Check every interval seconds to see if yield returns a truthy value. Note this isn't a strict boolean true, any truthy value is accepted. false and nil are considered failures. Give up after timeout seconds. Wait code from the selenium Ruby gem https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8...
[ "Check", "every", "interval", "seconds", "to", "see", "if", "yield", "returns", "a", "truthy", "value", ".", "Note", "this", "isn", "t", "a", "strict", "boolean", "true", "any", "truthy", "value", "is", "accepted", ".", "false", "and", "nil", "are", "con...
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/common/wait.rb#L44-L52
train
appium/ruby_lib
lib/appium_lib/android/element/textfield.rb
Appium.Android.textfield
def textfield(value) return ele_index EDIT_TEXT, value if value.is_a? Numeric complex_find_contains EDIT_TEXT, value end
ruby
def textfield(value) return ele_index EDIT_TEXT, value if value.is_a? Numeric complex_find_contains EDIT_TEXT, value end
[ "def", "textfield", "(", "value", ")", "return", "ele_index", "EDIT_TEXT", ",", "value", "if", "value", ".", "is_a?", "Numeric", "complex_find_contains", "EDIT_TEXT", ",", "value", "end" ]
Find the first EditText that contains value or by index. @param value [String, Integer] the text to match exactly. If int then the EditText at that index is returned. @return [EDIT_TEXT]
[ "Find", "the", "first", "EditText", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/textfield.rb#L24-L28
train
appium/ruby_lib
lib/appium_lib/android/element/text.rb
Appium.Android.text
def text(value) return ele_index TEXT_VIEW, value if value.is_a? Numeric complex_find_contains TEXT_VIEW, value end
ruby
def text(value) return ele_index TEXT_VIEW, value if value.is_a? Numeric complex_find_contains TEXT_VIEW, value end
[ "def", "text", "(", "value", ")", "return", "ele_index", "TEXT_VIEW", ",", "value", "if", "value", ".", "is_a?", "Numeric", "complex_find_contains", "TEXT_VIEW", ",", "value", "end" ]
Find the first TextView that contains value or by index. @param value [String, Integer] the value to find. If int then the TextView at that index is returned. @return [TextView]
[ "Find", "the", "first", "TextView", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/text.rb#L25-L29
train
appium/ruby_lib
lib/appium_lib/ios/element/button.rb
Appium.Ios.button
def button(value) # return button at index. return ele_index button_class, value if value.is_a? Numeric ele_by_json_visible_contains button_class, value end
ruby
def button(value) # return button at index. return ele_index button_class, value if value.is_a? Numeric ele_by_json_visible_contains button_class, value end
[ "def", "button", "(", "value", ")", "# return button at index.", "return", "ele_index", "button_class", ",", "value", "if", "value", ".", "is_a?", "Numeric", "ele_by_json_visible_contains", "button_class", ",", "value", "end" ]
Find the first UIAButton|XCUIElementTypeButton that contains value or by index. @param value [String, Integer] the value to exactly match. If int then the UIAButton|XCUIElementTypeButton at that index is returned. @return [UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
[ "Find", "the", "first", "UIAButton|XCUIElementTypeButton", "that", "contains", "value", "or", "by", "index", "." ]
1f5898400dd1928bfe42ddd5f842d1f8738f2f76
https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/button.rb#L33-L38
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/population_criteria.rb
HQMF2.PopulationCriteria.setup_derived_entry_elements
def setup_derived_entry_elements(id_generator) @hqmf_id = attr_val('./*/cda:id/@root') || attr_val('./*/cda:typeId/@extension') @title = attr_val('./*/cda:code/cda:displayName/@value').try(:titleize) @type = attr_val('./*/cda:code/@code') @comments = @entry.xpath('./*/cda:text/cda:xml/cda:qdmUse...
ruby
def setup_derived_entry_elements(id_generator) @hqmf_id = attr_val('./*/cda:id/@root') || attr_val('./*/cda:typeId/@extension') @title = attr_val('./*/cda:code/cda:displayName/@value').try(:titleize) @type = attr_val('./*/cda:code/@code') @comments = @entry.xpath('./*/cda:text/cda:xml/cda:qdmUse...
[ "def", "setup_derived_entry_elements", "(", "id_generator", ")", "@hqmf_id", "=", "attr_val", "(", "'./*/cda:id/@root'", ")", "||", "attr_val", "(", "'./*/cda:typeId/@extension'", ")", "@title", "=", "attr_val", "(", "'./*/cda:code/cda:displayName/@value'", ")", ".", "t...
Handles extracting elements from the entry
[ "Handles", "extracting", "elements", "from", "the", "entry" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L42-L54
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/population_criteria.rb
HQMF2.PopulationCriteria.handle_preconditions
def handle_preconditions(id_generator) # Nest multiple preconditions under a single root precondition @preconditions = @entry.xpath('./*/cda:precondition[not(@nullFlavor)]', HQMF2::Document::NAMESPACES) .collect do |pre| precondition = Precondition.parse(pre, @doc, id_generato...
ruby
def handle_preconditions(id_generator) # Nest multiple preconditions under a single root precondition @preconditions = @entry.xpath('./*/cda:precondition[not(@nullFlavor)]', HQMF2::Document::NAMESPACES) .collect do |pre| precondition = Precondition.parse(pre, @doc, id_generato...
[ "def", "handle_preconditions", "(", "id_generator", ")", "# Nest multiple preconditions under a single root precondition", "@preconditions", "=", "@entry", ".", "xpath", "(", "'./*/cda:precondition[not(@nullFlavor)]'", ",", "HQMF2", "::", "Document", "::", "NAMESPACES", ")", ...
specifically handles extracting the preconditions for the population criteria
[ "specifically", "handles", "extracting", "the", "preconditions", "for", "the", "population", "criteria" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L57-L66
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/population_criteria.rb
HQMF2.PopulationCriteria.handle_observation_criteria
def handle_observation_criteria exp = @entry.at_xpath('./cda:measureObservationDefinition/cda:value/cda:expression/@value', HQMF2::Document::NAMESPACES) # Measure Observations criteria rely on computed expressions. If it doesn't have one, # then it is likely formatted impr...
ruby
def handle_observation_criteria exp = @entry.at_xpath('./cda:measureObservationDefinition/cda:value/cda:expression/@value', HQMF2::Document::NAMESPACES) # Measure Observations criteria rely on computed expressions. If it doesn't have one, # then it is likely formatted impr...
[ "def", "handle_observation_criteria", "exp", "=", "@entry", ".", "at_xpath", "(", "'./cda:measureObservationDefinition/cda:value/cda:expression/@value'", ",", "HQMF2", "::", "Document", "::", "NAMESPACES", ")", "# Measure Observations criteria rely on computed expressions. If it does...
extracts out any measure observation definitons, creating from them the proper criteria to generate a precondition
[ "extracts", "out", "any", "measure", "observation", "definitons", "creating", "from", "them", "the", "proper", "criteria", "to", "generate", "a", "precondition" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L69-L81
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/population_criteria.rb
HQMF2.PopulationCriteria.parse_parts_to_dc
def parse_parts_to_dc(parts) case parts.length when 1 # If there is only one part, it is a reference to an existing data criteria's value @doc.find_criteria_by_lvn(parts.first.strip.split('.')[0]) when 2 # If there are two parts, there is a computation performed, specifically t...
ruby
def parse_parts_to_dc(parts) case parts.length when 1 # If there is only one part, it is a reference to an existing data criteria's value @doc.find_criteria_by_lvn(parts.first.strip.split('.')[0]) when 2 # If there are two parts, there is a computation performed, specifically t...
[ "def", "parse_parts_to_dc", "(", "parts", ")", "case", "parts", ".", "length", "when", "1", "# If there is only one part, it is a reference to an existing data criteria's value", "@doc", ".", "find_criteria_by_lvn", "(", "parts", ".", "first", ".", "strip", ".", "split", ...
generates the value given in an expression based on the number of criteria it references.
[ "generates", "the", "value", "given", "in", "an", "expression", "based", "on", "the", "number", "of", "criteria", "it", "references", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L84-L107
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/population_criteria.rb
HQMF2.PopulationCriteria.conjunction_code
def conjunction_code case @type when HQMF::PopulationCriteria::IPP, HQMF::PopulationCriteria::DENOM, HQMF::PopulationCriteria::NUMER, HQMF::PopulationCriteria::MSRPOPL, HQMF::PopulationCriteria::STRAT HQMF::Precondition::ALL_TRUE when HQMF::PopulationCriteria::DENEXCEP, HQMF::Popula...
ruby
def conjunction_code case @type when HQMF::PopulationCriteria::IPP, HQMF::PopulationCriteria::DENOM, HQMF::PopulationCriteria::NUMER, HQMF::PopulationCriteria::MSRPOPL, HQMF::PopulationCriteria::STRAT HQMF::Precondition::ALL_TRUE when HQMF::PopulationCriteria::DENEXCEP, HQMF::Popula...
[ "def", "conjunction_code", "case", "@type", "when", "HQMF", "::", "PopulationCriteria", "::", "IPP", ",", "HQMF", "::", "PopulationCriteria", "::", "DENOM", ",", "HQMF", "::", "PopulationCriteria", "::", "NUMER", ",", "HQMF", "::", "PopulationCriteria", "::", "M...
Get the conjunction code, ALL_TRUE or AT_LEAST_ONE_TRUE @return [String] conjunction code
[ "Get", "the", "conjunction", "code", "ALL_TRUE", "or", "AT_LEAST_ONE_TRUE" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/population_criteria.rb#L115-L126
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/types.rb
HQMF2.Value.inclusive_temporal_ref?
def inclusive_temporal_ref? # FIXME: NINF is used instead of 0 sometimes...? (not in the IG) # FIXME: Given nullFlavor, but IG uses it and nullValue everywhere... less_than_equal_tr = attr_val('../@highClosed') == 'true' && (attr_val('../cda:low/@value') == '0' || attr_val('...
ruby
def inclusive_temporal_ref? # FIXME: NINF is used instead of 0 sometimes...? (not in the IG) # FIXME: Given nullFlavor, but IG uses it and nullValue everywhere... less_than_equal_tr = attr_val('../@highClosed') == 'true' && (attr_val('../cda:low/@value') == '0' || attr_val('...
[ "def", "inclusive_temporal_ref?", "# FIXME: NINF is used instead of 0 sometimes...? (not in the IG)", "# FIXME: Given nullFlavor, but IG uses it and nullValue everywhere...", "less_than_equal_tr", "=", "attr_val", "(", "'../@highClosed'", ")", "==", "'true'", "&&", "(", "attr_val", "("...
Check whether the temporal reference should be marked as inclusive
[ "Check", "whether", "the", "temporal", "reference", "should", "be", "marked", "as", "inclusive" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L47-L56
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/types.rb
HQMF2.Value.inclusive_length_of_stay?
def inclusive_length_of_stay? # lengthOfStay - EH111, EH108 less_than_equal_los = attr_val('../cda:low/@nullFlavor') == 'NINF' && attr_val('../@highClosed') != 'false' greater_than_equal_los = attr_val('../cda:high/@nullFlavor') == 'PINF' && ...
ruby
def inclusive_length_of_stay? # lengthOfStay - EH111, EH108 less_than_equal_los = attr_val('../cda:low/@nullFlavor') == 'NINF' && attr_val('../@highClosed') != 'false' greater_than_equal_los = attr_val('../cda:high/@nullFlavor') == 'PINF' && ...
[ "def", "inclusive_length_of_stay?", "# lengthOfStay - EH111, EH108", "less_than_equal_los", "=", "attr_val", "(", "'../cda:low/@nullFlavor'", ")", "==", "'NINF'", "&&", "attr_val", "(", "'../@highClosed'", ")", "!=", "'false'", "greater_than_equal_los", "=", "attr_val", "("...
Check whether the length of stay should be inclusive.
[ "Check", "whether", "the", "length", "of", "stay", "should", "be", "inclusive", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L59-L68
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/types.rb
HQMF2.Range.generate_any_value?
def generate_any_value?(lm, hm) (lm.nil? || lm.is_a?(HQMF::AnyValue)) && (hm.nil? || hm.is_a?(HQMF::AnyValue)) end
ruby
def generate_any_value?(lm, hm) (lm.nil? || lm.is_a?(HQMF::AnyValue)) && (hm.nil? || hm.is_a?(HQMF::AnyValue)) end
[ "def", "generate_any_value?", "(", "lm", ",", "hm", ")", "(", "lm", ".", "nil?", "||", "lm", ".", "is_a?", "(", "HQMF", "::", "AnyValue", ")", ")", "&&", "(", "hm", ".", "nil?", "||", "hm", ".", "is_a?", "(", "HQMF", "::", "AnyValue", ")", ")", ...
Check if are only AnyValue elements for low and high
[ "Check", "if", "are", "only", "AnyValue", "elements", "for", "low", "and", "high" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L153-L155
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb
HQMF2.DocumentPopulationHelper.remove_population_preconditions
def remove_population_preconditions(doc) # population sections pop_ids = doc.xpath("//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id", HQMF2::Document::NAMESPACES) # find the population entries and get their ids pop_ids.each do |p_id| doc...
ruby
def remove_population_preconditions(doc) # population sections pop_ids = doc.xpath("//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id", HQMF2::Document::NAMESPACES) # find the population entries and get their ids pop_ids.each do |p_id| doc...
[ "def", "remove_population_preconditions", "(", "doc", ")", "# population sections", "pop_ids", "=", "doc", ".", "xpath", "(", "\"//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id\"", ",", "HQMF2", "::", "Document", "::", "NAMESPACES", ")", "# find the p...
If a precondition references a population, remove it
[ "If", "a", "precondition", "references", "a", "population", "remove", "it" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L21-L30
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb
HQMF2.DocumentPopulationHelper.extract_observations
def extract_observations has_observation = false # look for observation data in separate section but create a population for it if it exists observation_section = @doc.xpath('/cda:QualityMeasureDocument/cda:component/cda:measureObservationSection', HQMF2::Documen...
ruby
def extract_observations has_observation = false # look for observation data in separate section but create a population for it if it exists observation_section = @doc.xpath('/cda:QualityMeasureDocument/cda:component/cda:measureObservationSection', HQMF2::Documen...
[ "def", "extract_observations", "has_observation", "=", "false", "# look for observation data in separate section but create a population for it if it exists", "observation_section", "=", "@doc", ".", "xpath", "(", "'/cda:QualityMeasureDocument/cda:component/cda:measureObservationSection'", ...
Extracts the measure observations, will return true if one exists
[ "Extracts", "the", "measure", "observations", "will", "return", "true", "if", "one", "exists" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L64-L89
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb
HQMF2.DocumentPopulationHelper.handle_base_populations
def handle_base_populations(population_def, population) { HQMF::PopulationCriteria::IPP => 'initialPopulationCriteria', HQMF::PopulationCriteria::DENOM => 'denominatorCriteria', HQMF::PopulationCriteria::NUMER => 'numeratorCriteria', HQMF::PopulationCriteria::NUMEX => 'numeratorExc...
ruby
def handle_base_populations(population_def, population) { HQMF::PopulationCriteria::IPP => 'initialPopulationCriteria', HQMF::PopulationCriteria::DENOM => 'denominatorCriteria', HQMF::PopulationCriteria::NUMER => 'numeratorCriteria', HQMF::PopulationCriteria::NUMEX => 'numeratorExc...
[ "def", "handle_base_populations", "(", "population_def", ",", "population", ")", "{", "HQMF", "::", "PopulationCriteria", "::", "IPP", "=>", "'initialPopulationCriteria'", ",", "HQMF", "::", "PopulationCriteria", "::", "DENOM", "=>", "'denominatorCriteria'", ",", "HQM...
Builds populations based an a predfined set of expected populations
[ "Builds", "populations", "based", "an", "a", "predfined", "set", "of", "expected", "populations" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L92-L108
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb
HQMF2.DocumentPopulationHelper.handle_stratifications
def handle_stratifications(population_def, number_of_populations, population, id_def, population_index) # handle stratifications (EP137, EP155) stratifier_criteria_xpath = "cda:component/cda:stratifierCriteria[not(cda:component/cda:measureAttribute/cda:code[@code = 'SDE'])]/.." population_def.xpath(s...
ruby
def handle_stratifications(population_def, number_of_populations, population, id_def, population_index) # handle stratifications (EP137, EP155) stratifier_criteria_xpath = "cda:component/cda:stratifierCriteria[not(cda:component/cda:measureAttribute/cda:code[@code = 'SDE'])]/.." population_def.xpath(s...
[ "def", "handle_stratifications", "(", "population_def", ",", "number_of_populations", ",", "population", ",", "id_def", ",", "population_index", ")", "# handle stratifications (EP137, EP155)", "stratifier_criteria_xpath", "=", "\"cda:component/cda:stratifierCriteria[not(cda:component...
Generate the stratifications of populations, if any exist
[ "Generate", "the", "stratifications", "of", "populations", "if", "any", "exist" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L111-L133
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb
HQMF2.DocumentPopulationHelper.build_population_criteria
def build_population_criteria(criteria_def, criteria_id, population) criteria = PopulationCriteria.new(criteria_def, @document, @id_generator) # check to see if we have an identical population criteria. # this can happen since the hqmf 2.0 will export a DENOM, NUMER, etc for each population, even if ...
ruby
def build_population_criteria(criteria_def, criteria_id, population) criteria = PopulationCriteria.new(criteria_def, @document, @id_generator) # check to see if we have an identical population criteria. # this can happen since the hqmf 2.0 will export a DENOM, NUMER, etc for each population, even if ...
[ "def", "build_population_criteria", "(", "criteria_def", ",", "criteria_id", ",", "population", ")", "criteria", "=", "PopulationCriteria", ".", "new", "(", "criteria_def", ",", "@document", ",", "@id_generator", ")", "# check to see if we have an identical population crite...
Method to generate the criteria defining a population
[ "Method", "to", "generate", "the", "criteria", "defining", "a", "population" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L136-L162
train
projectcypress/health-data-standards
lib/hqmf-parser/1.0/document.rb
HQMF1.Document.backfill_derived_code_lists
def backfill_derived_code_lists data_criteria_by_id = {} @data_criteria.each {|criteria| data_criteria_by_id[criteria.id] = criteria} @data_criteria.each do |criteria| if (criteria.derived_from) derived_from = data_criteria_by_id[criteria.derived_from] criteria.definition =...
ruby
def backfill_derived_code_lists data_criteria_by_id = {} @data_criteria.each {|criteria| data_criteria_by_id[criteria.id] = criteria} @data_criteria.each do |criteria| if (criteria.derived_from) derived_from = data_criteria_by_id[criteria.derived_from] criteria.definition =...
[ "def", "backfill_derived_code_lists", "data_criteria_by_id", "=", "{", "}", "@data_criteria", ".", "each", "{", "|", "criteria", "|", "data_criteria_by_id", "[", "criteria", ".", "id", "]", "=", "criteria", "}", "@data_criteria", ".", "each", "do", "|", "criteri...
if the data criteria is derived from another criteria, then we want to grab the properties from the derived criteria this is typically the case with Occurrence A, Occurrence B type data criteria
[ "if", "the", "data", "criteria", "is", "derived", "from", "another", "criteria", "then", "we", "want", "to", "grab", "the", "properties", "from", "the", "derived", "criteria", "this", "is", "typically", "the", "case", "with", "Occurrence", "A", "Occurrence", ...
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/1.0/document.rb#L132-L143
train
projectcypress/health-data-standards
lib/hqmf-parser/converter/pass1/population_criteria_converter.rb
HQMF.PopulationCriteriaConverter.get_unmatched_population_keys
def get_unmatched_population_keys(target, source) return [] if target.length == source.length all_target_keys = target.values.map(&:id) with_ref_keys = source.values.map(&:id).map {|key| @population_criteria_by_id[@population_reference[key]].id if @population_criteria_by_id[@population_reference[key]]...
ruby
def get_unmatched_population_keys(target, source) return [] if target.length == source.length all_target_keys = target.values.map(&:id) with_ref_keys = source.values.map(&:id).map {|key| @population_criteria_by_id[@population_reference[key]].id if @population_criteria_by_id[@population_reference[key]]...
[ "def", "get_unmatched_population_keys", "(", "target", ",", "source", ")", "return", "[", "]", "if", "target", ".", "length", "==", "source", ".", "length", "all_target_keys", "=", "target", ".", "values", ".", "map", "(", ":id", ")", "with_ref_keys", "=", ...
source are things like exceptions or exclusions, target are IPP, or denom we want to find any denoms or IPPs that do not have exceptions or exclusions
[ "source", "are", "things", "like", "exceptions", "or", "exclusions", "target", "are", "IPP", "or", "denom", "we", "want", "to", "find", "any", "denoms", "or", "IPPs", "that", "do", "not", "have", "exceptions", "or", "exclusions" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/converter/pass1/population_criteria_converter.rb#L115-L122
train
projectcypress/health-data-standards
lib/hqmf-parser/converter/pass1/population_criteria_converter.rb
HQMF.PopulationCriteriaConverter.apply_to_submeasures
def apply_to_submeasures(subs, type, values, unpaired_type=nil, unpaired_keys=[]) new_subs = [] subs.each do |sub| # this unless prevents us from forcing an exclusion or excepion onto a measure that has a submeasure without # an exclusion or exception, but other populations with an exclusion...
ruby
def apply_to_submeasures(subs, type, values, unpaired_type=nil, unpaired_keys=[]) new_subs = [] subs.each do |sub| # this unless prevents us from forcing an exclusion or excepion onto a measure that has a submeasure without # an exclusion or exception, but other populations with an exclusion...
[ "def", "apply_to_submeasures", "(", "subs", ",", "type", ",", "values", ",", "unpaired_type", "=", "nil", ",", "unpaired_keys", "=", "[", "]", ")", "new_subs", "=", "[", "]", "subs", ".", "each", "do", "|", "sub", "|", "# this unless prevents us from forcing...
create a copy of each submeasre adding on the new values of the given type skip the unpaired values. Unpaired values are denominators without exclusions or populations without exceptions
[ "create", "a", "copy", "of", "each", "submeasre", "adding", "on", "the", "new", "values", "of", "the", "given", "type", "skip", "the", "unpaired", "values", ".", "Unpaired", "values", "are", "denominators", "without", "exclusions", "or", "populations", "withou...
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/converter/pass1/population_criteria_converter.rb#L126-L147
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document.rb
HQMF2.Document.setup_default_values
def setup_default_values(hqmf_contents, use_default_measure_period) @id_generator = IdGenerator.new @doc = @entry = Document.parse(hqmf_contents) @id = attr_val('cda:QualityMeasureDocument/cda:id/@extension') || attr_val('cda:QualityMeasureDocument/cda:id/@root').upcase @hqmf_set_id...
ruby
def setup_default_values(hqmf_contents, use_default_measure_period) @id_generator = IdGenerator.new @doc = @entry = Document.parse(hqmf_contents) @id = attr_val('cda:QualityMeasureDocument/cda:id/@extension') || attr_val('cda:QualityMeasureDocument/cda:id/@root').upcase @hqmf_set_id...
[ "def", "setup_default_values", "(", "hqmf_contents", ",", "use_default_measure_period", ")", "@id_generator", "=", "IdGenerator", ".", "new", "@doc", "=", "@entry", "=", "Document", ".", "parse", "(", "hqmf_contents", ")", "@id", "=", "attr_val", "(", "'cda:Qualit...
Handles setup of the base values of the document, defined here as ones that are either obtained from the xml directly or with limited parsing
[ "Handles", "setup", "of", "the", "base", "values", "of", "the", "document", "defined", "here", "as", "ones", "that", "are", "either", "obtained", "from", "the", "xml", "directly", "or", "with", "limited", "parsing" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L120-L150
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document.rb
HQMF2.Document.handle_attribute_code
def handle_attribute_code(attribute, code, name) null_flavor = attribute.at_xpath('./cda:code/@nullFlavor', NAMESPACES).try(:value) o_text = attribute.at_xpath('./cda:code/cda:originalText/@value', NAMESPACES).try(:value) code_obj = HQMF::Coded.new(attribute.at_xpath('./cda:code/@xsi:type', NAMESPACES...
ruby
def handle_attribute_code(attribute, code, name) null_flavor = attribute.at_xpath('./cda:code/@nullFlavor', NAMESPACES).try(:value) o_text = attribute.at_xpath('./cda:code/cda:originalText/@value', NAMESPACES).try(:value) code_obj = HQMF::Coded.new(attribute.at_xpath('./cda:code/@xsi:type', NAMESPACES...
[ "def", "handle_attribute_code", "(", "attribute", ",", "code", ",", "name", ")", "null_flavor", "=", "attribute", ".", "at_xpath", "(", "'./cda:code/@nullFlavor'", ",", "NAMESPACES", ")", ".", "try", "(", ":value", ")", "o_text", "=", "attribute", ".", "at_xpa...
Extracts the code used by a particular attribute
[ "Extracts", "the", "code", "used", "by", "a", "particular", "attribute" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L201-L212
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document.rb
HQMF2.Document.handle_attribute_value
def handle_attribute_value(attribute, value) type = attribute.at_xpath('./cda:value/@xsi:type', NAMESPACES).try(:value) case type when 'II' if value.nil? value = attribute.at_xpath('./cda:value/@extension', NAMESPACES).try(:value) end HQMF::Identifier.new(type, ...
ruby
def handle_attribute_value(attribute, value) type = attribute.at_xpath('./cda:value/@xsi:type', NAMESPACES).try(:value) case type when 'II' if value.nil? value = attribute.at_xpath('./cda:value/@extension', NAMESPACES).try(:value) end HQMF::Identifier.new(type, ...
[ "def", "handle_attribute_value", "(", "attribute", ",", "value", ")", "type", "=", "attribute", ".", "at_xpath", "(", "'./cda:value/@xsi:type'", ",", "NAMESPACES", ")", ".", "try", "(", ":value", ")", "case", "type", "when", "'II'", "if", "value", ".", "nil?...
Extracts the value used by a particular attribute
[ "Extracts", "the", "value", "used", "by", "a", "particular", "attribute" ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L215-L236
train
projectcypress/health-data-standards
lib/hqmf-parser/2.0/document.rb
HQMF2.Document.handle_specific_source_data_criteria_reference
def handle_specific_source_data_criteria_reference(criteria) original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria) updated_sdc = find(@source_data_criteria, :id, criteria.id) if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.speci...
ruby
def handle_specific_source_data_criteria_reference(criteria) original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria) updated_sdc = find(@source_data_criteria, :id, criteria.id) if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.speci...
[ "def", "handle_specific_source_data_criteria_reference", "(", "criteria", ")", "original_sdc", "=", "find", "(", "@source_data_criteria", ",", ":id", ",", "criteria", ".", "source_data_criteria", ")", "updated_sdc", "=", "find", "(", "@source_data_criteria", ",", ":id",...
For specific occurrence data criteria, make sure the source data criteria reference points to the correct source data criteria.
[ "For", "specific", "occurrence", "data", "criteria", "make", "sure", "the", "source", "data", "criteria", "reference", "points", "to", "the", "correct", "source", "data", "criteria", "." ]
252d4f0927c513eacde6b9ea41b76faa1423c34b
https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L289-L301
train